summaryrefslogtreecommitdiff
path: root/toxcore/network.h
diff options
context:
space:
mode:
Diffstat (limited to 'toxcore/network.h')
-rw-r--r--toxcore/network.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/toxcore/network.h b/toxcore/network.h
index 359d26c8..b902a487 100644
--- a/toxcore/network.h
+++ b/toxcore/network.h
@@ -191,6 +191,21 @@ IP_Port;
191 */ 191 */
192const char *ip_ntoa(const IP *ip); 192const char *ip_ntoa(const IP *ip);
193 193
194/*
195 * addr_parse_ip
196 * directly parses the input into an IP structure
197 * tries IPv4 first, then IPv6
198 *
199 * input
200 * address: dotted notation (IPv4: quad, IPv6: 16) or colon notation (IPv6)
201 *
202 * output
203 * IP: family and the value is set on success
204 *
205 * returns 1 on success, 0 on failure
206 */
207int addr_parse_ip(const char *address, IP *to);
208
194/* ip_equal 209/* ip_equal
195 * compares two IPAny structures 210 * compares two IPAny structures
196 * unset means unequal 211 * unset means unequal