RelayInterfaceSelector¶
Package: inet.linklayer.ethernet.common
simple module RelayInterfaceSelector
Selects the outgoing interface for the packet passing through from the MAC address table (forwarding information database) based on the destination MAC address. The selected interface is attached to the packet in an InterfaceReq. The packet may be duplicated if multiple interfaces are found.
Usage diagram¶
Inheritance diagram¶
Used in compound modules¶
Name |
Type |
Description |
|---|---|---|
compound module |
Combines the interface MAC address learning from incoming packets with the outgoing interface selection for outgoing packets into a single layer. |
Extends¶
Name |
Type |
Description |
|---|---|---|
simple module |
Base module for various packet pusher modules. |
Parameters¶
Name |
Type |
Default value |
Description |
|---|---|---|---|
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 |
macTableModule |
string |
Relative module path of MAC table |
|
interfaceTableModule |
string |
Relative module path of interface table |
Properties¶
Name |
Value |
Description |
|---|---|---|
class |
RelayInterfaceSelector |
|
display |
i=block/fork |
Gates¶
Name |
Direction |
Size |
Description |
|---|---|---|---|
in |
input |
||
out |
output |
Signals¶
Name |
Type |
Unit |
Description |
|---|---|---|---|
packetDropped |
Statistics¶
Name |
Title |
Source |
Record |
Unit |
Interpolation Mode |
Description |
|---|---|---|---|---|---|---|
packetDropped |
packets dropped |
count,sum(packetBytes),vector(packetBytes) |
none |
Source code¶
//
// Selects the outgoing interface for the packet passing through
// from the MAC address table (forwarding information database) based on the
// destination MAC address. The selected interface is attached to the packet
// in an ~InterfaceReq. The packet may be duplicated if multiple interfaces
// are found.
//
simple RelayInterfaceSelector extends PacketPusherBase like IPacketFlow
{
parameters:
string macTableModule; // Relative module path of MAC table
string interfaceTableModule; // Relative module path of interface table
@class(RelayInterfaceSelector);
@display("i=block/fork");
@signal[packetDropped](type=inet::Packet);
@statistic[packetDropped](title="packets dropped"; record=count,sum(packetBytes),vector(packetBytes); interpolationmode=none);
}
File: src/inet/linklayer/ethernet/common/RelayInterfaceSelector.ned