IpvxTrafSink

Package: inet.applications.generic

IpvxTrafSink

simple module

Consumes and prints packets received from the IP module. Compatible with both Ipv4 and Ipv6.

Inheritance diagram

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

Parameters

Name Type Default value Description
protocol int

value for IPv4, IPv6 protocol field, accepts only between 143 and 254

Properties

Name Value Description
lifecycleSupport
display i=block/sink

Gates

Name Direction Size Description
ipIn input
ipOut output

Signals

Name Type Unit
packetReceived inet::Packet

Statistics

Name Title Source Record Unit Interpolation Mode
packetReceived packets received packetReceived count, sum(packetBytes), vector(packetBytes) none
endToEndDelay end-to-end delay dataAge(packetReceived) histogram, vector s none

Direct method calls (observed)

call tofunctioninfo
MessageDispatcherinet::MessageDispatcher::handleRegisterProtocolhandleRegisterProtocol

Incoming messages (observed)

gatemsgkindctrlsrcModuletags
ipInPacket0Ipv4DispatchProtocolReq, DscpInd, EcnInd, HopLimitInd, InterfaceInd, L3AddressInd, NetworkProtocolInd, PacketProtocolTag, TosInd

Packet operations (observed)

chunkTypepacketAction
peekData

Shared Tagging operations (observed)

tagTypetagAction
L3AddressIndfindTag
L3AddressReqfindTag

Region Tagging operations (observed)

tagTypetagAction
CreationTimeTaggetAllTags

Source code

//
// Consumes and prints packets received from the IP module.
// Compatible with both ~Ipv4 and ~Ipv6.
//
simple IpvxTrafSink like IIpvxTrafficGenerator
{
    parameters:
        int protocol; // value for IPv4, IPv6 protocol field, accepts only between 143 and 254
        @lifecycleSupport;
        @display("i=block/sink");
        @signal[packetReceived](type=inet::Packet);
        @statistic[packetReceived](title="packets received"; source=packetReceived; record=count,"sum(packetBytes)","vector(packetBytes)"; interpolationmode=none);
        @statistic[endToEndDelay](title="end-to-end delay"; source="dataAge(packetReceived)"; unit=s; record=histogram,vector; interpolationmode=none);
    gates:
        input ipIn @labels(Ipv4ControlInfo/up,Ipv6ControlInfo/up);
        output ipOut @labels(Ipv4ControlInfo/down,Ipv6ControlInfo/down);
}

File: src/inet/applications/generic/IpvxTrafSink.ned