MacForwardingTable¶
Package: inet.linklayer.ethernet.common
simple module MacForwardingTable
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 is 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, resolved with ~L3AddressResolver as MAC_ADDR Interface: interface name, e.g. eth3 (or interface id, e.g. 103)
empty lines and commented out lines starting with ‘#’ are allowed.
Usage diagram¶
Inheritance diagram¶
Used in compound modules¶
Name |
Type |
Description |
|---|---|---|
compound module |
A wireless access point device that connects wireless stations (like WirelessHost) to a wired network. Supports multiple wireless radios and multiple Ethernet ports. |
Extends¶
Name |
Type |
Description |
|---|---|---|
simple module |
Base module for all INET simple modules. |
Parameters¶
Name |
Type |
Default value |
Description |
|---|---|---|---|
displayStringTextFormat |
string |
“addr: %a\nvlan: %v” |
Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information |
agingTime |
double |
120s |
|
forwardingTable |
object |
[] |
|
forwardingTableFile |
string |
“” |
|
interfaceTableModule |
string |
Properties¶
Name |
Value |
Description |
|---|---|---|
class |
MacForwardingTable |
|
display |
i=block/table2 |
Source code¶
//
// 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 is 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, resolved with ~L3AddressResolver as MAC_ADDR
// Interface: interface name, e.g. eth3 (or interface id, e.g. 103)
// empty lines and commented out lines starting with '#' are allowed.
//
simple MacForwardingTable extends SimpleModule like IMacForwardingTable
{
parameters:
@class(MacForwardingTable);
@display("i=block/table2");
double agingTime @unit(s) = default(120s);
object forwardingTable @mutable = default([]);
string forwardingTableFile = default("");
string interfaceTableModule;
displayStringTextFormat = default("addr: %a\nvlan: %v");
}
File: src/inet/linklayer/ethernet/common/MacForwardingTable.ned