PCAP 文件格式 每个
pcap 文件的文件头Pcap Header:24B 每个
pcap 文件中的数据包头 Packet Header:16B 每个
pcap 文件中的数据报 Packet Data:14B 以太头+TCP/IP 数据 具体如下: 1.pcap 文件头部(pcap header) sturct pcap_file_header { DWORD magic; WORD version_major; WORD version_minor; DWORD thiszone; DWORD sigfigs; DWORD snaplen; DWORD linktype; } 说明: 1、标识位 magic:32 位的,这个标识位的值是 16 进制的 0xa1b2c3d4
32-bit magic number , The magic number has the value hex a1b2c3d4
2、主版本号 version_major:16 位, 默认值为 0x2
返回写入被打开文件所使用的 pcap 函数的主版本号
16-bit major version number, The major version number should have the value 2
3、副版本号 version_minor:16 位,默认值为 0x04
16-bit minor version number, The minor version number should have the value 4
4、区域时间 thiszone:32 位,实际上该值并未使用,因此可以将该位设置为 0
32-bit time zone offset field that actually not used, so you can (and probably shou