#include "host/pingprotocol.h"
#include "dns/resolverbase.h"
+typedef std::list<PingerItem> pinger_list;
+
//-----------------------------------------------------------------------------
// PingScheduler
//-----------------------------------------------------------------------------
const int ping_fail_percentage_limit,
const int ping_reply_timeout,
LinkStatusItem link_analyzer,
- const int first_delay
+ const int first_delay,
+ const int n_parallel_pings,
+ const int parallel_ping_delay
);
~PingScheduler();
void get_next_ping_protocol();
bool can_change_ping_protocol() const;
+ void prepare_next_ping();
void update_dns_resolver( PingProtocol current_protocol );
void ping_when_ready();
void update_log_prefix();
void cancel_resolve(const bool force_cancel);
+ void clear_pingers();
//
// Attributes
HostStatus HostAnalyzer;
/// The Dns resolver
ResolverItem Resolver;
- /// The actual pinger
- PingerItem Ping;
+ /// vector of pingers
+ pinger_list Pingers;
+ /// number of pingers that work in parallel
+ int NPingers;
+ /// number of results from pingers
+ int NPingersDone;
+ /// delay (in ms) between pings to same IP
+ int ParallelPingDelay;
/// a flag whether we should ping as soon as dns is ready
bool WantToPing;
/// Prefix to log messages for quicker analysis/debugging