47 #include <pcap-stdinc.h>
56 #define PCAP_VERSION_MAJOR 2
57 #define PCAP_VERSION_MINOR 4
59 #define PCAP_ERRBUF_SIZE 256
65 #if BPF_RELEASE - 0 < 199406
70 typedef struct pcap
pcap_t;
156 #define PCAP_IF_LOOPBACK 0x00000001
u_int bpf_u_int32
32-bit unsigned integer
struct pcap pcap_t
Descriptor of an open capture instance. This structure is opaque to the user, that handles its conten...
int bpf_int32
32-bit integer
struct pcap_dumper pcap_dumper_t
libpcap savefile descriptor.
Representation of an interface address, used by pcap_findalldevs().
struct sockaddr * broadaddr
if not NULL, a pointer to a struct sockaddr that contains the broadcast address corre sponding to th...
struct sockaddr * addr
a pointer to a struct sockaddr containing an address
struct sockaddr * dstaddr
if not NULL, a pointer to a struct sockaddr that contains the destination address corre sponding to ...
struct pcap_addr * next
if not NULL, a pointer to the next element in the list; NULL for the last element of the list
struct sockaddr * netmask
if not NULL, a pointer to a struct sockaddr that contains the netmask corresponding to the address po...
Item in a list of interfaces, used by pcap_findalldevs().
u_int flags
PCAP_IF_ interface flags. Currently the only possible flag is PCAP_IF_LOOPBACK, that is set if the in...
struct pcap_addr * addresses
a pointer to the first element of a list of addresses for the interface
char * name
a pointer to a string giving a name for the device to pass to pcap_open_live()
struct pcap_if * next
if not NULL, a pointer to the next element in the list; NULL for the last element of the list
char * description
if not NULL, a pointer to a string giving a human-readable description of the device
Header of a packet in the dump file.
struct timeval ts
time stamp
bpf_u_int32 len
length this packet (off wire)
bpf_u_int32 caplen
length of portion present
Structure that keeps statistical values on an interface.
u_int ps_drop
number of packets dropped by the driver
u_int bs_capt
Win32 specific. number of packets captured, i.e number of packets that are accepted by the filter,...
u_int ps_recv
number of packets transited on the network
u_int ps_ifdrop
drops by interface, not yet supported