diff options
author | Coren[m] <Break@Ocean> | 2013-09-09 16:12:50 +0200 |
---|---|---|
committer | Coren[m] <Break@Ocean> | 2013-09-09 16:12:50 +0200 |
commit | dbd75e903e7931a3f673df6121a0dedab15c0423 (patch) | |
tree | 987ec9a012c203dcab90718598a9188d2c01126f /toxcore/network.h | |
parent | 291fa8d5c53a819602bd84ef21f4ace9f310ed85 (diff) |
network.*:
- IPAny_Port: analogous to IP_Port
- ipport_equal: moved from DHT.c and adapted
DHTc.:
- ipport_equal renamed to ip4port_equal
Diffstat (limited to 'toxcore/network.h')
-rw-r--r-- | toxcore/network.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/toxcore/network.h b/toxcore/network.h index 15ca68e3..d52a02ae 100644 --- a/toxcore/network.h +++ b/toxcore/network.h | |||
@@ -115,6 +115,22 @@ typedef union { | |||
115 | uint8_t uint8[8]; | 115 | uint8_t uint8[8]; |
116 | } IP_Port; | 116 | } IP_Port; |
117 | 117 | ||
118 | |||
119 | /* will replace IP_Port as soon as the complete infrastructure is in place | ||
120 | * removed the unused union and padding also */ | ||
121 | typedef struct { | ||
122 | IPAny ip; | ||
123 | uint16_t port; | ||
124 | } IPAny_Port; | ||
125 | |||
126 | /* ipport_equal | ||
127 | * compares two IPAny_Port structures | ||
128 | * unset means unequal | ||
129 | * | ||
130 | * returns 0 when not equal or when uninitialized | ||
131 | */ | ||
132 | int ipport_equal(IPAny_Port *a, IPAny_Port *b); | ||
133 | |||
118 | typedef struct { | 134 | typedef struct { |
119 | int16_t family; | 135 | int16_t family; |
120 | uint16_t port; | 136 | uint16_t port; |