BehaviorAggregateClassifier

Package: inet.networklayer.diffserv

BehaviorAggregateClassifier

simple module

This module reads the DSCP (lower six bits of ToS/TrafficClass) from the received datagram, and forwards the datagram to the corresponding output gate.

DSCPs are enumerated in the dscps parameter, first value is for out[0], second for out[1], etc. If the packet has no DSCP, or its value is not enumerated in the dscps parameter, it will be forwarded via the defaultOut gate.

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
DiffservQueue compound module

This is an example queue, that can be used in interfaces of DS core and edge nodes to support the AFxy (RFC 2597) and EF (RFC 3246) PHBs.

Extends

Name Type Description
PacketClassifierBase simple module

This is a base module for various packet classifier modules. Derived modules must implement a single packet classifier function which determines the index of the output gate for the next pushed packet.

Parameters

Name Type Default value Description
displayStringTextFormat string "classified %p pk (%l)"

determines the text that is written on top of the submodule

reverseOrder bool false
dscps string ""

space separated dscp values of the gates, both names (e.g. AF11, EF) and numbers (0x0A,0b101110) can be used

Properties

Name Value Description
display i=block/classifier
class BehaviorAggregateClassifier

Gates

Name Direction Size Description
in input
out [ ] output
defaultOut output

Signals

Name Type Unit
pkClass long

Statistics

Name Title Source Record Unit Interpolation Mode
pkClass packet class pkClass vector none

Direct method calls (observed)

call tofunctioninfo
PacketMultiplexerinet::queueing::PacketMultiplexer::handleCanPushPacketChangedhandleCanPushPacketChanged
RedDropperinet::queueing::RedDropper::pushPacketpushPacket
DropTailQueueinet::queueing::PacketQueue::pushPacketpushPacket

Called methods (observed)

functioninfocall from
inet::BehaviorAggregateClassifier::handleCanPushPacketChangedhandleCanPushPacketChangedPacketMultiplexer, RedDropper, DropTailQueue, PassivePacketSink

Incoming messages (observed)

gatemsgkindctrlsrcModuletags
inPacket0Ipv4DispatchProtocolInd, InterfaceInd, InterfaceReq, NetworkProtocolInd, PacketProtocolTag, MacAddressInd?

Pushed in messages (observed)

gatemsgkindctrlsrcModuletags
inPacket0SingleRateThreeColorMeterDispatchProtocolInd, InterfaceInd, InterfaceReq, MacAddressInd, NetworkProtocolInd, PacketProtocolTag
inPacket0PacketMultiplexerDispatchProtocolInd, InterfaceInd, InterfaceReq, MacAddressInd, NetworkProtocolInd, PacketProtocolTag

Push out messages (observed)

gatemsgkindctrldestModuletags
out[]Packet0DscpMarkerDispatchProtocolInd, InterfaceInd, InterfaceReq, MacAddressInd, NetworkProtocolInd, PacketProtocolTag
out[]Packet0TokenBucketMeterDispatchProtocolInd, InterfaceInd, InterfaceReq, MacAddressInd, NetworkProtocolInd, PacketProtocolTag
out[]Packet0RedDropperDispatchProtocolInd, InterfaceInd, InterfaceReq, NetworkProtocolInd, PacketProtocolTag, MacAddressInd?
out[]Packet0DropTailQueueDispatchProtocolInd, InterfaceInd, InterfaceReq, NetworkProtocolInd, PacketProtocolTag, MacAddressInd?

Packet operations (observed)

chunkTypepacketAction
peekData, setBackOffset, setFrontOffset
Ipv4HeaderpopAtFront

Shared Tagging operations (observed)

tagTypetagAction
PacketProtocolTagfindTag

Source code

//
// This module reads the DSCP (lower six bits of ToS/TrafficClass) from the
// received datagram, and forwards the datagram to the corresponding output gate.
//
// DSCPs are enumerated in the dscps parameter, first value is for out[0], second
// for out[1], etc. If the packet has no DSCP, or its value is not enumerated
// in the dscps parameter, it will be forwarded via the defaultOut gate.
//
simple BehaviorAggregateClassifier extends PacketClassifierBase
{
    parameters:
        string dscps = default(""); // space separated dscp values of the gates, both names (e.g. AF11, EF) and numbers (0x0A,0b101110) can be used
        @class(BehaviorAggregateClassifier);
        @signal[pkClass](type=long);
        @statistic[pkClass](title="packet class"; source=pkClass; record=vector; interpolationmode=none);
    gates:
        output defaultOut;
}

File: src/inet/networklayer/diffserv/BehaviorAggregateClassifier.ned