当前位置: 首页 > 文档资料 > WinPcap 中文手册 >

WinPcap: pcap.h File Reference

优质
小牛编辑
127浏览
2023-12-01

#include <pcap-stdinc.h>
#include <net/bpf.h>
#include <stdio.h>

Go to the source code of this file.

Data Structures

structpcap_file_header
Header of a libpcap dump file. More...
structpcap_pkthdr
Header of a packet in the dump file. More...
structpcap_stat
Structure that keeps statistical values on an interface. More...
structpcap_if
Item in a list of interfaces, used by pcap_findalldevs(). More...
structpcap_addr
Representation of an interface address, used by pcap_findalldevs(). More...

Defines

#definePCAP_VERSION_MAJOR2
Major libpcap dump file version.
#definePCAP_VERSION_MINOR4
Minor libpcap dump file version.
#definePCAP_ERRBUF_SIZE256
Size to use when allocating the buffer that contains the libpcap errors.
#definePCAP_IF_LOOPBACK0x00000001
interface is loopback
#defineMODE_CAPT0
Capture mode, to be used when calling pcap_setmode().
#defineMODE_STAT1
Statistical mode, to be used when calling pcap_setmode().

Typedefs

typedef intbpf_int32
32-bit integer
typedef u_intbpf_u_int32
32-bit unsigned integer
typedef pcappcap_t
Descriptor of an open capture instance. This structure is opaque to the user, that handles its content through the functions provided by wpcap.dll.
typedef pcap_dumperpcap_dumper_t
libpcap savefile descriptor.
typedef pcap_ifpcap_if_t
Item in a list of interfaces, see pcap_if.
typedef pcap_addrpcap_addr_t
Representation of an interface address, see pcap_addr.