pcap_lookupdev的使用
大家好,我想问哈怎样使用pcap_lookupdev()这个函数?
我编的程序是这样子的,但是执行没反应是怎么的回事?
#include "pcap.h"
#include <error.h>
#include <stdio.h>
int main(int argc,char**argv)
{
char ebuf[PCAP_ERRBUF_SIZE];
register char *device;
if(device ==NULL){
device = pcap_lookupdev(ebuf);
if(device ==NULL)
error("%s",64,ebuf);}
}
麻烦各位了!!