]> git.meshlink.io Git - meshlink-tiny/blobdiff - src/meshlink_internal.h
Remove MTU and traffic statistics.
[meshlink-tiny] / src / meshlink_internal.h
index 68d061b680a5177c84a306f27fe8d4ccd08f383c..c92af1b9f576b6c03214ec4205cbe3fafdefe632 100644 (file)
@@ -45,6 +45,8 @@ static const char meshlink_udp_label[] = "MeshLink UDP";
 #define MESHLINK_CONFIG_VERSION 2
 #define MESHLINK_INVITATION_VERSION 2
 
+#define CORE_MESH "."
+
 struct meshlink_open_params {
        char *confbase;
        char *lock_filename;
@@ -91,22 +93,13 @@ struct meshlink_handle {
        meshlink_queue_t outpacketqueue;
        signal_t datafromapp;
 
-       struct splay_tree_t *nodes;
-
-       struct list_t *connections;
-       struct list_t *outgoings;
-       struct list_t *submeshes;
+       struct node_t *peer;
+       struct connection_t *connection;
+       struct outgoing_t *outgoing;
 
-       // Meta-connection-related members
-       struct splay_tree_t *past_request_tree;
-       timeout_t past_request_timeout;
-
-       int connection_burst;
        int contradicting_add_edge;
        int contradicting_del_edge;
        int sleeptime;
-       time_t connection_burst_time;
-       time_t last_hard_try;
        time_t last_unreachable;
        timeout_t pingtimer;
        timeout_t periodictimer;
@@ -115,13 +108,9 @@ struct meshlink_handle {
        uint64_t prng_state[4];
        uint32_t session_id;
 
-       int next_pit;
-       int pits[10];
-
        // Infrequently used callbacks
        meshlink_node_status_cb_t node_status_cb;
        meshlink_node_status_cb_t meta_status_cb;
-       meshlink_node_pmtu_cb_t node_pmtu_cb;
        meshlink_channel_listen_cb_t channel_listen_cb;
        meshlink_channel_accept_cb_t channel_accept_cb;
        meshlink_node_duplicate_cb_t node_duplicate_cb;
@@ -161,12 +150,6 @@ struct meshlink_node {
        void *priv;
 };
 
-/// A handle for a node Sub-Mesh.
-struct meshlink_submesh {
-       const char *name;
-       void *priv;
-};
-
 /// An AIO buffer.
 typedef struct meshlink_aio_buffer {
        const void *data;
@@ -202,7 +185,6 @@ typedef struct meshlink_packethdr {
 
 void meshlink_send_from_queue(event_loop_t *loop, void *mesh);
 void update_node_status(meshlink_handle_t *mesh, struct node_t *n);
-void update_node_pmtu(meshlink_handle_t *mesh, struct node_t *n);
 extern meshlink_log_level_t global_log_level;
 extern meshlink_log_cb_t global_log_cb;
 void handle_duplicate_node(meshlink_handle_t *mesh, struct node_t *n);