PacketClassifierBase

Package: inet.queueing.base

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.

See also: IPacketClassifier

PacketClassifierBase

Inheritance diagram

The following diagram shows inheritance relationships for this type. Unresolved types are missing from the diagram.

Known subclasses

Name Type Description
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.

ContentBasedClassifier simple module

This module connects one packet producer to multiple packet consumers. It can be pushed with packets from the connected packet producer. When this happens, the classifier pushes the packet to one of its connected packet consumers based on the configured packet filters. The first matching expression determines the index of the output gate.

EtherFrameClassifier simple module

Classifier that forwards Ethernet PAUSE frames to the pauseOut gate, and other frames to the defaultOut gate.

LabelClassifier simple module

This module classifies packets based on the attached labels in a LabelsTag.

MarkovClassifier simple module

This module implements a packet classifier using a Markov process that has as many states as output gates the classifier has. The output gate for a given packet is determined by the current state of the Markov process.

MultiFieldClassifier simple module

This classifier contains a list of filters that identifies the flows and determines their classes. Each filter can match the source and destination address, IP protocol number, source and destination ports, or ToS of the datagram. The first matching filter determines the index of the out gate. If no matching filter is found, then the packet will be sent through the defaultOut gate.

PacketClassifier simple module

This module connects one packet producer to multiple packet consumers. It can be pushed with packets from the connected packet producer. When this happens, the classifier pushes the packet to one of its connected packet consumers based on the configured packet classifier function. The packet classifier function takes a packet and returns an integer which in turn is used for determining the output gate.

PriorityClassifier simple module

This classifier pushes packets into the first non-full among its connected packet consumers.

WrrClassifier simple module

This module implements weighted round-robin classifier.

Extends

Name Type Description
PacketSinkBase simple module

This is a base module for various packet sink modules.

Parameters

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

determines the text that is written on top of the submodule

Properties

Name Value Description
display i=block/classifier

Gates

Name Direction Size Description
in input
out [ ] output

Signals

Name Type Unit
packetPushed inet::Packet

Statistics

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

Source code

//
// 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.
//
// @see ~IPacketClassifier
//
simple PacketClassifierBase extends PacketSinkBase
{
    parameters:
        displayStringTextFormat = default("classified %p pk (%l)");
        @display("i=block/classifier");
        @signal[packetPushed](type=inet::Packet);
        @statistic[packetPushed](title="packets pushed"; record=count,sum(packetBytes),vector(packetBytes); interpolationmode=none);
    gates:
        input in;
        output out[];
}
File: src/inet/queueing/base/PacketClassifierBase.ned