VlanPolicyLayer

Package: inet.linklayer.vlan

compound module VlanPolicyLayer

(no description)

Usage diagram

Inheritance diagram

Used in compound modules

Name

Type

Description

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.

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

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

outboundMapper.interfaceTableModule

string

outboundMapper.protocol

string

“ieee8021qctag”

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

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

outboundFilter.backpressure

bool

false

outboundFilter.interfaceTableModule

string

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

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

inboundFilter.backpressure

bool

false

inboundFilter.interfaceTableModule

string

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

Source code

module VlanPolicyLayer like IProtocolLayer
{
    parameters:
        @display("i=block/layer");
        string interfaceTableModule;
        *.interfaceTableModule = default(absPath(this.interfaceTableModule));
    gates:
        input upperLayerIn;
        output upperLayerOut;
        input lowerLayerIn;
        output lowerLayerOut;
    submodules:
        outboundMapper: <default("VlanReqMapper")> like IPacketFlow {
            @display("p=200,150");
        }
        outboundFilter: <default("VlanReqFilter")> like IPacketFilter {
            @display("p=200,300");
        }
        inboundMapper: <default("")> like IPacketFlow {
            @display("p=500,150");
        }
        inboundFilter: <default("VlanIndFilter")> like IPacketFilter {
            @display("p=500,300");
        }
    connections:
        upperLayerIn --> { @display("m=n"); } --> outboundMapper.in;
        outboundMapper.out --> outboundFilter.in;
        outboundFilter.out --> { @display("m=s"); } --> lowerLayerOut;

        lowerLayerIn --> { @display("m=s"); } --> inboundFilter.in;
        inboundFilter.out --> inboundMapper.in;
        inboundMapper.out --> { @display("m=n"); } --> upperLayerOut;
}

File: src/inet/linklayer/vlan/VlanPolicyLayer.ned