2 * D header file for POSIX.
4 * Copyright: Public Domain
5 * License: Public Domain
7 * Standards: The Open Group Base Specifications Issue 6, IEEE Std 1003.1, 2004 Edition
9 module stdc.posix.arpa.inet;
11 private import stdc.posix.config;
12 public import stdc.inttypes : uint32_t, uint16_t;
13 public import stdc.posix.sys.socket : socklen_t;
21 in_port_t // from stdc.posix.netinet.in_
22 in_addr_t // from stdc.posix.netinet.in_
24 struct in_addr // from stdc.posix.netinet.in_
25 INET_ADDRSTRLEN // from stdc.posix.netinet.in_
27 uint32_t // from stdc.inttypes
28 uint16_t // from stdc.inttypes
30 uint32_t htonl(uint32_t);
31 uint16_t htons(uint16_t);
32 uint32_t ntohl(uint32_t);
33 uint16_t ntohs(uint16_t);
35 in_addr_t inet_addr(in char*);
36 char* inet_ntoa(in_addr);
37 // per spec: const char* inet_ntop(int, const void*, char*, socklen_t);
38 char* inet_ntop(int, in void*, char*, socklen_t);
39 int inet_pton(int, in char*, void*);
44 alias uint16_t in_port_t;
45 alias uint32_t in_addr_t;
52 const INET_ADDRSTRLEN = 16;
54 uint32_t htonl(uint32_t);
55 uint16_t htons(uint16_t);
56 uint32_t ntohl(uint32_t);
57 uint16_t ntohs(uint16_t);
59 in_addr_t inet_addr(in char*);
60 char* inet_ntoa(in_addr);
61 char* inet_ntop(int, in void*, char*, socklen_t);
62 int inet_pton(int, in char*, void*);
64 else version( darwin )
66 alias uint16_t in_port_t; // TODO: verify
67 alias uint32_t in_addr_t; // TODO: verify
74 const INET_ADDRSTRLEN = 16;
76 uint32_t htonl(uint32_t);
77 uint16_t htons(uint16_t);
78 uint32_t ntohl(uint32_t);
79 uint16_t ntohs(uint16_t);
81 in_addr_t inet_addr(in char*);
82 char* inet_ntoa(in_addr);
83 char* inet_ntop(int, in void*, char*, socklen_t);
84 int inet_pton(int, in char*, void*);
86 else version( freebsd )
88 alias uint16_t in_port_t; // TODO: verify
89 alias uint32_t in_addr_t; // TODO: verify
96 const INET_ADDRSTRLEN = 16;
98 uint32_t htonl(uint32_t);
99 uint16_t htons(uint16_t);
100 uint32_t ntohl(uint32_t);
101 uint16_t ntohs(uint16_t);
103 in_addr_t inet_addr(in char*);
104 char* inet_ntoa(in_addr);
105 char* inet_ntop(int, in void*, char*, socklen_t);
106 int inet_pton(int, in char*, void*);
113 INET6_ADDRSTRLEN // from stdc.posix.netinet.in_
118 const INET6_ADDRSTRLEN = 46;
120 else version( darwin )
122 const INET6_ADDRSTRLEN = 46;
124 else version( freebsd )
126 const INET6_ADDRSTRLEN = 46;