Pcap output for Packet logger. More...
#include <pcap-writer.h>


Public Member Functions | |
| void | Open (std::string const &name) |
| void | WriteEthernetHeader (void) |
| void | WriteIpHeader (void) |
| void | WriteWifiHeader (void) |
| void | WritePppHeader (void) |
| void | WritePacket (Ptr< const Packet > packet) |
Pcap output for Packet logger.
Log Packets to a file in pcap format which can be read by pcap readers.
| void ns3::PcapWriter::Open | ( | std::string const & | name | ) |
| name | the name of the file to store packet log into. This method creates the file if it does not exist. If it exists, the file is emptied. |
| void ns3::PcapWriter::WriteEthernetHeader | ( | void | ) |
Write a pcap header in the output file which specifies that the content of the file will be Packets with Ethernet/LLC/SNAP encapsulation. This method should be invoked before ns3::PcapWriter::writePacket and after ns3::PcapWriter::open.
| void ns3::PcapWriter::WriteIpHeader | ( | void | ) |
Write a pcap header in the output file which specifies that the content of the file will be IPv4 Packets. This method should be invoked before ns3::PcapWriter::WritePacket and after ns3::PcapWriter::Open.
| packet | packet to write to output file |
| void ns3::PcapWriter::WritePppHeader | ( | void | ) |
Write a pcap header in the output file which specifies that the content of the file will be ppp Packets. This method should be invoked before ns3::PcapWriter::WritePacket and after ns3::PcapWriter::Open.
| void ns3::PcapWriter::WriteWifiHeader | ( | void | ) |
Write a pcap header in the output file which specifies that the content of the file will be 802.11 Packets. This method should be invoked before ns3::PcapWriter::WritePacket and after ns3::PcapWriter::Open.
1.7.1