EthernetLayer

Package: inet.linklayer.ethernet.modular

compound module EthernetLayer

(no description)

EthernetLayerupperLayerIn --> socketCommandProcessor.insocketCommandProcessor.out --> macHeaderInserter.inmacHeaderInserter.out --> paddingInserter.inpaddingInserter.out --> fcsInserter.infcsInserter.out --> lowerLayerOutlowerLayerIn --> fcsChecker.infcsChecker.out --> macHeaderChecker.inmacHeaderChecker.out --> socketPacketProcessor.insocketPacketProcessor.out --> upperLayerOutsocketTable: inet.linklayer.ethernet.modular.EthernetSocketTable Source: socketTable: EthernetSocketTable if hasSocketSupport { @display("p=100,100"); }socketTablesocketCommandProcessor: inet.linklayer.ethernet.modular.EthernetSocketCommandProcessor (like IPacketFlow) IPacketFlow: Interface for packet flows. Source: socketCommandProcessor: <default(hasSocketSupport ? "EthernetSocketCommandProcessor" : "")> like IPacketFlow { @display("p=300,100"); }socketCommandProcessormacHeaderInserter: inet.linklayer.ethernet.modular.EthernetMacHeaderInserter (like IProtocolHeaderInserter) IProtocolHeaderInserter: Module interface for protocol header inserter components. Source: macHeaderInserter: <default("EthernetMacHeaderInserter")> like IProtocolHeaderInserter { @display("p=300,200"); }macHeaderInserterpaddingInserter: inet.protocolelement.common.PaddingInserter (like IPacketFlow) PaddingInserter: Adds padding to packets to ensure they meet a minimum length requirement or to round up to a spec... IPacketFlow: Interface for packet flows. Source: paddingInserter: <default("PaddingInserter")> like IPacketFlow { @display("p=300,300"); }paddingInserterfcsInserter: inet.linklayer.ethernet.modular.EthernetFcsInserter (like IPacketFlow) IPacketFlow: Interface for packet flows. Source: fcsInserter: <default("EthernetFcsInserter")> like IPacketFlow { @display("p=300,400"); }fcsInsertersocketPacketProcessor: inet.linklayer.ethernet.modular.EthernetSocketPacketProcessor (like IPacketFlow) IPacketFlow: Interface for packet flows. Source: socketPacketProcessor: <default(hasSocketSupport ? "EthernetSocketPacketProcessor" : "")> like IPacketFlow { @display("p=600,100"); }socketPacketProcessormacHeaderChecker: inet.linklayer.ethernet.modular.EthernetMacHeaderChecker (like IProtocolHeaderChecker) IProtocolHeaderChecker: Module interface for protocol header checker components. Source: macHeaderChecker: <default("EthernetMacHeaderChecker")> like IProtocolHeaderChecker { @display("p=600,200"); }macHeaderCheckerfcsChecker: inet.linklayer.ethernet.modular.EthernetFcsChecker (like IPacketFilter) IPacketFilter: Interface for packet filter modules. Source: fcsChecker: <default("EthernetFcsChecker")> like IPacketFilter { @display("p=600,400"); }fcsChecker

Usage diagram

Inheritance diagram

Parameters

Name

Type

Default value

Description

interfaceTableModule

string

hasSocketSupport

bool

false

Properties

Name

Value

Description

display

i=block/layer

Gates

Name

Direction

Size

Description

upperLayerIn

input

upperLayerOut

output

lowerLayerIn

input

lowerLayerOut

output

Unassigned submodule parameters

Name

Type

Default value

Description

socketTable.displayStringTextFormat

string

“”

Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information

socketCommandProcessor.displayStringTextFormat

string

“processed {numProcessedPackets} pk ({processedTotalLength})”

Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information

socketCommandProcessor.socketTableModule

string

macHeaderInserter.displayStringTextFormat

string

“processed {numProcessedPackets} pk ({processedTotalLength})”

Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information

macHeaderInserter.interfaceTableModule

string

paddingInserter.displayStringTextFormat

string

“processed {numProcessedPackets} pk ({processedTotalLength})”

Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information

paddingInserter.minLength

int

paddingInserter.roundingLength

int

1B

paddingInserter.insertionPosition

string

“back”

fcsInserter.displayStringTextFormat

string

“processed {numProcessedPackets} pk ({processedTotalLength})”

Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information

fcsInserter.fcsMode

string

“declared”

socketPacketProcessor.displayStringTextFormat

string

“processed {numProcessedPackets} pk ({processedTotalLength})”

Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information

socketPacketProcessor.socketTableModule

string

macHeaderChecker.displayStringTextFormat

string

“dropped {numDroppedPackets}/{numProcessedPackets} pk ({droppedTotalLength}/{processedTotalLength})”

Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information

macHeaderChecker.backpressure

bool

false

macHeaderChecker.interfaceTableModule

string

macHeaderChecker.promiscuous

bool

false

fcsChecker.displayStringTextFormat

string

“dropped {numDroppedPackets}/{numProcessedPackets} pk ({droppedTotalLength}/{processedTotalLength})”

Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information

fcsChecker.backpressure

bool

false

fcsChecker.popFcs

bool

true

Source code

module EthernetLayer like IEthernetLayer
{
    parameters:
        string interfaceTableModule;
        bool hasSocketSupport = default(false);
        *.interfaceTableModule = default(this.interfaceTableModule);
        *.socketTableModule = default(absPath(".socketTable"));
        paddingInserter.minLength = default(60B);
        @display("i=block/layer");
    gates:
        input upperLayerIn;
        output upperLayerOut;
        input lowerLayerIn;
        output lowerLayerOut;
    submodules:
        socketTable: EthernetSocketTable if hasSocketSupport {
            @display("p=100,100");
        }
        socketCommandProcessor: <default(hasSocketSupport ? "EthernetSocketCommandProcessor" : "")> like IPacketFlow {
            @display("p=300,100");
        }
        macHeaderInserter: <default("EthernetMacHeaderInserter")> like IProtocolHeaderInserter {
            @display("p=300,200");
        }
        paddingInserter: <default("PaddingInserter")> like IPacketFlow {
            @display("p=300,300");
        }
        fcsInserter: <default("EthernetFcsInserter")> like IPacketFlow {
            @display("p=300,400");
        }
        socketPacketProcessor: <default(hasSocketSupport ? "EthernetSocketPacketProcessor" : "")> like IPacketFlow {
            @display("p=600,100");
        }
        macHeaderChecker: <default("EthernetMacHeaderChecker")> like IProtocolHeaderChecker {
            @display("p=600,200");
        }
        fcsChecker: <default("EthernetFcsChecker")> like IPacketFilter {
            @display("p=600,400");
        }
    connections:
        upperLayerIn --> { @display("m=n"); } --> socketCommandProcessor.in;
        socketCommandProcessor.out --> macHeaderInserter.in;
        macHeaderInserter.out --> paddingInserter.in;
        paddingInserter.out --> fcsInserter.in;
        fcsInserter.out --> { @display("m=s"); } --> lowerLayerOut;

        lowerLayerIn --> { @display("m=s"); } --> fcsChecker.in;
        fcsChecker.out --> macHeaderChecker.in;
        macHeaderChecker.out --> socketPacketProcessor.in;
        socketPacketProcessor.out --> { @display("m=n"); } --> upperLayerOut;
}

File: src/inet/linklayer/ethernet/modular/EthernetLayer.ned