#include <PcapOffline.h>
Public Member Functions | |
FILE * | get_file () const |
Gets the standard I/O input stream of the PcapOffline. | |
std::string const & | get_filename () const |
Gets the name of the input file. | |
int | get_major_version () const |
Gets the major version number of the file format of the savefile. | |
int | get_minor_version () const |
Gets the minor version number of the file format of the savefile. | |
bool | is_swapped () const |
Whether the byte order of the savefile is swapped. | |
PcapOffline (FILE *fp) | |
Creates a PcapOffline to read from an open stream. | |
PcapOffline (std::string const &file_name=STD_INPUT) | |
Creates a PcapOffline to read from a savefile. | |
virtual | ~PcapOffline () |
Destroy a PcapOffline object. | |
Static Public Attributes | |
static std::string | STD_INPUT |
pcappp::PcapOffline::PcapOffline | ( | std::string const & | file_name = STD_INPUT |
) |
Creates a PcapOffline to read from a savefile.
This constructor is used to read packets from a previously created savefile. The file has the same format as those used by tcpdump and tcpslice
file_name | The name of the file to open, or PcapOffline::STD_INPUT to read the packets from the standard input stream (stdin) |
PcapError |
pcappp::PcapOffline::PcapOffline | ( | FILE * | fp | ) |
Creates a PcapOffline to read from an open stream.
fp | The stream to read the packet data from |
PcapError |
pcappp::PcapOffline::~PcapOffline | ( | ) | [virtual] |
Destroy a PcapOffline object.
Closes this PcapOffline and the associated Dumper if it is open
FILE * pcappp::PcapOffline::get_file | ( | ) | const |
Gets the standard I/O input stream of the PcapOffline.
This is meaningful only when reading packets from an open stream
std::string const& pcappp::PcapOffline::get_filename | ( | ) | const [inline] |
Gets the name of the input file.
This is meaningful only when reading packets from a savefile
int pcappp::PcapOffline::get_major_version | ( | ) | const |
Gets the major version number of the file format of the savefile.
int pcappp::PcapOffline::get_minor_version | ( | ) | const |
Gets the minor version number of the file format of the savefile.
bool pcappp::PcapOffline::is_swapped | ( | ) | const |
Whether the byte order of the savefile is swapped.
std::string pcappp::PcapOffline::STD_INPUT [static] |