]> git.meshlink.io Git - meshlink/blobdiff - src/meshlink_internal.h
Group discovery related variables together.
[meshlink] / src / meshlink_internal.h
index 6a433b608cbb7d1585bc32171feb7f217c6a5c40..ceffea320325bfe3547e3896dbcccf785267f503 100644 (file)
@@ -158,7 +158,6 @@ struct meshlink_handle {
        int netns;
 
        bool default_blacklist;
-       bool discovery;         // Whether mDNS discovery is enabled or not
        bool inviter_commits_first;
 
        // Configuration
@@ -172,18 +171,18 @@ struct meshlink_handle {
        // Thread management
        pthread_t thread;
        pthread_cond_t cond;
-       pthread_mutex_t discovery_mutex;
-       pthread_cond_t discovery_cond;
        bool threadstarted;
-       bool discovery_threadstarted;
 
        // mDNS discovery
-       io_t pfroute_io;
-       int *discovery_ifaces;
-       struct discovery_address *discovery_addresses;
-       int discovery_iface_count;
-       int discovery_address_count;
-       io_t discovery_sockets[2];
+       struct {
+               bool enabled;
+               io_t pfroute_io;
+               int *ifaces;
+               struct discovery_address *addresses;
+               int iface_count;
+               int address_count;
+               io_t sockets[2];
+       } discovery;
 
        // ADNS
        pthread_t adns_thread;