summaryrefslogtreecommitdiff
path: root/core/network.h
diff options
context:
space:
mode:
Diffstat (limited to 'core/network.h')
-rw-r--r--core/network.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/core/network.h b/core/network.h
index fe0c48eb..daab6e41 100644
--- a/core/network.h
+++ b/core/network.h
@@ -38,6 +38,7 @@
38 38
39#include <winsock2.h> 39#include <winsock2.h>
40#include <windows.h> 40#include <windows.h>
41#include <wspiapi.h>
41 42
42#undef VANILLA_NACL /* make sure on windows we use libsodium */ 43#undef VANILLA_NACL /* make sure on windows we use libsodium */
43 44
@@ -48,7 +49,8 @@
48#include <netinet/in.h> 49#include <netinet/in.h>
49#include <errno.h> 50#include <errno.h>
50#include <sys/time.h> 51#include <sys/time.h>
51 52#include <sys/types.h>
53#include <netdb.h>
52 54
53#endif 55#endif
54 56
@@ -121,4 +123,11 @@ int init_networking(IP ip ,uint16_t port);
121 123
122/* function to cleanup networking stuff(doesn't do much right now) */ 124/* function to cleanup networking stuff(doesn't do much right now) */
123void shutdown_networking(); 125void shutdown_networking();
126
127/* resolves provided address to a binary data in network byte order
128 address is ASCII null terminated string
129 address should represent IPv4, IPv6 or a hostname
130 on success returns a data in network byte order that can be used to set IP.i or IP_Port.ip.i
131 on failure returns -1 */
132int resolve_addr(char *address);
124#endif 133#endif