Nmap Development mailing list archives

Call for testers: poll and kqueue-based nsock engines


From: Henri Doreau <henri.doreau () gmail com>
Date: Wed, 8 Aug 2012 23:10:05 +0200

Hello,

The aim of the nsock-engine subsystem was to let most supported OS
leverage the high performance I/O notification facilities they have,
without breaking compatibility between them[1].

So far, only Linux benefits it, with a epoll-based engine (see
nsock/src/engine_epoll.c). Other operating systems fallback on the old
select(2) engine.

I developed two new engines, that (should) bring improvements to a
handful of OS's.

The first one is based on poll(2). It should basically work everywhere
(even on windows!). Its efficiency is similar to select() but it
doesn't suffer any hardcoded limit of manageable sockets. On windows,
some others and unrelated scalability limitations have been
highlighted recently[2], but I decided to leave the compatibility
code.

The second one is based on kqueue(2), which BSDs usually provide
(i.e.: Mac OS, FreeBSD, OpenBSD and NetBSD, to the best of my
knowledge). This engine, with FreeBSD, has shown very good
performances during my tests.

You can get the code at: https://svn.nmap.org/nmap-exp/henri/nsock-newengines

Once compiled you can use --nsock-engine=poll (almost everywhere I
guess) and --nsock-engine=kqueue (on BSDs) in nmap, nping and ncat to
enforce the use of a specific engine. Note that not all nmap phases
use nsock (typically: simple port scanning doesn't, version and script
scan do).

Feedback welcome!

Regards.

[1] http://seclists.org/nmap-dev/2011/q3/143
[2] http://seclists.org/nmap-dev/2012/q3/190

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


Current thread: