Bueno, es que me ha picado la curiosidad de que las opciones del configure no funcionen y me he bajado los fuentes de los dos paquetes: libnet y nemesis.
El configure.in de nemesis utiliza el shell-script libnet-config para obtener algunos flags a pasar al compilador. Las opciones del configure «--with-libnet-include» y «--with-libnet-libraries» parece, a simple vista y sin profundizar, que estén ahí más para dar el pego que para otra cosa.
Así que he compilado e instalado libnet con
./configure, a continuación
make y por último y ya como root
make install. Esto ha situado el archivo de cabecera libnet.h directamente en /usr/include y el resto en /usr/include/libnet. El binario libnet.a se copia a /usr/lib. También he abierto libnet.h para ver si había algún error y todo está correcto, en él se incluyen los demás archivos de cabecera de /usr/include/libnet.
El archivo configure.in de nemesis hace uso del script libnet-config, por lo que éste debe estar instalado en el path y tener permisos de ejecución para todo el mundo. Cuando hice
./configure en nemesis, una vez correctamente instalada libnet, sin haber copiado libnet-config al path (/usr/local/bin o /usr/bin), me daba el mismo error que a tí, pero una vez copiado ese script a su sitio el ./configure no me ha dado ningún error.
Pero ayer tenía prisa y no compilé. Hoy he intentado compilar nemesis (con make) y ahí si que hay un error «chungo» (al menos con mi compilador gcc versión 4.7.3):
fgo@yoda:~/tmp/nemesis/nemesis-1.4$ make
make all-recursive
make[1]: se ingresa al directorio `/home/fgo/tmp/nemesis/nemesis-1.4'
Making all in src
make[2]: se ingresa al directorio `/home/fgo/tmp/nemesis/nemesis-1.4/src'
gcc -DHAVE_CONFIG_H -I. -I.. -DLIBNET_LIL_ENDIAN -I/usr/local/include -I/sw/include -g -O2 -Wall -funroll-loops -pipe -c nemesis-functions.c
nemesis-functions.c: In function ‘nemesis_check_link’:
nemesis-functions.c:342:36: error: dereferencing pointer to incomplete type
make[2]: *** [nemesis-functions.o] Error 1
make[2]: se sale del directorio `/home/fgo/tmp/nemesis/nemesis-1.4/src'
make[1]: *** [all-recursive] Error 1
make[1]: se sale del directorio `/home/fgo/tmp/nemesis/nemesis-1.4'
make: *** [all] Error 2
Te pego también la salida del ./configure para que compruebes que yo no he obtenido errores haciéndolo como te he descrito:
fgo@yoda:~/tmp/nemesis/nemesis-1.4$ ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
/home/fgo/tmp/nemesis/nemesis-1.4/missing: Unknown `--is-lightweight' option
Try `/home/fgo/tmp/nemesis/nemesis-1.4/missing --help' for more information
configure: WARNING: 'missing' script is too old or missing
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking for style of include used by make... GNU
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking dependency style of gcc... none
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking dependency style of gcc... (cached) none
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking whether gcc needs -traditional... no
checking for an ANSI C-conforming const... yes
checking for gawk... (cached) gawk
checking whether ln -s works... yes
checking for fabs in -lm... yes
checking for inet_ntoa in -lnsl... yes
checking for socket in -lsocket... no
checking for hstrerror in -lresolv... yes
checking for libnet_build_ip in -lnet... yes
checking for ANSI C header files... yes
checking whether time.h and sys/time.h may both be included... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for unistd.h... (cached) yes
checking errno.h usability... yes
checking errno.h presence... yes
checking for errno.h... yes
checking for strings.h... (cached) yes
checking netdb.h usability... yes
checking netdb.h presence... yes
checking for netdb.h... yes
checking limits.h usability... yes
checking limits.h presence... yes
checking for limits.h... yes
checking machine/endian.h usability... no
checking machine/endian.h presence... no
checking for machine/endian.h... no
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking sys/param.h usability... yes
checking sys/param.h presence... yes
checking for sys/param.h... yes
checking arpa/inet.h usability... yes
checking arpa/inet.h presence... yes
checking for arpa/inet.h... yes
checking netinet/in.h usability... yes
checking netinet/in.h presence... yes
checking for netinet/in.h... yes
checking libnet.h usability... yes
checking libnet.h presence... yes
checking for libnet.h... yes
checking for libnet version 1.0.2a... yes
checking for u_int8_t... yes
checking for u_int16_t... yes
checking for u_int32_t... yes
checking for size_t... yes
checking whether struct tm is in sys/time.h or time.h... time.h
checking for gethostbyname... yes
checking for gettimeofday... yes
checking for inet_ntoa... yes
checking for isascii... yes
checking for working memcmp... yes
checking for memset... yes
checking for strchr... yes
checking for strdup... yes
checking for strerror... yes
checking for strrchr... yes
checking for strtoul... yes
checking for getopt... yes
checking for inet_aton... yes
checking for strlcat... no
checking for strlcpy... no
checking for strsep... yes
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating man/Makefile
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing depfiles commands
fgo@yoda:~/tmp/nemesis/nemesis-1.4$
El error de compilación lo da la línea nº 342 del archivo src/nemesis-functions.c en la posicón 36. Pego el código de la función que contiene esa línea:
/**
* Determine if a source Ethernet address has been specified and fill in the
* ETHERhdr structure if necessary.
*
* @param eth ETHERhdr pointer containing the source Ethernet address
* @param device char pointer containing the Ethernet device name
*
* @return 0 on sucess, -1 on failure
*/
int nemesis_check_link(ETHERhdr *eth, char *device)
{
int i;
struct ether_addr *e = NULL;
struct libnet_link_int l2;
memset(&l2, 0, sizeof(struct libnet_link_int));
#ifdef DEBUG
printf("DEBUG: determining if device %s\n has a hardware address "
"assigned.\n", device);
#endif
if (!memcmp(eth->ether_shost, zero, 6))
{
memset(&l2, 0, sizeof(l2));
if ((e = libnet_get_hwaddr(&l2, device, errbuf)) == NULL) /* Posible origen el error */
return -1;
for (i = 0; i < 6; i++)
eth->ether_shost[i] = e->ether_addr_octet[i]; /* Línea 342 */
return 0;
}
else
return 0;
}
El tipo de error viene a ser que un puntero no está correctamente desreferenciado (más o menos mal traducido). El puntero en cuestión es la variable 'e' que apunta (valga la redundancia) a una estructura de tipo
ether_addr. Este error puede ser debido a la versión de mi compilador (estoy en Debian Sid), ya que gcc ha ido evolucionando hacia un control cada vez más estricto de los tipos de las variables.
El origen del error podría estar en el valor devuelto por la función
libnet_get_hwaddr(&l2, device, errbuf), como indico en un comentario en el código de arriba, pero esto ya es cosa de andar trasteando el código, o «hackeando», en el sentido auténtico del término.
Esa función rellena los datos de una determinada estructura si ha sido especificada una dirección ethernet. Si consigues llegar al mismo punto que yo, y obtienes también el mismo error de compilación, puedes optar por un
horrororosísimo parche haciendo que esa función devuelva un '-1', como si el resultado del intento de obtener un valor para 'e' hubiera sido nulo, y a ver qué pasa

. También puedes optar por que devuelva '0', como si todo hubiera ido bien, depende de la influencia que pueda tener en el resultado. Pero yo voto por -1 y que haya suerte.
/**
* Determine if a source Ethernet address has been specified and fill in the
* ETHERhdr structure if necessary.
*
* @param eth ETHERhdr pointer containing the source Ethernet address
* @param device char pointer containing the Ethernet device name
*
* @return 0 on sucess, -1 on failure
*/
int nemesis_check_link(ETHERhdr *eth, char *device)
{
return -1;
}
Pues nada, «peazo tostón que m'aquedao», qué le vamos a hacer.

Saludos.