RelayInterfaceSelector

Package: inet.linklayer.ethernet.common

RelayInterfaceSelector

simple module

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

Inheritance diagram

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

Extends

Name Type Description
PacketPusherBase simple module

This is a base module for various packet pusher modules.

Parameters

Name Type Default value Description
displayStringTextFormat string "processed %p pk (%l)"

determines the text that is written on top of the submodule

macTableModule string

relative module path of MAC table

interfaceTableModule string

relative module path of interface table

Properties

Name Value Description
display i=block/fork
class RelayInterfaceSelector

Gates

Name Direction Size Description
in input
out output

Signals

Name Type Unit
packetDropped inet::Packet

Statistics

Name Title Source Record Unit Interpolation Mode
packetDropped packets dropped count, sum(packetBytes), vector(packetBytes) none

Direct method calls (observed)

call tofunctioninfo
MessageDispatcherinet::MessageDispatcher::pushPacketpushPacket
MacForwardingTableinet::MacForwardingTable::getMulticastAddressForwardingInterfacesgetMulticastAddressForwardingInterfaces
MacForwardingTableinet::MacForwardingTable::getUnicastAddressForwardingInterfacegetUnicastAddressForwardingInterface
VlanReqMapperinet::VlanReqMapper::pushPacketpushPacket

Called methods (observed)

functioninfocall from
inet::RelayInterfaceSelector::pushPacketpushPacketStreamEncoder, PacketMultiplexer

Pushed in messages (observed)

gatemsgkindctrlsrcModuletags
inPacket0StreamEncoderDirectionTag, EncapsulationProtocolReq, MacAddressReq, PacketProtocolTag, PcpReq, StreamReq, VlanReq, DispatchProtocolReq?, DropEligibleReq?, EligibilityTimeTag?, InterfaceInd?, SequenceNumberReq?, SocketReq?, UserPriorityReq?
inPacket0PacketMultiplexerMacAddressReq, PacketProtocolTag, CutthroughTag?, DirectionTag?, DispatchProtocolInd?, DispatchProtocolReq?, DropEligibleReq?, EncapsulationProtocolReq?, InterfaceInd?, InterfaceReq?, PcpReq?, UserPriorityReq?, VlanReq?

Push out messages (observed)

gatemsgkindctrldestModuletags
outPacket0MessageDispatcherDirectionTag, DispatchProtocolReq, EncapsulationProtocolReq, InterfaceReq, MacAddressReq, PacketProtocolTag, CutthroughTag?, DispatchProtocolInd?, DropEligibleReq?, EligibilityTimeTag?, InterfaceInd?, PcpReq?, SequenceNumberReq?, SocketReq?, StreamReq?, UserPriorityReq?, VlanReq?
outPacket0VlanReqMapperDirectionTag, DispatchProtocolReq, EncapsulationProtocolReq, InterfaceInd, InterfaceReq, MacAddressReq, PacketProtocolTag, DropEligibleReq?, UserPriorityReq?, VlanReq?

Shared Tagging operations (observed)

tagTypetagAction
DirectionTagaddTagIfAbsent
DispatchProtocolReqaddTagIfAbsent
EncapsulationProtocolReqaddTagIfAbsent, findTagForUpdate
InterfaceIndfindTag
InterfaceReqaddTagIfAbsent, findTag
MacAddressReqgetTag
VlanReqfindTag

Source code

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