[PLUG] Problem using 'libpcap'

Ashutosh Adkar ashu.adkar at gmail.com
Fri Feb 23 09:39:29 PST 2007


I tried writing a compiling a small program that uses the libpcap
library.But I got the following errors on compiling

ldev.c:12:52: error: linux/pcap.h: No such file or directory
ldev.c: In function 'main':
ldev.c:24: error: 'PCAP_ERRBUF_SIZE' undeclared (first use in this function)
ldev.c:24: error: (Each undeclared identifier is reported only once
ldev.c:24: error: for each function it appears in.)
ldev.c:25: error: 'bpf_u_int32' undeclared (first use in this function)
ldev.c:25: error: expected ';' before 'netp'
ldev.c:26: error: expected ';' before 'maskp'
ldev.c:30: warning: assignment makes pointer from integer without a cast
ldev.c:43: error: 'netp' undeclared (first use in this function)
ldev.c:43: error: 'maskp' undeclared (first use in this function)

Anybody has any idea what it is?
Here is the version information if it helps,

gcc version 4.1.1 20061011
Thanks a lot

Regards,
Ashutosh Adkar


More information about the plug-mail mailing list