IpvxTrafSink¶
Package: inet.applications.generic
simple module IpvxTrafSink
Consumes and prints packets received from the IP module. Compatible with both Ipv4 and Ipv6.
Inheritance diagram¶
Extends¶
Name |
Type |
Description |
|---|---|---|
simple module |
Base module for all INET simple modules. |
Parameters¶
Name |
Type |
Default value |
Description |
|---|---|---|---|
displayStringTextFormat |
string |
“rcvd: {numReceived} pks” |
Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information |
protocol |
int |
Value for IPv4, IPv6 protocol field, accepts only values between 143 and 254 |
Properties¶
Name |
Value |
Description |
|---|---|---|
class |
IpvxTrafSink |
|
display |
i=block/sink |
|
lifecycleSupport |
Gates¶
Name |
Direction |
Size |
Description |
|---|---|---|---|
ipIn |
input |
||
ipOut |
output |
Signals¶
Name |
Type |
Unit |
Description |
|---|---|---|---|
packetReceived |
Statistics¶
Name |
Title |
Source |
Record |
Unit |
Interpolation Mode |
Description |
|---|---|---|---|---|---|---|
endToEndDelay |
end-to-end delay |
dataAge(packetReceived) |
histogram,vector |
s |
none |
|
packetReceived |
packets received |
packetReceived |
count,”sum(packetBytes)”,”vector(packetBytes)” |
none |
Source code¶
//
// Consumes and prints packets received from the IP module.
// Compatible with both ~Ipv4 and ~Ipv6.
//
simple IpvxTrafSink extends SimpleModule like IIpvxTrafficGenerator
{
parameters:
@class(IpvxTrafSink);
int protocol; // Value for IPv4, IPv6 protocol field, accepts only values between 143 and 254
displayStringTextFormat @mutable = default("rcvd: {numReceived} pks");
@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);
}