Re: Problem compiling libnet 1.1.2 with latest cygwin
kha <[email protected]> Tue, 30 Mar 2004 13:01:02 -0600
| Newsgroups | gmane.comp.security.libnet |
|---|---|
| Message-ID | <[email protected]> |
Hello :) Thank you all for your help : i finally compiled libnet 1.1.2 on cygwin, but i had to make some changes (just a little). All diffs i used and made are in the zip file. So here is the story : *1*. i first applied the icmp_redir.patch file ;) *2*. then i applied all patch files that Ste Jones supplied (thank you!) *3*. i tried autoconf but... it didn't work on my cygwin : so i made the changes manually to the configure file (see the diff) : in fact i apply the patch file "configure.in.diff" of Ste Jones : - CFLAGS="$CFLAGS -mno-cygwin -O0 -fnative-struct -DNO_SNPRINTF -I/usr/include/pcap" + CFLAGS="$CFLAGS -mno-cygwin -O0 -D_CYGWIN -DNO_SNPRINTF -I/usr/include/pcap" - LIBS="$LIBS -lws2_32" + LIBS="$LIBS -liphlpapi -lws2_32" *4.* ./configure : work well :) *5.* make caused an error while linking sebek.o (undefined reference to `__imp__optarg') : actually i only had to modify sebek.c to had these lines (also see the diff in the zip) : #ifdef _CYGWIN extern char *optarg; #endif (NB : actually i shoud have had these lines to the sample.diff file) *6.* all linked well and make install worked fine ;) i also tested icmp_redirect -s 1.1.1.1 -d 2.2.2.2 -g 3.3.3.3 and i saw in windump the redirect packet. So i don't know what you think about all this but... as the PORTED doc says libnet can compile well under cygwin i think it could be better to apply these modification to make it work or at least explain how to ? Have a good day, Mathieu Carbou Student Computer Science Université du Québec A Montréal
1.1.2-diffs.zip
(application/zip, 6 KB) - not displayed