nmap/libdnet-stripped
david b5c1e83471 Substitute on-link routes' gateways with an all-zero address.
On OS X, the code in route_loop in route-bsd.c can get a gateway
sockaddr_dl that looks like this:

$1 = {
  sdl_len = 20 '\024',
  sdl_family = 18 '\022',
  sdl_index = 4,
  sdl_type = 6 '\006',
  sdl_nlen = 0 '\0',
  sdl_alen = 0 '\0',
  sdl_slen = 0 '\0',
  sdl_data = '\0' <repeats 11 times>
}

route_loop would throw these out because there's no hardward address
there. This is a routing table entry that indicates that there is no
gateway, and that packets for this particular destination need to go on
interface #4. It corresponds to this type of line from netstat output:

Destination        Gateway            Flags        Refs      Use   Netif Expire
192.168.0          link#4             UCS             2        0     en0

I've changed it so that instead of throwing out the entry, it creates an
all-zero address of the same type as the destination address, which is a
convention used (by Nmap at least) to indicate an on-link route.
2012-03-26 22:24:55 +00:00
..
config Use getkerninfo to get routing information on AIX. 2011-09-21 07:31:34 +00:00
include Check for <netinet/in6_var.h>. 2011-09-28 06:55:47 +00:00
src Substitute on-link routes' gateways with an all-zero address. 2012-03-26 22:24:55 +00:00
acconfig.h Add semicolons to the socklen_t typedefs, thanks again to Michael 2010-01-14 06:04:17 +00:00
aclocal.m4 autoreconf with Autoconf 2.63, Automake 1.10.1, and libtool 2.2.6. 2009-08-06 22:00:34 +00:00
configure Check for <netinet/in6_var.h>. 2011-09-28 06:55:47 +00:00
configure.in Check for <netinet/in6_var.h>. 2011-09-28 06:55:47 +00:00
dnet-config.in Upgrading shipped libdnet to 1.12 2008-09-19 06:12:25 +00:00
INSTALL Upgrading shipped libdnet to 1.12 2008-09-19 06:12:25 +00:00
libdnet-stripped.vcxproj Remove the nonexistent include/config.h from the build configuration. 2011-07-20 07:16:05 +00:00
LICENSE Upgrading shipped libdnet to 1.12 2008-09-19 06:12:25 +00:00
Makefile.am Don't use the removed directorie man, python, and test in Makefile.am. 2009-08-06 21:45:19 +00:00
Makefile.am.common Upgrading shipped libdnet to 1.12 2008-09-19 06:12:25 +00:00
Makefile.in autoreconf with Autoconf 2.63, Automake 1.10.1, and libtool 2.2.6. 2009-08-06 22:00:34 +00:00
NMAP_MODIFICATIONS Consider IFF_LOOPBACK before IFF_BROADCAST. 2011-09-26 22:26:50 +00:00
README Upgrading shipped libdnet to 1.12 2008-09-19 06:12:25 +00:00
THANKS Upgrading shipped libdnet to 1.12 2008-09-19 06:12:25 +00:00
TODO Upgrading shipped libdnet to 1.12 2008-09-19 06:12:25 +00:00

libdnet
-------

libdnet provides a simplified, portable interface to several low-level
networking routines, including network address manipulation, kernel
arp(4) cache and route(4) table lookup and manipulation, network
firewalling, network interface lookup and manipulation, IP tunnelling,
and raw IP packet and Ethernet frame transmission.

WWW: http://libdnet.sourceforge.net/

$Id: README 578 2005-02-14 21:00:17Z dugsong $