congestion detection now working; also add case that if all IPs get timeout despite...
[pingcheck] / src / host / hoststatus.h
index 6e3e3d2..5aa9911 100644 (file)
@@ -55,8 +55,9 @@ public:
     void set_n_parallel_pings(const int n_parallel_pings);
 
 private:
-    void update_fail_stats( const PingStatus &ping_success );
-    void update_congestion_stats( const PingStatus &ping_success,
+    void update_fail_stats( const PingStatus &ping_success,
+                            const bool failed_because_congested );
+    bool update_congestion_stats( const PingStatus &ping_success,
                                   const long ping_duration_us );
     bool tried_all_resolved_ip() const;
     void analyze_ping_statistics();
@@ -96,6 +97,9 @@ private:
     bool ExceededPingCongestionLimit;
     /// number of pingers that ping the same IP in parallel
     int NParallelPingers;
+    /// flag whether we performed a greater number of pings because line seems
+    /// congested
+    bool InBurstMode;
 
 };