首先值得一提的,就是几个基本的结构体.
在pcap.h中定义的pcap_if || pcap_if_t结构体,往往是存放设备信息,设备名称的结构体.
typedef struct pcap_if pcap_if_t;
/*Item in a list of interfaces. */
struct pcap_if {
struct pcap_if *next;
char *name; /* name to hand to "pcap_open_live()" */
char *description; /* textual description of interface, or NULL */
struct pcap_addr *addresses;
bpf_u_int32 flags; /* PCAP_IF_ interface flags */};