LinkLayerNodeBase

Package: inet.node.base

LinkLayerNodeBase

compound module

(no description)

status : NodeStatus

Keeps track of the status of network node (up, down, etc.) for other modules, and also displays it...

Source:
status: NodeStatus if hasStatus {
    @display("p=125,80;is=s");
} clock : like IClock

IClock: This module interface is implemented by clock models.

Source:
clock: <default("")> like IClock if typename != "" {
    @display("p=125,320;is=s");
} energyStorage : like IEnergyStorage

IEnergyStorage: The energy storage models describe devices that absorb energy produced by generators, and provide...

Source:
energyStorage: <default("")> like IEnergyStorage if typename != "" {
    @display("p=125,400;is=s");
} energyManagement : like IEnergyManagement

IEnergyManagement: The energy management models monitors an energy storage, estimates its state, and controls the...

Source:
energyManagement: <default("")> like IEnergyManagement if typename != "" {
    @display("p=125,480;is=s");
} energyGenerator : like IEnergyGenerator

IEnergyGenerator: The energy generator models describe the energy generation process of devices over time.

Source:
energyGenerator: <default("")> like IEnergyGenerator if typename != "" {
    @display("p=125,560;is=s");
} mobility : like IMobility

IMobility: The module interface for mobility models.

Source:
mobility: <default("")> like IMobility if typename != "" {
    @display("p=125,160;is=s");
} measurer : like IMeasurer

IMeasurer: This module interface is implemented by all standalone measurement modules.

Source:
measurer: <default("")> like IMeasurer if typename != "" {
    @display("p=125,660;is=s");
} pcapRecorder[numPcapRecorders] : PcapRecorder

Records PCAP traces of frames sent/received by other modules within the same host.

Source:
pcapRecorder[numPcapRecorders]: PcapRecorder {
    @display("p=125,640;is=s");
} interfaceTable : InterfaceTable

Keeps the table of network interfaces.

Source:
interfaceTable: InterfaceTable {
    @display("p=125,240;is=s");
} llc : like IIeee8022Llc

Source:
llc: <default("")> like IIeee8022Llc if typename != "" {
    @display("p=375,525");
} cb : MessageDispatcher

This module connects multiple applications, protocols and interfaces with each other and...

Source:
cb: MessageDispatcher {
    @display("p=750,600;b=1000,5");
} bridging : like IProtocolLayer

IProtocolLayer: This module interface is implemented by all protocol layer modules that connect to a higher and to...

Source:
bridging: <default("")> like IProtocolLayer if typename != "" {
    @display("p=750,675");
} bl : MessageDispatcher

This module connects multiple applications, protocols and interfaces with each other and...

Source:
bl: MessageDispatcher {
    @display("p=750,750;b=1000,5");
} ethernet : like IEthernetLayer

Source:
ethernet: <default(sizeof(ethg) > 0 ? "EthernetEncapsulation" : "")> like IEthernetLayer if typename != "" {
    @display("p=375,825");
} ieee8021q : like IIeee8021qLayer

Source:
ieee8021q: <default("")> like IIeee8021qLayer if typename != "" {
    @display("p=525,825");
} ieee8021r : like IIeee8021rLayer

Source:
ieee8021r: <default("")> like IIeee8021rLayer if typename != "" {
    @display("p=675,825");
} li : MessageDispatcher

This module connects multiple applications, protocols and interfaces with each other and...

Source:
li: MessageDispatcher {
    @display("p=750,900;b=1000,5,,,,1");
} lo[numLoInterfaces] : like ILoopbackInterface

LoopbackInterface: This module implements a loopback network interface.

ILoopbackInterface: This module interface is implemented by loopback network interfaces.

Source:
lo[numLoInterfaces]: <default("LoopbackInterface")> like ILoopbackInterface {
    @display("p=750,975,row,150");
} wlan[numWlanInterfaces] : like IWirelessInterface

Ieee80211Interface: This module implements an IEEE 802.11 network interface.

IWirelessInterface: This module interface is implemented by wireless network interfaces.

Source:
wlan[numWlanInterfaces]: <default("Ieee80211Interface")> like IWirelessInterface {
    @display("p=375,1000,row,150;q=queue");
} ppp[sizeof(pppg)] : like IPppInterface

PppInterface: This module implements a PPP network interface.

IPppInterface: This module interface is implemented by PPP network interfaces.

Source:
ppp[sizeof(pppg)]: <default("PppInterface")> like IPppInterface {
    @display("p=300,975,row,150;q=txQueue");
} eth[sizeof(ethg)] : like IEthernetInterface

EthernetInterface: This module represents an Ethernet network interface.

IEthernetInterface: This module interface is implemented by Ethernet network interfaces.

Source:
eth[sizeof(ethg)]: <default("EthernetInterface")> like IEthernetInterface {
    @display("p=900,975,row,150;q=txQueue");
} tun[numTunInterfaces] : like ITunnelInterface

TunInterface: This module implements a TUN network interface.

ITunnelInterface: This module interface is implemnted by tunnel network interfaces.

Source:
tun[numTunInterfaces]: <default("TunInterface")> like ITunnelInterface {
    @display("p=975,1000,row,150;q=txQueue");
} virt[numVirtInterfaces] : like IVirtualInterface

VirtualInterface: This module implements a virtual network interface.

IVirtualInterface: This module interface is implemnted by virtual network interfaces.

Source:
virt[numVirtInterfaces]: <default("VirtualInterface")> like IVirtualInterface {
    @display("p=975,1000,row,150;q=txQueue");
}

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.

Known subclasses

Name Type Description
NetworkLayerNodeBase compound module (no description)

Extends

Name Type Description
NodeBase compound module

This module contains the most basic infrastructure for network nodes that is not strictly communication protocol related.

Parameters

Name Type Default value Description
hasStatus bool false
osgModel string ""

3D model for OSG visualization, no 3D model by default

osgModelColor string ""

tint color, no colorization by default

canvasImage string ""

image for canvas visualization, no image by default

canvasImageColor string ""

tint color, no colorization by default

recordPcap bool false
numPcapRecorders int recordPcap ? 1 : 0
numLoInterfaces int 1
numWlanInterfaces int 0
numEthInterfaces int 0

minimum number of ethernet interfaces

numPppInterfaces int 0

minimum number of PPP interfaces

numTunInterfaces int 0
numVirtInterfaces int 0
fcsMode string "declared"

Properties

Name Value Description
networkNode
labels node
class NodeBase
display bgb=1256,1125

Gates

Name Direction Size Description
radioIn [ ] input numWlanInterfaces
pppg [ ] inout numPppInterfaces
ethg [ ] inout numEthInterfaces

Unassigned submodule parameters

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

TODO @signal, @statistic

pcapRecorder.verbose bool true

whether to log packets on the module output

pcapRecorder.pcapFile string ""

the PCAP file to be written

pcapRecorder.fileFormat string "pcapng"
pcapRecorder.snaplen int 65535

maximum number of bytes to record per packet

pcapRecorder.dumpBadFrames bool true

enable dump of frames with hasBitError

pcapRecorder.moduleNamePatterns string "wlan[*] eth[*] ppp[*]"

space-separated list of sibling module names to listen on

pcapRecorder.sendingSignalNames string "packetSentToLower"

space-separated list of outbound packet signals to subscribe to

pcapRecorder.receivingSignalNames string "packetReceivedFromLower"

space-separated list of inbound packet signals to subscribe to

pcapRecorder.dumpProtocols string "ethernetmac ppp ieee80211mac"

space-separated list of protocol names as defined in the Protocol class

pcapRecorder.packetFilter object "*"

which packets are considered, matches all packets by default

pcapRecorder.helpers string ""

usable PcapRecorder::IHelper helpers for accept packettype and store/convert packet as specified linktype currently available: "inet::AckingMacToEthernetPcapRecorderHelper"

pcapRecorder.alwaysFlush bool false

flush the pcapFile after each write to ensure that all packets are captured in case of a crash

pcapRecorder.displayStringTextFormat string "rec: %n pks"
interfaceTable.displayAddresses bool false

whether to display IP addresses on links

cb.displayStringTextFormat string "processed %p pk (%l)"

determines the text that is written on top of the submodule

cb.forwardServiceRegistration bool true
cb.forwardProtocolRegistration bool true
bl.displayStringTextFormat string "processed %p pk (%l)"

determines the text that is written on top of the submodule

bl.forwardServiceRegistration bool true
bl.forwardProtocolRegistration bool true
li.displayStringTextFormat string "processed %p pk (%l)"

determines the text that is written on top of the submodule

li.forwardServiceRegistration bool true
li.forwardProtocolRegistration bool true
eth.bitrate double

Source code

module LinkLayerNodeBase extends NodeBase like IEthernetNetworkNode
{
    parameters:
        bool recordPcap = default(false);
        int numPcapRecorders = default(recordPcap ? 1 : 0);
        int numLoInterfaces = default(1);
        int numWlanInterfaces = default(0);
        int numEthInterfaces = default(0);  // minimum number of ethernet interfaces
        int numPppInterfaces = default(0);  // minimum number of PPP interfaces
        int numTunInterfaces = default(0);
        int numVirtInterfaces = default(0);
        string fcsMode @enum("declared","computed") = default("declared");
        pcapRecorder[*].pcapFile = default("results/" + expand("${configname}-") + fullPath() + ".pcap");
        mobility.typename = default(numWlanInterfaces > 0 ? "StationaryMobility" : "");
        *.interfaceTableModule = default(absPath(".interfaceTable"));
        *.fcsMode = this.fcsMode;
        wlan[*].radio.antenna.mobilityModule = default("^.^.^.mobility");
        ethernet.registerProtocol = default(true);
        @figure[linkLayer](type=rectangle; pos=250,458; size=1000,284; fillColor=#0000ff; lineColor=#808080; cornerRadius=5; fillOpacity=0.1);
        @figure[linkLayer.title](type=text; pos=1245,463; anchor=ne; text="link layer");
        @figure[interfaceLayer](type=rectangle; pos=250,758; size=1000,360; fillColor=#00ffff; lineColor=#808080; cornerRadius=5; fillOpacity=0.1);
        @figure[interfaceLayer.title](type=text; pos=1245,763; anchor=ne; text="interface layer");
    gates:
        input radioIn[numWlanInterfaces] @directIn;
        inout pppg[numPppInterfaces] @labels(PppFrame-conn) @allowUnconnected;
        inout ethg[numEthInterfaces] @labels(EtherFrame-conn) @allowUnconnected;
    submodules:
        pcapRecorder[numPcapRecorders]: PcapRecorder {
            @display("p=125,640;is=s");
        }
        interfaceTable: InterfaceTable {
            @display("p=125,240;is=s");
        }
        llc: <default("")> like IIeee8022Llc if typename != "" {
            @display("p=375,525");
        }
        cb: MessageDispatcher {
            @display("p=750,600;b=1000,5");
        }
        bridging: <default("")> like IProtocolLayer if typename != "" {
            @display("p=750,675");
        }
        bl: MessageDispatcher {
            @display("p=750,750;b=1000,5");
        }
        ethernet: <default(sizeof(ethg) > 0 ? "EthernetEncapsulation" : "")> like IEthernetLayer if typename != "" {
            @display("p=375,825");
        }
        ieee8021q: <default("")> like IIeee8021qLayer if typename != "" {
            @display("p=525,825");
        }
        ieee8021r: <default("")> like IIeee8021rLayer if typename != "" {
            @display("p=675,825");
        }
        li: MessageDispatcher {
            @display("p=750,900;b=1000,5,,,,1");
        }
        lo[numLoInterfaces]: <default("LoopbackInterface")> like ILoopbackInterface {
            @display("p=750,975,row,150");
        }
        // TODO move wlan interfaces after eth interfaces, but it changes IP address assignment and breaks examples/inet/configurator/complex.ini
        wlan[numWlanInterfaces]: <default("Ieee80211Interface")> like IWirelessInterface {
            @display("p=375,1000,row,150;q=queue");
        }
        ppp[sizeof(pppg)]: <default("PppInterface")> like IPppInterface {
            @display("p=300,975,row,150;q=txQueue");
        }
        eth[sizeof(ethg)]: <default("EthernetInterface")> like IEthernetInterface {
            @display("p=900,975,row,150;q=txQueue");
        }
        tun[numTunInterfaces]: <default("TunInterface")> like ITunnelInterface {
            @display("p=975,1000,row,150;q=txQueue");
        }
        virt[numVirtInterfaces]: <default("VirtualInterface")> like IVirtualInterface {
            @display("p=975,1000,row,150;q=txQueue");
        }
    connections allowunconnected:
        llc.lowerLayerOut --> cb.in++ if exists(llc);
        llc.lowerLayerIn <-- cb.out++ if exists(llc);

        cb.out++ --> bridging.upperLayerIn if exists(bridging);
        bridging.upperLayerOut --> cb.in++ if exists(bridging);

        bridging.lowerLayerOut --> bl.in++ if exists(bridging);
        bl.out++ --> bridging.lowerLayerIn if exists(bridging);

        cb.out++ --> bl.in++ if !exists(bridging);
        bl.out++ --> cb.in++ if !exists(bridging);

        bl.out++ --> li.in++;
        li.out++ --> bl.in++;

        bl.out++ --> ieee8021q.upperLayerIn if exists(ieee8021q);
        ieee8021q.upperLayerOut --> bl.in++ if exists(ieee8021q);

        bl.out++ --> ieee8021r.upperLayerIn if exists(ieee8021r);
        ieee8021r.upperLayerOut --> bl.in++ if exists(ieee8021r);

        bl.out++ --> ethernet.upperLayerIn if exists(ethernet);
        ethernet.upperLayerOut --> bl.in++ if exists(ethernet);

        ieee8021q.lowerLayerOut --> li.in++ if exists(ieee8021q);
        li.out++ --> ieee8021q.lowerLayerIn if exists(ieee8021q);

        ieee8021r.lowerLayerOut --> li.in++ if exists(ieee8021r);
        li.out++ --> ieee8021r.lowerLayerIn if exists(ieee8021r);

        ethernet.lowerLayerOut --> li.in++ if exists(ethernet);
        li.out++ --> ethernet.lowerLayerIn if exists(ethernet);

        for i=0..sizeof(radioIn)-1 {
            radioIn[i] --> { @display("m=s"); } --> wlan[i].radioIn;
        }

        for i=0..sizeof(ethg)-1 {
            ethg[i] <--> { @display("m=s"); } <--> eth[i].phys;
        }

        for i=0..sizeof(pppg)-1 {
            pppg[i] <--> { @display("m=s"); } <--> ppp[i].phys;
        }

        for i=0..numLoInterfaces-1 {
            li.out++ --> lo[i].upperLayerIn;
            lo[i].upperLayerOut --> li.in++;
        }

        for i=0..sizeof(radioIn)-1 {
            wlan[i].upperLayerOut --> li.in++;
            wlan[i].upperLayerIn <-- li.out++;
        }

        for i=0..sizeof(ethg)-1 {
            eth[i].upperLayerOut --> li.in++;
            eth[i].upperLayerIn <-- li.out++;
        }

        for i=0..sizeof(pppg)-1 {
            ppp[i].upperLayerOut --> li.in++;
            ppp[i].upperLayerIn <-- li.out++;
        }

        for i=0..numTunInterfaces-1 {
            tun[i].upperLayerOut --> li.in++;
            tun[i].upperLayerIn <-- li.out++;
        }

        for i=0..numVirtInterfaces-1 {
            virt[i].upperLayerOut --> li.in++;
            virt[i].upperLayerIn <-- li.out++;
        }
}

File: src/inet/node/base/LinkLayerNodeBase.ned