aboutsummaryrefslogtreecommitdiff
path: root/lib/reconnect.h
diff options
context:
space:
mode:
authorAndrew Evans <aevans@nicira.com>2011-03-09 18:36:26 -0800
committerAndrew Evans <aevans@nicira.com>2011-03-09 18:40:03 -0800
commiteba18f0044cbe3654b4c796bbe7c056ca1793c70 (patch)
treea079d0ed481c6c8352922baa17e275672307bf9b /lib/reconnect.h
parent926ea16ea3b38df0f34cdccdea92aa4933ca9dd4 (diff)
reconnect: Track last-disconnected time.
Commit a4613b01ab (ovsdb: Change the way connection duration time is reported in Manager table.), pushed earlier today, requires this commit, so OVSDB has been unbuildable from then to now.
Diffstat (limited to 'lib/reconnect.h')
-rw-r--r--lib/reconnect.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/reconnect.h b/lib/reconnect.h
index d316448f..52f1001f 100644
--- a/lib/reconnect.h
+++ b/lib/reconnect.h
@@ -69,6 +69,8 @@ void reconnect_force_reconnect(struct reconnect *, long long int now);
bool reconnect_is_connected(const struct reconnect *);
unsigned int reconnect_get_connection_duration(const struct reconnect *,
long long int now);
+unsigned int reconnect_get_disconnect_duration(const struct reconnect *,
+ long long int now);
void reconnect_disconnected(struct reconnect *, long long int now, int error);
void reconnect_connecting(struct reconnect *, long long int now);
@@ -93,12 +95,14 @@ struct reconnect_stats {
long long int creation_time; /* Time reconnect_create() called. */
long long int last_received; /* Last call to reconnect_received(). */
long long int last_connected; /* Last call to reconnect_connected(). */
+ long long int last_disconnected; /* Last call to reconnect_disconnected(). */
int backoff; /* Current backoff duration. */
unsigned int seqno; /* # of connections + # of disconnections. */
bool is_connected; /* Currently connected? */
unsigned int current_connection_duration; /* Time of current connection. */
+ unsigned int current_disconnect_duration; /* Time disconnected (if disconnected). */
unsigned int total_connected_duration; /* Sum of all connections. */
unsigned int n_attempted_connections;
unsigned int n_successful_connections;