Hi.
Somedays ago I started to read “Building security tools…” and when I try to compile any program that depends on libnet I get errors like these:
gcc -g -c -O2 -Wall punch.c
In file included from /usr/local/include/libnet.h:77,
from ./punch.h:33,
from punch.c:33:
/usr/include/./libnet/libnet-headers.h:115: error: ‘ETHER_ADDR_LEN’ undeclared here (not in a function)
/usr/include/./libnet/libnet-headers.h:531: error: ‘FDDI_ADDR_LEN’ undeclared here (not in a function)
/usr/include/./libnet/libnet-headers.h:536: error: ‘LIBNET_ORG_CODE_SIZE’ undeclared here (not in a function)
/usr/include/./libnet/libnet-headers.h:1572: error: ‘TOKEN_RING_ADDR_LEN’ undeclared here (not in a function)
In file included from /usr/local/include/libnet.h:78,
from ./punch.h:33,
from punch.c:33:
/usr/include/./libnet/libnet-structures.h:192: error: ‘LIBNET_LABEL_SIZE’ undeclared here (not in a function)
/usr/include/./libnet/libnet-structures.h:194: error: ‘LIBNET_ERRBUF_SIZE’ undeclared here (not in a function)
In file included from ./punch.h:33,
from punch.c:33:
/usr/local/include/libnet.h:82:34: error: ./libnet/libnet-ospf.h: No existe el fichero o el directorio
/usr/local/include/libnet.h:87:2: error: #error "byte order has not been specified, you'll
punch.c: In function ‘main’:
punch.c:177: warning: pointer targets in passing argument 5 of ‘libnet_build_udp’ differ in signedness
punch.c:306: warning: format ‘%ld’ expects type ‘long int’, but argument 2 has type ‘u_int64_t’
punch.c:306: warning: format ‘%ld’ expects type ‘long int’, but argument 3 has type ‘u_int64_t’
punch.c:306: warning: format ‘%ld’ expects type ‘long int’, but argument 4 has type ‘u_int64_t’
make: *** [punch.o] Error 1
I’m using OpenSuse 11.0 and the 1.1.2.1-117.1 libnet version which is the default one.
Any hint about this will be appreciate.
Cheers