1 /* 2 * Copyright 2009-2020 Haiku, Inc. All Rights Reserved. 3 * Distributed under the terms of the MIT License. 4 */ 5 #ifndef _INET_H_ 6 #define _INET_H_ 7 8 9 #include <netinet/in.h> 10 #include <sys/cdefs.h> 11 #include <sys/param.h> 12 #include <sys/types.h> 13 14 15 #ifdef __cplusplus 16 extern "C" { 17 #endif 18 19 in_addr_t inet_addr(const char* addressString); 20 int inet_aton(const char* addressString, struct in_addr* address); 21 in_addr_t inet_lnaof(struct in_addr address); 22 struct in_addr inet_makeaddr(in_addr_t net, in_addr_t host); 23 char* inet_net_ntop(int family, const void* source, int bits, 24 char* dest, size_t destSize); 25 int inet_net_pton(int family, const char* sourceString, void* dest, 26 size_t destSize); 27 char* inet_neta(u_long source, char* dest, size_t destSize); 28 in_addr_t inet_netof(struct in_addr address); 29 in_addr_t inet_network(const char* addressString); 30 char* inet_ntoa(struct in_addr address); 31 const char* inet_ntop(int family, const void* source, char* dest, 32 socklen_t destSize); 33 int inet_pton(int family, const char* sourceString, void* dest); 34 u_int inet_nsap_addr(const char* sourceString, u_char* dest, 35 int destSize); 36 char* inet_nsap_ntoa(int sourceLength, const u_char* source, 37 char* dest); 38 39 #ifdef __cplusplus 40 } 41 #endif 42 43 #endif /* _INET_H_ */ 44