xref: /haiku/headers/posix/arpa/inet.h (revision 002f37b0cca92e4cf72857c72ac95db5a8b09615)
1 /*
2  * Copyright 2009-2012 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 char*			inet_cidr_ntop(int family, const void* source, int bits,
22 					char* dest, size_t destSize);
23 int				inet_cidr_pton(int family, const char* sourceString, void* dest,
24 					int* _bits);
25 u_long			inet_lnaof(struct in_addr address);
26 struct in_addr	inet_makeaddr(u_long net, u_long host);
27 char*			inet_net_ntop(int family, const void* source, int bits,
28 					char* dest, size_t destSize);
29 int				inet_net_pton(int family, const char* sourceString, void* dest,
30 					size_t destSize);
31 char*			inet_neta(u_long source, char* dest, size_t destSize);
32 u_long			inet_netof(struct in_addr address);
33 u_long			inet_network(const char* addressString);
34 char*			inet_ntoa(struct in_addr address);
35 const char*		inet_ntop(int family, const void* source, char* dest,
36 					socklen_t destSize);
37 int				inet_pton(int family, const char* sourceString, void* dest);
38 u_int			inet_nsap_addr(const char* sourceString, u_char* dest,
39 					int destSize);
40 char*			inet_nsap_ntoa(int sourceLength, const u_char* source,
41 					char* dest);
42 
43 #ifdef __cplusplus
44 }
45 #endif
46 
47 #endif	/* _INET_H_ */
48