]> git.meshlink.io Git - meshlink/blobdiff - src/net.h
Add meshlink_set_canonical_address().
[meshlink] / src / net.h
index 0ff313d0bdafd1d7f120082e46413629aad62ab0..04bd55a50a0a5ff42fc50d2f314738f32d6b58a6 100644 (file)
--- a/src/net.h
+++ b/src/net.h
@@ -60,12 +60,19 @@ typedef enum packet_type_t {
 
 typedef struct outgoing_t {
        char *name;
-       int timeout;
        struct splay_tree_t *config_tree;
+       int timeout;
+       enum {
+               OUTGOING_START,
+               OUTGOING_CANONICAL,
+               OUTGOING_RECENT,
+               OUTGOING_KNOWN,
+               OUTGOING_END,
+               OUTGOING_NO_KNOWN_ADDRESSES,
+       } state;
        struct config_t *cfg;
-       struct addrinfo *ai; // addresses from config files
+       struct addrinfo *ai;
        struct addrinfo *aip;
-       struct addrinfo *nai; // addresses known via other online nodes (use free_known_addresses())
        timeout_t ev;
        struct meshlink_handle *mesh;
 } outgoing_t;