Nmap Development mailing list archives

Re: Patches to Nmap 5.30BETA1


From: David Fifield <david () bamsoftware com>
Date: Sat, 3 Apr 2010 14:15:08 -0600

On Sat, Apr 03, 2010 at 12:19:59AM -0700, Darren Reed wrote:

Patches required to build on OpenSolaris with gmake 3.81


I hope I have fixed all of the cut-n-paste errors.

The common theme throughout is that our gmake seems to behave a lot  
differently to either the linux one or the makefiles are just broken.  
Either way, the changes below should work on all platforms.

Hmm, can you tell us more about the platform? What version of
OpenSolaris (uname)? Are you sure it's gmake 3.81?

The reason I ask is that we had reports of successful builds on
OpenSolaris recently, with only a small problem keeping Nping from
building.

http://seclists.org/nmap-dev/2010/q1/870

And things like this:

-       cd $(NSOCKDIR)/src && $(MAKE)
+       cd $(NSOCKDIR)/src && $(MAKE) NBASEDIR=../../nbase

should not be necessary with GNU Make, because there's an
"export NBASEDIR" earlier in the makefile.


I know it is bad form to patch "configure" but I don't know any other  
way to fix the detection of bpf here. The configure script is also wrong  
for many BSD's because NetBSD, etc, now only have /dev/bpf (a cloning  
device) and no longer have /dev/bpf0-15.

btw, I think I need to ask for guidance here...

OpenSolaris currently supports DLPI, PF_PACKET and BPF. DLPI will "work"
as it always has, but it is slow. With PF_PACKET some of the include paths
are different to Linux (there is no /usr/include/linux, for example) and
at present SIOCGIFHWADDR is only supported on PF_PACKET sockets (libdnet
usesSIOCGIFHWADDR on an AF_INET socket. The presence of BPF is taken to
indicate that the box is BSD and therefore the sysctl interface is used
to get the NIC address. The goal is to end up with nmap using BPF but
OpenSolaris isn't going to get sysctl any time soon. The next best
alternative seems to be supporting SIOCGIFHWADDR on AF_INET with
OpenSolaris and adapting the pcap/bpf part of nmap to use that ioctl
if it is present. Thoughts?

How slow is DLPI compared to the alternatives? I'm afraid I don't know
much about this.

As far as I know, SIOCGIFHWADDR is already used (on an AF_INET socket)
to get the interface list on OpenSolaris (in tcpip.cc). Does that not
work? What does "nmap --iflist" say?

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


Current thread: