PacketFilterBase

Package: inet.queueing.base

PacketFilterBase

simple module

This is a base module for various packet filter modules. Derived modules must implement a single packet matcher function which determines if a packet is to be passed through or filtered out.

See also: IPacketFilter

Inheritance diagram

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

Known subclasses

Name Type Description
ContentBasedFilter simple module

This module filters for packets matching the configured filter criteria. When the filter is pushed by a connected packet producer, it either pushes the packet to the connected packet consumer or drops it depending on the configured packet filter. Similarily, when the filter is pulled by a connected packet collector, it pulls packets from the connected packet provider until it finds one which matches the configured packet filter.

CrcCheckerBase simple module (no description)
EligibilityTimeFilter simple module

This module is a packet filter that operates based on the EligibilityTimeTag attached to the packet that is passing through. Packets are dropped if the tag is missing. If the maxResidenceTime parameter is set, then the filter also drops the packets for which the eligibility time in the attached EligibilityTimeTag is greater than the current simulation time plus the maximum residence time.

EthernetAddressChecker simple module (no description)
EthernetFcsChecker simple module (no description)
EthernetFragmentFcsChecker simple module (no description)
EthernetFragmentPhyHeaderChecker simple module (no description)
EthernetMacHeaderChecker simple module (no description)
EthernetPhyHeaderChecker simple module (no description)
EthernetTypeOrLengthChecker simple module (no description)
FcsCheckerBase simple module (no description)
FragmentNumberHeaderChecker simple module (no description)
Ieee8021aeTagEpdHeaderChecker simple module

TODO this module is incomplete

Ieee8021qTagEpdHeaderChecker simple module (no description)
Ieee8021qTagTpidHeaderChecker simple module (no description)
Ieee8021rTagEpdHeaderChecker simple module (no description)
Ieee8022LlcChecker simple module (no description)
Ieee8022SnapChecker simple module (no description)
LabelFilter simple module

This packet filter module drops packets that don't match the given packet label filter criteria. The criteria can use wildcards and boolean operators.

OrdinalBasedDropper simple module

This module drops packets based on the ordinal number of the packet in the received stream of packets.

PacketFilter simple module

This module filters for packets matching the configured filter criteria. When the filter is pushed by a connected packet producer, it either pushes the packet to the connected packet consumer or drops it depending on the configured packet filter. Similarily, when the filter is pulled by a connected packet collector, it pulls packets from the connected packet provider until it finds one which matches the configured packet filter.

ProtocolChecker simple module (no description)
RedDropper simple module

This module implements Random Early Detection (RED).

StatisticalRateLimiter simple module

This module limit the datarate or the packetrate of a stream of packets based on the RateTag attached to the packets.

StreamFilter simple module

This module implements a packet filter using solely the stream name. The stream name must match the filter criteria in order the packet to pass through the filter.

StreamMerger simple module

This module merges the packets of the same stream by removing duplicates. In addition it also replaces the stream name on the packet based on the mapping parameter. For merging it maintains a separate finite buffer per stream with the last seen sequence numbers.

VlanIndFilter simple module

This module filters out packets based on the attached VlanInd tag.

VlanReqFilter simple module

This module filters out packets based on the attached VlanReq tag.

Extends

Name Type Description
PacketProcessorBase simple module

This is a base module for various packet processing modules which maintains a few statistics.

Parameters

Name Type Default value Description
displayStringTextFormat string "dropped %d/%p pk (%k/%l)"

determines the text that is written on top of the submodule

backpressure bool false

Properties

Name Value Description
display i=block/downarrow
class PacketFilterBase

Gates

Name Direction Size Description
in input
out output

Signals

Name Type Unit
packetPushedIn inet::Packet
packetPulledIn inet::Packet
packetDropped inet::Packet
packetPushedOut inet::Packet
packetPulledOut inet::Packet

Statistics

Name Title Source Record Unit Interpolation Mode
flowDroppedPacketLengths flow specific dropped packet lengths packetLength(demuxFlow(packetDropped)) sum, histogram, vector b none
incomingDataRate incoming data rate throughput(merge(packetPushedIn, packetPulledIn)) vector bps linear
droppedPacketLengths dropped packet lengths packetLength(packetDropped) sum, histogram, vector b none
incomingPacketLengths incoming packet lengths packetLength(merge(packetPushedIn, packetPulledIn)) sum, histogram, vector b none
droppedDataRate dropped data rate throughput(packetDropped) vector bps linear
flowOutgoingPacketLengths flow specific outgoing packet lengths packetLength(demuxFlow(merge(packetPushedOut, packetPulledOut))) sum, histogram, vector b none
flowDroppedDataRate flow specific dropped data rate throughput(demuxFlow(packetDropped)) vector bps linear
droppedPackets dropped packets packetDropped count pk
flowIncomingDataRate flow specific incoming data rate throughput(demuxFlow(merge(packetPushedIn, packetPulledIn))) vector bps linear
outgoingDataRate outgoing data rate throughput(merge(packetPushedOut, packetPulledOut)) vector bps linear
outgoingPacketLengths outgoing packet lengths packetLength(merge(packetPushedOut, packetPulledOut)) sum, histogram, vector b none
flowIncomingPacketLengths flow specific incoming packet lengths packetLength(demuxFlow(merge(packetPushedIn, packetPulledIn))) sum, histogram, vector b none
flowOutgoingDataRate flow specific outgoing data rate throughput(demuxFlow(merge(packetPushedOut, packetPulledOut))) vector bps linear
incomingPackets incoming packets merge(packetPushedIn, packetPulledIn) count pk
outgoingPackets outgoing packets merge(packetPushedOut, packetPulledOut) count pk

Source code

//
// This is a base module for various packet filter modules. Derived modules must
// implement a single packet matcher function which determines if a packet is to
// be passed through or filtered out.
//
// @see ~IPacketFilter
//
simple PacketFilterBase extends PacketProcessorBase
{
    parameters:
        bool backpressure = default(false);
        displayStringTextFormat = default("dropped %d/%p pk (%k/%l)"); // determines the text that is written on top of the submodule
        @class(PacketFilterBase);
        @display("i=block/downarrow");
        @signal[packetPushedIn](type=inet::Packet);
        @signal[packetPushedOut](type=inet::Packet);
        @signal[packetPulledIn](type=inet::Packet);
        @signal[packetPulledOut](type=inet::Packet);
        @signal[packetDropped](type=inet::Packet);
        // the statistical value is the incoming packet
        @statistic[incomingPackets](title="incoming packets"; source=merge(packetPushedIn, packetPulledIn); record=count; unit=pk);
        // the statistical value is the length of the incoming packet
        @statistic[incomingPacketLengths](title="incoming packet lengths"; source=packetLength(merge(packetPushedIn, packetPulledIn)); record=sum,histogram,vector; unit=b; interpolationmode=none);
        // the statistical value is the data rate of the incoming packets
        @statistic[incomingDataRate](title="incoming data rate"; source=throughput(merge(packetPushedIn, packetPulledIn)); record=vector; unit=bps; interpolationmode=linear);
        // the statistical value is the outgoing packet
        @statistic[outgoingPackets](title="outgoing packets"; source=merge(packetPushedOut, packetPulledOut); record=count; unit=pk);
        // the statistical value is the length of the outgoing packet
        @statistic[outgoingPacketLengths](title="outgoing packet lengths"; source=packetLength(merge(packetPushedOut, packetPulledOut)); record=sum,histogram,vector; unit=b; interpolationmode=none);
        // the statistical value is the data rate of the outgoing packets
        @statistic[outgoingDataRate](title="outgoing data rate"; source=throughput(merge(packetPushedOut, packetPulledOut)); record=vector; unit=bps; interpolationmode=linear);
        // the statistical value is the dropped packet
        @statistic[droppedPackets](title="dropped packets"; source=packetDropped; record=count; unit=pk);
        // the statistical value is the length of the dropped packet
        @statistic[droppedPacketLengths](title="dropped packet lengths"; source=packetLength(packetDropped); record=sum,histogram,vector; unit=b; interpolationmode=none);
        // the statistical value is the data rate of the dropped packets
        @statistic[droppedDataRate](title="dropped data rate"; source=throughput(packetDropped); record=vector; unit=bps; interpolationmode=linear);
        // the statistical value is the flow specific length of the incoming packet
        @statistic[flowIncomingPacketLengths](title="flow specific incoming packet lengths"; source=packetLength(demuxFlow(merge(packetPushedIn, packetPulledIn))); record=sum,histogram,vector; unit=b; interpolationmode=none);
        // the statistical value is the flow specific data rate of the incoming packets
        @statistic[flowIncomingDataRate](title="flow specific incoming data rate"; source=throughput(demuxFlow(merge(packetPushedIn, packetPulledIn))); record=vector; unit=bps; interpolationmode=linear);
        // the statistical value is the flow specific length of the outgoing packet
        @statistic[flowOutgoingPacketLengths](title="flow specific outgoing packet lengths"; source=packetLength(demuxFlow(merge(packetPushedOut, packetPulledOut))); record=sum,histogram,vector; unit=b; interpolationmode=none);
        // the statistical value is the flow specific data rate of the outgoing packets
        @statistic[flowOutgoingDataRate](title="flow specific outgoing data rate"; source=throughput(demuxFlow(merge(packetPushedOut, packetPulledOut))); record=vector; unit=bps; interpolationmode=linear);
        // the statistical value is the flow specific length of the dropped packet
        @statistic[flowDroppedPacketLengths](title="flow specific dropped packet lengths"; source=packetLength(demuxFlow(packetDropped)); record=sum,histogram,vector; unit=b; interpolationmode=none);
        // the statistical value is the flow specific data rate of the dropped packets
        @statistic[flowDroppedDataRate](title="flow specific dropped data rate"; source=throughput(demuxFlow(packetDropped)); record=vector; unit=bps; interpolationmode=linear);
    gates:
        input in @labels(send,push,pull,pass,stream);
        output out @labels(send,push,pull,pass,stream);
}
File: src/inet/queueing/base/PacketFilterBase.ned