libpcap - BBS

By Candice
at 2004-04-12T02:56
at 2004-04-12T02:56
Table of Contents
我寫了一個簡單呼叫 libpcap 的程式,在 freebs編譯..
結果會有問題..?
#include<pcap.h>
#include<stdio.h>
int main()
{
char *dev, errbuf[PCAP_ERRBUF_SIZE];
dev = pcap_lookupdev(errbuf);
printf("Device: %s\n", dev);
return(0);
}
#gcc -lpcap main.c
#./a.out
Device: (null)
libpcap找到的 device 竟然是 null,why?
但是我在 linux 跑都很正常,並且可以找到 eth0
--
結果會有問題..?
#include<pcap.h>
#include<stdio.h>
int main()
{
char *dev, errbuf[PCAP_ERRBUF_SIZE];
dev = pcap_lookupdev(errbuf);
printf("Device: %s\n", dev);
return(0);
}
#gcc -lpcap main.c
#./a.out
Device: (null)
libpcap找到的 device 竟然是 null,why?
但是我在 linux 跑都很正常,並且可以找到 eth0
--
Tags:
BBS
All Comments
Related Posts
Re: How do packet filtering?

By Zora
at 2004-04-11T21:58
at 2004-04-11T21:58
請問 t1.5 的作用

By George
at 2004-04-10T05:08
at 2004-04-10T05:08
請問user如何執行應用程式?

By Bennie
at 2004-04-09T14:08
at 2004-04-09T14:08
關於wep無線網路的存取?

By Ingrid
at 2004-04-09T00:51
at 2004-04-09T00:51
請問有關無線網卡

By Ula
at 2004-04-06T22:57
at 2004-04-06T22:57