Nmap Development mailing list archives
Re: Nmap-dev-only release: Nmap 3.10ALPHA1
From: Fyodor <fyodor () insecure org>
Date: Sat, 31 Aug 2002 21:49:50 -0700
On Wed, Aug 28, 2002 at 02:18:11PM -0500, William McVey wrote:
On Wed, 2002-08-28 at 03:18, Fyodor wrote: Am I the only person who hates C++ and is sad to see the poC (plain ole C) version of nmap die?
The death of poC Nmap has ben greatly exaggerated. Sure it compiles with g++ instead of gcc, but at least 90% of the code is identical. I am not an OO paradigm fanatic planning a wholesale rewrite of the Nmap codebase to include multiple inheritance, polymorphism, etc. I have just added the basics. For example, there are new classes to encapsulate data with related functions. Constructors and destructors have replaced ad-hoc calls such as options_init(), hostgroup_state_init(), and hostgroup_state_destroy(). Syntactic sugar like line comments (//) has been added, and accessor functions have replaced some of the most bug-prone member variables to enforce critical invariants. The goal is to make the Nmap codebase more scalable, maintainable, and robust without sacrificing performance. Improving code organization and readability will make performance-improvements to the Nmap scanning algorithms much easier. These algorithms can be hundreds of times more important than optimization details like handcrafted assembly packet checksum routines or reducing C++ object instantiation overhead. Give it a try. If nothing else, you may appreciate the C++-style comments :).
It seems odd to me that a project that had conniptions on bringing in external libraries (libnet, libxml/libsax) due to portability and bloat issues would go down the C++ route...
I can't believe I'm being accused of bloat by one of the biggest Nmap XML output proponents :). But seriously, I don't see this bloat you are referring to. Nmap 3.10ALPHA2 includes IPv6 as well as the C++ conversion, and yet the source code size, executable size, and runtime performance are very similar: Package size: -rw------- 1 fyodor fyodor 922293 Aug 20 18:19 nmap-3.00.tgz -rw------- 1 fyodor fyodor 945497 Aug 31 18:45 nmap-3.10ALPHA2.tgz Stripped Linux binary size: -rwx------ 1 fyodor fyodor 288560 Aug 31 20:47 nmap-3.00/nmap* -rwx------ 1 fyodor fyodor 306040 Aug 31 20:47 nmap-3.10ALPHA2/nmap* Runtime performance on the same machine: Nmap 3.00 64K localhost TCP scan: 3.22 seconds (average of 3) Nmap 3.10ALPHA2 (same scan): 3.21 seconds (average of 3) My tests have not shown any performance degradation from the C++ switchover. If someone can demonstrate meaningful performance problems with 3.10ALPHA2, I'll certainly investigate. Cheers, Fyodor --------------------------------------------------------------------- For help using this (nmap-dev) mailing list, send a blank email to nmap-dev-help () insecure org . List run by ezmlm-idx (www.ezmlm.org).
Current thread:
- Nmap-dev-only release: Nmap 3.10ALPHA1 Fyodor (Aug 28)
- Re: Nmap-dev-only release: Nmap 3.10ALPHA1 William McVey (Aug 28)
- Re: Nmap-dev-only release: Nmap 3.10ALPHA1 Stan Bubrouski (Aug 28)
- Re: Nmap-dev-only release: Nmap 3.10ALPHA1 einsteinmg (Aug 28)
- Re: Nmap-dev-only release: Nmap 3.10ALPHA1 Matthew Franz (Aug 28)
- Re: Nmap-dev-only release: Nmap 3.10ALPHA1 Fyodor (Aug 31)
- Re: Nmap-dev-only release: Nmap 3.10ALPHA1 William McVey (Sep 03)
- Re: Nmap-dev-only release: Nmap 3.10ALPHA1 Stan Bubrouski (Aug 28)
- Re: Nmap-dev-only release: Nmap 3.10ALPHA1 William McVey (Aug 28)
