Nmap Development mailing list archives
Re: [PATCH] OpenBSD ioctl() performance improvement
From: Kris Katterjohn <katterjohn () gmail com>
Date: Sat, 24 Feb 2007 16:25:19 -0600
doug () hcsw org wrote:
I am attaching my current patch to nmap-4.21ALPHA1 but I don't think it's ready for incorporation yet. Here is what remains to be done: * Figure out what other operating systems will benefit from BIOCIMMEDIATE (I suspect at least NetBSD). * Find a better way than the #define hack in my patch. The BIOCIMMEDIATE constant is straight out of OpenBSD's /usr/include/net/bpf.h . Ideally we should #include <net/bpf.h> as described in OpenBSD's man bpf. I tried this but some of the structures defined there conflict with the bpf.h that nmap currently includes. If anybody has any ideas or suggestions regarding the above points please reply to nmap-dev!
Which bpf.h are you talking about Nmap including? pcap-bpf.h? Including net/bpf.h somewhere before the pcap.h #include in tcpip.h should work if that's the case. From pcap-bpf.h (which gets included from pcap.h): --snip-- /* * This is libpcap's cut-down version of bpf.h; it includes only * the stuff needed for the code generator and the userland BPF * interpreter, and the libpcap APIs for setting filters, etc.. * * "pcap-bpf.c" will include the native OS version, as it deals with * the OS's BPF implementation. * * XXX - should this all just be moved to "pcap.h"? */ #ifndef BPF_MAJOR_VERSION --snip-- Since net/bpf.h should (definitely) #define BPF_MAJOR_VERSION then the conflicting stuff in this header won't be included and all should work (since pcap-bpf.h is just a "cut-down version") I certainly hope pcap-bpf.h was the one you were talking about or that was for nothing :)
Best, Doug
I'm in the process of moving and just got online some today and I might be on a little tomorrow, so any replies might be delayed. Thanks, Kris Katterjohn
Attachment:
signature.asc
Description: OpenPGP digital signature
_______________________________________________ Sent through the nmap-dev mailing list http://cgi.insecure.org/mailman/listinfo/nmap-dev Archived at http://SecLists.Org
Current thread:
- [PATCH] OpenBSD ioctl() performance improvement doug (Feb 22)
- Re: [PATCH] OpenBSD ioctl() performance improvement Kris Katterjohn (Feb 24)
- Re: [PATCH] OpenBSD ioctl() performance improvement Kris Katterjohn (Feb 24)
- Re: [PATCH] OpenBSD ioctl() performance improvement Kris Katterjohn (Feb 24)