summaryrefslogtreecommitdiff
path: root/core/network.h
diff options
context:
space:
mode:
Diffstat (limited to 'core/network.h')
-rw-r--r--core/network.h16
1 files changed, 10 insertions, 6 deletions
diff --git a/core/network.h b/core/network.h
index 3277070c..a5f7899b 100644
--- a/core/network.h
+++ b/core/network.h
@@ -116,12 +116,16 @@ int init_networking(IP ip, uint16_t port);
116/* function to cleanup networking stuff(doesn't do much right now) */ 116/* function to cleanup networking stuff(doesn't do much right now) */
117void shutdown_networking(); 117void shutdown_networking();
118 118
119/* resolves provided address to a binary data in network byte order 119/*
120 address is ASCII null terminated string 120 resolve_addr():
121 address should represent IPv4, IPv6 or a hostname 121 address should represent IPv4 or a hostname with A record
122 on success returns a data in network byte order that can be used to set IP.i or IP_Port.ip.i 122
123 on failure returns -1 */ 123 returns a data in network byte order that can be used to set IP.i or IP_Port.ip.i
124int resolve_addr(const char *address); 124 returns 0 on failure
125
126 TODO: Fix ipv6 support
127*/
128uint32_t resolve_addr(const char *address);
125 129
126#ifdef __cplusplus 130#ifdef __cplusplus
127} 131}