InterfaceRelayLayer

Package: inet.linklayer.ethernet.common

InterfaceRelayLayer

compound module

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

learner : like IPacketFlow

RelayInterfaceLearner: This module extracts the source MAC address of the packet passing through and stores the mapping...

IPacketFlow: This module interface is implemented by packet flows.

Source:
learner: <default("RelayInterfaceLearner")> like IPacketFlow {
    @display("p=200,150");
} selector : like IPacketFlow

RelayInterfaceSelector: This module selects the outgoing interface for the packet passing through from the MAC address...

IPacketFlow: This module interface is implemented by packet flows.

Source:
selector: <default("RelayInterfaceSelector")> like IPacketFlow {
    @display("p=500,150");
}

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.

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

Source code

//
// This module 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