GptpBridge¶
Package: inet.linklayer.ieee8021as
compound module GptpBridge
Implements a gPTP bridge network node.
Inheritance diagram¶
Extends¶
Name |
Type |
Description |
|---|---|---|
compound module |
EthernetSwitch models a Layer 2 Ethernet switch with support for various IEEE 802.1 protocols and features. It provides frame forwarding based on MAC addresses and implements multiple switching technologies. |
Parameters¶
Name |
Type |
Default value |
Description |
|---|---|---|---|
recordPcap |
bool |
false |
|
numPcapRecorders |
int |
recordPcap ? 1 : 0 |
|
numApps |
int |
0 |
|
hasStatus |
bool |
false |
|
hasStp |
bool |
false |
|
hasMrp |
bool |
false |
|
hasGptp |
bool |
true |
|
hasCutthroughSwitching |
bool |
false |
|
fcsMode |
string |
“declared” |
|
spanningTreeProtocol |
string |
“Stp” |
|
numEthInterfaces |
int |
0 |
Minimum number of ethernet interfaces |
Properties¶
Name |
Value |
Description |
|---|---|---|
display |
i=device/switch |
|
labels |
node,ethernet-node |
|
networkNode |
Gates¶
Name |
Direction |
Size |
Description |
|---|---|---|---|
ethg [ ] |
inout |
numEthInterfaces |
Unassigned submodule parameters¶
Name |
Type |
Default value |
Description |
|---|---|---|---|
macTable.displayStringTextFormat |
string |
“addr: %a\nvlan: %v” |
Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information |
macTable.agingTime |
double |
120s |
|
macTable.forwardingTable |
object |
[] |
|
macTable.forwardingTableFile |
string |
“” |
|
macTable.interfaceTableModule |
string |
||
interfaceTable.displayStringTextFormat |
string |
“{numInterfaces} interfaces” |
Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information |
interfaceTable.displayAddresses |
bool |
false |
Whether to display IP addresses on links |
l2NodeConfigurator.displayStringTextFormat |
string |
“” |
Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information |
l2NodeConfigurator.interfaceTableModule |
string |
||
l2NodeConfigurator.l2ConfiguratorModule |
string |
“l2NetworkConfigurator” |
The absolute path to the L2NetworkConfigurator; use “” if there is no configurator |
status.displayStringTextFormat |
string |
“{stateStr}” |
Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information |
status.initialStatus |
string |
“UP” |
Initial status of the network node |
clock.oscillator.displayStringTextFormat |
string |
“%c (%n + %d)” |
Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information |
clock.oscillator.emitNumTicksSignal |
bool |
!parent.useFutureEventSet |
Enables emitting a signal at each oscillator tick, can be useful for validating the behavior of the more efficient implementation without events |
clock.oscillator.oscillatorTickEventSchedulingPriority |
int |
0 |
Specifies the scheduling priority of the tick event |
clock.oscillator.nominalTickLength |
double |
Specifies the elapsed time between oscillator ticks |
|
clock.oscillator.tickOffset |
double |
0s |
Shifts ticks to the past, must be in the range of [0, current tick length) |
clock.oscillator.driftRate |
double |
0ppm |
Constant fractional frequency offset |
clock.underlyingClock.oscillator.displayStringTextFormat |
string |
“%c (%n + %d)” |
Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information |
clock.underlyingClock.oscillator.emitNumTicksSignal |
bool |
!parent.useFutureEventSet |
Enables emitting a signal at each oscillator tick, can be useful for validating the behavior of the more efficient implementation without events |
clock.underlyingClock.oscillator.oscillatorTickEventSchedulingPriority |
int |
0 |
Specifies the scheduling priority of the tick event |
clock.underlyingClock.oscillator.nominalTickLength |
double |
Specifies the elapsed time between oscillator ticks |
|
clock.underlyingClock.oscillator.tickOffset |
double |
0s |
Shifts ticks to the past, must be in the range of [0, current tick length) |
clock.underlyingClock.oscillator.driftRate |
double |
0ppm |
Constant fractional frequency offset |
pcapRecorder.displayStringTextFormat |
string |
“rec: %n pks” |
Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information |
pcapRecorder.verbose |
bool |
true |
Whether to log packets on the module output |
pcapRecorder.recordEmptyPackets |
bool |
true |
Specifies if zero length packets are recorded or not |
pcapRecorder.enableConvertingPackets |
bool |
true |
Specifies if converting packets to link type is allowed or not |
pcapRecorder.pcapFile |
string |
“” |
The PCAP file to be written, suggested value: pcapFile = “${resultdir}/${configname}-#${runnumber}” + fullpath() + “.pcap” |
pcapRecorder.fileFormat |
string |
“pcapng” |
|
pcapRecorder.snaplen |
int |
65535 |
Maximum number of bytes to record per packet |
pcapRecorder.timePrecision |
int |
6 |
Time precision in recorded file. pcap supports only 6 (usec) or 9 (nanosec), pcapng supports more values (see ‘if_tsresol’ option in pcapng file format). |
pcapRecorder.dumpBadFrames |
bool |
true |
Enable dump of frames with hasBitError |
pcapRecorder.moduleNamePatterns |
string |
“wlan[*] eth[*] ppp[*]” |
Space-separated list of sibling module names to listen on |
pcapRecorder.sendingSignalNames |
string |
“transmissionEnded” |
Space-separated list of outbound packet signals to subscribe to |
pcapRecorder.receivingSignalNames |
string |
“receptionEnded” |
Space-separated list of inbound packet signals to subscribe to |
pcapRecorder.dumpProtocols |
string |
“ethernetmac ppp ieee80211mac” |
Space-separated list of protocol names as defined in the Protocol class |
pcapRecorder.packetFilter |
object |
“*” |
Which packets are considered, matches all packets by default |
pcapRecorder.helpers |
string |
“” |
Usable PcapRecorder::IHelper helpers for accept packettype and store/convert packet as specified linktype |
pcapRecorder.alwaysFlush |
bool |
false |
Flush the pcapFile after each write to ensure that all packets are captured in case of a crash |
mrp.displayStringTextFormat |
string |
“role: %r\nnode: %n\nring: %g” |
Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information |
mrp.linkDetectionDelay |
double |
truncnormal(385ms,325ms) |
Switches do not detect a link change immediately. This parameter sets the simulated delay of a “link down” event. Note: the delay for “link up” is hardcoded to 1us in the code. |
mrp.processingDelay |
double |
truncnormal(100us,80us) |
Switches require a certain amount of time to process each received packet. This parameter sets the processing delay; it is applied in handleMessageWhenUp(). |
mrp.timingProfile |
int |
500ms |
MRP defines four Maximum Recovery Time settings for rings: 500 ms, 200 ms, 30 ms, or 10 ms. This parameter sets a hard upper time limit guaranteed by the protocol, and the interval for test frames, topology changes, and link change times are adapted accordingly. It should be set to the same value on all nodes within a ring. |
mrp.mrpRole |
string |
“disabled” |
Each MRP node can either be disabled (value 0, no MRP function), be a MediaRedundancyClient (MRC, value 1), a MediaRedundancyManager (MRM, value 2), or a MediaRedundancyAutoManager (MRA, value 4). The model does not support the backward-compatible MRA (value 3) as it would be redundant. Each network may have only one MRM; all other nodes must assume the MRC role. MRAs can vote on which node should take the MRM role based on priority and MAC address value; other nodes dynamically switch to the MRC role. Mixing MRM and MRA is possible but not recommended. |
mrp.ringPort1 |
int |
0 |
Each MRP node has exactly two ring interfaces, which must be configured by the network administrator. The ringPort1 and ringPort2 parameters define the port index of the first and second ring port, respectively. |
mrp.ringPort2 |
int |
1 |
|
mrp.uuid0 |
int |
An MRP ring has a UUID, split into two 64-bit parts. Every node in a ring must be configured with the same UUID. |
|
mrp.uuid1 |
int |
||
mrp.enableLinkCheckOnRing |
bool |
false |
It is possible to enable active link checks on Layer 2 for each ring port, using CCM (Connectivity Check Message) messages defined in 802.1q Continuity Fault Management (CFM). Consider the additional load on the node and network when enabling this feature. |
mrp.ccmInterval |
double |
10ms |
CCM (Connectivity Check Message) link checks can be performed every 3.3 ms or every 10 ms. |
mrp.interconnectionRingCheckAware |
bool |
true |
MRP rings can be redundantly connected by interconnection nodes. To manage necessary communication, normal MRP nodes should be aware of the check methods used. Checks can be performed either by ring check (similar to the ring test mechanism) or by link check on Layer 2 (CCM messages). |
mrp.interconnectionLinkCheckAware |
bool |
true |
|
mrp.visualize |
bool |
true |
Visualizes the ring by coloring connections in the network graphics. Labels the Ethernet interface with port role and status. |
mrp.interfaceTableModule |
string |
The path to the InterfaceTable module. |
|
mrp.macTableModule |
string |
The path to the MacForwardingTable module. |
|
mrp.mrpRelayModule |
string |
The path to the MrpRelay module. |
|
mrp.mrpPriority |
int |
0xA000 |
A MRM or MRA can have a priority ranging from the highest (0x0000) to the lowest (0xFFFF). MRMs should be assigned one of the following values: HIGHEST = 0x0000, HIGH = 0x4000, DEFAULT = 0x8000. If the node is an MRA, assign one of these: MRAHIGHEST = 0x9000, MRADEFAULT = 0xA000, MRALOWEST = 0xFFFF. MRAs determine the acting manager based on priority and MAC address. |
mrp.nonblockingMrcSupported |
bool |
true |
In MRM role: Specifies whether non-blocking MRCs are supported by the MRM, i.e. those that are not capable of setting a ring port to BLOCKED state. |
mrp.reactOnLinkChange |
bool |
true |
In MRM role: Determines if the manager reacts to link change frames sent by clients or if it solely relies on ring tests for status updates. |
stp.helloTime |
double |
||
stp.forwardDelay |
double |
||
stp.maxAge |
double |
||
stp.bridgePriority |
int |
||
stp.visualize |
bool |
||
sc.displayStringTextFormat |
string |
“processed {numProcessedPackets} pk ({processedTotalLength})” |
Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information |
sc.interfaceTableModule |
string |
Module path to the InterfaceTable module |
|
sc.forwardServiceRegistration |
bool |
true |
|
sc.forwardProtocolRegistration |
bool |
true |
|
sc.interfaceMapping |
object |
{} |
Maps network interface names to connected submodule names (e.g. {“eth0”: “bridging”}), overrides automatically learned dispatching; * overrides all learned network interfaces, ? overrides default |
sc.serviceMapping |
object |
{} |
Maps protocols to connected submodule names (e.g. {“ethernetmac”: “bridging”}), overrides automatically learned dispatching; * overrides all learned services, ? overrides default |
sc.protocolMapping |
object |
{} |
Maps protocols to connected submodule names (e.g. {“ipv4”: “bridging”}), overrides automatically learned dispatching; * overrides all learned protocols, ? overrides default |
llc.displayStringTextFormat |
string |
“” |
Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information |
llc.registerProtocol |
bool |
false |
FIXME //KLUDGE should redesign the placement of EthernetEncapsulation and LLC modules |
cb.displayStringTextFormat |
string |
“processed {numProcessedPackets} pk ({processedTotalLength})” |
Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information |
cb.interfaceTableModule |
string |
Module path to the InterfaceTable module |
|
cb.forwardServiceRegistration |
bool |
true |
|
cb.forwardProtocolRegistration |
bool |
true |
|
cb.interfaceMapping |
object |
{} |
Maps network interface names to connected submodule names (e.g. {“eth0”: “bridging”}), overrides automatically learned dispatching; * overrides all learned network interfaces, ? overrides default |
cb.serviceMapping |
object |
{} |
Maps protocols to connected submodule names (e.g. {“ethernetmac”: “bridging”}), overrides automatically learned dispatching; * overrides all learned services, ? overrides default |
cb.protocolMapping |
object |
{} |
Maps protocols to connected submodule names (e.g. {“ipv4”: “bridging”}), overrides automatically learned dispatching; * overrides all learned protocols, ? overrides default |
bridging.displayStringTextFormat |
string |
“proc: %p\ndisc: %d” |
Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information |
bridging.macTableModule |
string |
||
bridging.interfaceTableModule |
string |
||
bridging.switchingDelay |
double |
truncnormal(8.61us,5.42us) |
Switches take a certain amount of time for processing each packet. This parameter sets the processsing delay applied before sending packets out. |
bl.displayStringTextFormat |
string |
“processed {numProcessedPackets} pk ({processedTotalLength})” |
Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information |
bl.interfaceTableModule |
string |
Module path to the InterfaceTable module |
|
bl.forwardServiceRegistration |
bool |
true |
|
bl.forwardProtocolRegistration |
bool |
true |
|
bl.interfaceMapping |
object |
{} |
Maps network interface names to connected submodule names (e.g. {“eth0”: “bridging”}), overrides automatically learned dispatching; * overrides all learned network interfaces, ? overrides default |
bl.serviceMapping |
object |
{} |
Maps protocols to connected submodule names (e.g. {“ethernetmac”: “bridging”}), overrides automatically learned dispatching; * overrides all learned services, ? overrides default |
bl.protocolMapping |
object |
{} |
Maps protocols to connected submodule names (e.g. {“ipv4”: “bridging”}), overrides automatically learned dispatching; * overrides all learned protocols, ? overrides default |
ethernet.displayStringTextFormat |
string |
“passed up: {totalFromMAC}\nsent: {totalFromHigherLayer}” |
Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information |
ethernet.registerProtocol |
bool |
false |
FIXME //KLUDGE should redesign place of EthernetEncapsulation and LLC modules |
ethernet.interfaceTableModule |
string |
The path to the InterfaceTable module |
|
ethernet.fcsMode |
string |
“declared” |
|
ethernet.stopOperationExtraTime |
double |
-1s |
Extra time after the lifecycle stop operation has finished |
ethernet.stopOperationTimeout |
double |
2s |
Timeout value for the lifecycle stop operation |
li.displayStringTextFormat |
string |
“processed {numProcessedPackets} pk ({processedTotalLength})” |
Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information |
li.interfaceTableModule |
string |
Module path to the InterfaceTable module |
|
li.forwardServiceRegistration |
bool |
true |
|
li.forwardProtocolRegistration |
bool |
true |
|
li.interfaceMapping |
object |
{} |
Maps network interface names to connected submodule names (e.g. {“eth0”: “bridging”}), overrides automatically learned dispatching; * overrides all learned network interfaces, ? overrides default |
li.serviceMapping |
object |
{} |
Maps protocols to connected submodule names (e.g. {“ethernetmac”: “bridging”}), overrides automatically learned dispatching; * overrides all learned services, ? overrides default |
li.protocolMapping |
object |
{} |
Maps protocols to connected submodule names (e.g. {“ipv4”: “bridging”}), overrides automatically learned dispatching; * overrides all learned protocols, ? overrides default |
eth.pcapRecorder.displayStringTextFormat |
string |
“rec: %n pks” |
Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information |
eth.pcapRecorder.verbose |
bool |
true |
Whether to log packets on the module output |
eth.pcapRecorder.recordEmptyPackets |
bool |
true |
Specifies if zero length packets are recorded or not |
eth.pcapRecorder.enableConvertingPackets |
bool |
true |
Specifies if converting packets to link type is allowed or not |
eth.pcapRecorder.pcapFile |
string |
“” |
The PCAP file to be written, suggested value: pcapFile = “${resultdir}/${configname}-#${runnumber}” + fullpath() + “.pcap” |
eth.pcapRecorder.fileFormat |
string |
“pcapng” |
|
eth.pcapRecorder.snaplen |
int |
65535 |
Maximum number of bytes to record per packet |
eth.pcapRecorder.timePrecision |
int |
6 |
Time precision in recorded file. pcap supports only 6 (usec) or 9 (nanosec), pcapng supports more values (see ‘if_tsresol’ option in pcapng file format). |
eth.pcapRecorder.dumpBadFrames |
bool |
true |
Enable dump of frames with hasBitError |
eth.pcapRecorder.sendingSignalNames |
string |
“transmissionEnded” |
Space-separated list of outbound packet signals to subscribe to |
eth.pcapRecorder.receivingSignalNames |
string |
“receptionEnded” |
Space-separated list of inbound packet signals to subscribe to |
eth.pcapRecorder.dumpProtocols |
string |
“ethernetmac ppp ieee80211mac” |
Space-separated list of protocol names as defined in the Protocol class |
eth.pcapRecorder.packetFilter |
object |
“*” |
Which packets are considered, matches all packets by default |
eth.pcapRecorder.helpers |
string |
“” |
Usable PcapRecorder::IHelper helpers for accept packettype and store/convert packet as specified linktype |
eth.pcapRecorder.alwaysFlush |
bool |
false |
Flush the pcapFile after each write to ensure that all packets are captured in case of a crash |
string |
“contains %p pk (%l) pushed %u\npulled %o removed %r dropped %d” |
Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information |
|
int |
-1 |
Maximum number of packets in the queue, no limit by default |
|
int |
-1b |
Maximum total length of packets in the queue, no limit by default |
|
string |
“” |
Determines which packets are dropped when the queue is overloaded, packets are not dropped by default; the parameter must be the name of a C++ class which implements the IPacketDropperFunction C++ interface and is registered via Register_Class |
|
string |
“” |
Determines the order of packets in the queue, insertion order by default; the parameter must be the name of a C++ class which implements the IPacketComparatorFunction C++ interface and is registered via Register_Class |
|
string |
“” |
Relative module path to the IPacketBuffer module used by this queue, implicit buffer by default |
|
string |
“served %p pk (%l)” |
Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information |
|
int |
0 |
Specifies the FES scheduling priority for the extra event that is pulling the packet, -1 means no extra event |
|
eth.macLayer.outboundEmitter.displayStringTextFormat |
string |
“processed {numProcessedPackets} pk ({processedTotalLength})” |
Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information |
eth.macLayer.outboundEmitter.packetFilter |
object |
“*” |
Which packets are considered, matches all packets by default |
eth.macLayer.outboundEmitter.direction |
string |
“undefined” |
|
eth.macLayer.outboundEmitter.signalName |
string |
||
eth.macLayer.fcsChecker.displayStringTextFormat |
string |
“dropped {numDroppedPackets}/{numProcessedPackets} pk ({droppedTotalLength}/{processedTotalLength})” |
Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information |
eth.macLayer.fcsChecker.backpressure |
bool |
false |
|
eth.macLayer.fcsChecker.popFcs |
bool |
false |
|
eth.macLayer.inboundEmitter.displayStringTextFormat |
string |
“processed {numProcessedPackets} pk ({processedTotalLength})” |
Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information |
eth.macLayer.inboundEmitter.packetFilter |
object |
“*” |
Which packets are considered, matches all packets by default |
eth.macLayer.inboundEmitter.direction |
string |
“undefined” |
|
eth.macLayer.inboundEmitter.signalName |
string |
||
eth.phyLayer.phyHeaderInserter.displayStringTextFormat |
string |
“processed {numProcessedPackets} pk ({processedTotalLength})” |
Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information |
eth.phyLayer.interFrameGapInserter.displayStringTextFormat |
string |
“delayed %p pk (%l)\nifg: %g” |
Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information |
eth.phyLayer.interFrameGapInserter.clockModule |
string |
“” |
Relative path of a module that implements IClock(1,:ref:2 <neddoc-msg-inet-iclock>); optional |
eth.phyLayer.interFrameGapInserter.initialChannelBusy |
bool |
false |
Assume that the channel was busy before the simulation started |
eth.phyLayer.interFrameGapInserter.duration |
double |
96s / dropUnit(parent.bitrate) |
|
eth.phyLayer.outboundEmitter.displayStringTextFormat |
string |
“processed {numProcessedPackets} pk ({processedTotalLength})” |
Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information |
eth.phyLayer.outboundEmitter.packetFilter |
object |
“*” |
Which packets are considered, matches all packets by default |
eth.phyLayer.outboundEmitter.direction |
string |
“undefined” |
|
eth.phyLayer.outboundEmitter.signalName |
string |
||
eth.phyLayer.transmitter.displayStringTextFormat |
string |
“processed {numProcessedPackets} pk ({processedTotalLength})” |
Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information |
eth.phyLayer.transmitter.clockModule |
string |
“” |
Relative path of a module that implements IClock(1,:ref:2 <neddoc-msg-inet-iclock>); optional |
eth.phyLayer.transmitter.datarate |
double |
parent.bitrate |
|
eth.phyLayer.phyHeaderChecker.displayStringTextFormat |
string |
“dropped {numDroppedPackets}/{numProcessedPackets} pk ({droppedTotalLength}/{processedTotalLength})” |
Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information |
eth.phyLayer.phyHeaderChecker.backpressure |
bool |
false |
|
eth.phyLayer.inboundEmitter.displayStringTextFormat |
string |
“processed {numProcessedPackets} pk ({processedTotalLength})” |
Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information |
eth.phyLayer.inboundEmitter.packetFilter |
object |
“*” |
Which packets are considered, matches all packets by default |
eth.phyLayer.inboundEmitter.direction |
string |
“undefined” |
|
eth.phyLayer.inboundEmitter.signalName |
string |
||
string |
“processed {numProcessedPackets} pk ({processedTotalLength})” |
Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information |
|
double |
parent.bitrate |
Source code¶
//
// Implements a gPTP bridge network node.
//
module GptpBridge extends EthernetSwitch
{
parameters:
hasGptp = true;
}