尝试从捕获文件中逐一读取数据包:
pcap_t * structure = pcap_open_offline(file, errbuf)
接着
pcap_pkthdr** hdr=new (pcap_pkthdr*);
const u_char** data=NULL;
while(pcap_next_ex(structure, hdr, data) == 1)
{.....}
因此, pcap_next_ex 与核心崩溃
Program terminated with signal 11, Segmentation fault.
[New process 7928]
(gdb) bt
0x0804a038 in pcap_fakecallback ()
0x08057ac4 in pcap_offline_read ()
0x0804ae19 in pcap_next_ex ()
0x08049b3d in main () at ..
有任何想法吗?谢谢!