X-Git-Url: http://git.meshlink.io/?a=blobdiff_plain;f=src%2Fnet.h;h=04bd55a50a0a5ff42fc50d2f314738f32d6b58a6;hb=5c7be85686db219955e1af592b32d0d4108625cb;hp=fa34dcf7eaa2faf6f87fcfdfb46c8508bc138e7e;hpb=0bdce44687a22c8825695cba185b845f5ea5e060;p=meshlink diff --git a/src/net.h b/src/net.h index fa34dcf7..04bd55a5 100644 --- 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; @@ -91,7 +98,6 @@ extern int setup_vpn_in_socket(struct meshlink_handle *mesh, const sockaddr_t *) extern bool send_sptps_data(void *handle, uint8_t type, const void *data, size_t len); extern bool receive_sptps_record(void *handle, uint8_t type, const void *data, uint16_t len); extern void send_packet(struct meshlink_handle *mesh, struct node_t *, struct vpn_packet_t *); -extern void receive_tcppacket(struct meshlink_handle *mesh, struct connection_t *, const char *, int); extern void broadcast_packet(struct meshlink_handle *mesh, const struct node_t *, struct vpn_packet_t *); extern char *get_name(struct meshlink_handle *mesh); extern void load_all_nodes(struct meshlink_handle *mesh); @@ -111,8 +117,6 @@ extern void retry(struct meshlink_handle *mesh); #ifndef HAVE_MINGW #define closesocket(s) close(s) -#else -extern CRITICAL_SECTION mutex; #endif #endif