help using pcap library to sniff packets

Posted by scatman on Stack Overflow See other posts from Stack Overflow or by scatman
Published on 2010-03-20T08:07:59Z Indexed on 2010/03/20 8:11 UTC
Read the original article Hit count: 518

Filed under:
|
|

i am using pcap sample codes to create my own sniffer. i downloaded their sample sniffer and its working on windows but not on linux. i am using gcc compiler on both machines, and i have only pcap.h included.
the error is : dereferencing pointer to incomplete type.
the netmask is causing the error. the netmask is the mask of the first address of the interface.

u_int netmask=netmask((structsockaddr_in*)d->addresses->netmask))->sin_addr.S_un.S_addr;  

any solutions?

© Stack Overflow or respective owner

Related posts about pcap

Related posts about c