+ struct list_t *outgoings;
+ struct list_t *submeshes;
+
+ // Meta-connection-related members
+ struct splay_tree_t *past_request_tree;
+ timeout_t past_request_timeout;
+
+ int connection_burst;
+ int contradicting_add_edge;
+ int contradicting_del_edge;
+ int sleeptime;
+ time_t connection_burst_time;
+ time_t last_config_check;
+ time_t last_hard_try;
+ timeout_t pingtimer;
+ timeout_t periodictimer;
+
+ struct connection_t *everyone;
+ uint64_t prng_state[4];
+ uint32_t session_id;
+
+ int next_pit;
+ int pits[10];
+
+ // Infrequently used callbacks
+ meshlink_node_status_cb_t node_status_cb;
+ meshlink_node_pmtu_cb_t node_pmtu_cb;
+ meshlink_channel_accept_cb_t channel_accept_cb;
+ meshlink_node_duplicate_cb_t node_duplicate_cb;
+ meshlink_connection_try_cb_t connection_try_cb;
+ meshlink_error_cb_t error_cb;
+
+ // Mesh parameters
+ char *appname;
+ char *myport;
+
+ struct ecdsa *private_key;
+ struct ecdsa *invitation_key;
+
+ dev_class_t devclass;
+
+ int invitation_timeout;
+ int maxtimeout;
+ int udp_choice;
+
+ dev_class_traits_t dev_class_traits[DEV_CLASS_COUNT];
+
+ int netns;
+
+ bool default_blacklist;
+ bool discovery; // Whether Catta is enabled or not
+
+
+ // Configuration
+ char *confbase;
+ FILE *conffile;
+ void *config_key;
+
+ // Thread management
+ pthread_t thread;
+ pthread_cond_t cond;
+ pthread_mutex_t discovery_mutex;
+ pthread_cond_t discovery_cond;
+ bool threadstarted;
+ bool discovery_threadstarted;
+
+ // Catta
+ pthread_t discovery_thread;
+ struct CattaServer *catta_server;
+ struct CattaSServiceBrowser *catta_browser;
+ struct CattaSimplePoll *catta_poll;
+ struct CattaSEntryGroup *catta_group;
+ char *catta_servicetype;
+ unsigned int catta_interfaces;
+
+ // State used for meshlink_join()
+ int sock;
+ char cookie[18], hash[18];
+ bool success;
+ sptps_t sptps;
+ char *data;
+ size_t thedatalen;
+ size_t blen;
+ char line[4096];
+ char buffer[4096];
+
+ // Proxy configuration, currently not exposed.
+ char *proxyhost;
+ char *proxyport;
+ char *proxyuser;
+ char *proxypass;
+ proxytype_t proxytype;