X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=lib%2Freconnect.h;h=d0790ec6f797ce3f8d0e7c152523745ea139aba8;hb=fb0d597fb64308c60001e3afc9b31eb295dedb6b;hp=3442c07ab2a26645d976343e71f186acf0a8be63;hpb=3ed497fc10033c9857140270d60ef6aa2d7c0c08;p=openvswitch diff --git a/lib/reconnect.h b/lib/reconnect.h index 3442c07a..d0790ec6 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. @@ -42,10 +42,17 @@ int reconnect_get_min_backoff(const struct reconnect *); int reconnect_get_max_backoff(const struct reconnect *); int reconnect_get_probe_interval(const struct reconnect *); +void reconnect_set_max_tries(struct reconnect *, unsigned int max_tries); +unsigned int reconnect_get_max_tries(struct reconnect *); + 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); @@ -58,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);