diff options
Diffstat (limited to 'toxcore/network.h')
-rw-r--r-- | toxcore/network.h | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/toxcore/network.h b/toxcore/network.h index d3b80218..a698fdc9 100644 --- a/toxcore/network.h +++ b/toxcore/network.h | |||
@@ -125,17 +125,16 @@ typedef enum NET_PACKET_TYPE { | |||
125 | #define TCP_INET6 (TOX_AF_INET6 + 3) | 125 | #define TCP_INET6 (TOX_AF_INET6 + 3) |
126 | #define TCP_FAMILY (TOX_AF_INET6 + 4) | 126 | #define TCP_FAMILY (TOX_AF_INET6 + 4) |
127 | 127 | ||
128 | typedef union { | 128 | typedef union IP4 { |
129 | uint32_t uint32; | 129 | uint32_t uint32; |
130 | uint16_t uint16[2]; | 130 | uint16_t uint16[2]; |
131 | uint8_t uint8[4]; | 131 | uint8_t uint8[4]; |
132 | } | 132 | } IP4; |
133 | IP4; | ||
134 | 133 | ||
135 | IP4 get_ip4_loopback(void); | 134 | IP4 get_ip4_loopback(void); |
136 | extern const IP4 IP4_BROADCAST; | 135 | extern const IP4 IP4_BROADCAST; |
137 | 136 | ||
138 | typedef union { | 137 | typedef union IP6 { |
139 | uint8_t uint8[16]; | 138 | uint8_t uint8[16]; |
140 | uint16_t uint16[8]; | 139 | uint16_t uint16[8]; |
141 | uint32_t uint32[4]; | 140 | uint32_t uint32[4]; |
@@ -146,7 +145,7 @@ IP6 get_ip6_loopback(void); | |||
146 | extern const IP6 IP6_BROADCAST; | 145 | extern const IP6 IP6_BROADCAST; |
147 | 146 | ||
148 | #define IP_DEFINED | 147 | #define IP_DEFINED |
149 | typedef struct { | 148 | typedef struct IP { |
150 | uint8_t family; | 149 | uint8_t family; |
151 | GNU_EXTENSION union { | 150 | GNU_EXTENSION union { |
152 | IP4 ip4; | 151 | IP4 ip4; |