winpcap问题
#include "pcap.h"main()
{
pcap_if_t *alldevs;
pcap_if_t *d;
int i=0;
char errbuf[PCAP_ERRBUF_SIZE];
/* 获取本地机器设备列表 */
if (pcap_findalldevs_ex(PCAP_SRC_IF_STRING, NULL /* auth is not needed */, &alldevs, errbuf) == -1)
{
fprintf(stderr,"Error in pcap_findalldevs_ex: %s\n", errbuf);
exit(1);
}
/* 打印列表 */
for(d= alldevs; d != NULL; d= d->next)
{
printf("%d. %s", ++i, d->name);
if (d->description)
printf(" (%s)\n", d->description);
else
printf(" (No description available)\n");
}
if (i == 0)
{
printf("\nNo interfaces found! Make sure WinPcap is installed.\n");
return;
}
/* 不再需要设备列表了,释放它 */
pcap_freealldevs(alldevs);
}
为什么总是输出No interfaces found! Make sure WinPcap is installed
我明明装了winpcap的呀! --------------------编程问答-------------------- 原来是兼容问题,自己解决了 ... --------------------编程问答-------------------- 恭喜,接分 --------------------编程问答-------------------- 3.0的会比较稳定 --------------------编程问答-------------------- 定,支持楼主!高手帮忙解答下啊!
补充:.NET技术 , VC.NET