Ieee8021qProtocol

Package: inet.linklayer.ieee8021q

Ieee8021qProtocol

compound module

This module implements the IEEE 802.1Q protocol encapsulation/decapsulation. It also provides socket support so applications can use the protocol directly.

socketTable : Ieee8021qSocketTable

Source:
socketTable: Ieee8021qSocketTable if hasSocketSupport {
    @display("p=100,100");
} socketCommandProcessor : like IPacketFlow

IPacketFlow: This module interface is implemented by packet flows.

Source:
socketCommandProcessor: <default(hasSocketSupport ? "Ieee8021qSocketCommandProcessor" : "")> like IPacketFlow {
    @display("p=300,100");
} qTagHeaderInserter : like IIeee8021qTagEpdHeaderInserter

Source:
qTagHeaderInserter: <default("Ieee8021qTagEpdHeaderInserter")> like IIeee8021qTagEpdHeaderInserter {
    @display("p=300,200");
} socketPacketProcessor : like IPacketFlow

IPacketFlow: This module interface is implemented by packet flows.

Source:
socketPacketProcessor: <default(hasSocketSupport ? "Ieee8021qSocketPacketProcessor" : "")> like IPacketFlow {
    @display("p=600,100");
} qTagHeaderChecker : like IIeee8021qTagEpdHeaderChecker

Source:
qTagHeaderChecker: <default("Ieee8021qTagEpdHeaderChecker")> like IIeee8021qTagEpdHeaderChecker {
    @display("p=600,200");
}

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
vlanTagType string "c"
hasSocketSupport bool false

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
qTagHeaderInserter.vlanTagType string
qTagHeaderChecker.vlanTagType string

Source code

//
// This module implements the IEEE 802.1Q protocol encapsulation/decapsulation.
// It also provides socket support so applications can use the protocol directly.
//
module Ieee8021qProtocol like IIeee8021qLayer
{
    parameters:
        string vlanTagType = default("c");
        bool hasSocketSupport = default(false);
        *.vlanTagType = default(this.vlanTagType);
        *.socketTableModule = default(absPath(".socketTable"));
        @display("i=block/layer");
    gates:
        input upperLayerIn;
        output upperLayerOut;
        input lowerLayerIn;
        output lowerLayerOut;
    submodules:
        socketTable: Ieee8021qSocketTable if hasSocketSupport {
            @display("p=100,100");
        }
        socketCommandProcessor: <default(hasSocketSupport ? "Ieee8021qSocketCommandProcessor" : "")> like IPacketFlow {
            @display("p=300,100");
        }
        qTagHeaderInserter: <default("Ieee8021qTagEpdHeaderInserter")> like IIeee8021qTagEpdHeaderInserter {
            @display("p=300,200");
        }
        socketPacketProcessor: <default(hasSocketSupport ? "Ieee8021qSocketPacketProcessor" : "")> like IPacketFlow {
            @display("p=600,100");
        }
        qTagHeaderChecker: <default("Ieee8021qTagEpdHeaderChecker")> like IIeee8021qTagEpdHeaderChecker {
            @display("p=600,200");
        }
    connections:
        upperLayerIn --> { @display("m=n"); } --> socketCommandProcessor.in;
        socketCommandProcessor.out --> qTagHeaderInserter.in;
        qTagHeaderInserter.out --> { @display("m=s"); } --> lowerLayerOut;

        lowerLayerIn --> { @display("m=s"); } --> qTagHeaderChecker.in;
        qTagHeaderChecker.out --> socketPacketProcessor.in;
        socketPacketProcessor.out --> { @display("m=n"); } --> upperLayerOut;
}
File: src/inet/linklayer/ieee8021q/Ieee8021qProtocol.ned