Ieee8021dRelay

Package: inet.linklayer.ieee8021d.relay

Ieee8021dRelay

simple module

This modul forwards frames (EtherFrame) based on their destination MAC addresses to appropriate ports.

It can work in two mode:

  • STP unaware mode (If no module connected to its STP gate): Looks up the frames destination address in the MacForwardingTable, if it found the address, sends through that port, or otherwise broadcasts it.
  • STP aware mode (If an STP or RSTP module connected to its STP gate): Handles BPDU frames. If relaying a message also checks the port's status in the InterfaceTable.

See also: EtherFrame, MacForwardingTable, Stp, Rstp

Inheritance diagram

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

Extends

Name Type Description
MacRelayUnitBase simple module (no description)

Parameters

Name Type Default value Description
macTableModule string
interfaceTableModule string
displayStringTextFormat string "proc: %p\ndisc: %d"

Properties

Name Value Description
display i=block/switch
class Ieee8021dRelay

Gates

Name Direction Size Description
lowerLayerIn input
lowerLayerOut output
upperLayerIn input
upperLayerOut output

Signals

Name Type Unit
packetReceivedFromUpper inet::Packet
packetReceivedFromLower inet::Packet
packetDropped inet::Packet
packetSentToLower 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::arrivedarrived
MessageDispatcherinet::MessageDispatcher::handleRegisterAnyProtocolhandleRegisterAnyProtocol
MessageDispatcherinet::MessageDispatcher::handleRegisterAnyServicehandleRegisterAnyService
MessageDispatcherinet::MessageDispatcher::handleRegisterServicehandleRegisterService
MacForwardingTableinet::MacForwardingTable::getMulticastAddressForwardingInterfacesgetMulticastAddressForwardingInterfaces
MacForwardingTableinet::MacForwardingTable::getUnicastAddressForwardingInterfacegetUnicastAddressForwardingInterface
MacForwardingTableinet::MacForwardingTable::learnUnicastAddressForwardingInterfacelearnUnicastAddressForwardingInterface

Called methods (observed)

functioninfocall from
inet::Ieee8021dRelay::handleOperationStagehandleOperationStageScenarioManager

Incoming messages (observed)

gatemsgkindctrlsrcModuletags
lowerLayerInPacket0MessageDispatcherDirectionTag, DispatchProtocolReq, EncapsulationProtocolInd, InterfaceInd, MacAddressInd, PacketProtocolTag, GptpIngressTimeInd?
lowerLayerInPacket0EthernetEncapsulationDispatchProtocolReq, InterfaceInd, MacAddressInd, PacketProtocolTag, ErrorRateInd?, SignalPowerInd?, SignalTimeInd?, SnirInd?, Ieee80211ChannelInd?, Ieee80211ModeInd?
upperLayerInPacket0GptpDispatchProtocolInd, DispatchProtocolReq, InterfaceReq, MacAddressReq, PacketProtocolTag
upperLayerInPacket0Ieee8022LlcDispatchProtocolReq, InterfaceReq, MacAddressReq, PacketProtocolTag

Outgoing messages (observed)

gatemsgkindctrldestModuletags
lowerLayerOutPacket0EthernetEncapsulationDirectionTag, DispatchProtocolReq, InterfaceReq, MacAddressReq, PacketProtocolTag
lowerLayerOutPacket0EthernetMacHeaderInserterDirectionTag, DispatchProtocolReq, InterfaceReq, MacAddressReq, PacketProtocolTag, DispatchProtocolInd?
upperLayerOutPacket0GptpDirectionTag, DispatchProtocolReq, EncapsulationProtocolInd, GptpIngressTimeInd, InterfaceInd, MacAddressInd, PacketProtocolTag
upperLayerOutPacket0Ieee8022LlcDirectionTag, DispatchProtocolReq, EncapsulationProtocolInd, InterfaceInd, MacAddressInd, PacketProtocolTag

Packet operations (observed)

chunkTypepacketAction
trim

Shared Tagging operations (observed)

tagTypetagAction
clearTags
DirectionTagaddTagIfAbsent
DispatchProtocolReqaddTagIfAbsent
InterfaceIndgetTag
InterfaceReqaddTagIfAbsent, findTag
MacAddressIndgetTag
MacAddressReqaddTag, getTag
PacketProtocolTagaddTag, getTag
UserPriorityIndfindTag
VlanIndfindTag

Tagging operations (observed)

tagTypetagAction
inet::Ieee8021dInterfaceDatafindTag

Source code

//
// This modul forwards frames (~EtherFrame) based on their destination MAC addresses to appropriate ports.
//
// It can work in two mode:
// - STP unaware mode (If no module connected to its STP gate):
//     Looks up the frames destination address in the ~MacForwardingTable, if it found the address, sends through
//     that port, or otherwise broadcasts it.
// - STP aware mode (If an ~STP or ~RSTP module connected to its STP gate):
//     Handles BPDU frames.
//     If relaying a message also checks the port's status in the InterfaceTable.
//
// @see EtherFrame, MacForwardingTable, Stp, Rstp
//
simple Ieee8021dRelay extends MacRelayUnitBase like IMacRelayUnit
{
    parameters:
        @class(Ieee8021dRelay);
}

File: src/inet/linklayer/ieee8021d/relay/Ieee8021dRelay.ned