X-Git-Url: https://www.tinc-vpn.org/git/browse?a=blobdiff_plain;f=src%2Fnet.h;h=6e575d45c536d215ca3391b2544daeaab76dd90e;hb=55a78da4e0b496fc599704473f41d5ea52669737;hp=8d236dadf2eb302ec492945f4a4aad7c5baa6c8e;hpb=cc3c69c892b0dad9a6ece0a0f4ccd429a22fcbff;p=tinc diff --git a/src/net.h b/src/net.h index 8d236dad..6e575d45 100644 --- a/src/net.h +++ b/src/net.h @@ -1,7 +1,7 @@ /* net.h -- header for net.c Copyright (C) 1998-2005 Ivo Timmermans - 2000-2013 Guus Sliepen + 2000-2014 Guus Sliepen This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -52,6 +52,10 @@ typedef struct ipv6_t { uint16_t x[8]; } ipv6_t; +typedef struct node_id_t { + uint8_t x[6]; +} node_id_t; + typedef short length_t; #define AF_UNKNOWN 255 @@ -103,6 +107,7 @@ typedef struct listen_socket_t { io_t tcp; io_t udp; sockaddr_t sa; + bool bindto; } listen_socket_t; #include "conf.h" @@ -132,9 +137,12 @@ extern io_t unix_socket; extern int keylifetime; extern int udp_rcvbuf; extern int udp_sndbuf; +extern int max_connection_burst; extern bool do_prune; extern char *myport; -extern int autoconnect; +extern bool device_standby; +extern bool autoconnect; +extern bool disablebuggypeers; extern int contradicting_add_edge; extern int contradicting_del_edge; extern time_t last_config_check; @@ -174,6 +182,8 @@ extern void send_packet(struct node_t *, vpn_packet_t *); extern void receive_tcppacket(struct connection_t *, const char *, int); extern void broadcast_packet(const struct node_t *, vpn_packet_t *); extern char *get_name(void); +extern void device_enable(void); +extern void device_disable(void); extern bool setup_myself_reloadable(void); extern bool setup_network(void); extern void setup_outgoing_connection(struct outgoing_t *); @@ -196,8 +206,6 @@ extern void load_all_nodes(void); #ifndef HAVE_MINGW #define closesocket(s) close(s) -#else -extern CRITICAL_SECTION mutex; #endif #endif /* __TINC_NET_H__ */