diff options
author | Kostya <kostyarjcnz@gmail.com> | 2013-08-30 02:51:15 -0400 |
---|---|---|
committer | Kostya <kostyarjcnz@gmail.com> | 2013-08-30 02:51:15 -0400 |
commit | d2d1af2ce91d7a774534be5864096e04af3621ae (patch) | |
tree | c93e1a79dfa66a20fdfc96180776b04989a1dcf2 /toxcore/network.h | |
parent | 205ba48a5addbe43b7693a28c7ccf3a0501c8111 (diff) |
Made IP_Port a union.
Diffstat (limited to 'toxcore/network.h')
-rw-r--r-- | toxcore/network.h | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/toxcore/network.h b/toxcore/network.h index 0a0122be..685341ad 100644 --- a/toxcore/network.h +++ b/toxcore/network.h | |||
@@ -86,11 +86,14 @@ typedef union { | |||
86 | uint32_t i; | 86 | uint32_t i; |
87 | } IP; | 87 | } IP; |
88 | 88 | ||
89 | typedef struct { | 89 | typedef union { |
90 | IP ip; | 90 | struct { |
91 | uint16_t port; | 91 | IP ip; |
92 | /* Not used for anything right now. */ | 92 | uint16_t port; |
93 | uint16_t padding; | 93 | /* Not used for anything right now. */ |
94 | uint16_t padding; | ||
95 | }; | ||
96 | uint8_t uint8[8]; | ||
94 | } IP_Port; | 97 | } IP_Port; |
95 | 98 | ||
96 | typedef struct { | 99 | typedef struct { |