xref: /minix3/include/arpa/inet.h (revision e3f68488ee1359988fc7ac942963ddb89df5c630)
1 /*
2 arpa/inet.h
3 */
4 
5 #ifndef _ARPA__INET_H
6 #define _ARPA__INET_H
7 
8 #include <stdint.h>
9 
10 /* Open Group Base Specifications Issue 6 (not complete): */
11 
12 #ifndef _IN_ADDR_T
13 #define _IN_ADDR_T
14 /* Has to match corresponding declaration in <netinet/in.h> */
15 typedef uint32_t	in_addr_t;
16 #endif /* _IN_ADDR_T */
17 
18 #ifndef _STRUCT_IN_ADDR
19 #define _STRUCT_IN_ADDR
20 /* Has to match corresponding declaration in <netinet/in.h> */
21 struct in_addr
22 {
23 	in_addr_t	s_addr;
24 };
25 #endif
26 
27 _PROTOTYPE( uint32_t htonl, (uint32_t _hostval)				);
28 _PROTOTYPE( uint16_t htons, (uint16_t _hostval)				);
29 _PROTOTYPE( char *inet_ntoa, (struct in_addr _in)			);
30 _PROTOTYPE( uint32_t ntohl, (uint32_t _netval)				);
31 _PROTOTYPE( uint16_t ntohs, (uint16_t _netval)				);
32 _PROTOTYPE( char *inet_ntop, (int af, const void *src, char *dst,
33 							uint32_t size)	);
34 _PROTOTYPE( int inet_pton, (int af, const char *src, void *dst)		);
35 
36 #ifdef _MINIX
37 /* Additional functions */
38 _PROTOTYPE( int inet_aton, (const char *_cp, struct in_addr *_pin)	);
39 #endif
40 
41 #ifdef _POSIX_SOURCE
42 in_addr_t inet_addr(const char *cp);
43 #endif
44 
45 #endif /* _ARPA__INET_H */
46 
47