DualIeee8021qFilter

Package: inet.linklayer.ieee8021q

DualIeee8021qFilter

compound module

This module combines two meters and their corresponding filters per path. This is primarily useful for combining a token bucket based metering with an asynchronous packet shaper. Note that the asynchronous packet shaper also has parts in the network interface queue module.

See also: EligibilityTimeQueue, EligibilityTimeGate

classifier : like IPacketClassifier

StreamClassifier: This module classifies packets based on the stream they are part of.

IPacketClassifier: This module interface is implemented by packet classifier modules.

Source:
classifier: <default("StreamClassifier")> like IPacketClassifier {
    gateIndexOffset = default(parent.hasDefaultPath ? 1 : 0);
    @display("p=100,100");
} meter1[numStreams] : like IPacketMeter

DualRateThreeColorMeter: This packet meter module measures the packet flow that is passing through using two token buckets.

IPacketMeter: This module interface is implemented by packet meter modules.

Source:
meter1[numStreams]: <default("DualRateThreeColorMeter")> like IPacketMeter {
    @display("p=300,$startY,column,150");
} filter1[numStreams] : like IPacketFilter

LabelFilter: This packet filter module drops packets that don't match the given packet label filter criteria.

IPacketFilter: This module interface is implemented by packet filter modules.

Source:
filter1[numStreams]: <default("LabelFilter")> like IPacketFilter {
    labelFilter = default("green");
    @display("p=500,$startY,column,150");
} meter2[numStreams] : like IPacketMeter

EligibilityTimeMeter: This module is a packet meter which measures the packet flow that is passing through and optionally...

IPacketMeter: This module interface is implemented by packet meter modules.

Source:
meter2[numStreams]: <default("EligibilityTimeMeter")> like IPacketMeter {
    @display("p=700,$startY,column,150");
} filter2[numStreams] : like IPacketFilter

EligibilityTimeFilter: This module is a packet filter that operates based on the ~EligibilityTimeTag attached to the...

IPacketFilter: This module interface is implemented by packet filter modules.

Source:
filter2[numStreams]: <default("EligibilityTimeFilter")> like IPacketFilter {
    @display("p=900,$startY,column,150");
} gate[numStreams] : like IPacketGate

InteractiveGate: This packet gate module allows or forbids packets to pass through depending on whether the gate is...

IPacketGate: This module interface is implemented by packet gate.

Source:
gate[numStreams]: <default("InteractiveGate")> like IPacketGate {
    @display("p=1100,$startY,column,150");
} multiplexer : PacketMultiplexer

This module connects multiple packet producers to one packet consumer.

Source:
multiplexer: PacketMultiplexer {
    @display("p=1300,100");
}

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
numStreams int 0

number of streams

hasDefaultPath bool true

specifies if the non-filtered direct path should exist

startY int hasDefaultPath ? 200 : 100

used for submodule layout

Properties

Name Value Description
display i=block/filter

Gates

Name Direction Size Description
in input
out output

Unassigned submodule parameters

Name Type Default value Description
multiplexer.displayStringTextFormat string "passed %p pk (%l)"

determines the text that is written on top of the submodule

multiplexer.forwardServiceRegistration bool true
multiplexer.forwardProtocolRegistration bool true

Source code

//
// This module combines two meters and their corresponding filters per path. This
// is primarily useful for combining a token bucket based metering with an
// asynchronous packet shaper. Note that the asynchronous packet shaper also has
// parts in the network interface queue module.
//
// @see ~EligibilityTimeQueue, EligibilityTimeGate
//
module DualIeee8021qFilter like IPacketFilter
{
    parameters:
        int numStreams = default(0); // number of streams
        bool hasDefaultPath = default(true); // specifies if the non-filtered direct path should exist
        int startY = default(hasDefaultPath ? 200 : 100); // used for submodule layout
        @display("i=block/filter");
    gates:
        input in;
        output out;
    submodules:
        classifier: <default("StreamClassifier")> like IPacketClassifier {
            gateIndexOffset = default(parent.hasDefaultPath ? 1 : 0);
            @display("p=100,100");
        }
        meter1[numStreams]: <default("DualRateThreeColorMeter")> like IPacketMeter {
            @display("p=300,$startY,column,150");
        }
        filter1[numStreams]: <default("LabelFilter")> like IPacketFilter {
            labelFilter = default("green");
            @display("p=500,$startY,column,150");
        }
        meter2[numStreams]: <default("EligibilityTimeMeter")> like IPacketMeter {
            @display("p=700,$startY,column,150");
        }
        filter2[numStreams]: <default("EligibilityTimeFilter")> like IPacketFilter {
            @display("p=900,$startY,column,150");
        }
        gate[numStreams]: <default("InteractiveGate")> like IPacketGate {
            @display("p=1100,$startY,column,150");
        }
        multiplexer: PacketMultiplexer {
            @display("p=1300,100");
        }
    connections:
        in --> { @display("m=w"); } --> classifier.in;
        classifier.out++ --> multiplexer.in++ if hasDefaultPath;
        for i=0..numStreams-1 {
            classifier.out++ --> meter1[i].in;
            meter1[i].out --> filter1[i].in;
            filter1[i].out --> meter2[i].in;
            meter2[i].out --> filter2[i].in;
            filter2[i].out --> gate[i].in;
            gate[i].out --> multiplexer.in++;
        }
        multiplexer.out --> { @display("m=e"); } --> out;
}
File: src/inet/linklayer/ieee8021q/DualIeee8021qFilter.ned