Ieee8021qLayer¶
Package: inet.linklayer.ieee8021q
compound module Ieee8021qLayer
Implements IEEE 802.1Q protocol functionality as a layered architecture with policy and protocol components. The policy submodule handles VLAN filtering and mapping, while the protocol submodule manages tag encapsulation/ decapsulation. Supports both C-VLAN (0x8100) and S-VLAN (0x88A8) tag types through configuration. Enables network segmentation and traffic control in Ethernet networks by processing VLAN tags according to configured policies.
Usage diagram¶
Inheritance diagram¶
Parameters¶
Name |
Type |
Default value |
Description |
|---|---|---|---|
interfaceTableModule |
string |
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 |
|---|---|---|---|
policy.outboundMapper.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 |
policy.outboundMapper.interfaceTableModule |
string |
||
policy.outboundMapper.protocol |
string |
“ieee8021qctag” |
|
policy.outboundMapper.mappedVlanIds |
object |
{} |
Maps network interface name to another map which maps accepted VLAN ids to replacement VLAN ids, ‘*’ as interface name matches all interfaces, -1 VLAN id matches if no tag is present |
policy.outboundFilter.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 |
policy.outboundFilter.backpressure |
bool |
false |
|
policy.outboundFilter.interfaceTableModule |
string |
||
policy.outboundFilter.acceptedVlanIds |
object |
{} |
Maps network interface name to a list of accepted VLAN ids, ‘*’ as interface name matches all interfaces, -1 VLAN id matches if no tag is present |
policy.inboundFilter.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 |
policy.inboundFilter.backpressure |
bool |
false |
|
policy.inboundFilter.interfaceTableModule |
string |
||
policy.inboundFilter.acceptedVlanIds |
object |
{} |
Maps network interface name to a list of accepted VLAN ids, ‘*’ as interface name matches all interfaces, -1 VLAN id matches if no tag is present |
protocol.socketTable.displayStringTextFormat |
string |
“” |
Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information |
protocol.socketCommandProcessor.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 |
protocol.socketCommandProcessor.socketTableModule |
string |
||
protocol.qTagHeaderInserter.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 |
protocol.qTagHeaderInserter.vlanTagType |
string |
“c” |
|
protocol.qTagHeaderInserter.nextProtocol |
string |
“ethernetmac” |
|
protocol.qTagHeaderInserter.defaultVlanId |
int |
-1 |
|
protocol.qTagHeaderInserter.defaultPcp |
int |
-1 |
|
protocol.qTagHeaderInserter.defaultUserPriority |
int |
-1 |
|
protocol.qTagHeaderInserter.defaultDropEligible |
int |
-1 |
<0: unspecified, 0: false, >0: true |
protocol.socketPacketProcessor.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 |
protocol.socketPacketProcessor.socketTableModule |
string |
||
protocol.qTagHeaderChecker.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 |
protocol.qTagHeaderChecker.backpressure |
bool |
false |
|
protocol.qTagHeaderChecker.vlanTagType |
string |
“c” |
|
protocol.qTagHeaderChecker.vlanIdFilter |
object |
[] |
Source code¶
//
// Implements IEEE 802.1Q protocol functionality as a layered architecture with
// policy and protocol components. The policy submodule handles VLAN filtering
// and mapping, while the protocol submodule manages tag encapsulation/
// decapsulation. Supports both C-VLAN (0x8100) and S-VLAN
// (0x88A8) tag types through configuration. Enables network segmentation and
// traffic control in Ethernet networks by processing VLAN tags according to
// configured policies.
//
module Ieee8021qLayer like IIeee8021qLayer
{
parameters:
@display("i=block/layer");
string interfaceTableModule;
*.interfaceTableModule = default(absPath(this.interfaceTableModule));
gates:
input upperLayerIn;
output upperLayerOut;
input lowerLayerIn;
output lowerLayerOut;
submodules:
policy: <default("VlanPolicyLayer")> like IProtocolLayer {
@display("p=300,150");
}
protocol: <default("Ieee8021qProtocol")> like IIeee8021qLayer {
@display("p=300,300");
}
connections:
upperLayerIn --> { @display("m=n"); } --> policy.upperLayerIn;
policy.lowerLayerOut --> protocol.upperLayerIn;
protocol.lowerLayerOut --> { @display("m=s"); } --> lowerLayerOut;
lowerLayerIn --> { @display("m=s"); } --> protocol.lowerLayerIn;
protocol.upperLayerOut --> policy.lowerLayerIn;
policy.upperLayerOut --> { @display("m=n"); } --> upperLayerOut;
}