summaryrefslogtreecommitdiff
path: root/toxcore/network.h
diff options
context:
space:
mode:
authorRoman Yepishev <rye@keypressure.com>2016-02-27 11:45:02 -0500
committerRoman Yepishev <rye@keypressure.com>2016-02-27 11:45:02 -0500
commit9035325e566c47e83700f88b1ff6376dce0068e8 (patch)
treea28a96ae1868470e66272d63492e9c64f248bfa8 /toxcore/network.h
parent72b1a17cc28c9a5a653823336bf0a495f6f271b1 (diff)
Remove magic numbers from addr_resolve
* Add #defines for INET/INET6 returns * Remove magic number 3 - exact AF_INET/INET6 result found. * Updated network_test.c
Diffstat (limited to 'toxcore/network.h')
-rw-r--r--toxcore/network.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/toxcore/network.h b/toxcore/network.h
index 56494562..8d2ccfce 100644
--- a/toxcore/network.h
+++ b/toxcore/network.h
@@ -176,6 +176,10 @@ IP_Port;
176 176
177#define TOX_ENABLE_IPV6_DEFAULT 1 177#define TOX_ENABLE_IPV6_DEFAULT 1
178 178
179/* addr_resolve return values */
180#define TOX_ADDR_RESOLVE_INET 1
181#define TOX_ADDR_RESOLVE_INET6 2
182
179/* ip_ntoa 183/* ip_ntoa
180 * converts ip into a string 184 * converts ip into a string
181 * uses a static buffer, so mustn't used multiple times in the same output 185 * uses a static buffer, so mustn't used multiple times in the same output