initial check-in, version 0.5.0
[musl] / include / arpa / inet.h
1 #ifndef _ARPA_INET_H
2 #define _ARPA_INET_H
3
4 #include <netinet/in.h>
5 #include <inttypes.h>
6
7 #define __NEED_socklen_t
8 #define __NEED_in_addr_t
9 #define __NEED_in_port_t
10 #define __NEED_uint16_t
11 #define __NEED_uint32_t
12 #define __NEED_struct_in_addr
13
14 #include <bits/alltypes.h>
15
16 uint32_t htonl(uint32_t);
17 uint16_t htons(uint16_t);
18 uint32_t ntohl(uint32_t);
19 uint16_t ntohs(uint16_t);
20
21 in_addr_t inet_addr (const char *);
22 char *inet_ntoa (struct in_addr);
23 int inet_pton (int, const char *, void *);
24 const char *inet_ntop (int, const void *, char *, socklen_t);
25
26 int inet_aton (const char *, struct in_addr *); /* nonstandard but widely used */
27
28 #undef INET_ADDRSTRLEN
29 #undef INET6_ADDRSTRLEN
30 #define INET_ADDRSTRLEN  16
31 #define INET6_ADDRSTRLEN 46
32
33 #endif