[Winpcap-users] libpcap application in cygwin

Loris Degioanni loris.degioanni at cacetech.com
Tue Nov 7 17:19:24 GMT 2006


Download and unpack the WinPcap developer's pack from 
http://www.winpcap.org/devel.htm. It contains a set of examples that 
compile under cygwin too. This will save you a lot of time in setting up 
a ready-to-go environment.

Loris


shuprabha shakya wrote:
> 
> 
> Dear all,
>  
> I wanted to know whether we can run program using libpcap in cygwin or not?
>  
> Following the link 
> http://cvs.tcpdump.org/cgi-bin/cvsweb/libpcap/README.Win32?rev=1.1
>  
> I installed winpcap, and did ./configure, make and make install of 
> libpcap-0.8.1 in cygwin.
>  
> After that I tried to compile a small sniffer.c code in the link
> http://www.tcpdump.org/lists/workers/2005/06/msg00102.html
>  
> But it is giving me many errors like
>  
> $ gcc -o snif sniffer.c
> sniffer.c:9:24: netinet/in.h: No such file or directory
> In file included from sniffer.c:10:
> /usr/include/arpa/inet.h:22: error: parse error before "inet_addr"
> /usr/include/arpa/inet.h:24: error: parse error before "inet_lnaof"
> /usr/include/arpa/inet.h:26: error: parse error before "inet_netof"
> /usr/include/arpa/inet.h:27: error: parse error before "inet_network"
> In file included from sniffer.c:12:
> /usr/include/netinet/if_ether.h:26:28: linux/if_ether.h: No such file or 
> directory
> sniffer.c:20: error: `ETHER_ADDR_LEN' undeclared here (not in a function)
> sniffer.c:46: error: field `ip_src' has incomplete type
> sniffer.c:46: error: field `ip_dst' has incomplete type
> sniffer.c:72:1: warning: "TH_FLAGS" redefined
> In file included from sniffer.c:13:
> /usr/include/netinet/tcp.h:79:1: warning: this is the location of the 
> previous definition
> sniffer.c: In function `got_packet':
> sniffer.c:120: error: type of formal parameter 1 is incomplete
> sniffer.c:121: error: type of formal parameter 1 is incomplete
> sniffer.c:125: error: `IPPROTO_TCP' undeclared (first use in this function)
> sniffer.c:125: error: (Each undeclared identifier is reported only once
> sniffer.c:125: error: for each function it appears in.)
> sniffer.c:128: error: `IPPROTO_UDP' undeclared (first use in this function)
> sniffer.c:131: error: `IPPROTO_ICMP' undeclared (first use in this function)
> sniffer.c:134: error: `IPPROTO_IP' undeclared (first use in this function)
>  
>  
> So, I would like to know is there any possibility that we can run 
> application using libpcap in cygwin.
>  
> Shupa
> 
> ------------------------------------------------------------------------
> FREE pop-up blocking with the new MSN Toolbar MSN Toolbar 
> <http://g.msn.com/8HMAEN/2755??PS=47575> Get it now!
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Winpcap-users mailing list
> Winpcap-users at winpcap.org
> https://www.winpcap.org/mailman/listinfo/winpcap-users


More information about the Winpcap-users mailing list