]> git.meshlink.io Git - meshlink/blobdiff - src/meshlink_internal.h
Add an asynchronous DNS thread.
[meshlink] / src / meshlink_internal.h
index eaa89c5dbd59fb3aa3baf8f8c96db8e130b29e07..8a632e26f0527e676c6cdbf662a05df70fd73ce8 100644 (file)
@@ -99,6 +99,7 @@ struct meshlink_handle {
        struct node_t *self;
        meshlink_log_cb_t log_cb;
        meshlink_log_level_t log_level;
+       void *packet;
 
        // The most important network-related members come first
        int reachable;
@@ -127,7 +128,6 @@ struct meshlink_handle {
        int contradicting_del_edge;
        int sleeptime;
        time_t connection_burst_time;
-       time_t last_config_check;
        time_t last_hard_try;
        time_t last_unreachable;
        timeout_t pingtimer;
@@ -193,6 +193,13 @@ struct meshlink_handle {
        char *catta_servicetype;
        unsigned int catta_interfaces;
 
+       // ADNS
+       pthread_t adns_thread;
+       pthread_cond_t adns_cond;
+       meshlink_queue_t adns_queue;
+       meshlink_queue_t adns_done_queue;
+       signal_t adns_signal;
+
        // Proxy configuration, currently not exposed.
        char *proxyhost;
        char *proxyport;
@@ -260,6 +267,6 @@ static inline int prng(meshlink_handle_t *mesh, uint64_t max) {
 }
 
 /// Fudge value of ~0.1 seconds, in microseconds.
-static const unsigned int TIMER_FUDGE = 0x20000;
+static const unsigned int TIMER_FUDGE = 0x8000000;
 
 #endif