]> git.meshlink.io Git - meshlink/blobdiff - src/meshlink_internal.h
Ensure consistent use of SPTPS session labels.
[meshlink] / src / meshlink_internal.h
index 6c7ac7bdf717e12e13d7c927a7aaf19237ce2cb1..08f740719a769e17c4a664509254f539222a7f22 100644 (file)
 
 #define MAXSOCKETS 8    /* Probably overkill... */
 
-struct AvahiServer;
-struct AvahiSServiceBrowser;
-struct AvahiSimplePoll;
-struct AvahiSEntryGroup;
+static const char meshlink_invitation_label[] = "MeshLink invitation";
+static const char meshlink_tcp_label[] = "MeshLink TCP";
+static const char meshlink_udp_label[] = "MeshLink UDP";
+
+struct CattaServer;
+struct CattaSServiceBrowser;
+struct CattaSimplePoll;
+struct CattaSEntryGroup;
 
 typedef struct listen_socket_t {
        struct io_t tcp;
@@ -112,6 +116,8 @@ struct meshlink_handle {
        bool localdiscovery;
        sockaddr_t localdiscovery_address;
 
+       bool default_blacklist;
+
        hash_t *node_udp_cache;
        struct connection_t *everyone;
        struct ecdsa *invitation_key;
@@ -132,11 +138,11 @@ struct meshlink_handle {
 
        pthread_t discovery_thread;
        bool discovery_threadstarted;
-       struct AvahiServer *avahi_server;
-       struct AvahiSServiceBrowser *avahi_browser;
-       struct AvahiSimplePoll *avahi_poll;
-       struct AvahiSEntryGroup *avahi_group;
-       char* avahi_servicetype;
+       struct CattaServer *catta_server;
+       struct CattaSServiceBrowser *catta_browser;
+       struct CattaSimplePoll *catta_poll;
+       struct CattaSEntryGroup *catta_group;
+       char* catta_servicetype;
 };
 
 /// A handle for a MeshLink node.
@@ -152,6 +158,7 @@ struct meshlink_channel {
 
        struct utcp_connection *c;
        meshlink_channel_receive_cb_t receive_cb;
+       meshlink_channel_poll_cb_t poll_cb;
 };
 
 /// Header for data packets routed between nodes
@@ -161,6 +168,7 @@ typedef struct meshlink_packethdr {
 } __attribute__ ((__packed__)) meshlink_packethdr_t;
 
 extern void meshlink_send_from_queue(event_loop_t* el,meshlink_handle_t *mesh);
+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;