PacketMultiplexer

Package: inet.queueing.common

PacketMultiplexer

simple module

This module connects multiple packet producers to one packet consumer. When a packet is pushed by one of the connected packet producers, then the multiplexer simply pushes the packet to the connected packet consumer.

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

This is an example queue, that implements one class of the Assured Forwarding PHB group (RFC 2597).

DirectionReverserLayer compound module

This 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.

DualIeee8021qFilter compound module

This 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.

EthernetPreemptingMacLayer compound module (no description)
EthernetPreemptingPhyLayer compound module (no description)
Ieee8021qFilter compound module

This 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 about the connections between the submodules based on the streamFilterTable parameter.

Ieee8022LlcLayer compound module (no description)
InterfaceService compound module (no description)
MacService compound module (no description)
MultiDomainGptp compound module

This module combines multiple Gptp modules, one per time domain into a multi time domain time synchronization module. Each gPTP time domain is automatically configured to use the corresponding subclock of the clock passed in to this module.

MultiPacketPolicing compound module

This module combines multiple packet policing modules into one.

PeerService compound module (no description)
ResponseProducer compound module

This module is capable of generating several different streams of packets, one after the other. For each traffic category, the packets are produced by a separate token based server. The traffic stream can be started by adding tokens the corresponding server module. The packet data, packet length, and timing distributions can be configured in the corresponding packet provider.

SimpleIeee8021qFilter compound module

This 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.

TelnetServerConnection compound module

This module contains a configurable pre-composed telnet traffic source and traffic sink as part of a telnet server application.

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 "passed %p pk (%l)"

determines the text that is written on top of the submodule

forwardServiceRegistration bool true
forwardProtocolRegistration bool true

Properties

Name Value Description
display i=-;b=10,10,oval,grey,,1
class PacketMultiplexer

Gates

Name Direction Size Description
in [ ] input
out output

Signals

Name Type Unit
packetPushed inet::Packet
packetPulled inet::Packet

Statistics

Name Title Source Record Unit Interpolation Mode
packetLengths packet lengths packetLength(merge(packetPushed, packetPulled)) sum, histogram, vector b none
dataRate data rate throughput(merge(packetPushed, packetPulled)) vector bps linear
packets packets merge(packetPushed, packetPulled) count pk

Direct method calls (observed)

call tofunctioninfo
MessageDispatcherinet::MessageDispatcher::handleRegisterProtocolhandleRegisterProtocol
MessageDispatcherinet::MessageDispatcher::handleRegisterServicehandleRegisterService
MessageDispatcherinet::MessageDispatcher::pushPacketpushPacket
EthernetInterfaceinet::NetworkInterface::pushPacketpushPacket
LayeredEthernetInterfaceinet::NetworkInterface::pushPacketpushPacket
RelayInterfaceSelectorinet::RelayInterfaceSelector::pushPacketpushPacket
BehaviorAggregateClassifierinet::BehaviorAggregateClassifier::handleCanPushPacketChangedhandleCanPushPacketChanged
DiffservQueueinet::queueing::CompoundPacketQueueBase::pushPacketpushPacket
DscpMarkerinet::DscpMarker::pushPacketpushPacket
EthernetFragmentPhyHeaderInserterinet::physicallayer::EthernetFragmentPhyHeaderInserter::handleCanPushPacketChangedhandleCanPushPacketChanged
EthernetPhyHeaderInserterinet::physicallayer::EthernetPhyHeaderInserter::handleCanPushPacketChangedhandleCanPushPacketChanged
InterpacketGapInserterinet::InterpacketGapInserter::pushPacketEndpushPacketEnd
InterpacketGapInserterinet::InterpacketGapInserter::pushPacketProgresspushPacketProgress
StreamClassifierinet::StreamClassifier::handleCanPushPacketChangedhandleCanPushPacketChanged
StreamEncoderinet::StreamEncoder::pushPacketpushPacket
StreamIdentifierinet::StreamIdentifier::pushPacketpushPacket
EligibilityTimeFilterinet::EligibilityTimeFilter::pushPacketpushPacket
EligibilityTimeMeterinet::EligibilityTimeMeter::handleCanPushPacketChangedhandleCanPushPacketChanged
PacketClassifierinet::queueing::PacketClassifier::pushPacketpushPacket
BackPressureBarrierinet::queueing::BackPressureBarrier::pushPacketpushPacket
PacketClonerinet::queueing::PacketCloner::handleCanPushPacketChangedhandleCanPushPacketChanged
PacketMultiplexerinet::queueing::PacketMultiplexer::handleCanPushPacketChangedhandleCanPushPacketChanged
PacketMultiplexerinet::queueing::PacketMultiplexer::pushPacketpushPacket
LabelFilterinet::queueing::LabelFilter::handleCanPushPacketChangedhandleCanPushPacketChanged
RedDropperinet::queueing::RedDropper::handleCanPushPacketChangedhandleCanPushPacketChanged
DropTailQueueinet::queueing::PacketQueue::pushPacketpushPacket
PacketQueueinet::queueing::PacketQueue::pushPacketpushPacket
TokenBasedServerinet::queueing::TokenBasedServer::handleCanPushPacketChangedhandleCanPushPacketChanged
PassivePacketSinkinet::queueing::PassivePacketSink::pushPacketpushPacket
ActivePacketSourceinet::queueing::ActivePacketSource::handleCanPushPacketChangedhandleCanPushPacketChanged

Called methods (observed)

functioninfocall from
inet::queueing::PacketMultiplexer::handleCanPushPacketChangedhandleCanPushPacketChangedBehaviorAggregateClassifier, InterpacketGapInserter, StreamIdentifier, EligibilityTimeFilter, BackPressureBarrier, PacketMultiplexer, DropTailQueue, PacketQueue, PassivePacketSink
inet::queueing::PacketMultiplexer::handlePushPacketProcessedhandlePushPacketProcessedPacketEmitter
inet::queueing::PacketMultiplexer::pushPacketpushPacketMessageDispatcher, PacketDirectionReverser, EthernetFcsChecker, EthernetFcsInserter, DscpMarker, MultiFieldClassifier, EthernetFragmentPhyHeaderChecker, EthernetPhyHeaderChecker, StreamClassifier, EligibilityTimeFilter, EligibilityTimeMeter, PacketCloner, PacketMultiplexer, LabelFilter, RedDropper, StatisticalRateLimiter, TokenBasedServer, ActivePacketSource
inet::queueing::PacketMultiplexer::pushPacketEndpushPacketEndEthernetFragmentPhyHeaderInserter, EthernetPhyHeaderInserter
inet::queueing::PacketMultiplexer::pushPacketProgresspushPacketProgressEthernetFragmentPhyHeaderInserter, EthernetPhyHeaderInserter

Incoming messages (observed)

gatemsgkindctrlsrcModuletags
in[]Packet0EthernetSocketIoDirectionTag, DispatchProtocolReq, EncapsulationProtocolReq, MacAddressReq, PacketProtocolTag, SocketReq
in[]Packet0GptpDispatchProtocolInd, DispatchProtocolReq, InterfaceReq, MacAddressReq, PacketProtocolTag
in[]Packet0Ipv4DirectionTag, DispatchProtocolInd, DispatchProtocolReq, EncapsulationProtocolReq, InterfaceReq, MacAddressReq, MulticastReq, NetworkProtocolInd, PacketProtocolTag, TransportProtocolInd

Outgoing messages (observed)

gatemsgkindctrldestModuletags
outPacket0TcpServerSocketIoDirectionTag, PacketProtocolTag
outPacket0UdpSocketIoDirectionTag, PacketProtocolTag

Pushed in messages (observed)

gatemsgkindctrlsrcModuletags
in[]Packet0MessageDispatcherDispatchProtocolInd, DispatchProtocolReq, InterfaceReq, MacAddressReq, PacketProtocolTag
in[]Packet0PacketDirectionReverserDirectionTag, EncapsulationProtocolReq, InterfaceInd, MacAddressReq, PacketProtocolTag, CutthroughTag?, DropEligibleReq?, EligibilityTimeTag?, PcpReq?, SequenceNumberReq?, StreamReq?, UserPriorityReq?, VlanReq?
in[]Packet0EthernetFcsCheckerDirectionTag, DispatchProtocolReq, InterfaceInd, PacketProtocolTag
in[]Packet0EthernetFcsInserterDirectionTag, DispatchProtocolReq, FragmentTag, InterfaceInd, PacketProtocolTag
in[]Packet0DscpMarkerInterfaceInd, MacAddressInd, NetworkProtocolInd, PacketProtocolTag, DispatchProtocolInd?, DispatchProtocolReq?, InterfaceReq?
in[]Packet0MultiFieldClassifierDispatchProtocolReq, InterfaceInd, MacAddressInd, PacketProtocolTag
in[]Packet0SingleRateThreeColorMeterDispatchProtocolInd, InterfaceInd, InterfaceReq, MacAddressInd, NetworkProtocolInd, PacketProtocolTag
in[]Packet0TokenBucketMeterInterfaceInd, MacAddressInd, PacketProtocolTag, DispatchProtocolInd?, DispatchProtocolReq?, InterfaceReq?, NetworkProtocolInd?
in[]Packet0EthernetFragmentPhyHeaderCheckerDirectionTag, DispatchProtocolReq, FragmentTag, InterfaceInd, PacketProtocolTag
in[]Packet0EthernetFragmentPhyHeaderInserterDirectionTag, DispatchProtocolInd, EncapsulationProtocolReq, FragmentTag, InterfaceReq, MacAddressReq, MulticastReq, NetworkProtocolInd, PacketProtocolTag, TransportProtocolInd, VlanReq
in[]Packet0EthernetPhyHeaderCheckerDirectionTag, DispatchProtocolReq, InterfaceInd, PacketProtocolTag
in[]Packet0EthernetPhyHeaderInserterDirectionTag, DispatchProtocolInd, EncapsulationProtocolReq, InterfaceReq, MacAddressReq, MulticastReq, NetworkProtocolInd, PacketProtocolTag, TransportProtocolInd, VlanReq
in[]Packet0StreamClassifierDirectionTag, DispatchProtocolReq, DropEligibleInd, EncapsulationProtocolInd, InterfaceInd, MacAddressInd, PacketProtocolTag, PcpInd, StreamInd, UserPriorityInd, VlanInd
in[]Packet0EligibilityTimeFilterDirectionTag, DispatchProtocolReq, DropEligibleInd, EligibilityTimeTag, EncapsulationProtocolInd, InterfaceInd, MacAddressInd, PacketProtocolTag, PcpInd, StreamInd, UserPriorityInd, VlanInd
in[]Packet0EligibilityTimeMeterDirectionTag, PacketProtocolTag, EligibilityTimeTag?
in[]Packet0PacketClonerDirectionTag, PacketProtocolTag
in[]Packet0LabelFilterDirectionTag, LabelsTag, PacketProtocolTag, DispatchProtocolReq?, DropEligibleInd?, EncapsulationProtocolInd?, InterfaceInd?, MacAddressInd?, PcpInd?, StreamInd?, StreamReq?, UserPriorityInd?, VlanInd?
in[]Packet0RedDropperDispatchProtocolInd, InterfaceInd, InterfaceReq, NetworkProtocolInd, PacketProtocolTag, MacAddressInd?
in[]Packet0StatisticalRateLimiterDirectionTag, DispatchProtocolReq, DropEligibleInd, EncapsulationProtocolInd, InterfaceInd, MacAddressInd, PacketProtocolTag, PcpInd, RateTag, StreamInd, UserPriorityInd, VlanInd
in[]Packet0TokenBasedServerDirectionTag, PacketProtocolTag
in[]Packet0ActivePacketSourceDirectionTag, PacketProtocolTag

Push out messages (observed)

gatemsgkindctrldestModuletags
outPacket0MessageDispatcherDispatchProtocolReq, PacketProtocolTag, DirectionTag?, DispatchProtocolInd?, FragmentTag?, InterfaceInd?, InterfaceReq?, MacAddressInd?, MacAddressReq?, NetworkProtocolInd?
outPacket0RelayInterfaceSelectorMacAddressReq, PacketProtocolTag, CutthroughTag?, DirectionTag?, DispatchProtocolInd?, DispatchProtocolReq?, DropEligibleReq?, EncapsulationProtocolReq?, InterfaceInd?, InterfaceReq?, PcpReq?, UserPriorityReq?, VlanReq?
outPacket0BehaviorAggregateClassifierDispatchProtocolInd, InterfaceInd, InterfaceReq, MacAddressInd, NetworkProtocolInd, PacketProtocolTag
outPacket0SingleRateThreeColorMeterDispatchProtocolInd, InterfaceInd, InterfaceReq, MacAddressInd, NetworkProtocolInd, PacketProtocolTag
outPacket0InterpacketGapInserterDirectionTag, DispatchProtocolInd, EncapsulationProtocolReq, InterfaceReq, MacAddressReq, MulticastReq, NetworkProtocolInd, PacketProtocolTag, TransportProtocolInd, VlanReq, FragmentTag?
outPacket0StreamEncoderDirectionTag, DropEligibleReq, EncapsulationProtocolReq, InterfaceInd, MacAddressReq, PacketProtocolTag, PcpReq, StreamReq, UserPriorityReq, VlanReq, EligibilityTimeTag?
outPacket0StreamIdentifierDirectionTag, PacketProtocolTag, DispatchProtocolInd?, DispatchProtocolReq?, DropEligibleReq?, EncapsulationProtocolReq?, InterfaceInd?, InterfaceReq?, MacAddressReq?, MulticastReq?, NetworkProtocolInd?, PcpReq?, SequenceNumberReq?, SocketReq?, StreamReq?, TransportProtocolInd?, UserPriorityReq?, VlanReq?
outPacket0EligibilityTimeFilterDirectionTag, PacketProtocolTag, EligibilityTimeTag?
outPacket0PacketClassifierDirectionTag, DispatchProtocolReq, InterfaceInd, PacketProtocolTag, FragmentTag?
outPacket0BackPressureBarrierDirectionTag, PacketProtocolTag, DispatchProtocolReq?, DropEligibleInd?, EligibilityTimeTag?, EncapsulationProtocolInd?, InterfaceInd?, LabelsTag?, MacAddressInd?, PcpInd?, RateTag?, StreamInd?, StreamReq?, UserPriorityInd?, VlanInd?
outPacket0DropTailQueueDispatchProtocolInd, InterfaceInd, InterfaceReq, MacAddressInd, NetworkProtocolInd, PacketProtocolTag
outPacket0PacketQueueDispatchProtocolInd, InterfaceInd, InterfaceReq, NetworkProtocolInd, PacketProtocolTag, MacAddressInd?
outPacket0PassivePacketSinkDirectionTag, PacketProtocolTag

Packet operations (observed)

chunkTypepacketAction
peekData, setBackOffset, setFrontOffset
Ipv4HeaderpopAtFront

Shared Tagging operations (observed)

tagTypetagAction
PacketProtocolTagfindTag

Source code

//
// This module connects multiple packet producers to one packet consumer. When
// a packet is pushed by one of the connected packet producers, then the multiplexer
// simply pushes the packet to the connected packet consumer.
//
simple PacketMultiplexer extends PacketProcessorBase like IActivePacketSource // TODO IPassivePacketSink // in gate is vector
{
    parameters:
        bool forwardServiceRegistration = default(true);
        bool forwardProtocolRegistration = default(true);
        displayStringTextFormat = default("passed %p pk (%l)"); // %p number of packet, %l total length
        @class(PacketMultiplexer);
        @display("i=-;b=10,10,oval,grey,,1");
        @signal[packetPushed](type=inet::Packet);
        @signal[packetPulled](type=inet::Packet);
        // the statistical value is the multiplexed packet
        @statistic[packets](title="packets"; source=merge(packetPushed, packetPulled); record=count; unit=pk);
        // the statistical value is the length of the multiplexed packet
        @statistic[packetLengths](title="packet lengths"; source=packetLength(merge(packetPushed, packetPulled)); record=sum,histogram,vector; unit=b; interpolationmode=none);
        // the statistical value is the data rate of the multiplexed packets
        @statistic[dataRate](title="data rate"; source=throughput(merge(packetPushed, packetPulled)); record=vector; unit=bps; interpolationmode=linear);
    gates:
        input in[] @labels(push);
        output out @labels(push);
}
File: src/inet/queueing/common/PacketMultiplexer.ned