Package: inet.linklayer.ieee8021d.relay
Ieee8021dRelay
simple moduleThis 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 to | function | info |
---|---|---|
MessageDispatcher | inet::MessageDispatcher::arrived | arrived |
MessageDispatcher | inet::MessageDispatcher::handleRegisterAnyProtocol | handleRegisterAnyProtocol |
MessageDispatcher | inet::MessageDispatcher::handleRegisterAnyService | handleRegisterAnyService |
MessageDispatcher | inet::MessageDispatcher::handleRegisterService | handleRegisterService |
MacForwardingTable | inet::MacForwardingTable::getMulticastAddressForwardingInterfaces | getMulticastAddressForwardingInterfaces |
MacForwardingTable | inet::MacForwardingTable::getUnicastAddressForwardingInterface | getUnicastAddressForwardingInterface |
MacForwardingTable | inet::MacForwardingTable::learnUnicastAddressForwardingInterface | learnUnicastAddressForwardingInterface |
Called methods (observed)
function | info | call from |
---|---|---|
inet::Ieee8021dRelay::handleOperationStage | handleOperationStage | ScenarioManager |
Incoming messages (observed)
gate | msg | kind | ctrl | srcModule | tags |
---|---|---|---|---|---|
lowerLayerIn | Packet | 0 | MessageDispatcher | DirectionTag, DispatchProtocolReq, EncapsulationProtocolInd, InterfaceInd, MacAddressInd, PacketProtocolTag, GptpIngressTimeInd? | |
lowerLayerIn | Packet | 0 | EthernetEncapsulation | DispatchProtocolReq, InterfaceInd, MacAddressInd, PacketProtocolTag, ErrorRateInd?, SignalPowerInd?, SignalTimeInd?, SnirInd?, Ieee80211ChannelInd?, Ieee80211ModeInd? | |
upperLayerIn | Packet | 0 | Gptp | DispatchProtocolInd, DispatchProtocolReq, InterfaceReq, MacAddressReq, PacketProtocolTag | |
upperLayerIn | Packet | 0 | Ieee8022Llc | DispatchProtocolReq, InterfaceReq, MacAddressReq, PacketProtocolTag |
Outgoing messages (observed)
gate | msg | kind | ctrl | destModule | tags |
---|---|---|---|---|---|
lowerLayerOut | Packet | 0 | EthernetEncapsulation | DirectionTag, DispatchProtocolReq, InterfaceReq, MacAddressReq, PacketProtocolTag | |
lowerLayerOut | Packet | 0 | EthernetMacHeaderInserter | DirectionTag, DispatchProtocolReq, InterfaceReq, MacAddressReq, PacketProtocolTag, DispatchProtocolInd? | |
upperLayerOut | Packet | 0 | Gptp | DirectionTag, DispatchProtocolReq, EncapsulationProtocolInd, GptpIngressTimeInd, InterfaceInd, MacAddressInd, PacketProtocolTag | |
upperLayerOut | Packet | 0 | Ieee8022Llc | DirectionTag, DispatchProtocolReq, EncapsulationProtocolInd, InterfaceInd, MacAddressInd, PacketProtocolTag |
Packet operations (observed)
chunkType | packetAction |
---|---|
trim |
Shared Tagging operations (observed)
tagType | tagAction |
---|---|
clearTags | |
DirectionTag | addTagIfAbsent |
DispatchProtocolReq | addTagIfAbsent |
InterfaceInd | getTag |
InterfaceReq | addTagIfAbsent, findTag |
MacAddressInd | getTag |
MacAddressReq | addTag, getTag |
PacketProtocolTag | addTag, getTag |
UserPriorityInd | findTag |
VlanInd | findTag |
Tagging operations (observed)
tagType | tagAction |
---|---|
inet::Ieee8021dInterfaceData | findTag |
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