Package: inet.linklayer.contract
IMacRelayUnit
module interfaceModule interface for modules providing Ethernet switch functionality. These modules handle the mapping between ports and MAC addresses, and forward frames to appropriate ports.
Functions:
- relays frames based on their dest MAC addresses (dest-->port mapping)
- models finite buffer size (drops) and finite processing power (latency, queuing)
Address caching is modeled by a fixed-size lookup table. When the table is full, the oldest address is kicked out of the cache.
Entries are also deleted if their age exceeds a certain limit.
If needed, address tables can be pre-loaded from text files at the beginning of the simulation; this is controlled by the forwardingTableFile module parameter.
This module is not a concrete implementation, it just defines gates and parameters an ~IMacRelayUnit should have. Concrete implementations add capacity and performance aspects to the model (number of frames processed per second, amount of memory available in the switch, etc.)
Known implementations are ~MacRelayUnit and ~Ieee8021dRelay.
Inheritance diagram
The following diagram shows inheritance relationships for this type. Unresolved types are missing from the diagram.
Implemented by
| Name | Type | Description |
|---|---|---|
| Ieee8021dRelay | simple module |
Forwards frames (~EtherFrame) based on their destination MAC addresses to appropriate ports. |
| MacRelayUnit | simple module |
Implements Ethernet switch functionality by relaying frames between different ports based on destination MAC addresses. Maintains a MAC address table that maps addresses to ports, learns addresses from incoming frames, and forwards frames appropriately. Handles unicast, multicast, and broadcast traffic according to standard Ethernet switching rules, with support for VLANs. |
| MrpRelay | simple module |
Relay unit with support for the Media Redundancy Protocol (MRP), defined in IEC 62439-2. |
Used in compound modules
| Name | Type | Description |
|---|---|---|
| AccessPoint | compound module |
A wireless access point device that connects wireless stations (like WirelessHost) to a wired network. Supports multiple wireless radios and multiple Ethernet ports. |
Extends
| Name | Type | Description |
|---|---|---|
| IProtocolLayer | module interface |
Interface for all protocol layer modules that connect to a higher and to a lower protocol layer, both of which are optional. |
Properties
| Name | Value | Description |
|---|---|---|
| omittedTypename | OmittedProtocolLayer | |
| display | i=block/switch |
Source code
// // Module interface for modules providing Ethernet switch functionality. // These modules handle the mapping between ports and MAC addresses, // and forward frames to appropriate ports. // // Functions: // - relays frames based on their dest MAC addresses (dest-->port mapping) // - models finite buffer size (drops) and finite processing power (latency, queuing) // // Address caching is modeled by a fixed-size lookup table. // When the table is full, the oldest address is kicked out of the cache. // // Entries are also deleted if their age exceeds a certain limit. // // If needed, address tables can be pre-loaded from text files at the beginning // of the simulation; this is controlled by the `forwardingTableFile` module parameter. // // This module is not a concrete implementation, it just defines gates and // parameters an ~IMacRelayUnit should have. Concrete implementations add // capacity and performance aspects to the model (number of frames processed // per second, amount of memory available in the switch, etc.) // // Known implementations are ~MacRelayUnit and ~Ieee8021dRelay. // moduleinterface IMacRelayUnit extends IProtocolLayer { parameters: @display("i=block/switch"); }File: src/inet/linklayer/contract/IMacRelayUnit.ned