Since you're using Linux, I would suggest you use: ./configure
--disable-libnet.  This will force tcpreplay to use Linux's PF_PACKET
for injection which in effect removes the middleman (libnet).

Libnet IMHO sucks and in 3.0 will likely be considered deprecated
(meaning, most likely you'll have to manually set --enable-libnet if
you don't have PF_PACKET, BPF or a 0.9.x version of libpcap installed.

Anyways, regarding the defines.h error.  I can't explain it.  It's
already generated via configure & defines.h.in and uses the value of
LNETINC to include the file.   Are you sure you don't have two copies
of libnet installed?  If not, a copy of your config.log from that
machine would be helpful.

-Aaron

On 9/5/06, Alexander Dupuy <[EMAIL PROTECTED]> wrote:
> On an FC5 x86_64 system with libnet-devel installed, I'm getting the
> following compilation error:
>
> In file included from pcaptools/tcpreplay/src/tcpedit/../mac.c:32:
> pcaptools/tcpreplay/src/tcpedit/../defines.h:44:39: error:
> /usr/local/include/libnet.h: No such file or directory
>
> The problem is that libnet is detected by configure, but it is installed
> in /usr (/usr/include/libnet.h and /usr/lib64/libnet.a) and not
> /usr/local; config.log fragments include:
>
> configure:24390: checking for libnet
> configure:24418: result: /usr
> ...
> LNETINC='/usr/include/libnet.h'
> LNETLIB='/usr/lib64/libnet.a'
>
> However, src/defines.h has the following:
>
> #ifdef HAVE_LIBNET
> #include "/usr/local/include/libnet.h"
> #endif
>
> There are a few solutions to this.
>
> One is to modify the configure script so that it doesn't look in
> /usr/include and /usr/lib (or /usr/lib64 in this case) for libnet, and
> to only use a version in /usr/local/.  But this is pretty lame, and
> requires extra work to prevent configure from accepting a --with-libnet=
> option with any value other than /usr/local/.
>
> A better one is to change this to #include "libnet.h" and make sure that
> the necessary -I/usr/local/include is added to the Makefile by the
> configure script if needed (there's automake support for setting AC_LIBS
> and AC_DEFINES appropriately within configure, and this can be
> propagated to the Makefile from a modified Makefile.in).
>
> The best one is to have src/defines.h generated from a new
> src/defines.h.in by configure, so that it can specify the right location
> for all of the header files, not just libnet.h but also libpcap.h, which
> is explicitly included as "/usr/include/libpcap.h" regardless of any
> --with-libpcap= option passed to configure.  This way you don't have to
> worry that you get the /usr/local version of libnet when you want the
> /usr version, but can't eliminate -I/usr/local/include as you also need
> the /usr/local version of some other library, say, libpcap-nav or something.
>
> @alex
>


-- 
Aaron Turner
http://synfin.net/

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Tcpreplay-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tcpreplay-users

Reply via email to