Ieee8021qLayer

Package: inet.linklayer.ieee8021q

Ieee8021qLayer

compound module

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.

policy : like IProtocolLayer

IProtocolLayer: Interface for all protocol layer modules that connect to a higher and to a lower protocol layer,...

Source:
policy: <default("VlanPolicyLayer")> like IProtocolLayer {
    @display("p=300,150");
} protocol : like IIeee8021qLayer

Ieee8021qProtocol: Implements the IEEE 802.1Q protocol encapsulation/decapsulation.

Source:
protocol: <default("Ieee8021qProtocol")> like IIeee8021qLayer {
    @display("p=300,300");
}

Usage diagram

The following diagram shows usage relationships between types. Unresolved types are missing from the diagram.

Inheritance diagram

The following diagram shows inheritance relationships for this type. Unresolved types are missing from the 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

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;
}
File: src/inet/linklayer/ieee8021q/Ieee8021qLayer.ned