struct pcap_file_header {
bpf_u_int32 magic;
u_short version_major;
u_short version_minor;
bpf_in32 thizone;
bpf_u_int32 sigfigs;
bpf_u_int32 snaplen;
bpf_u_int32 linktype;
};
struct pcap_pkther {
struct timeval ts;
bpf_u_int32 caplen;
bpf_u_int32 len;
};
struct pcap_stat {
u_int32 ps_recv;
u_int32 ps_drop;
u_int32 ps_ifdrop;
#ifdef WIN32
u_int bs_capt;
#endif
};
struct pcap_if {
struct pcap_if *next;
char *namel;
char *description;
struct pcap_addr *addresses;
bpf_u_int32 flags;
};
struct pcap_address {
struct pcap_addr *next;
struct sockaddr *addr;
struct sockaddr *netmask;
struct sockaddr *broadaddr;
struct soccket *dstaddr;
};
typedef {
PCAP_D_INOUT = 0;
PCAP_D_IN,
PCAP_D_OUT
} pcap_direction_t;
libpcap中<pcap.h>定义的结构
最新推荐文章于 2024-04-10 09:22:24 发布
本文介绍了PCAP文件格式中关键的数据结构,包括文件头、数据包头及统计数据等,这些结构对于理解PCAP文件如何存储捕获的网络数据包至关重要。

9218

被折叠的 条评论
为什么被折叠?



