Package: inet.queueing.sink
PcapFilePacketConsumer
simple moduleThis module is a passive packet sink which is pushed with packets by the connected packet producer. All pushed packets are written to a PCAP file.
Inheritance diagram
The following diagram shows inheritance relationships for this type. Unresolved types are missing from the diagram.
Extends
Name | Type | Description |
---|---|---|
PassivePacketSinkBase | simple module |
This is a base module for various active packet sink modules. |
Parameters
Name | Type | Default value | Description |
---|---|---|---|
displayStringTextFormat | string | "received %p pk (%l)" |
determines the text that is written on top of the submodule |
filename | string |
the PCAP file to be written |
|
networkType | int |
the network type header field in the PCAP file, see http://www.tcpdump.org/linktypes.html (1=ethernet, 204=ppp, 105=IEEE 802.11, ...) |
|
snaplen | int | 65535 |
maximum number of bytes to record per packet |
outbound | bool |
direction flag |
|
alwaysFlush | bool | false |
flush the PCAP file after each write to ensure that all packets are captured in case of a crash |
Properties
Name | Value | Description |
---|---|---|
display | i=block/sink | |
class | PcapFilePacketConsumer |
Gates
Name | Direction | Size | Description |
---|---|---|---|
in | input |
Signals
Name | Type | Unit |
---|---|---|
packetPushed | inet::Packet |
Statistics
Name | Title | Source | Record | Unit | Interpolation Mode |
---|---|---|---|---|---|
packetDelayVariation | packet delay variation | stddev(weightedMeanPerGroup(groupRegionsPerPacket(lifeTimePerRegion(packetPushed)))) | vector, histogram | s | |
packetDelayDifferenceToMean | packet delay difference to mean | differenceToMean(weightedMeanPerGroup(groupRegionsPerPacket(lifeTimePerRegion(packetPushed)))) | vector, histogram | s | none |
meanBitLifeTimePerPacket | mean bit life time per packet | weightedMeanPerGroup(groupRegionsPerPacket(lifeTimePerRegion(packetPushed))) | vector, histogram | s | none |
packetLengths | packet lengths | packetLength(packetPushed) | sum, histogram, vector | b | none |
dataRate | data rate | throughput(packetPushed) | vector | bps | linear |
packetJitter | packet jitter | jitter(weightedMeanPerGroup(groupRegionsPerPacket(lifeTimePerRegion(packetPushed)))) | vector, histogram | s | none |
bitLifeTime | bit life time | weightTimes(lengthWeightedValuePerRegion(lifeTimePerRegion(packetPushed))) | histogram? | s | none |
packets | packets | packetPushed | count | pk |
Source code
// // This module is a passive packet sink which is pushed with packets by the // connected packet producer. All pushed packets are written to a PCAP file. // simple PcapFilePacketConsumer extends PassivePacketSinkBase like IPassivePacketSink { parameters: string filename; // the PCAP file to be written int networkType; // the network type header field in the PCAP file, see http://www.tcpdump.org/linktypes.html (1=ethernet, 204=ppp, 105=IEEE 802.11, ...) int snaplen = default(65535); // maximum number of bytes to record per packet bool outbound; // direction flag bool alwaysFlush = default(false); // flush the PCAP file after each write to ensure that all packets are captured in case of a crash @class(PcapFilePacketConsumer); gates: input in @labels(push); }File: src/inet/queueing/sink/PcapFilePacketConsumer.ned