Nmap Development mailing list archives

AIX woes


From: Peter O'Gorman <nmap-dev () mlists thewrittenword com>
Date: Wed, 8 Nov 2006 22:18:25 -0600

Hi,

It seeems that when I "tested" nmap-4.03 on AIX, I was actually
dreaming. It did not work at all. So we had a look at 4.20ALPHA11 and
4.11.

We changed around a bunch of includes so that dnet.h gets included
before netinet/ip.h (it does wonderful stuff like #define ip_len
ip_ff.ip_flen) see the tcpip.h and nmap.h patches. Due to a similar
issue, we had to rename the variables used as arguments for fill_ip_raw
in tcpip.cc. These patches applied we got a successful build, but
total failure to work, eth_open always fails.

While we tried eth-bsd.c, eth-dlpi.c and eth-ndd.c with various
patches, the eth-ndd.c method seemed most likely to work. The bind()
call always fails with EEXIST "File Exists", which is a rather unusual
error for bind(). When NS_ETHERTYPE is changed to NS_TAP, the bind()
call succeeds, but unfortunately pcap_open_live then fails. We spent
quite a while with this and could not get both pcap and libdnet to
open the ethernet device at the same time. It may not be possible. So,
at this point, giving up, we disabled the ARP ping check by setting
directly_connected=0 for AIX in Target.cc. Would be very interested in
better solutions to this.

So with that, and eth_open hacked to not return failure whtn bind()
fails, we get better results, but can not scan hosts outside the local
subnet because route-bsd.c does not actually work on AIX. Turned out
that AIX has getkerninfo(KINFO_RT_DUMP,...) which is the same as the
sysctl on modern bsd, so we used that. If this is not the best way,
please let us know.

Also added $(CXXFLAGS) to the link rule, this is similar to the way
automake generates rules.

Patch attached.

Thanks,
Peter


Attachment: nmap-4.20.diff
Description:


_______________________________________________
Sent through the nmap-dev mailing list
http://cgi.insecure.org/mailman/listinfo/nmap-dev
Archived at http://SecLists.Org

Current thread: