Nmap Development mailing list archives

Re: [PATCH] Timing template orderings


From: Fyodor <fyodor () insecure org>
Date: Tue, 16 May 2006 14:43:40 -0700

On Tue, May 16, 2006 at 03:11:24PM -0700, doug () hcsw org wrote:
Hi nmap-dev,

I'm attaching 2 patches. The first, nmap-4.03-timing-template-ordering.patch,
modifies nmap.cc so that all the timing variables a user can specify and
are currently clobbered by 1 or more timing templates (--initial-rtt-timeout,
--max-retries, etc) are stored and only dealt with after the entire argument
list has been processed.

Thanks, this looks good!  I have applied it for the next version.  I
also updated the man page to remove the note about this (former)
limitation.  The only other change I made involved temporary values
like these:

       } else if (optcmp(long_options[option_index].name, "initial-rtt-timeout") == 0) {
      l = tval2msecs(optarg);
      if (l <= 0) fatal("Bogus --initial-rtt-timeout argument specified.  Must be positive");
-     o.setInitialRttTimeout(l);
+        pre_init_rtt_timeout = l;

The 'l' variable can be pretty easily removed here, so I did so in
many of the cases.  Oh, I also made pre_host_timeout a 'long' rather
than 'int', though I doubt many people will have a 24-day host timeout
needed to overflow a 32-bit signed int :).  And, of course, long is 32-bits
too on many platforms.  So its no big deal.

We really are making short work of that feature/bug list :).

Cheers,
-F


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


Current thread: