pcap file. More...
#include <wipal/pcap/stream.hh>
Public Types | |
typedef HIDDEN | exact_type |
typedef istream< exact_type > | super_type |
typedef HIDDEN | iterator |
typedef iterator | const_iterator |
typedef iterator::value_type | packet |
Public Member Functions | |
file (const std::string &filename) | |
std::ifstream * | stream (bool seek=true) const |
std::streampos | filesize () const |
const std::string & | filename () const |
std::ostream & | print_impl (std::ostream &) const |
bool | swapped_impl () const |
pkt::type | type_impl () const |
int32_t | zone_impl () const |
int32_t | snaplen_impl () const |
int32_t | zone () const |
int32_t | snaplen () const |
bool | swapped () const |
pkt::type | type () const |
void | expect (pkt::type t) const |
std::ostream & | print (std::ostream &) const |
iterator | begin () const |
iterator | end () const |
template<class OutputIterator > | |
void | operator() (const OutputIterator &output) const |
template<class O > | |
void | operator() (const O &o) const |
template<class F > | |
void | for_each (F &f) const |
template<class F > | |
void | for_each (const F &f) const |
opt::list & | meta () |
const opt::list & | meta () const |
Apply a function/functor to each element | |
template<class Functor > | |
void | for_each (Functor &f) const |
template<class Functor > | |
void | for_each (const Functor &f) const |
Downcast methods | |
const exact_type & | exact () const |
exact_type & | exact () |
const exact_type * | exact_ptr () const |
exact_type * | exact_ptr () |
pcap file.
const opt::list & wpl::pkt::stream< B >::meta | ( | ) | const [inline, inherited] |
Access to the stream metadata.
opt::list & wpl::pkt::stream< B >::meta | ( | ) | [inline, inherited] |
Access to the stream metadata.
std::ifstream * wpl::pcap::file< B >::stream | ( | bool | seek = true |
) | const [inline] |
Get a fresh std::ifstream object.
If seek
is true, the stream is positioned at the beginning of packets.
The stream needs too be delete'ed after use.
bool wpl::pkt::stream< B >::swapped | ( | ) | const [inline, inherited] |
Get the stream's endianness w.r.t.
the host system.
Some packet streams might be encoded with a custom endianness by packet sniffers. This should not impact users in theory because it is up to the stream implementation to decode it. However sometimes the capture system's endianness might affect packet bytes (e.g. Prism headers) and nothing can be done at the stream implementation level to fix this. Thus this function.
pkt::type wpl::pkt::stream< B >::type | ( | ) | const [inline, inherited] |
Get the stream's link type.