IPacketFlow

Package: inet.queueing.contract

IPacketFlow

module interface

Interface for packet flows. A packet flow connects one input to one output. It can operate in both active and passive mode. Packets can be pushed into its input or packets can be pulled from its output. Packets are never dropped but the contents and/or attached meta information may be altered.

Inheritance diagram

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

Implemented by

Name Type Description
ATSIeee8021qFilter compound module

Implements a filtering module for the asynchronous traffic shaper taking scheduler groups into account.

BackPressureBasedFilter simple module

Implements a packet filter that drops packets when the following module (consumer) does not allow packets to be pushed. The module itself accepts all packets (i.e. canPushPacket() and canPushSomePacket() always return true). This is useful, for example, when the following module is a gate to filter out packets when the gate is closed.

ContentBasedFilter simple module

Filters packets that match 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. Similarly, when the filter is pulled by a connected packet collector, it pulls packets from the connected packet provider until it finds one that matches the configured packet filter.

ContentBasedLabeler simple module

Attaches various request labels to packets.

ContentBasedTagger simple module

Attaches various request tags to packets.

CutthroughSink simple module (no description)
CutthroughSource simple module (no description)
DualIeee8021qFilter compound 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.

DualRateThreeColorMeter simple module

This packet meter module measures the packet flow that is passing through using two token buckets. The meter attaches a ~LabelsTag to each packet with either green, yellow, or red color depending on which token bucket contains the required number of tokens for the packet.

EligibilityTimeFilter simple module

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.

EligibilityTimeMeter simple module

A packet meter which measures the packet flow that is passing through and optionally attaches an ~EligibilityTimeTag to the packets. The tag contains the calculated simulation time when the packet becomes eligible for transmission according to the asynchronous shaper algorithm.

EthernetAddressChecker simple module

Filters Ethernet packets based on their destination MAC address. Extracts source and destination addresses from Ethernet frames and adds them as tags for use by higher layers. Accepts packets where the destination address is the receiving interface's MAC address, the broadcast address, or a multicast address for which the interface has group membership. Drops the rest as "not addressed to us". When in promiscuous mode, accepts all packets regardless of destination address.

EthernetAddressInserter simple module

Inserts Ethernet MAC address fields into outgoing packets. Creates and adds the source and destination address header fields at the front of each packet. Uses the destination address from the packet's MacAddressReq tag. If the source address is unspecified in the tag, it uses the MAC address of the requested target network interface. Updates packet protocol tags to reflect the added header.

EthernetCutthroughSink simple module (no description)
EthernetCutthroughSource simple module (no description)
EthernetFcsChecker simple module (no description)
EthernetFcsInserter simple module (no description)
EthernetFragmentFcsChecker simple module (no description)
EthernetFragmentFcsInserter simple module (no description)
EthernetFragmentPhyHeaderChecker simple module (no description)
EthernetFragmentPhyHeaderInserter simple module (no description)
EthernetMacHeaderChecker simple module (no description)
EthernetMacHeaderInserter simple module (no description)
EthernetPhyHeaderChecker simple module (no description)
EthernetPhyHeaderInserter simple module (no description)
EthernetSocketCommandProcessor simple module (no description)
EthernetSocketPacketProcessor simple module (no description)
EthernetTypeOrLengthChecker simple module (no description)
EthernetTypeOrLengthInserter simple module (no description)
ExponentialRateMeter simple module

Attaches a ~RateTag to each packet specifying the data rate and packet rate of the received stream of packets. The algorithm takes older packets into account with an exponentially decreasing weight.

FlowMeasurementRecorder simple module

Part of the flow measurement infrastructure. It can be used to record the collected statistics and also to terminate the flow measurements.

FlowMeasurementStarter simple module

Initiates packet flow measurements by adding time tags to selected packets. Supports measuring various timing aspects including elapsed time, delaying time, queueing time, processing time, transmission time, and propagation time. Can be configured to measure specific packet regions and to filter which packets are measured.

GroupEligibilityTimeMeter simple module (no description)
Ieee8021qFilter compound module

Implements the IEEE 802.1Q per-stream filtering and policing. The relationship between streams, gates, and meters is not one-to-one. The number of streams, gates, and meters can be different, and the module will take care of the connections between the submodules based on the streamFilterTable parameter.

Ieee8021qSocketCommandProcessor simple module

Processes IEEE 802.1Q socket commands from applications and manages socket registrations in the socket table. Handles bind, close, and destroy commands for IEEE 802.1Q sockets, enabling applications to send and receive VLAN-tagged frames. Supports filtering traffic based on protocol and VLAN ID, providing a socket-based interface to the IEEE 802.1Q layer. Works in conjunction with ~Ieee8021qSocketTable to maintain socket state and ~Ieee8021qSocketPacketProcessor to deliver packets to the appropriate applications.

Ieee8021qSocketPacketProcessor simple module

Processes packets related to IEEE 802.1Q VLAN sockets. Delivers packets to registered sockets based on protocol and VLAN ID matching. Duplicates packets for delivery to interested sockets and supports "stealing" packets to prevent them from being forwarded. Enables applications to communicate directly with specific VLANs and implements protocol handlers for VLAN-specific traffic. Works in conjunction with ~Ieee8021qSocketTable to provide a socket-based API for VLAN communication.

Ieee8021qTagEpdHeaderChecker simple module (no description)
Ieee8021qTagEpdHeaderInserter simple module (no description)
Ieee8021qTagTpidHeaderChecker simple module (no description)
Ieee8021qTagTpidHeaderInserter simple module (no description)
Ieee8021rTagEpdHeaderChecker simple module (no description)
Ieee8021rTagEpdHeaderInserter simple module (no description)
Ieee8022LlcSocketCommandProcessor simple module (no description)
Ieee8022LlcSocketPacketProcessor 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.

MultiPacketFilter compound module

Combines multiple packet filters into one.

MultiPacketMeter compound module

Combines multiple packet meters into one.

MultiTokenBucketMeter simple module

Labels packets according to the first token bucket that contains the required number of tokens. If no such token bucket is found then the default label is attached to the packet.

OmittedIeee8021qTagEpdHeaderChecker compound module

Implements the module given interface and can be used as an omitted optional module that removes itself from the module hierarchy during initialization.

OmittedIeee8021qTagEpdHeaderInserter compound module

Implements the module given by the interface and can be used as an omitted optional module that removes itself from the module hierarchy during initialization.

OmittedIeee8021qTagTpidHeaderChecker compound module

Implements the module given interface and can be used as an omitted optional module that removes itself from the module hierarchy during initialize.

OmittedIeee8021qTagTpidHeaderInserter compound module

Implements the module given interface and can be used as an omitted optional module that removes itself from the module hierarchy during initialization.

OmittedPacketFilter compound module

Implements the given module interface and can be used as an omitted optional module that removes itself from the module hierarchy during initialization.

OmittedPacketFlow compound module

Implements the given module interface and can be used as an optional module that removes itself from the module hierarchy during initialization.

OmittedPacketMeter compound module

Implements the module given interface and can be used as an optional module that removes itself from the module hierarchy during initialize.

PacketDestreamer simple module

Takes packets streamed to its input and passes them to its output.

PacketDirectionReverser simple module

Part of the layer 2 architecture. It turns an incoming packet into an outgoing packet simply by removing all attached indication tags and turning some of them into an attached request tag on the packet.

PacketEmitter simple module (no description)
PacketFilter simple module

Filters packets that match 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. Similarly, when the filter is pulled by a connected packet collector, it pulls packets from the connected packet provider until it finds one that matches the configured packet filter.

PacketFlowPcapFileRecorder simple module

Records packets passing through the module to a PCAP or PCAPNG file. The file format, and fields like network type, time precision, and direction flag can be configured. It supports truncation of long packets. It can also be configured to flush the file after each write to ensure all packets are captured even in case of a crash.

PacketLabeler simple module

Attaches a ~LabelsTag to packets based on the configured filters. For each matching filter, a new label is attached.

PacketStreamer simple module

Takes packets passed to its input and streams them to its output.

PacketTagger simple module

Attaches various request tags to packets.

PaddingInserter simple module

Adds padding to packets to ensure they meet a minimum length requirement or to round up to a specific length. This module calculates the required padding length based on the packet's current length and the configured parameters. If padding is needed, it adds either a ByteCountChunk (for byte-aligned padding) or a BitCountChunk (for bit-level padding) at the specified position (front or back of the packet). This is commonly used in protocols that require packets to have a minimum size or to align to specific boundaries.

PreemptableStreamer simple module

Takes packets passed to its input and streams them to its output.

RelayInterfaceLearner simple module

Extracts the source MAC address of the packet passing through and stores the mapping from this MAC address to the incoming network interface in the MAC address table (forwarding information database).

RelayInterfaceSelector simple module

Selects the outgoing interface for the packet passing through from the MAC address table (forwarding information database) based on the destination MAC address. The selected interface is attached to the packet in an ~InterfaceReq. The packet may be duplicated if multiple interfaces are found.

SimpleIeee8021qFilter compound module

Implements a simplified version of the IEEE 802.1Q per-stream filtering and policing. Each filtered stream has its own path where metering and filtering happens independently of any other stream.

SingleRateThreeColorMeter simple module

This packet meter module measures the packet flow that is passing through using two token buckets. The meter attaches a ~LabelsTag to each packet with either green, yellow, or red color depending on which token bucket contains the required number of tokens for the packet.

SingleRateTwoColorMeter simple module

This packet meter module measures the packet flow that is passing through using one token bucket. The meter attaches a ~LabelsTag to each packet with either a green or red color depending on whether the token bucket contains the required number of tokens for the packet.

SlidingWindowRateMeter simple module

Attaches a ~RateTag to each packet specifying the data rate and packet rate of the received stream of packets. The algorithm takes packets into account only in the given time window.

StatisticalRateLimiter simple module

Limits the datarate or the packetrate of a stream of packets based on the ~RateTag attached to the packets.

StreamDecoder simple module

Decodes the stream of a packet by matching various tags on the packet against the mapping. It can check for network interface, source address, destination address, VLAN id, and PCP. If a match was found, then the stream is attached to the packet in a ~StreamInd tag.

StreamEncoder simple module

Encodes the stream name of a packet into several request tags attached to the packet. It looks up the stream in the mapping and attaches the necessary request tags to the packet based on the specified parameters.

StreamFilter simple module

Implements a packet filter using solely the stream name. The stream name must match the filter criteria in order for the packet to pass through the filter.

StreamIdentifier simple module

Identifies the stream of a packet using packet filter expressions. It can check for arbitrary packet data and assign an if a match was found then the stream is attached to the packet in the ~StreamReq tag.

StreamMerger simple 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.

TokenBucketMeter simple module

Labels each packet if the token bucket contains enough tokens for the packet that is passing through. The amount of required tokens is equal to the packet length in bits and is subtracted from the number of stored tokens. New tokens are generated with the provided constant rate and they may also be added by other modules.

VlanIndFilter simple module

Filters out packets based on the attached VlanInd tag.

VlanReqFilter simple module

Filters out packets based on the attached VlanReq tag.

VlanReqMapper simple module

Updates the VlanReq tag on packets.

Used in compound modules

Name Type Description
DirectionReverserLayer compound module

Provides a layer that combines the decision for local delivery with the service of reversing the direction of an incoming packet to outgoing for packet forwarding.

EthernetApp compound module

Generates traffic as an Ethernet application. The traffic source and traffic sink modules can be built from queueing model elements.

EthernetFragmentingMacLayer compound module (no description)
EthernetLayer compound module (no description)
EthernetMacLayer compound module (no description)
EthernetPhyLayer compound module (no description)
EthernetPreemptingPhyLayer compound module (no description)
EthernetStreamingMacLayer compound module (no description)
Ieee8021qProtocol compound module

Implements the IEEE 802.1Q protocol encapsulation/decapsulation. It also provides socket support so applications can use the protocol directly.

Ieee8022LlcApp compound module

Generates traffic as an IEEE 802.2 LLC application. The traffic source and traffic sink modules can be built from queueing model elements.

Ieee8022LlcLayer compound module (no description)
InterfaceRelayLayer compound module

Combines the interface MAC address learning from incoming packets with the outgoing interface selection for outgoing packets into a single layer.

IpApp compound module

Generates traffic for a IP application. The traffic source and traffic sink modules can be built from queueing model elements.

MeasurementLayer compound module (no description)
MultiMeasurementLayer compound module (no description)
StreamCoderLayer compound module

Combines a stream decoder and a stream encoder into a layer. For incoming packets, the stream decoder determines the stream of the packet. For outgoing packets, the stream encoder determines the VLAN id, etc. of the packet.

StreamIdentifierLayer compound module

Wraps a stream identifier into a protocol layer so that it can be used in a layered compound module.

TcpClientApp compound module

A generic, very modular TCP client application, similar to ~TcpServerApp. The traffic source and traffic sink modules can be built from queueing model elements.

TcpServerConnection compound module

This is a pre-assembled module type to be used in ~TcpServerApp. One instance of this module type is launched by ~TcpServerListener for each incoming connection. It is composed of a traffic source, a traffic sink, a socket I/O and other modules, and most of the module types are parametric. The traffic source and traffic sink modules can be built from queueing model elements.

UdpApp compound module

Generates traffic for a UDP application. The traffic source and traffic sink modules can be built from queueing model elements.

VlanPolicyLayer compound module (no description)

Known subclasses

Name Type Description
IPacketFilter module interface

Interface for packet filter modules. A packet filter connects one input to one output. It can operate in both active and passive mode. Packets can be pushed into its input or packets can be pulled from its output. Processed packets are either dropped, if they don't match the filter criteria, or they are passed through without any delay or reordering. Packets are not modified in any way.

IPacketMarker module interface

Interface for packet marker modules. A packet marker connects one input to one output. It can operate in both active and passive mode. Packets can be pushed into its input or packets can be pulled from its output. When processing a packet, a marker attaches some information (such as a label) to the packet based on the data and metadata it contains. The packets are processed individually.

IPacketMeter module interface

Interface for packet meter modules. A packet meter connects one input to one output. It can operate in both active and passive mode. Packets can be pushed into its input or packets can be pulled from its output. When processing packets, a meter attaches some information (such as the packet rate) to the packets based on the data and metadata they contain. The packets are processed as part of a stream.

IProtocolHeaderInserter module interface

Module interface for protocol header inserter components. Modules that implement this interface add protocol-specific headers to packets before they are transmitted. These components process packets by prepending or appending headers that contain protocol information such as addressing, control data, or authentication codes.

Extends

Name Type Description
IPacketSink module interface

Interface for packet sink modules which are both passive and active simultaneously.

IPacketSource module interface

Interface for packet source modules which are both active and passive simultaneously.

Properties

Name Value Description
omittedTypename OmittedPacketFlow
display i=block/source

Source code

//
// Interface for packet flows. A packet flow connects
// one input to one output. It can operate in both active and passive mode.
// Packets can be pushed into its input or packets can be pulled from its
// output. Packets are never dropped but the contents and/or attached meta
// information may be altered.
//
moduleinterface IPacketFlow extends IPacketSink, IPacketSource
{
    parameters:
        @omittedTypename(OmittedPacketFlow);
        @display("i=block/star");
}
File: src/inet/queueing/contract/IPacketFlow.ned