]> git.meshlink.io Git - meshlink/blobdiff - src/meshlink_internal.h
Add support for encrypted storage.
[meshlink] / src / meshlink_internal.h
index 92774c49baf3c9481d4aac62273256156c77d629..4410505300a928da3427981f653fe777386b3113 100644 (file)
@@ -37,6 +37,9 @@ 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
+
 struct CattaServer;
 struct CattaSServiceBrowser;
 struct CattaSimplePoll;
@@ -63,7 +66,7 @@ struct meshlink_handle {
        void *priv;
 
        char *appname;
-       dev_class_t devclass;
+       int32_t devclass;
 
        char *confbase;
        FILE *conffile;
@@ -86,7 +89,6 @@ struct meshlink_handle {
 
        struct node_t *self;
 
-       struct splay_tree_t *config;
        struct splay_tree_t *edges;
        struct splay_tree_t *nodes;
 
@@ -121,6 +123,7 @@ struct meshlink_handle {
 
        hash_t *node_udp_cache;
        struct connection_t *everyone;
+       struct ecdsa *private_key;
        struct ecdsa *invitation_key;
        int invitation_timeout;
 
@@ -145,6 +148,8 @@ struct meshlink_handle {
        struct CattaSimplePoll *catta_poll;
        struct CattaSEntryGroup *catta_group;
        char *catta_servicetype;
+
+       void *config_key;
 };
 
 /// A handle for a MeshLink node.