InterfaceRelayLayer

Package: inet.linklayer.ethernet.common

compound module InterfaceRelayLayer

Combines the interface MAC address learning from incoming packets with the outgoing interface selection for outgoing packets into a single layer.

Usage diagram

Inheritance diagram

Used in compound modules

Name

Type

Description

BridgingLayer

compound module

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

Parameters

Name

Type

Default value

Description

macTableModule

string

interfaceTableModule

string

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

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

learner.macTableModule

string

Relative module path of MAC table

learner.interfaceTableModule

string

Relative module path of the interface table

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

selector.macTableModule

string

Relative module path of MAC table

selector.interfaceTableModule

string

Relative module path of interface table

Source code

//
// Combines the interface MAC address learning from incoming packets
// with the outgoing interface selection for outgoing packets into a single layer.
//
module InterfaceRelayLayer like IProtocolLayer
{
    parameters:
        string macTableModule;
        string interfaceTableModule;
        *.macTableModule = default(absPath(this.macTableModule));
        *.interfaceTableModule = default(absPath(this.interfaceTableModule));
        @display("i=block/layer");
    gates:
        input upperLayerIn;
        output upperLayerOut;
        input lowerLayerIn;
        output lowerLayerOut;
    submodules:
        learner: <default("RelayInterfaceLearner")> like IPacketFlow {
            @display("p=200,150");
        }
        selector: <default("RelayInterfaceSelector")> like IPacketFlow {
            @display("p=500,150");
        }
    connections:
        upperLayerIn --> { @display("m=n"); } --> selector.in;
        selector.out --> { @display("m=s"); } --> lowerLayerOut;

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

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