Change vpn_packet_t::seqno from uint32_t to uint8_t[4].
[tinc] / src / net.h
index f0ece89..8cf48e7 100644 (file)
--- a/src/net.h
+++ b/src/net.h
@@ -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
@@ -83,7 +87,7 @@ typedef union sockaddr_t {
 typedef struct vpn_packet_t {
        length_t len;           /* the actual number of bytes in the `data' field */
        int priority;           /* priority or TOS */
-       uint32_t seqno;         /* 32 bits sequence number (network byte order of course) */
+       uint8_t seqno[4];       /* 32 bits sequence number (network byte order of course) */
        uint8_t data[MAXSIZE];
 } vpn_packet_t;
 
@@ -126,7 +130,6 @@ extern int seconds_till_retry;
 extern int addressfamily;
 extern unsigned replaywin;
 extern bool localdiscovery;
-extern sockaddr_t localdiscovery_address;
 
 extern listen_socket_t listen_socket[MAXSOCKETS];
 extern int listen_sockets;
@@ -203,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__ */