Discussion:
Help req: Using Libnet with NetPoke
Habibullah baig
2005-03-19 08:54:38 UTC
Permalink
Hi all
while tying to intall the Netpoke i got folllowing messages.
it says gmt2local.c file missing which is not included in the WinPoke package.
pl help
/usr/include/libnet/libnet-headers.h:654: duplicate member `ip_v'
/usr/include/libnet/libnet-headers.h:655: duplicate member `ip_hl'
/usr/include/libnet/libnet-headers.h:1096: duplicate member `isl_user'
/usr/include/libnet/libnet-headers.h:1097: duplicate member `isl_type'
/usr/include/libnet/libnet-headers.h:1530: duplicate member `th_off'
/usr/include/libnet/libnet-headers.h:1531: duplicate member `th_x2'
/usr/include/libnet/libnet-headers.h:1641: duplicate member `vrrp_t'
/usr/include/libnet/libnet-headers.h:1642: duplicate member `vrrp_v'
netpoke.c:40:23: gmt2local.c: No such file or directory
netpoke.c:212: warning: `struct libnet_link_int' declared inside parameter list
netpoke.c:212: warning: its scope is only this definition or declaration, which is probably not what you want
netpoke.c: In function `send_timing_packet':
netpoke.c:214: `ETH_H' undeclared (first use in this function)
netpoke.c:214: (Each undeclared identifier is reported only once
netpoke.c:214: for each function it appears in.)
netpoke.c:214: `IP_H' undeclared (first use in this function)
netpoke.c:214: `TCP_H' undeclared (first use in this function)
netpoke.c:233: too few arguments to function `libnet_build_ethernet'
netpoke.c:261: warning: passing arg 8 of `libnet_build_tcp' makes integer from pointer without a cast
netpoke.c:261: too few arguments to function `libnet_build_tcp'
netpoke.c:263: too few arguments to function `libnet_do_checksum'
netpoke.c:264: warning: passing arg 2 of `libnet_do_checksum' makes pointer from integer without a cast
netpoke.c:264: too few arguments to function `libnet_do_checksum'
netpoke.c: In function `main':
netpoke.c:482: warning: passing arg 1 of `libnet_select_device' from incompatible pointer type
netpoke.c:482: too many arguments to function `libnet_select_device'
netpoke.c:486: warning: assignment makes pointer from integer without a cast
netpoke.c:491: warning: assignment makes pointer from integer without a cast
netpoke.c:494: warning: assignment makes pointer from integer without a cast
netpoke.c:562: warning: passing arg 1 of `send_timing_packet' from incompatible pointer type
make: *** [netpoke] Error 1
Dunceor .
2005-03-22 09:35:23 UTC
Permalink
Seems like you need to read up some on the doc's.
Like TCP_H should be LIBNET_TCP_H, IP_H should be LIBNET_IPV4_H, I
don't know what you ETH_H is ment to be.

You pass some wrong arguments to the functions also, check the samples
that comes with libnet to see the correct syntax or go and buy Mike's
great book Building Open Source Network Security Tools: Components and
Techniques (http://www.amazon.com/exec/obidos/tg/detail/-/0471205443/102-2777803-4653764?v=glance).

It's hard to say what is wrong when I can't see your code.

Hope this helps some.

// Dunceor
Post by Habibullah baig
Hi all
while tying to intall the Netpoke i got folllowing messages.
it says gmt2local.c file missing which is not included in the WinPoke package.
pl help
/usr/include/libnet/libnet-headers.h:654: duplicate member `ip_v'
/usr/include/libnet/libnet-headers.h:655: duplicate member `ip_hl'
/usr/include/libnet/libnet-headers.h:1096: duplicate member `isl_user'
/usr/include/libnet/libnet-headers.h:1097: duplicate member `isl_type'
/usr/include/libnet/libnet-headers.h:1530: duplicate member `th_off'
/usr/include/libnet/libnet-headers.h:1531: duplicate member `th_x2'
/usr/include/libnet/libnet-headers.h:1641: duplicate member `vrrp_t'
/usr/include/libnet/libnet-headers.h:1642: duplicate member `vrrp_v'
netpoke.c:40:23: gmt2local.c: No such file or directory
netpoke.c:212: warning: `struct libnet_link_int' declared inside parameter list
netpoke.c:212: warning: its scope is only this definition or declaration, which is probably not what you want
netpoke.c:214: `ETH_H' undeclared (first use in this function)
netpoke.c:214: (Each undeclared identifier is reported only once
netpoke.c:214: for each function it appears in.)
netpoke.c:214: `IP_H' undeclared (first use in this function)
netpoke.c:214: `TCP_H' undeclared (first use in this function)
netpoke.c:233: too few arguments to function `libnet_build_ethernet'
netpoke.c:261: warning: passing arg 8 of `libnet_build_tcp' makes integer from pointer without a cast
netpoke.c:261: too few arguments to function `libnet_build_tcp'
netpoke.c:263: too few arguments to function `libnet_do_checksum'
netpoke.c:264: warning: passing arg 2 of `libnet_do_checksum' makes pointer from integer without a cast
netpoke.c:264: too few arguments to function `libnet_do_checksum'
netpoke.c:482: warning: passing arg 1 of `libnet_select_device' from incompatible pointer type
netpoke.c:482: too many arguments to function `libnet_select_device'
netpoke.c:486: warning: assignment makes pointer from integer without a cast
netpoke.c:491: warning: assignment makes pointer from integer without a cast
netpoke.c:494: warning: assignment makes pointer from integer without a cast
netpoke.c:562: warning: passing arg 1 of `send_timing_packet' from incompatible pointer type
make: *** [netpoke] Error 1
Loading...