MacForwardingTable

Package: inet.linklayer.ethernet.common

MacForwardingTable

simple module

This module handles the mapping between ports and MAC addresses.

Entries are deleted if their age exceeds a certain limit.

If needed, address tables can be pre-loaded from text files at the beginning of the simulation; this controlled by the forwardingTableFile module parameter. File format: line oriented table with space or TAB delimited columns. columns: VLAN ID: numeric value, 0 means no vlan MAC address: string, resolving with L3AddressResolver as MAC_ADDR Interface: interface name, e.g. eth3 (or interface id, e.g. 103) empty lines and commented out lines starts with '#' are allowed.

Inheritance diagram

The following diagram shows inheritance relationships for this type. Unresolved types are missing from the diagram.

Parameters

Name Type Default value Description
agingTime double 120s
forwardingTable object []
forwardingTableFile string ""
interfaceTableModule string
displayStringTextFormat string "addr: %a\nvlan: %v"

Properties

Name Value Description
display i=block/table2

Direct method calls (observed)

call tofunctioninfo
MacForwardingTableinet::MacForwardingTable::addMulticastAddressForwardingInterfaceaddMulticastAddressForwardingInterface
MacForwardingTableinet::MacForwardingTable::setUnicastAddressForwardingInterfacesetUnicastAddressForwardingInterface
InterfaceTableinet::InterfaceTable::findInterfaceByNamefindInterfaceByName

Called methods (observed)

functioninfocall from
inet::MacForwardingTable::addMulticastAddressForwardingInterfaceaddMulticastAddressForwardingInterfaceMacForwardingTable
inet::MacForwardingTable::getMulticastAddressForwardingInterfacesgetMulticastAddressForwardingInterfacesRelayInterfaceSelector, Ieee8021dRelay
inet::MacForwardingTable::getUnicastAddressForwardingInterfacegetUnicastAddressForwardingInterfaceMacRelayUnit, RelayInterfaceSelector, Ieee8021dRelay
inet::MacForwardingTable::handleOperationStagehandleOperationStageScenarioManager
inet::MacForwardingTable::learnUnicastAddressForwardingInterfacelearnUnicastAddressForwardingInterfaceMacRelayUnit, RelayInterfaceLearner, Ieee8021dRelay
inet::MacForwardingTable::removeForwardingInterfaceremoveForwardingInterfaceRstp
inet::MacForwardingTable::replaceForwardingInterfacereplaceForwardingInterfaceRstp
inet::MacForwardingTable::setUnicastAddressForwardingInterfacesetUnicastAddressForwardingInterfaceMacForwardingTable

Source code

//
// This module handles the mapping between ports and MAC addresses.
//
// Entries are deleted if their age exceeds a certain limit.
//
// If needed, address tables can be pre-loaded from text files at the beginning
// of the simulation; this controlled by the forwardingTableFile module parameter.
// File format:
//   line oriented table with space or TAB delimited columns.
//   columns:
//     VLAN ID:      numeric value, 0 means no vlan
//     MAC address:  string, resolving with ~L3AddressResolver as MAC_ADDR
//     Interface:    interface name, e.g. eth3 (or interface id, e.g. 103)
//   empty lines and commented out lines starts with '#' are allowed.
//
simple MacForwardingTable like IMacForwardingTable
{
    parameters:
        @display("i=block/table2");
        double agingTime @unit(s) = default(120s);
        object forwardingTable @mutable = default([]);
        string forwardingTableFile = default("");
        string interfaceTableModule;
        string displayStringTextFormat = default("addr: %a\nvlan: %v");
}

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