Simple Module DSCPMarker

Package: inet.networklayer.diffserv
File: src/inet/networklayer/diffserv/DSCPMarker.ned

C++ definition

This module sets the DSCP field (lower six bit of Tos/TrafficClass) of IP datagrams to the value specified by the dscps parameter.

The dscps parameter is a space separated list of DSCP values. Packets arrived at gate in[i] are marked with the ith value. If there are fewer dscp values given than input gates, then the last one is repeated.

DSCPMarker

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.

Used in compound modules:

Name Type Description
TC1 compound module

Traffic conditioner used in Experiments 1.1-1.6 and 5.1.

TC2 compound module

Traffic conditioner used in Experiment 3.1.

TrafficConditioner compound module

TODO documentation

Parameters:

Name Type Default value Description
dscps string

space separated list if dscp values; both names (e.g. AF11, EF) and numbers (0x0A,0b101110) can be used

Properties:

Name Value Description
display i=block/star

Gates:

Name Direction Size Description
in [ ] input
out output

Signals:

Name Type Unit
markPk cPacket

Statistics:

Name Title Source Record Unit Interpolation Mode
markPk packets marked markPk count, sum(packetBytes), vector(packetBytes) none

Source code:

//
// This module sets the DSCP field (lower six bit of Tos/TrafficClass) of IP datagrams
// to the value specified by the dscps parameter.
//
// The dscps parameter is a space separated list of DSCP values.
// Packets arrived at gate in[i] are marked with the ith value. If there are fewer
// dscp values given than input gates, then the last one is repeated.
//
simple DSCPMarker
{
    parameters:
        string dscps; // space separated list if dscp values; both names (e.g. AF11, EF) and numbers (0x0A,0b101110) can be used

        @display("i=block/star");

        @signal[markPk](type=cPacket);
        @statistic[markPk](title="packets marked"; source=markPk; record=count,"sum(packetBytes)","vector(packetBytes)"; interpolationmode=none);
    gates:
        input in[];
        output out;
}