#include "pcap.h"
#include <cstdlib>
/* 回调函数原型 */
void packet_handler(u_char *param, const struct pcap_pkthdr *header, const u_char *pkt_data);
int main(int argc, char **argv)
{
pcap_if_t *alldevs;
pcap_if_t *d;
int inum;
int i=0;
pcap_t *adhandle;
char errbuf[PCAP_ERRBUF_SIZE];
pcap_dumper_t *dumpfile;
/* 检查程序输入参数 */
if(argc !=
Libpcap库编程指南--保存数据包
最新推荐文章于 2024-07-01 16:12:48 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)