Compound Module WirelessHost

Package: inet.nodes.wireless
File: src/nodes/wireless/WirelessHost.ned

Models a host with one wireless (802.11b) card in infrastructure mode. This module is basically a StandardHost with an Ieee80211NicSTA added. It should be used in conjunction with WirelessAP, or any other AP model which contains Ieee80211NicAP.

See also: WirelessAP, WirelessAPSimplified, WirelessAPWithEth, WirelessAPWithEthSimplified

See also: WirelessHost, WirelessHostSimplified

See also: MobileHost, MFMobileHost

NotificationBoard InterfaceTable RoutingTable TCPApp TCP UDPApp UDP PingApp NetworkLayer PPPInterface EthernetInterface Ieee80211NicSTA BasicMobility

Usage diagram:

The following diagram shows usage relationships between types. Unresolved types are missing from the diagram.

Inheritance diagram:

The following diagram shows inheritance relationships for this type. Unresolved types are missing from the diagram.

Networks:

Name Type Description
HandoverNetwork network (no description)

Parameters:

Name Type Default value Description
numTcpApps int 0
numUdpApps int 0
tcpAppType string ""
udpAppType string ""
IPForward bool false
routingFile string ""
mobilityType string "NullMobility"

Properties:

Name Value Description
node
labels node
display i=device/wifilaptop

Gates:

Name Direction Size Description
pppg [ ] inout
ethg [ ] inout
radioIn input

Unassigned submodule parameters:

Name Type Default value Description
tcp.advertisedWindow int 14*this.mss

in bytes, corresponds with the maximal receiver buffer capacity (Note: normally, NIC queues should be at least this size)

tcp.delayedAcksEnabled bool false

delayed ACK algorithm (RFC 1122) enabled/disabled

tcp.nagleEnabled bool true

Nagle's algorithm (RFC 896) enabled/disabled

tcp.limitedTransmitEnabled bool false

Limited Transmit algorithm (RFC 3042) enabled/disabled (can be used for TCPReno/TCPTahoe/TCPNewReno/TCPNoCongestionControl)

tcp.increasedIWEnabled bool false

Increased Initial Window (RFC 3390) enabled/disabled

tcp.sackSupport bool false

Selective Acknowledgment (RFC 2018, 2883, 3517) support (header option) (SACK will be enabled for a connection if both endpoints support it)

tcp.windowScalingSupport bool false

Window Scale (RFC 1323) support (header option) (WS will be enabled for a connection if both endpoints support it)

tcp.timestampSupport bool false

Timestamps (RFC 1323) support (header option) (TS will be enabled for a connection if both endpoints support it)

tcp.mss int 536

Maximum Segment Size (RFC 793) (header option)

tcp.tcpAlgorithmClass string "TCPReno"

TCPReno/TCPTahoe/TCPNewReno/TCPNoCongestionControl/DumbTCP

tcp.sendQueueClass string "TCPVirtualDataSendQueue"

TCPVirtualDataSendQueue/TCPMsgBasedSendQueue

tcp.receiveQueueClass string "TCPVirtualDataRcvQueue"

TCPVirtualDataRcvQueue/TCPMsgBasedRcvQueue

tcp.recordStats bool true

recording of seqNum etc. into output vectors enabled/disabled

pingApp.destAddr string ""

destination IP or IPv6 address

pingApp.srcAddr string ""

source IP or IPv6 address (useful with multi-homing)

pingApp.packetSize double 56B

of ping payload, in bytes

pingApp.interval double 1s

time to wait between pings (can be random)

pingApp.hopLimit double 32

TTL or hopLimit for IP packets

pingApp.count double 0

stop after count ping requests, 0 means continuously

pingApp.startTime double uniform(0s,this.interval)

send first ping at startTime

pingApp.stopTime double 0s

send no pings after stopTime, 0 means forever

pingApp.printPing bool true

dump on stdout

networkLayer.ip.procDelay double 0s
networkLayer.arp.retryTimeout double 1s

number seconds ARP waits between retries to resolve an IP address

networkLayer.arp.retryCount int 3

number of times ARP will attempt to resolve an IP address

networkLayer.arp.cacheTimeout double 120s

number seconds unused entries in the cache will time out

ppp.ppp.mtu int 4470
eth.mac.promiscuous bool false

if true, all packets are received, otherwise only the ones with matching destination MAC address

eth.mac.address string "auto"

MAC address as hex string (12 hex digits), or "auto". "auto" values will be replaced by a generated MAC address in init stage 0.

eth.mac.txrate double 100Mbps

maximum data rate supported by this station (bit/s); actually chosen speed may be lower due to auto- configuration. 0 means fully auto-configured.

eth.mac.duplexEnabled bool true

whether duplex mode can be enabled or not; whether MAC will actually use duplex mode depends on the result of the auto-configuration process (duplex is only possible with DTE-to-DTE connection).

eth.mac.mtu int 1500
wlan.agent.activeScan bool true

selects between active and passive scanning

wlan.agent.channelsToScan string ""

list of channel numbers to scan (space delimited); empty means all channels

wlan.agent.probeDelay double

delay before sending a probe request during active scanning

wlan.agent.minChannelTime double

min interval to spend on a channel during active scanning

wlan.agent.maxChannelTime double

channel time for passive scanning, and max channel time for active scanning

wlan.agent.authenticationTimeout double 5s

timeout for the authentication procedure

wlan.agent.associationTimeout double 5s

timeout for the association procedure

wlan.mgmt.frameCapacity int 100

maximum queue length

wlan.mac.address string "auto"

MAC address as hex string (12 hex digits), or "auto". "auto" values will be replaced by a generated MAC address in init stage 0.

wlan.mac.maxQueueSize int

max queue length in frames; only used if queueModule==""

wlan.mac.bitrate double
wlan.mac.rtsThresholdBytes int 2346B

longer messages will be sent using RTS/CTS

wlan.mac.retryLimit int -1

maximum number of retries per message, -1 means default

wlan.mac.cwMinData int -1

contention window for normal data frames, -1 means default

wlan.mac.cwMinBroadcast int -1

contention window for broadcast messages, -1 means default

wlan.mac.mtu int 1500
wlan.radio.channelNumber int 0

channel identifier

wlan.radio.transmitterPower double 20mW

power used for transmission of messages (in mW)

wlan.radio.bitrate double

(in bits/s)

wlan.radio.thermalNoise double -110dBm

base noise level (dBm)

wlan.radio.pathLossAlpha double 2

used by the path loss calculation

wlan.radio.shadowingDeviation double 0dB

used by the shadowing model calculation

wlan.radio.snirThreshold double 4dB

if signal-noise ratio is below this threshold, frame is considered noise (in dB)

wlan.radio.sensitivity double

received signals with power below sensitivity are ignored

Source code:

//
// Models a host with one wireless (802.11b) card in infrastructure mode.
// This module is basically a StandardHost with an Ieee80211NicSTA added.
// It should be used in conjunction with WirelessAP, or any other AP model
// which contains Ieee80211NicAP.
//
// @see WirelessAP, WirelessAPSimplified, WirelessAPWithEth, WirelessAPWithEthSimplified
// @see WirelessHost, WirelessHostSimplified
// @see MobileHost, MFMobileHost
//
module WirelessHost
{
    parameters:
        @node();
        @labels(node,ethernet-node,wireless-node);
        @display("i=device/wifilaptop");
        int numTcpApps = default(0);
        int numUdpApps = default(0);
        string tcpAppType = default("");
        string udpAppType = default("");
        bool IPForward = default(false);
        string routingFile = default("");
        string mobilityType = default("NullMobility");
    gates:
        inout pppg[] @labels(PPPFrame-conn);
        inout ethg[] @labels(EtherFrame-conn);
        input radioIn @directIn;
    submodules:
        notificationBoard: NotificationBoard {
            parameters:
                @display("p=60,70");
        }
        interfaceTable: InterfaceTable {
            parameters:
                @display("p=60,150");
        }
        routingTable: RoutingTable {
            parameters:
                IPForward = IPForward;
                routerId = "";
                routingFile = routingFile;
                @display("p=60,230");
        }
        tcpApp[numTcpApps]: <tcpAppType> like TCPApp {
            parameters:
                @display("p=163,67");
        }
        tcp: TCP {
            parameters:
                @display("p=163,154");
        }
        udpApp[numUdpApps]: <udpAppType> like UDPApp {
            parameters:
                @display("p=272,67");
        }
        udp: UDP {
            parameters:
                @display("p=272,154");
        }
        pingApp: PingApp {
            parameters:
                @display("p=343,200");
        }
        networkLayer: NetworkLayer {
            parameters:
                proxyARP = false;
                @display("p=248,247;q=queue");
            gates:
                ifIn[(sizeof(pppg)+sizeof(ethg))+1];
                ifOut[(sizeof(pppg)+sizeof(ethg))+1];
        }
        ppp[sizeof(pppg)]: PPPInterface {
            parameters:
                @display("p=205,350,row,90;q=txQueue");
        }
        eth[sizeof(ethg)]: EthernetInterface {
            parameters:
                @display("p=240,350,row,90;q=txQueue");
        }
        wlan: Ieee80211NicSTA {
            parameters:
                @display("p=120,350;q=queue");
        }
        mobility: <mobilityType> like BasicMobility {
            parameters:
                @display("p=58,301");
        }
    connections allowunconnected:
        for i=0..numTcpApps-1 {
            tcpApp[i].tcpOut --> tcp.appIn++;
            tcpApp[i].tcpIn <-- tcp.appOut++;
        }

        tcp.ipOut --> networkLayer.tcpIn;
        tcp.ipIn <-- networkLayer.tcpOut;

        for i=0..numUdpApps-1 {
            udpApp[i].udpOut --> udp.appIn++;
            udpApp[i].udpIn <-- udp.appOut++;
        }

        udp.ipOut --> networkLayer.udpIn;
        udp.ipIn <-- networkLayer.udpOut;

        networkLayer.pingOut --> pingApp.pingIn;
        networkLayer.pingIn <-- pingApp.pingOut;

        // connections to network outside
        for i=0..sizeof(pppg)-1 {
            pppg[i] <--> ppp[i].phys;
            ppp[i].netwOut --> networkLayer.ifIn[i];
            ppp[i].netwIn <-- networkLayer.ifOut[i];
        }

        for i=0..sizeof(ethg)-1 {
            ethg[i] <--> eth[i].phys;
            eth[i].netwOut --> networkLayer.ifIn[sizeof(pppg)+i];
            eth[i].netwIn <-- networkLayer.ifOut[sizeof(pppg)+i];
        }

        radioIn --> wlan.radioIn;
        wlan.uppergateOut --> networkLayer.ifIn[sizeof(pppg)+sizeof(ethg)];
        wlan.uppergateIn <-- networkLayer.ifOut[sizeof(pppg)+sizeof(ethg)];
}