e47a41f6fa03886b4c103ae8ca50809097d571cc
[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 #include <inttypes.h>
11
12 #define __NEED_socklen_t
13 #define __NEED_in_addr_t
14 #define __NEED_in_port_t
15 #define __NEED_uint16_t
16 #define __NEED_uint32_t
17 #define __NEED_struct_in_addr
18
19 #include <bits/alltypes.h>
20
21 uint32_t htonl(uint32_t);
22 uint16_t htons(uint16_t);
23 uint32_t ntohl(uint32_t);
24 uint16_t ntohs(uint16_t);
25
26 in_addr_t inet_addr (const char *);
27 in_addr_t inet_network (const char *);
28 char *inet_ntoa (struct in_addr);
29 int inet_pton (int, const char *__restrict, void *__restrict);
30 const char *inet_ntop (int, const void *__restrict, char *__restrict, socklen_t);
31
32 int inet_aton (const char *, struct in_addr *);
33 struct in_addr inet_makeaddr(int, int);
34 in_addr_t inet_lnaof(struct in_addr);
35 in_addr_t inet_netof(struct in_addr);
36
37 #undef INET_ADDRSTRLEN
38 #undef INET6_ADDRSTRLEN
39 #define INET_ADDRSTRLEN  16
40 #define INET6_ADDRSTRLEN 46
41
42 #ifdef __cplusplus
43 }
44 #endif
45
46 #endif