摘要: 1: #include"pcap.h" 2: //每次捕获到数据包时,libpcap都会自动调用这个回调函数 3: void packet_handler(u_char *param,const pcap_pkthdr*header,const u_char *ptk_data){ 4: 5: char timestr[16]; 6: ... 阅读全文
posted @ 2014-05-07 09:43 姜楠 阅读(559) 评论(0) 推荐(0) 编辑
摘要: WinPcap中文API http://www.ferrisxu.com/WinPcap/html/index.html 1: #include"pcap.h" 2: #include 3: #define IPTOSBUFFERS 12 4: char *iptos(u_long in){ 5: static char output[IPTOSBUF... 阅读全文
posted @ 2014-05-07 09:01 姜楠 阅读(685) 评论(0) 推荐(0) 编辑