IPacketSource

Package: inet.queueing.contract

module interface IPacketSource

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

See also: IPassivePacketSource, IActivePacketSource

Inheritance diagram

Implemented by

Name

Type

Description

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.

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.

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)

EthernetMacHeaderChecker

simple module

(no description)

EthernetMacHeaderInserter

simple module

(no description)

EthernetSocketCommandProcessor

simple module

(no description)

EthernetSocketPacketProcessor

simple module

(no description)

EthernetTypeOrLengthChecker

simple module

(no description)

EthernetTypeOrLengthInserter

simple module

(no description)

ATSIeee8021qFilter

compound module

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

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.

Ieee8021qAsynchronousShaper

compound module

Implements the IEEE 802.1Q asynchronous shaper. An alias for the EligibilityTimeGate module.

Ieee8021qCreditBasedGate

simple module

A packet gate that can be used to implement the IEEE 802.1q credit-based shaper algorithm in combination with a packet queue.

Ieee8021qCreditBasedShaper

compound module

Implements the IEEE 802.1Q credit-based shaper.

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)

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.

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.

Ieee8021rTagEpdHeaderChecker

simple module

(no description)

Ieee8021rTagEpdHeaderInserter

simple module

(no description)

Ieee8022LlcSocketCommandProcessor

simple module

(no description)

Ieee8022LlcSocketPacketProcessor

simple module

(no description)

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.

EthernetFragmentPhyHeaderChecker

simple module

(no description)

EthernetFragmentPhyHeaderInserter

simple module

(no description)

EthernetPhyHeaderChecker

simple module

(no description)

EthernetPhyHeaderInserter

simple module

(no description)

PacketDestreamer

simple module

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

PacketEmitter

simple module

(no description)

PacketStreamer

simple module

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

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.

CutthroughSink

simple module

(no description)

CutthroughSource

simple module

(no description)

PreemptableStreamer

simple module

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

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.

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.

EligibilityTimeGate

simple module

A packet gate that operates based on the EligibilityTimeTag attached to the next packet waiting to be pulled through. The gate is closed if the eligibility time is greater than the current simulation time, otherwise, it is open.

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.

GroupEligibilityTimeMeter

simple module

Extends the EligibilityTimeMeter with scheduler groups. The calculation of the eligibility time takes into account the eligibility times of all streams of the same group.

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.

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.

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.

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.

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.

StatisticalRateLimiter

simple module

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

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.

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.

CreditBasedGate

simple module

A packet gate that operates based on the number of credits it contains. The gate is open if the number of credits is greater than the configured transmit credit limit, otherwise it is closed. The module attaches a CreditGateTag to all packets that pass through. The attached tag allows the gate module to determine if a packet belongs to it when the packet is eventually transmitted.

InteractiveGate

simple module

This packet gate module allows or forbids packets to pass through depending on whether the gate is open or closed as specified by the parameter. The gate can also be controlled by the user by manually changing the open parameter from the graphical user interface while the simulation is paused.

OmittedPacketGate

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.

PacketGate

simple module

Allows or forbids packets to pass through depending on whether the gate is open or closed.

PeriodicGate

simple module

Allows or forbids packets to pass through depending on whether the gate is open or closed. The gate is open and closed according to the list of change times periodically.

ContentBasedLabeler

simple module

Attaches various request labels to packets.

ContentBasedTagger

simple module

Attaches various request tags to packets.

PacketLabeler

simple module

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

PacketTagger

simple module

Attaches various request tags to packets.

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.

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.

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.

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.

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.

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.

EmptyPacketSource

simple module

An active/passive empty packet source. It doesn’t push packets into the connected module, and it doesn’t allow packets to be pulled from it by the connected module. The output gate generates backpressure for pull packet operations.

Known subclasses

Name

Type

Description

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.

IPacketGate

module interface

Interface for a packet gate. A packet gate 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.

Properties

Name

Value

Description

display

i=block/source

Source code

//
// Interface for packet source modules which are both
// active and passive simultaneously.
//
// @see ~IPassivePacketSource, ~IActivePacketSource
//
moduleinterface IPacketSource
{
    parameters:
        @display("i=block/source");
    gates:
        output out @labels(push,pull);
}

File: src/inet/queueing/contract/IPacketSource.ned