pcappp::PcapOffline Class Reference

#include <PcapOffline.h>

Inheritance diagram for pcappp::PcapOffline:

pcappp::Pcap

List of all members.

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


Constructor & Destructor Documentation

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

Parameters:
file_name The name of the file to open, or PcapOffline::STD_INPUT to read the packets from the standard input stream (stdin)
Exceptions:
PcapError 

pcappp::PcapOffline::PcapOffline ( FILE *  fp  ) 

Creates a PcapOffline to read from an open stream.

Parameters:
fp The stream to read the packet data from
Exceptions:
PcapError 

pcappp::PcapOffline::~PcapOffline (  )  [virtual]

Destroy a PcapOffline object.

Closes this PcapOffline and the associated Dumper if it is open


Member Function Documentation

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

Returns:
A pointer to the standard I/O stream of the PcapOffline, or NULL if reading packets from a savefile

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

Returns:
The name of the savefile, or "" when reading packets from an open stream

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.

Returns:
true if the current savefile uses a different byte order than the current system


Member Data Documentation

std::string pcappp::PcapOffline::STD_INPUT [static]


The documentation for this class was generated from the following files:

Generated on Tue Apr 15 17:36:29 2008 for libpcap++ by  doxygen 1.5.5