From 1b41c049fc485bc06d5b650f0d65f9fd1b7cfd6e Mon Sep 17 00:00:00 2001 From: david Date: Wed, 5 Sep 2007 04:57:36 +0000 Subject: [PATCH] Merge r5771:5778 from /nmap-exp/david/nmap-massping-migration. Print group timing stats with -d2 and individual host timing stats with -d3. Change how much the congestion threshold drops on packet drops. Increase the initial ccthresh from 50 to 75. --- scan_engine.cc | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/scan_engine.cc b/scan_engine.cc index ad532f011..38621a519 100644 --- a/scan_engine.cc +++ b/scan_engine.cc @@ -1231,12 +1231,20 @@ static void init_perf_values(struct ultra_scan_performance_vars *perf, /* Increase by up to 8 / cwnd in congestion control mode. */ perf->cc_incr = (int) (1 + 7.0 / num_probes_per_host); } - perf->initial_ccthresh = 50; + perf->initial_ccthresh = 75; perf->ping_magnifier = 3; perf->pingtime = 5000000; perf->group_drop_cwnd_divisor = 2.0; - perf->group_drop_ccthresh_divisor = (o.timing_level < 4)? 2.0 : 1.5; - perf->host_drop_ccthresh_divisor = (o.timing_level < 4)? 2.0 : 1.5; + /* Change the amount that ccthresh drops based on the timing level. */ + double ccthresh_divisor; + if (o.timing_level <= 3) + ccthresh_divisor = (3.0 / 2.0); + else if (o.timing_level <= 4) + ccthresh_divisor = (4.0 / 3.0); + else + ccthresh_divisor = (5.0 / 4.0); + perf->group_drop_ccthresh_divisor = ccthresh_divisor; + perf->host_drop_ccthresh_divisor = ccthresh_divisor; perf->tryno_cap = o.getMaxRetransmissions(); }