edu.cmu.emulator.wlandev
Class MadwifiNGDevice

java.lang.Object
  extended by edu.cmu.emulator.wlandev.WLANDevice
      extended by edu.cmu.emulator.wlandev.MadwifiNGDevice

public class MadwifiNGDevice
extends WLANDevice


Field Summary
protected  boolean bOnly
           
static double[] bRates
           
static String BRIDGE_DEV_NAME
           
protected  boolean bridgeAP
           
protected  String bridgeDevName
           
static String DEV_NAME
           
protected  boolean fastProbeEnabled
           
protected  RemoteProcess fpRelayReceiverProc
           
protected  RemoteProcess fpRelaySenderProc
           
static double[] gRates
           
protected static long IWCONFIG_RETRY_INTERVAL
           
static int M_B
           
static int M_BG
           
static int M_BRIDGE_AP
           
static int M_ENHANCED_ROAM
           
static int M_FAST_PROBE
           
protected static int MAX_IWCONFIG_RETRIES
           
protected static long MSG_TIMEOUT_MILLIS
           
static String VLAN_BASE_DEV_NAME
           
static String VLAN_DEV_NAME
           
static int VLAN_NUM
           
protected  String vlanBaseDevName
           
protected  String vlanDevName
           
protected  int vlanNum
           
 
Fields inherited from class edu.cmu.emulator.wlandev.WLANDevice
channel, dComm, devName, emuNode, essid, ip, mac, macToEmuNodeMap, prefix, txRateMbps, useSudo
 
Constructor Summary
MadwifiNGDevice(EmuNode emuNode, DaemonCommunicator dComm, byte[] ip, String essid, int channel)
          Construct a MadwifiNGDevice.
MadwifiNGDevice(EmuNode emuNode, DaemonCommunicator dComm, byte[] ip, String essid, int channel, int flags)
           
 
Method Summary
 void adHocMode()
          Sets the device into ad hoc mode using the current desired essid and channel.
 void adHocMode(String essid, int channel)
          Sets the device into ad hoc mode with the given essid and channel.
 void apMode()
          Sets the device into AP mode using the current desired essid and channel.
 void apMode(String essid, int channel)
          Sets the device into AP mode with the given essid and channel.
 void create()
          Creates a the device.
protected  void createBridgeInfrastructure()
           
 void destroy()
          Destroys the device.
protected  void destroyBridgeInfrastructure()
           
protected  void diversityOff()
           
protected  void fpRelayStart()
           
protected  void fpRelayStop()
           
 gmj.net.PhysicalAddress getBSSID()
          Get the BSSID reported by iwconfig.
 int getSignalLevel()
          Get the current signal level reported by iwconfig.
 void ifconfig()
          Set the actual device ip address to the desired ip using ifconfig.
 void managedMode()
          Sets the device into managed mode using the current desired essid and channel.
 void managedMode(String essid, int channel)
          Sets the device into managed mode with the given essid and channel.
 
Methods inherited from class edu.cmu.emulator.wlandev.WLANDevice
determineMAC, getDevName, getEmuNodeFromMAC, getIP, getMAC, ifconfigToArrayList, iwconfig, iwconfig, iwconfigToArrayList, setTxRate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

fpRelaySenderProc

protected RemoteProcess fpRelaySenderProc

fpRelayReceiverProc

protected RemoteProcess fpRelayReceiverProc

fastProbeEnabled

protected boolean fastProbeEnabled

bridgeAP

protected boolean bridgeAP

bridgeDevName

protected String bridgeDevName

vlanDevName

protected String vlanDevName

vlanBaseDevName

protected String vlanBaseDevName

vlanNum

protected int vlanNum

bOnly

protected boolean bOnly

gRates

public static final double[] gRates

bRates

public static final double[] bRates

DEV_NAME

public static String DEV_NAME

BRIDGE_DEV_NAME

public static String BRIDGE_DEV_NAME

VLAN_BASE_DEV_NAME

public static String VLAN_BASE_DEV_NAME

VLAN_NUM

public static int VLAN_NUM

VLAN_DEV_NAME

public static String VLAN_DEV_NAME

MSG_TIMEOUT_MILLIS

protected static final long MSG_TIMEOUT_MILLIS
See Also:
Constant Field Values

MAX_IWCONFIG_RETRIES

protected static final int MAX_IWCONFIG_RETRIES
See Also:
Constant Field Values

IWCONFIG_RETRY_INTERVAL

protected static final long IWCONFIG_RETRY_INTERVAL
See Also:
Constant Field Values

M_FAST_PROBE

public static final int M_FAST_PROBE
See Also:
Constant Field Values

M_ENHANCED_ROAM

public static final int M_ENHANCED_ROAM
See Also:
Constant Field Values

M_BRIDGE_AP

public static final int M_BRIDGE_AP
See Also:
Constant Field Values

M_B

public static final int M_B
See Also:
Constant Field Values

M_BG

public static final int M_BG
See Also:
Constant Field Values
Constructor Detail

MadwifiNGDevice

public MadwifiNGDevice(EmuNode emuNode,
                       DaemonCommunicator dComm,
                       byte[] ip,
                       String essid,
                       int channel)
Construct a MadwifiNGDevice.

Parameters:
emuNode - the emuNode for the device
dComm - the dComm running on the node
ip - the desired ip for the device
essid - the desired essid
channel - the desired channel

MadwifiNGDevice

public MadwifiNGDevice(EmuNode emuNode,
                       DaemonCommunicator dComm,
                       byte[] ip,
                       String essid,
                       int channel,
                       int flags)
Method Detail

apMode

public void apMode(String essid,
                   int channel)
Sets the device into AP mode with the given essid and channel.

Specified by:
apMode in class WLANDevice
Parameters:
essid - the new essid
channel - the new channel

apMode

public void apMode()
Sets the device into AP mode using the current desired essid and channel.


destroyBridgeInfrastructure

protected void destroyBridgeInfrastructure()

createBridgeInfrastructure

protected void createBridgeInfrastructure()

ifconfig

public void ifconfig()
Set the actual device ip address to the desired ip using ifconfig. If bridging, destroy any existing bridge and create a new one.

Overrides:
ifconfig in class WLANDevice

managedMode

public void managedMode(String essid,
                        int channel)
Sets the device into managed mode with the given essid and channel.

Specified by:
managedMode in class WLANDevice
Parameters:
essid - the new essid
channel - the channel to begin searching on

managedMode

public void managedMode()
Sets the device into managed mode using the current desired essid and channel.


adHocMode

public void adHocMode(String essid,
                      int channel)
Sets the device into ad hoc mode with the given essid and channel.

Specified by:
adHocMode in class WLANDevice
Parameters:
essid - the new essid
channel - the new channel

adHocMode

public void adHocMode()
Sets the device into ad hoc mode using the current desired essid and channel.


create

public void create()
Creates a the device. Must be called before device can be used.

Specified by:
create in class WLANDevice

destroy

public void destroy()
Destroys the device.

Specified by:
destroy in class WLANDevice

diversityOff

protected void diversityOff()

fpRelayStart

protected void fpRelayStart()

fpRelayStop

protected void fpRelayStop()

getBSSID

public gmj.net.PhysicalAddress getBSSID()
Get the BSSID reported by iwconfig.

Specified by:
getBSSID in class WLANDevice
Returns:
the bssid

getSignalLevel

public int getSignalLevel()
Get the current signal level reported by iwconfig. NOTE: in many cases this value is an average.

Specified by:
getSignalLevel in class WLANDevice


Copyright © 2013. All Rights Reserved.