X-Git-Url: http://git.meshlink.io/?a=blobdiff_plain;f=src%2Fmeshlink_internal.h;h=f576eb1290a1178c14b02fddc273dd3f601a013c;hb=6054182c9e208fd0b3f5c6c90f54cb5af75d3f5c;hp=d7d4910b18cfccf79461195d3246f137d4396445;hpb=43ffcfc3c3fcd8088a77e9a2ac9cc4013c466158;p=meshlink diff --git a/src/meshlink_internal.h b/src/meshlink_internal.h index d7d4910b..f576eb12 100644 --- a/src/meshlink_internal.h +++ b/src/meshlink_internal.h @@ -57,6 +57,15 @@ typedef enum proxytype_t { PROXY_HTTP, } proxytype_t; +struct meshlink_open_params { + char *confbase; + char *appname; + char *name; + dev_class_t devclass; + + int netns; +}; + /// A handle for an instance of MeshLink. struct meshlink_handle { char *name; @@ -66,6 +75,7 @@ struct meshlink_handle { dev_class_t devclass; char *confbase; + FILE *conffile; meshlink_receive_cb_t receive_cb; meshlink_node_status_cb_t node_status_cb; @@ -73,6 +83,7 @@ struct meshlink_handle { meshlink_log_level_t log_level; meshlink_channel_accept_cb_t channel_accept_cb; + meshlink_node_duplicate_cb_t node_duplicate_cb; pthread_t thread; bool threadstarted; @@ -120,6 +131,7 @@ struct meshlink_handle { hash_t *node_udp_cache; struct connection_t *everyone; struct ecdsa *invitation_key; + int invitation_timeout; int pinginterval; /* seconds between pings */ int pingtimeout; /* seconds to wait for response */ @@ -142,6 +154,8 @@ struct meshlink_handle { struct CattaSimplePoll *catta_poll; struct CattaSEntryGroup *catta_group; char *catta_servicetype; + + int netns; }; /// A handle for a MeshLink node. @@ -171,6 +185,7 @@ extern void update_node_status(meshlink_handle_t *mesh, struct node_t *n); extern meshlink_log_level_t global_log_level; extern meshlink_log_cb_t global_log_cb; extern int check_port(meshlink_handle_t *mesh); +extern void handle_duplicate_node(meshlink_handle_t *mesh, struct node_t *n); /// Device class traits typedef struct {