Package: inet.queueing.source
PcapFilePacketProducer
simple moduleThis module is an active packet source which pushes packets into the connected packet consumer. All pushed packets are read from a PCAP file.
Available packet name format directives: %s - source address and/or port %d - destination address and/or port %p - innermost packet protocol %t - innermost packet protocol subtype %l - packet length %i - packet data information %n - number of packets read so far
Inheritance diagram
The following diagram shows inheritance relationships for this type. Unresolved types are missing from the diagram.
Parameters
Name | Type | Default value | Description |
---|---|---|---|
filename | string |
the PCAP file to be read |
|
packetNameFormat | string | "Pcap-%p-%t-%n" |
determines the name of the packets read from the PCAP file |
Properties
Name | Value | Description |
---|---|---|
class | PcapFilePacketProducer | |
display | i=block/source |
Gates
Name | Direction | Size | Description |
---|---|---|---|
out | output |
Signals
Name | Type | Unit |
---|---|---|
packetCreated | inet::Packet |
Statistics
Name | Title | Source | Record | Unit | Interpolation Mode |
---|---|---|---|---|---|
packetCreated | packets created | count, sum(packetBytes), vector(packetBytes) | none |
Source code
// // This module is an active packet source which pushes packets into the connected // packet consumer. All pushed packets are read from a PCAP file. // // Available packet name format directives: // %s - source address and/or port // %d - destination address and/or port // %p - innermost packet protocol // %t - innermost packet protocol subtype // %l - packet length // %i - packet data information // %n - number of packets read so far // simple PcapFilePacketProducer like IActivePacketSource { parameters: string filename; // the PCAP file to be read string packetNameFormat = default("Pcap-%p-%t-%n"); // determines the name of the packets read from the PCAP file @class(PcapFilePacketProducer); @display("i=block/source"); @signal[packetCreated](type=inet::Packet); @statistic[packetCreated](title="packets created"; record=count,sum(packetBytes),vector(packetBytes); interpolationmode=none); gates: output out @labels(push); }File: src/inet/queueing/source/PcapFilePacketProducer.ned