diff options
Diffstat (limited to 'toxcore/network.h')
-rw-r--r-- | toxcore/network.h | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/toxcore/network.h b/toxcore/network.h index b250604e..2c090aef 100644 --- a/toxcore/network.h +++ b/toxcore/network.h | |||
@@ -105,7 +105,6 @@ typedef int sock_t; | |||
105 | #define NET_PACKET_CRYPTO_DATA 27 /* Crypto data packet */ | 105 | #define NET_PACKET_CRYPTO_DATA 27 /* Crypto data packet */ |
106 | #define NET_PACKET_CRYPTO 32 /* Encrypted data packet ID. */ | 106 | #define NET_PACKET_CRYPTO 32 /* Encrypted data packet ID. */ |
107 | #define NET_PACKET_LAN_DISCOVERY 33 /* LAN discovery packet ID. */ | 107 | #define NET_PACKET_LAN_DISCOVERY 33 /* LAN discovery packet ID. */ |
108 | #define NET_PACKET_GROUP_CHATS 48 /* Group chats packet ID. */ | ||
109 | 108 | ||
110 | /* See: docs/Prevent_Tracking.txt and onion.{c, h} */ | 109 | /* See: docs/Prevent_Tracking.txt and onion.{c, h} */ |
111 | #define NET_PACKET_ONION_SEND_INITIAL 128 | 110 | #define NET_PACKET_ONION_SEND_INITIAL 128 |
@@ -135,8 +134,7 @@ typedef int sock_t; | |||
135 | #define TCP_INET6 (AF_INET6 + 3) | 134 | #define TCP_INET6 (AF_INET6 + 3) |
136 | #define TCP_FAMILY (AF_INET6 + 4) | 135 | #define TCP_FAMILY (AF_INET6 + 4) |
137 | 136 | ||
138 | typedef union __attribute__ ((__packed__)) | 137 | typedef union { |
139 | { | ||
140 | uint8_t uint8[4]; | 138 | uint8_t uint8[4]; |
141 | uint16_t uint16[2]; | 139 | uint16_t uint16[2]; |
142 | uint32_t uint32; | 140 | uint32_t uint32; |
@@ -144,8 +142,7 @@ typedef union __attribute__ ((__packed__)) | |||
144 | } | 142 | } |
145 | IP4; | 143 | IP4; |
146 | 144 | ||
147 | typedef union __attribute__ ((__packed__)) | 145 | typedef union { |
148 | { | ||
149 | uint8_t uint8[16]; | 146 | uint8_t uint8[16]; |
150 | uint16_t uint16[8]; | 147 | uint16_t uint16[8]; |
151 | uint32_t uint32[4]; | 148 | uint32_t uint32[4]; |
@@ -154,8 +151,7 @@ typedef union __attribute__ ((__packed__)) | |||
154 | } | 151 | } |
155 | IP6; | 152 | IP6; |
156 | 153 | ||
157 | typedef struct __attribute__ ((__packed__)) | 154 | typedef struct { |
158 | { | ||
159 | uint8_t family; | 155 | uint8_t family; |
160 | union { | 156 | union { |
161 | IP4 ip4; | 157 | IP4 ip4; |
@@ -164,8 +160,7 @@ typedef struct __attribute__ ((__packed__)) | |||
164 | } | 160 | } |
165 | IP; | 161 | IP; |
166 | 162 | ||
167 | typedef struct __attribute__ ((__packed__)) __attribute__((gcc_struct)) | 163 | typedef struct { |
168 | { | ||
169 | IP ip; | 164 | IP ip; |
170 | uint16_t port; | 165 | uint16_t port; |
171 | } | 166 | } |