ns2 Network Simulator      C++ Class Hierarchy of version ns-snapshot-20040722
Home |  Source Code |  Manual |  FAQ |  Mailing List Archive |  Search |  Download | 

Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

PcapNetwork Class Reference

Inheritance diagram for PcapNetwork:

Network TclObject PcapFileNetwork PcapLiveNetwork List of all members.

Public Member Functions

 PcapNetwork ()
int rchannel ()
int schannel ()
virtual int command (int argc, const char *const *argv)
virtual int open (int mode, const char *)=0
virtual int skiphdr ()=0
virtual double gents (pcap_pkthdr *)=0
int recv (u_char *buf, int len, sockaddr &, double &)
int send (u_char *buf, int len)
int recv (netpkt_handler callback, void *clientdata)
void close ()
void reset ()
int filter (const char *)
int stat_pkts ()
int stat_pdrops ()

Public Attributes

double offset_
double t_firstpkt_

Protected Member Functions

virtual void bindvars ()=0

Static Protected Member Functions

void phandler (u_char *u, const pcap_pkthdr *h, const u_char *p)
void phandler_callback (u_char *u, const pcap_pkthdr *h, const u_char *p)

Protected Attributes

char errbuf_ [PCAP_ERRBUF_SIZE]
char srcname_ [PATH_MAX]
int pfd_
int pcnt_
int state_
int optimize_
pcap_t * pcap_
bpf_program bpfpgm_
pcap_stat pcs_
unsigned int local_netmask_

Constructor & Destructor Documentation

PcapNetwork::PcapNetwork   [inline]

Member Function Documentation

void PcapNetwork::bindvars   [protected, pure virtual]

Implemented in PcapLiveNetwork, and PcapFileNetwork.

void PcapNetwork::close  

int PcapNetwork::command int    argc,
const char *const *    argv

Reimplemented from Network.

Reimplemented in PcapLiveNetwork, and PcapFileNetwork.

int PcapNetwork::filter const char *   

virtual double PcapNetwork::gents pcap_pkthdr *    [pure virtual]

Implemented in PcapLiveNetwork, and PcapFileNetwork.

virtual int PcapNetwork::open int    mode,
const char *   
[pure virtual]

Implemented in PcapLiveNetwork, and PcapFileNetwork.

void PcapNetwork::phandler u_char *    u,
const pcap_pkthdr *    h,
const u_char *    p
[static, protected]

void PcapNetwork::phandler_callback u_char *    u,
const pcap_pkthdr *    h,
const u_char *    p
[static, protected]

int PcapNetwork::rchannel   [inline, virtual]

Implements Network.

int PcapNetwork::recv netpkt_handler    callback,
void *    clientdata

Reimplemented from Network.

int PcapNetwork::recv u_char *    buf,
int    len,
sockaddr &   ,

Implements Network.

void PcapNetwork::reset  

int PcapNetwork::schannel   [inline, virtual]

Implements Network.

int PcapNetwork::send u_char *    buf,
int    len

Implements Network.

virtual int PcapNetwork::skiphdr   [pure virtual]

Implemented in PcapLiveNetwork, and PcapFileNetwork.

int PcapNetwork::stat_pdrops  

int PcapNetwork::stat_pkts  

Member Data Documentation

struct bpf_program PcapNetwork::bpfpgm_ [protected]

char PcapNetwork::errbuf_[PCAP_ERRBUF_SIZE] [protected]

unsigned int PcapNetwork::local_netmask_ [protected]

double PcapNetwork::offset_

int PcapNetwork::optimize_ [protected]

pcap_t* PcapNetwork::pcap_ [protected]

int PcapNetwork::pcnt_ [protected]

struct pcap_stat PcapNetwork::pcs_ [protected]

int PcapNetwork::pfd_ [protected]

char PcapNetwork::srcname_[PATH_MAX] [protected]

int PcapNetwork::state_ [protected]

double PcapNetwork::t_firstpkt_

The documentation for this class was generated from the following file:
This document is generated by doxygen.