From 80a8a8a418a02cbb2043cdaefc5d2930ad3fa79e Mon Sep 17 00:00:00 2001 From: luis Date: Mon, 25 Jul 2011 18:36:05 +0000 Subject: [PATCH] Change explicit definition of struct osscan_timing_vals to a typedef in the header file --- osscan2.cc | 22 +++------------------- osscan2.h | 19 +++++++++++++++++++ 2 files changed, 22 insertions(+), 19 deletions(-) diff --git a/osscan2.cc b/osscan2.cc index 711d4b887..8be620f85 100644 --- a/osscan2.cc +++ b/osscan2.cc @@ -155,23 +155,7 @@ class OsScanInfo; /* Global to store performance info */ os_scan_performance_vars_t perf; -/* Some of the algorithms used here are TCP congestion control - techniques from RFC2581. */ -struct osscan_timing_vals { - double cwnd; /* Congestion window - in probes */ - - /* The threshold after which mode is changed from QUICK_START to - CONGESTION_CONTROL */ - int ccthresh; - - /* Number of updates to this utv (generally packet receipts ) */ - int num_updates; - - /* Last time values were adjusted for a drop (you usually only want - to adjust again based on probes sent after that adjustment so a - sudden batch of drops doesn't destroy timing. Init to now */ - struct timeval last_drop; -}; + typedef enum OFProbeType { OFP_UNSET, @@ -283,7 +267,7 @@ private: /* When the last probe is sent. */ struct timeval lastProbeSent; - struct osscan_timing_vals timing; + osscan_timing_vals_t timing; /* * Fingerprint of this target. When a scan is completed, it'll @@ -331,7 +315,7 @@ public: /* Returns true if the system says that sending is OK. */ bool sendOK(); - struct osscan_timing_vals timing; + osscan_timing_vals_t timing; struct timeout_info to; /* rtt/timeout info */ /* Total number of active probes */ diff --git a/osscan2.h b/osscan2.h index 6704436db..d5aa869e1 100644 --- a/osscan2.h +++ b/osscan2.h @@ -153,6 +153,25 @@ typedef struct os_scan_performance_vars { +/* Some of the algorithms used here are TCP congestion control + techniques from RFC2581. */ +typedef struct osscan_timing_vals { + double cwnd; /* Congestion window - in probes */ + + /* The threshold after which mode is changed from QUICK_START to + CONGESTION_CONTROL */ + int ccthresh; + + /* Number of updates to this utv (generally packet receipts ) */ + int num_updates; + + /* Last time values were adjusted for a drop (you usually only want + to adjust again based on probes sent after that adjustment so a + sudden batch of drops doesn't destroy timing. Init to now */ + struct timeval last_drop; +} osscan_timing_vals_t; + + /****************************************************************************** * FUNCTION PROTOTYPES * ******************************************************************************/