Network packet. More...
#include <wipal/pcap/pkt.hh>
Classes | |
| struct | shared_data |
| Data embedded in a packet. More... | |
Public Types | |
| enum | { max_size = 65535 } |
| typedef Source | source_type |
Public Member Functions | |
| const Source * | source_ptr () const |
| const Source & | source () const |
| bool | swapped () const |
| long | use_count () const |
| bool | unique () const |
| std::ostream & | print (std::ostream &) const |
| packet (unsigned index, unsigned sec, unsigned usec, size_t caplen, size_t len=0, const Source *src=0) | |
| packet (const metadata &meta, const Source *src=0) | |
| const metadata & | meta () const |
| metadata & | meta () |
| const void * | bytes () const |
| void * | bytes () |
Equality checks | |
| bool | operator== (const packet &) const |
| bool | operator!= (const packet &) const |
Protected Attributes | |
| boost::shared_ptr< shared_data > | data_ |
Network packet.
A packet holds both the packet's meta-information and bytes.
A packet might optionally be attached to its source. If attached, the packet has an index inside this source.
Packets use shared pointers: you may copy them efficiently.
1.6.2