BridgingLayer

Package: inet.linklayer.ethernet.common

compound module BridgingLayer

Provides various layer 2 services such as packet forwarding, interface selection, virtual LAN handling, stream handling.

BridgingLayerupperLayerIn --> processingDelayLayer.upperLayerInprocessingDelayLayer.lowerLayerOut --> directionReverser.upperLayerIndirectionReverser.lowerLayerOut --> streamIdentifier.upperLayerInstreamIdentifier.lowerLayerOut --> streamRelay.upperLayerInstreamRelay.lowerLayerOut --> streamFilter.upperLayerInstreamFilter.lowerLayerOut --> streamCoder.upperLayerInstreamCoder.lowerLayerOut --> interfaceRelay.upperLayerIninterfaceRelay.lowerLayerOut --> vlanPolicy.upperLayerInvlanPolicy.lowerLayerOut --> lowerLayerOutlowerLayerIn --> vlanPolicy.lowerLayerInvlanPolicy.upperLayerOut --> interfaceRelay.lowerLayerIninterfaceRelay.upperLayerOut --> streamCoder.lowerLayerInstreamCoder.upperLayerOut --> streamFilter.lowerLayerInstreamFilter.upperLayerOut --> streamRelay.lowerLayerInstreamRelay.upperLayerOut --> streamIdentifier.lowerLayerInstreamIdentifier.upperLayerOut --> directionReverser.lowerLayerIndirectionReverser.upperLayerOut --> processingDelayLayer.lowerLayerInprocessingDelayLayer.upperLayerOut --> upperLayerOutprocessingDelayLayer: inet.protocolelement.processing.IProcessingDelayLayer (like IProcessingDelayLayer) IProcessingDelayLayer: Module interface for processing delay layers that model packet processing time in network devices. Source: processingDelayLayer: <default("")> like IProcessingDelayLayer { @display("p=300,150"); }processingDelayLayerdirectionReverser: inet.linklayer.ethernet.common.DirectionReverserLayer (like IProtocolLayer) DirectionReverserLayer: Provides a layer that combines the decision for local delivery with the service of reversing the... IProtocolLayer: Interface for all protocol layer modules that connect to a higher and to a lower protocol layer,... Source: directionReverser: <default("DirectionReverserLayer")> like IProtocolLayer { @display("p=300,300"); }directionReverserstreamIdentifier: inet.protocolelement.contract.IProtocolLayer (like IProtocolLayer) IProtocolLayer: Interface for all protocol layer modules that connect to a higher and to a lower protocol layer,... Source: streamIdentifier: <default("")> like IProtocolLayer { @display("p=300,450"); }streamIdentifierstreamRelay: inet.protocolelement.contract.IProtocolLayer (like IProtocolLayer) IProtocolLayer: Interface for all protocol layer modules that connect to a higher and to a lower protocol layer,... Source: streamRelay: <default("")> like IProtocolLayer { @display("p=300,600"); }streamRelaystreamFilter: inet.protocolelement.contract.IProtocolLayer (like IProtocolLayer) IProtocolLayer: Interface for all protocol layer modules that connect to a higher and to a lower protocol layer,... Source: streamFilter: <default("")> like IProtocolLayer { @display("p=300,750"); }streamFilterstreamCoder: inet.protocolelement.contract.IProtocolLayer (like IProtocolLayer) IProtocolLayer: Interface for all protocol layer modules that connect to a higher and to a lower protocol layer,... Source: streamCoder: <default("")> like IProtocolLayer { @display("p=300,900"); }streamCoderinterfaceRelay: inet.linklayer.ethernet.common.InterfaceRelayLayer (like IProtocolLayer) InterfaceRelayLayer: Combines the interface MAC address learning from incoming packets with the outgoing interface sel... IProtocolLayer: Interface for all protocol layer modules that connect to a higher and to a lower protocol layer,... Source: interfaceRelay: <default("InterfaceRelayLayer")> like IProtocolLayer { @display("p=300,1050"); }interfaceRelayvlanPolicy: inet.protocolelement.contract.IProtocolLayer (like IProtocolLayer) IProtocolLayer: Interface for all protocol layer modules that connect to a higher and to a lower protocol layer,... Source: vlanPolicy: <default("")> like IProtocolLayer { @display("p=300,1200"); }vlanPolicy

Usage diagram

Inheritance diagram

Parameters

Name

Type

Default value

Description

macTableModule

string

“”

interfaceTableModule

string

Relative module path of the interface table

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

directionReverser.fork.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

directionReverser.fork.interfaceTableModule

string

Module path to the InterfaceTable module

directionReverser.fork.forwardProtocolRegistration

bool

true

directionReverser.fork.interfaceMapping

object

{}

Maps network interface names to connected submodule names (e.g. {“eth0”: “bridging”}), overrides automatically learned dispatching; * overrides all learned network interfaces, ? overrides default

directionReverser.fork.serviceMapping

object

{}

Maps protocols to connected submodule names (e.g. {“ethernetmac”: “bridging”}), overrides automatically learned dispatching; * overrides all learned services, ? overrides default

directionReverser.fork.protocolMapping

object

{}

Maps protocols to connected submodule names (e.g. {“ipv4”: “bridging”}), overrides automatically learned dispatching; * overrides all learned protocols, ? overrides default

directionReverser.reverser.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

directionReverser.reverser.forwardVlan

bool

true

directionReverser.reverser.forwardPcp

bool

true

directionReverser.reverser.excludeEncapsulationProtocols

object

[]

directionReverser.join.displayStringTextFormat

string

“passed %p pk (%l)”

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

directionReverser.join.forwardServiceRegistration

bool

true

interfaceRelay.learner.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

interfaceRelay.learner.macTableModule

string

Relative module path of MAC table

interfaceRelay.learner.interfaceTableModule

string

Relative module path of the interface table

interfaceRelay.selector.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

interfaceRelay.selector.macTableModule

string

Relative module path of MAC table

interfaceRelay.selector.interfaceTableModule

string

Relative module path of interface table

Source code

//
// Provides various layer 2 services such as packet forwarding,
// interface selection, virtual LAN handling, stream handling.
//
module BridgingLayer like IProtocolLayer
{
    parameters:
        string macTableModule = default("");
        string interfaceTableModule; // Relative module path of the interface table
        *.macTableModule = default(absPath(this.macTableModule));
        *.interfaceTableModule = default(this.interfaceTableModule);
        @display("i=block/layer");
    gates:
        input upperLayerIn;
        output upperLayerOut;
        input lowerLayerIn;
        output lowerLayerOut;
    submodules:
        processingDelayLayer: <default("")> like IProcessingDelayLayer {
            @display("p=300,150");
        }
        directionReverser: <default("DirectionReverserLayer")> like IProtocolLayer {
            @display("p=300,300");
        }
        streamIdentifier: <default("")> like IProtocolLayer {
            @display("p=300,450");
        }
        streamRelay: <default("")> like IProtocolLayer {
            @display("p=300,600");
        }
        streamFilter: <default("")> like IProtocolLayer {
            @display("p=300,750");
        }
        streamCoder: <default("")> like IProtocolLayer {
            @display("p=300,900");
        }
        interfaceRelay: <default("InterfaceRelayLayer")> like IProtocolLayer {
            @display("p=300,1050");
        }
        vlanPolicy: <default("")> like IProtocolLayer {
            @display("p=300,1200");
        }
    connections:
        upperLayerIn --> processingDelayLayer.upperLayerIn;
        processingDelayLayer.lowerLayerOut --> directionReverser.upperLayerIn;
        directionReverser.lowerLayerOut --> streamIdentifier.upperLayerIn;
        streamIdentifier.lowerLayerOut --> streamRelay.upperLayerIn;
        streamRelay.lowerLayerOut --> streamFilter.upperLayerIn;
        streamFilter.lowerLayerOut --> streamCoder.upperLayerIn;
        streamCoder.lowerLayerOut --> interfaceRelay.upperLayerIn;
        interfaceRelay.lowerLayerOut --> vlanPolicy.upperLayerIn;
        vlanPolicy.lowerLayerOut --> lowerLayerOut;

        lowerLayerIn --> vlanPolicy.lowerLayerIn;
        vlanPolicy.upperLayerOut --> interfaceRelay.lowerLayerIn;
        interfaceRelay.upperLayerOut --> streamCoder.lowerLayerIn;
        streamCoder.upperLayerOut --> streamFilter.lowerLayerIn;
        streamFilter.upperLayerOut --> streamRelay.lowerLayerIn;
        streamRelay.upperLayerOut --> streamIdentifier.lowerLayerIn;
        streamIdentifier.upperLayerOut --> directionReverser.lowerLayerIn;
        directionReverser.upperLayerOut --> processingDelayLayer.lowerLayerIn;
        processingDelayLayer.upperLayerOut --> upperLayerOut;
}

File: src/inet/linklayer/ethernet/common/BridgingLayer.ned