AccessPoint

Package: inet.node.wireless

AccessPoint

compound module

A generic access point supporting multiple wireless radios, and multiple ethernet ports. The type of the ethernet MAC, relay unit and wireless card can be specified as parameters.

By default, the access point is stationary (StationaryMobility), but that can also be configured by a parameter.

The wlan[*].mgmt.typename can be configured for different management types currently it can be: Ieee80211MgmtApSimplified and Ieee80211MgmtAp. By default it is Ieee80211MgmtAp. The Simplified version does not support channel scanning, authentication and association . In this case, nodes must explicitly specify the hardware address of the wlan card they want to be associated with.

NodeStatus InterfaceTable IMobility IMacAddressTable IMacRelayUnit MessageDispatcher IWirelessInterface IEthernetInterface

Usage diagram

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

Parameters

Name Type Default value Description
numWlanInterfaces int 1

the number of radios in the access point

hasStatus bool false

Properties

Name Value Description
networkNode
labels node
display i=device/accesspoint

Gates

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

Unassigned submodule parameters

Name Type Default value Description
status.initialStatus string "UP"

TODO @signal, @statistic

interfaceTable.displayAddresses bool false

whether to display IP addresses on links

macTable.agingTime double
macTable.addressTableFile string

Source code

//
// A generic access point supporting multiple wireless radios, and
// multiple ethernet ports. The type of the ethernet MAC, relay unit
// and wireless card can be specified as parameters.
//
// By default, the access point is stationary (~StationaryMobility),
// but that can also be configured by a parameter.
//
// The wlan[*].mgmt.typename can be configured for different management types
// currently it can be: ~Ieee80211MgmtApSimplified and ~Ieee80211MgmtAp.
// By default it is ~Ieee80211MgmtAp. The Simplified version does not
// support channel scanning, authentication and association .
// In this case, nodes must explicitly specify the hardware address
// of the wlan card they want to be associated with.
//
module AccessPoint
{
    parameters:
        @networkNode();
        @labels(node,ethernet-node,wireless-node);
        @display("i=device/accesspoint");
        int numWlanInterfaces = default(1);               // the number of radios in the access point
        bool hasStatus = default(false);
        wlan[*].mgmt.typename = default("Ieee80211MgmtAp");
        wlan[*].llc.typename = default("Ieee80211Portal");
        wlan[*].agent.typename = default("");
        wlan[*].radio.antenna.mobilityModule = default("^.^.^.mobility");
        eth[*].encap.typename = "EtherEncapDummy";
        *.interfaceTableModule = default(absPath(".interfaceTable"));
        relayUnit.hasStp = false;
    gates:
        input radioIn[numWlanInterfaces] @directIn;
        inout ethg[] @labels(EtherFrame-conn);
    submodules:
        status: NodeStatus if hasStatus {
            parameters:
                @display("p=100,100;is=s");
        }

        interfaceTable: InterfaceTable {
            parameters:
                @display("p=100,200;is=s");
        }
        mobility: <default("StationaryMobility")> like IMobility {
            parameters:
                @display("p=100,400;is=s");
        }
        macTable: <default("MacAddressTable")> like IMacAddressTable {
            parameters:
                @display("p=100,300;is=s");
        }
        relayUnit: <default(firstAvailable("Ieee8021dRelay","MacRelayUnit"))> like IMacRelayUnit if sizeof(ethg)+numWlanInterfaces > 1 && typename != "" {
            parameters:
                @display("p=400,100");
        }
        nl: MessageDispatcher if sizeof(ethg)+numWlanInterfaces > 1 && exists(relayUnit) {
            parameters:
                @display("p=800,200;b=1200,5,,,,1");
        }
        wlan[numWlanInterfaces]: <default("Ieee80211Interface")> like IWirelessInterface {
            parameters:
                @display("p=250,300,row,150;q=queue");
        }
        eth[sizeof(ethg)]: <default("EthernetInterface")> like IEthernetInterface {
            parameters:
                mac.promiscuous = true;
                @display("p=850,300,row;q=txQueue");
        }
    connections allowunconnected:
        nl.out++ --> relayUnit.ifIn if sizeof(ethg)+numWlanInterfaces > 1 && exists(relayUnit);
        nl.in++ <-- relayUnit.ifOut if sizeof(ethg)+numWlanInterfaces > 1 && exists(relayUnit);
        // connections to network outside
        // wireless interfaces MUST be connected first (i.e. ports 0..numWlanInterfaces-1)
        // because broadcasts must be handled differently for wireless IFs by the relayUnit
        for i=0..numWlanInterfaces-1 {
            radioIn[i] --> { @display("m=s"); } --> wlan[i].radioIn;
            wlan[i].upperLayerOut --> nl.in++ if sizeof(ethg)+numWlanInterfaces > 1 && exists(relayUnit);
            wlan[i].upperLayerIn <-- nl.out++ if sizeof(ethg)+numWlanInterfaces > 1 && exists(relayUnit);
        }
        // ethernet must be connected only AFTER wireless ports
        for i=0..sizeof(ethg)-1 {
            eth[i].phys <--> { @display("m=s"); } <--> ethg[i];
            eth[i].upperLayerIn <-- nl.out++ if sizeof(ethg)+numWlanInterfaces>1;
            eth[i].upperLayerOut --> nl.in++ if sizeof(ethg)+numWlanInterfaces>1;
        }
}

File: src/inet/node/wireless/AccessPoint.ned