demo 1:
#define WPCAP
#define HAVE_REMOTE
// http://www.cnblogs.com/phinecos/archive/2008/10/20/1315176.html
// http://wenku.baidu.com/view/ede0fc886529647d272852e8.html
// http://www.ferrisxu.com/WinPcap/html/index.html
#include "stdafx.h"
#pragma comment(lib,"wpcap.lib")
#pragma comment(lib,"packet.lib")
#pragma comment(lib,"ws2_32.lib")
#include<pcap.h>
// 获取适配器列表
int _tmain(int argc, _TCHAR* argv[])
{
pcap_if_t* allAdapters = NULL; // 适配器
pcap_if......
阅读全文