#include <wipal/pcap/dumper.hh>
Public Member Functions | |
dumper (const std::string &filename, int32_t type, int32_t snaplen) | |
void | operator() (const pkthdr *, const void *pkt) |
void | operator() (const frame_descriptor &) |
descriptor< tool::bottom > | descriptor () const |
A PCAP dumper allows you to dump frames/packets into a file.
void pcapxx::dumper::operator() | ( | const pkthdr * | h, | |
const void * | pkt | |||
) | [inline] |
Dump a frame/packet given a PCAP header and some data.
References pcapxx::pkthdr::caplen, pcapxx::internals::file_frame_header::caplen, pcapxx::pkthdr::len, pcapxx::internals::file_frame_header::len, pcapxx::pkthdr::ts, and pcapxx::internals::file_frame_header::ts.
void pcapxx::dumper::operator() | ( | const frame_descriptor & | d | ) | [inline] |
Dump a frame/packet given a frame descritpor.
References pcapxx::frame_descriptor::bytes(), and pcapxx::frame_descriptor::pcap_header().
descriptor< tool::bottom > pcapxx::dumper::descriptor | ( | ) | const [inline] |
Retrieve a descriptor to the dumped file.