diff --git a/global_structures.h b/global_structures.h index 220e2f058..ad1c7acd4 100644 --- a/global_structures.h +++ b/global_structures.h @@ -205,6 +205,26 @@ struct FingerPrintDB { ~FingerPrintDB(); }; +/* Based on TCP congestion control techniques from RFC2581. */ +struct ultra_timing_vals { + double cwnd; /* Congestion window - in probes */ + int ssthresh; /* The threshold above which mode is changed from slow start + to congestion avoidance */ + /* The number of replies we would expect if every probe produced a reply. This + is almost like the total number of probes sent but it is not incremented + until a reply is received or a probe times out. This and + num_replies_received are used to scale congestion window increments. */ + int num_replies_expected; + /* The number of replies we've received to probes of any type. */ + int num_replies_received; + /* Number of updates to this timing structure (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; +}; + struct timeout_info { int srtt; /* Smoothed rtt estimate (microseconds) */ int rttvar; /* Rout trip time variance */ diff --git a/scan_engine.cc b/scan_engine.cc index 5530f4998..270d26a93 100644 --- a/scan_engine.cc +++ b/scan_engine.cc @@ -145,27 +145,6 @@ struct ultra_scan_performance_vars { int tryno_cap; /* The maximum trynumber (starts at zero) allowed */ }; -/* Some of the algorithms used here are TCP congestion control - techniques from RFC2581. */ -struct ultra_timing_vals { - double cwnd; /* Congestion window - in probes */ - int ssthresh; /* The threshold above which mode is changed from slow start - to congestion avoidance */ - /* The number of replies we would expect if every probe produced a reply. This - is almost like the total number of probes sent but it is not incremented - until a reply is received or a probe times out. This and - num_replies_received are used to scale congestion window increments. */ - int num_replies_expected; - /* The number of replies we've received to probes of any type. */ - int num_replies_received; - /* Number of updates to this timing structure (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; -}; - static const char *pspectype2ascii(int type) { switch(type) { case PS_NONE: