summaryrefslogtreecommitdiff
path: root/lib/reconnect.h
diff options
context:
space:
mode:
authorBen Pfaff <blp@nicira.com>2010-03-24 13:09:38 -0700
committerBen Pfaff <blp@nicira.com>2010-04-12 11:03:32 -0700
commit19df7f512c50e453c8eaa97675e213b4d6e9735d (patch)
treeeb915fcf266710e759f59595e9c1493b4cd346a6 /lib/reconnect.h
parent024b7728cc40be792f9a27c434720258d8e77ef0 (diff)
downloadopenvswitch-19df7f512c50e453c8eaa97675e213b4d6e9735d.tar.gz
reconnect: Implement "passive mode".
This allows the reconnect library to support clients that want to listen for an incoming connection.
Diffstat (limited to 'lib/reconnect.h')
-rw-r--r--lib/reconnect.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/reconnect.h b/lib/reconnect.h
index 76c7f78ec..d0790ec6f 100644
--- a/lib/reconnect.h
+++ b/lib/reconnect.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2009 Nicira Networks.
+ * Copyright (c) 2009, 2010 Nicira Networks.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -49,6 +49,10 @@ void reconnect_set_backoff(struct reconnect *,
int min_backoff, int max_backoff);
void reconnect_set_probe_interval(struct reconnect *, int probe_interval);
+bool reconnect_is_passive(const struct reconnect *);
+void reconnect_set_passive(struct reconnect *, bool passive,
+ long long int now);
+
bool reconnect_is_enabled(const struct reconnect *);
void reconnect_enable(struct reconnect *, long long int now);
void reconnect_disable(struct reconnect *, long long int now);
@@ -61,6 +65,8 @@ unsigned int reconnect_get_connection_duration(const struct reconnect *,
void reconnect_disconnected(struct reconnect *, long long int now, int error);
void reconnect_connecting(struct reconnect *, long long int now);
+void reconnect_listening(struct reconnect *, long long int now);
+void reconnect_listen_error(struct reconnect *, long long int now, int error);
void reconnect_connected(struct reconnect *, long long int now);
void reconnect_connect_failed(struct reconnect *, long long int now,
int error);