X-Git-Url: http://git.meshlink.io/?a=blobdiff_plain;f=src%2Fmeshlink_internal.h;h=6aa871717563e8ea07cf813fd9a5be11fddfae89;hb=529b8fab8c21e7ae5af91d742ff202eab38e51f3;hp=bad5825591968f4d5bba0ebe88f42108bc70bbc6;hpb=947f09ff2c507a80bbe7f92ed0d41b06c98d5375;p=meshlink diff --git a/src/meshlink_internal.h b/src/meshlink_internal.h index bad58255..6aa87171 100644 --- a/src/meshlink_internal.h +++ b/src/meshlink_internal.h @@ -42,8 +42,8 @@ static const char meshlink_invitation_label[] = "MeshLink invitation"; static const char meshlink_tcp_label[] = "MeshLink TCP"; static const char meshlink_udp_label[] = "MeshLink UDP"; -#define MESHLINK_CONFIG_VERSION 1 -#define MESHLINK_INVITATION_VERSION 1 +#define MESHLINK_CONFIG_VERSION 2 +#define MESHLINK_INVITATION_VERSION 2 struct CattaServer; struct CattaSServiceBrowser; @@ -82,6 +82,7 @@ struct meshlink_open_params { typedef struct { int pinginterval; int pingtimeout; + int fast_retry_period; unsigned int min_connects; unsigned int max_connects; int edge_weight; @@ -101,6 +102,7 @@ struct meshlink_handle { meshlink_log_level_t log_level; // The most important network-related members come first + int reachable; int listen_sockets; listen_socket_t listen_socket[MAXSOCKETS]; @@ -128,6 +130,7 @@ struct meshlink_handle { time_t connection_burst_time; time_t last_config_check; time_t last_hard_try; + time_t last_unreachable; timeout_t pingtimer; timeout_t periodictimer; @@ -169,7 +172,7 @@ struct meshlink_handle { // Configuration char *confbase; - FILE *conffile; + FILE *lockfile; void *config_key; // Thread management