1arpa_inet.h(0P) POSIX Programmer's Manual arpa_inet.h(0P)
2
3
4
6 This manual page is part of the POSIX Programmer's Manual. The Linux
7 implementation of this interface may differ (consult the corresponding
8 Linux manual page for details of Linux behavior), or the interface may
9 not be implemented on Linux.
10
12 arpa/inet.h — definitions for internet operations
13
15 #include <arpa/inet.h>
16
18 The <arpa/inet.h> header shall define the in_port_t and in_addr_t types
19 as described in <netinet/in.h>.
20
21 The <arpa/inet.h> header shall define the in_addr structure as
22 described in <netinet/in.h>.
23
24 The <arpa/inet.h> header shall define the INET_ADDRSTRLEN and
25 INET6_ADDRSTRLEN macros as described in <netinet/in.h>.
26
27 The following shall be declared as functions, or defined as macros, or
28 both. If functions are declared, function prototypes shall be provided.
29
30
31 uint32_t htonl(uint32_t);
32 uint16_t htons(uint16_t);
33 uint32_t ntohl(uint32_t);
34 uint16_t ntohs(uint16_t);
35
36 The <arpa/inet.h> header shall define the uint32_t and uint16_t types
37 as described in <inttypes.h>.
38
39 The following shall be declared as functions and may also be defined as
40 macros. Function prototypes shall be provided.
41
42
43 in_addr_t inet_addr(const char *);
44 char *inet_ntoa(struct in_addr);
45 const char *inet_ntop(int, const void *restrict, char *restrict,
46 socklen_t);
47 int inet_pton(int, const char *restrict, void *restrict);
48
49 Inclusion of the <arpa/inet.h> header may also make visible all symbols
50 from <netinet/in.h> and <inttypes.h>.
51
52 The following sections are informative.
53
55 None.
56
58 None.
59
61 None.
62
64 <inttypes.h>, <netinet_in.h>
65
66 The System Interfaces volume of POSIX.1‐2017, htonl(), inet_addr(),
67 inet_ntop()
68
70 Portions of this text are reprinted and reproduced in electronic form
71 from IEEE Std 1003.1-2017, Standard for Information Technology -- Por‐
72 table Operating System Interface (POSIX), The Open Group Base Specifi‐
73 cations Issue 7, 2018 Edition, Copyright (C) 2018 by the Institute of
74 Electrical and Electronics Engineers, Inc and The Open Group. In the
75 event of any discrepancy between this version and the original IEEE and
76 The Open Group Standard, the original IEEE and The Open Group Standard
77 is the referee document. The original Standard can be obtained online
78 at http://www.opengroup.org/unix/online.html .
79
80 Any typographical or formatting errors that appear in this page are
81 most likely to have been introduced during the conversion of the source
82 files to man page format. To report such errors, see https://www.ker‐
83 nel.org/doc/man-pages/reporting_bugs.html .
84
85
86
87IEEE/The Open Group 2017 arpa_inet.h(0P)