fix all missing instances of __cplusplus checks/extern "C" in headers
[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 <netinet/in.h>
9 #include <inttypes.h>
10
11 #define __NEED_socklen_t
12 #define __NEED_in_addr_t
13 #define __NEED_in_port_t
14 #define __NEED_uint16_t
15 #define __NEED_uint32_t
16 #define __NEED_struct_in_addr
17
18 #include <bits/alltypes.h>
19
20 uint32_t htonl(uint32_t);
21 uint16_t htons(uint16_t);
22 uint32_t ntohl(uint32_t);
23 uint16_t ntohs(uint16_t);
24
25 in_addr_t inet_addr (const char *);
26 char *inet_ntoa (struct in_addr);
27 int inet_pton (int, const char *, void *);
28 const char *inet_ntop (int, const void *, char *, socklen_t);
29
30 int inet_aton (const char *, struct in_addr *); /* nonstandard but widely used */
31
32 #undef INET_ADDRSTRLEN
33 #undef INET6_ADDRSTRLEN
34 #define INET_ADDRSTRLEN  16
35 #define INET6_ADDRSTRLEN 46
36
37 #ifdef __cplusplus
38 }
39 #endif
40
41 #endif