BridgingLayer¶
Package: inet.linklayer.ethernet.common
compound module BridgingLayer
Provides various layer 2 services such as packet forwarding, interface selection, virtual LAN handling, stream handling.
Usage diagram¶
Inheritance diagram¶
Parameters¶
Name |
Type |
Default value |
Description |
|---|---|---|---|
macTableModule |
string |
“” |
|
interfaceTableModule |
string |
Relative module path of the interface table |
Properties¶
Name |
Value |
Description |
|---|---|---|
display |
i=block/layer |
Gates¶
Name |
Direction |
Size |
Description |
|---|---|---|---|
upperLayerIn |
input |
||
upperLayerOut |
output |
||
lowerLayerIn |
input |
||
lowerLayerOut |
output |
Unassigned submodule parameters¶
Name |
Type |
Default value |
Description |
|---|---|---|---|
directionReverser.fork.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 |
directionReverser.fork.interfaceTableModule |
string |
Module path to the InterfaceTable module |
|
directionReverser.fork.forwardProtocolRegistration |
bool |
true |
|
directionReverser.fork.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 |
directionReverser.fork.serviceMapping |
object |
{} |
Maps protocols to connected submodule names (e.g. {“ethernetmac”: “bridging”}), overrides automatically learned dispatching; * overrides all learned services, ? overrides default |
directionReverser.fork.protocolMapping |
object |
{} |
Maps protocols to connected submodule names (e.g. {“ipv4”: “bridging”}), overrides automatically learned dispatching; * overrides all learned protocols, ? overrides default |
directionReverser.reverser.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 |
directionReverser.reverser.forwardVlan |
bool |
true |
|
directionReverser.reverser.forwardPcp |
bool |
true |
|
directionReverser.reverser.excludeEncapsulationProtocols |
object |
[] |
|
directionReverser.join.displayStringTextFormat |
string |
“passed %p pk (%l)” |
Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information |
directionReverser.join.forwardServiceRegistration |
bool |
true |
|
interfaceRelay.learner.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 |
interfaceRelay.learner.macTableModule |
string |
Relative module path of MAC table |
|
interfaceRelay.learner.interfaceTableModule |
string |
Relative module path of the interface table |
|
interfaceRelay.selector.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 |
interfaceRelay.selector.macTableModule |
string |
Relative module path of MAC table |
|
interfaceRelay.selector.interfaceTableModule |
string |
Relative module path of interface table |
Source code¶
//
// Provides various layer 2 services such as packet forwarding,
// interface selection, virtual LAN handling, stream handling.
//
module BridgingLayer like IProtocolLayer
{
parameters:
string macTableModule = default("");
string interfaceTableModule; // Relative module path of the interface table
*.macTableModule = default(absPath(this.macTableModule));
*.interfaceTableModule = default(this.interfaceTableModule);
@display("i=block/layer");
gates:
input upperLayerIn;
output upperLayerOut;
input lowerLayerIn;
output lowerLayerOut;
submodules:
processingDelayLayer: <default("")> like IProcessingDelayLayer {
@display("p=300,150");
}
directionReverser: <default("DirectionReverserLayer")> like IProtocolLayer {
@display("p=300,300");
}
streamIdentifier: <default("")> like IProtocolLayer {
@display("p=300,450");
}
streamRelay: <default("")> like IProtocolLayer {
@display("p=300,600");
}
streamFilter: <default("")> like IProtocolLayer {
@display("p=300,750");
}
streamCoder: <default("")> like IProtocolLayer {
@display("p=300,900");
}
interfaceRelay: <default("InterfaceRelayLayer")> like IProtocolLayer {
@display("p=300,1050");
}
vlanPolicy: <default("")> like IProtocolLayer {
@display("p=300,1200");
}
connections:
upperLayerIn --> processingDelayLayer.upperLayerIn;
processingDelayLayer.lowerLayerOut --> directionReverser.upperLayerIn;
directionReverser.lowerLayerOut --> streamIdentifier.upperLayerIn;
streamIdentifier.lowerLayerOut --> streamRelay.upperLayerIn;
streamRelay.lowerLayerOut --> streamFilter.upperLayerIn;
streamFilter.lowerLayerOut --> streamCoder.upperLayerIn;
streamCoder.lowerLayerOut --> interfaceRelay.upperLayerIn;
interfaceRelay.lowerLayerOut --> vlanPolicy.upperLayerIn;
vlanPolicy.lowerLayerOut --> lowerLayerOut;
lowerLayerIn --> vlanPolicy.lowerLayerIn;
vlanPolicy.upperLayerOut --> interfaceRelay.lowerLayerIn;
interfaceRelay.upperLayerOut --> streamCoder.lowerLayerIn;
streamCoder.upperLayerOut --> streamFilter.lowerLayerIn;
streamFilter.upperLayerOut --> streamRelay.lowerLayerIn;
streamRelay.upperLayerOut --> streamIdentifier.lowerLayerIn;
streamIdentifier.upperLayerOut --> directionReverser.lowerLayerIn;
directionReverser.upperLayerOut --> processingDelayLayer.lowerLayerIn;
processingDelayLayer.upperLayerOut --> upperLayerOut;
}