From 35ef43f71102eff33ff7710f9022e4216f458aba Mon Sep 17 00:00:00 2001 From: luis Date: Mon, 25 Jul 2011 18:34:03 +0000 Subject: [PATCH] Change explicit definition of os_scan_performance_vars to a typedef in the header file --- osscan2.cc | 21 ++------------------- osscan2.h | 25 +++++++++++++++++++++++++ 2 files changed, 27 insertions(+), 19 deletions(-) diff --git a/osscan2.cc b/osscan2.cc index 9ce5eae19..711d4b887 100644 --- a/osscan2.cc +++ b/osscan2.cc @@ -152,25 +152,8 @@ class HostOsScan; class HostOsScanInfo; class OsScanInfo; -/* Performance tuning variable. */ -struct os_scan_performance_vars { - int low_cwnd; /* The lowest cwnd (congestion window) allowed */ - int host_initial_cwnd; /* Initial congestion window for ind. hosts */ - int group_initial_cwnd; /* Initial congestion window for all hosts as a group */ - int max_cwnd; /* I should never have more than this many probes - outstanding */ - int quick_incr; /* How many probes are incremented for each response - in quick start mode */ - int cc_incr; /* How many probes are incremented per (roughly) rtt in - congestion control mode */ - int initial_ccthresh; - double group_drop_cwnd_divisor; /* all-host group cwnd divided by this - value if any packet drop occurs */ - double group_drop_ccthresh_divisor; /* used to drop the group ccthresh when - any drop occurs */ - double host_drop_ccthresh_divisor; /* used to drop the host ccthresh when - any drop occurs */ -} perf; +/* Global to store performance info */ +os_scan_performance_vars_t perf; /* Some of the algorithms used here are TCP congestion control techniques from RFC2581. */ diff --git a/osscan2.h b/osscan2.h index 1c09b6814..6704436db 100644 --- a/osscan2.h +++ b/osscan2.h @@ -127,6 +127,31 @@ class Target; #define OS_SEQ_PROBE_DELAY 100 +/****************************************************************************** + * TYPE AND STRUCTURE DEFINITIONS * + ******************************************************************************/ + +/* Performance tuning variable. */ +typedef struct os_scan_performance_vars { + int low_cwnd; /* The lowest cwnd (congestion window) allowed */ + int host_initial_cwnd; /* Initial congestion window for ind. hosts */ + int group_initial_cwnd; /* Initial congestion window for all hosts as a group */ + int max_cwnd; /* I should never have more than this many probes + outstanding */ + int quick_incr; /* How many probes are incremented for each response + in quick start mode */ + int cc_incr; /* How many probes are incremented per (roughly) rtt in + congestion control mode */ + int initial_ccthresh; + double group_drop_cwnd_divisor; /* all-host group cwnd divided by this + value if any packet drop occurs */ + double group_drop_ccthresh_divisor; /* used to drop the group ccthresh when + any drop occurs */ + double host_drop_ccthresh_divisor; /* used to drop the host ccthresh when + any drop occurs */ +} os_scan_performance_vars_t; + + /****************************************************************************** * FUNCTION PROTOTYPES *