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
+
struct CattaServer;
struct CattaSServiceBrowser;
struct CattaSimplePoll;
dev_class_t devclass;
int netns;
+
+ const void *key;
+ size_t keylen;
};
/// A handle for an instance of MeshLink.
void *priv;
char *appname;
- dev_class_t devclass;
+ int32_t devclass;
char *confbase;
FILE *conffile;
meshlink_channel_accept_cb_t channel_accept_cb;
meshlink_node_duplicate_cb_t node_duplicate_cb;
+ meshlink_connection_try_cb_t connection_try_cb;
pthread_t thread;
bool threadstarted;
struct node_t *self;
- struct splay_tree_t *config;
struct splay_tree_t *edges;
struct splay_tree_t *nodes;
hash_t *node_udp_cache;
struct connection_t *everyone;
+ struct ecdsa *private_key;
struct ecdsa *invitation_key;
int invitation_timeout;
struct CattaSimplePoll *catta_poll;
struct CattaSEntryGroup *catta_group;
char *catta_servicetype;
+ unsigned int catta_interfaces;
int netns;
+ void *config_key;
};
/// A handle for a MeshLink node.
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);
+extern void handle_network_change(meshlink_handle_t *mesh, bool online);
/// Device class traits
typedef struct {