]> git.proxmox.com Git - wasi-libc.git/blob - libc-top-half/musl/include/arpa/inet.h
Add comments explaining changes to upstream source files.
[wasi-libc.git] / libc-top-half / musl / include / arpa / inet.h
1 #ifndef _ARPA_INET_H
2 #define _ARPA_INET_H
3
4 #ifdef __cplusplus
5 extern "C" {
6 #endif
7
8 #include <features.h>
9 #include <netinet/in.h>
10
11 uint32_t htonl(uint32_t);
12 uint16_t htons(uint16_t);
13 uint32_t ntohl(uint32_t);
14 uint16_t ntohs(uint16_t);
15
16 #ifdef __wasilibc_unmodified_upstream /* WASI has no inet_addr */
17 in_addr_t inet_addr (const char *);
18 in_addr_t inet_network (const char *);
19 char *inet_ntoa (struct in_addr);
20 #endif
21 int inet_pton (int, const char *__restrict, void *__restrict);
22 const char *inet_ntop (int, const void *__restrict, char *__restrict, socklen_t);
23
24 int inet_aton (const char *, struct in_addr *);
25 #ifdef __wasilibc_unmodified_upstream /* WASI has no inet_makeaddr */
26 struct in_addr inet_makeaddr(in_addr_t, in_addr_t);
27 in_addr_t inet_lnaof(struct in_addr);
28 in_addr_t inet_netof(struct in_addr);
29 #endif
30
31 #undef INET_ADDRSTRLEN
32 #undef INET6_ADDRSTRLEN
33 #define INET_ADDRSTRLEN 16
34 #define INET6_ADDRSTRLEN 46
35
36 #ifdef __cplusplus
37 }
38 #endif
39
40 #endif