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 MACAddressTable, 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, MACAddressTable, STP, RSTP
Inheritance diagram
The following diagram shows inheritance relationships for this type. Unresolved types are missing from the diagram.
Parameters
Name | Type | Default value | Description |
---|---|---|---|
interfaceTablePath | string | "^.interfaceTable" |
The path to the InterfaceTable module |
macTablePath | string | "^.macTable" |
The path to the MACAddressTable module |
Properties
Name | Value | Description |
---|---|---|
display | i=block/broadcast;bgb=425,114 |
Gates
Name | Direction | Size | Description |
---|---|---|---|
ifIn [ ] | input | ||
ifOut [ ] | output | ||
stpIn | input | ||
stpOut | output |
Signals
Name | Type | Unit |
---|---|---|
packetReceivedFromLower | cPacket | |
packetSentToLower | cPacket |
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 ~MACAddressTable, 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, MACAddressTable, STP, RSTP // simple Ieee8021dRelay like IMACRelayUnit { parameters: string interfaceTablePath = default("^.interfaceTable"); // The path to the InterfaceTable module string macTablePath = default("^.macTable"); // The path to the MACAddressTable module @display("i=block/broadcast;bgb=425,114"); @signal[packetSentToLower](type=cPacket); @signal[packetReceivedFromLower](type=cPacket); gates: input ifIn[]; output ifOut[]; input stpIn @loose; output stpOut @loose; }File: src/inet/linklayer/ieee8021d/relay/Ieee8021dRelay.ned