Conexus::PacketCapture Class Reference

#include <conexus/packetcapture.h>

Inheritance diagram for Conexus::PacketCapture:

Inheritance graph
[legend]
List of all members.

Detailed Description

Author:
Rick L Vinyard Jr


Public Types

typedef boost::shared_ptr<
PacketCapture
pointer
typedef enum Conexus::PacketCapture::Address Address
typedef std::vector< Device > Devices
enum  Address { ADDRESS, NETMASK, BROADCAST, DESTINATION }

Public Member Functions

 PacketCapture (std::string device=std::string(), int snaplen=65535, bool promiscuous=false, int timeout_ms=0)
virtual void open () throw (open_error)
virtual void close (bool force=false) throw (close_error)
virtual Data read (size_t s) throw (read_error)
virtual ssize_t write (CData data)
virtual ssize_t write (const void *data, size_t size, IOMETHOD block=BLOCK) throw (write_error)
virtual ssize_t write (Data data)
std::string device () const
void set_device (const std::string &value=std::string())
int snapshot_length () const
void set_snapshot_length (const int &value=65535)
bool promiscuous () const
void set_promiscuous (bool value=false)
int timeout_ms () const
void set_timeout_ms (const int &value=0)
virtual void stop ()
virtual void set_responsiveness (long r)
virtual long responsiveness ()
virtual const std::string & object_type ()

Static Public Member Functions

static PacketCapture::pointer create (std::string device=std::string(), int snaplen=65535, bool promiscuous=false, int timeout_ms=0)
static Devices get_all_devices ()

Protected Member Functions

virtual void read_thread_main ()

Static Protected Member Functions

static void pcap_callback (u_char *object, const struct pcap_pkthdr *pkthdr, const u_char *packet)

Protected Attributes

char m_errbuf [PCAP_ERRBUF_SIZE]
pcap_t * m_pcapd
std::string m_device
int m_snapshot_length
bool m_promiscuous
int m_timeout_ms
pcap_pkthdr * m_capture_header
uint8_t * m_capture_data
long m_responsiveness
pthread_mutex_t m_mutex_working

Static Protected Attributes

static char m_static_errbuf [PCAP_ERRBUF_SIZE]


The documentation for this class was generated from the following files:
Generated on Sun Aug 6 12:17:03 2006 by  doxygen 1.4.6