]> git.meshlink.io Git - meshlink/blobdiff - src/meshlink_internal.h
Fix spelling errors.
[meshlink] / src / meshlink_internal.h
index ba7f7d155c4893cb28e6d6a5ccdc2a9a286a1333..6aa871717563e8ea07cf813fd9a5be11fddfae89 100644 (file)
@@ -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;
@@ -94,13 +95,14 @@ struct meshlink_handle {
        void *priv;
 
        // private members
-       pthread_mutex_t mesh_mutex;
+       pthread_mutex_t mutex;
        event_loop_t loop;
        struct node_t *self;
        meshlink_log_cb_t log_cb;
        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,11 +130,13 @@ 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;
 
        struct connection_t *everyone;
        uint64_t prng_state[4];
+       uint32_t session_id;
 
        int next_pit;
        int pits[10];
@@ -168,7 +172,7 @@ struct meshlink_handle {
 
        // Configuration
        char *confbase;
-       FILE *conffile;
+       FILE *lockfile;
        void *config_key;
 
        // Thread management
@@ -258,7 +262,7 @@ extern meshlink_log_level_t global_log_level;
 extern meshlink_log_cb_t global_log_cb;
 extern void handle_duplicate_node(meshlink_handle_t *mesh, struct node_t *n);
 extern void handle_network_change(meshlink_handle_t *mesh, bool online);
-extern void call_error_cb(meshlink_handle_t *mesh);
+extern void call_error_cb(meshlink_handle_t *mesh, meshlink_errno_t meshlink_errno);
 
 /// Per-instance PRNG
 static inline int prng(meshlink_handle_t *mesh, uint64_t max) {