arpa_inet.h(0P)
π arpa_inet.h β POSIX Programmer's Manual, bestie edition π
okay so this is arpa_inet.h(0P), straight out of the POSIX Programmer's Manual. we're doing the whole thing, no skips, no shortcuts. let's go π«Ά
π¨ PROLOG π¨
bestie real talk before we even start: this manual page is part of the POSIX Programmer's Manual. the Linux implementation of this interface may differ β so like, consult the corresponding Linux manual page for details on Linux behavior β or honestly, the interface may not be implemented on Linux at all. π check first, always.
β¨ NAME β¨
arpa/inet.h β definitions for internet operations π
it's giving "the header that makes your sockets talk to the internet". iconic. π
πΈ SYNOPSIS πΈ
#include <arpa/inet.h>
that's it. that's the whole vibe. one include and you're in. π
π¦ DESCRIPTION π¦
okay so here's everything this header is contractually obligated to do, and we're going through all of it:
The <arpa/inet.h> header shall define the in_port_t and in_addr_t types as described in <netinet/in.h>.
The <arpa/inet.h> header shall define the in_addr structure as described in <netinet/in.h>.
The <arpa/inet.h> header shall define the INET_ADDRSTRLEN and INET6_ADDRSTRLEN macros as described in <netinet/in.h>. (yes queen, buffer sizes for your address strings, know them, love them β¨)
The following shall be declared as functions, or defined as macros, or both. If functions are declared, function prototypes shall be provided.
uint32_t htonl(uint32_t);
uint16_t htons(uint16_t);
uint32_t ntohl(uint32_t);
uint16_t ntohs(uint16_t);
host-to-network and network-to-host, the byte-order besties. endianness could NEVER catch you slipping. π₯
The <arpa/inet.h> header shall define the uint32_t and uint16_t types as described in <inttypes.h>.
The following shall be declared as functions and may also be defined as macros. Function prototypes shall be provided.
in_addr_t inet_addr(const char *);
char *inet_ntoa(struct in_addr);
const char *inet_ntop(int, const void *restrict, char *restrict,
socklen_t);
int inet_pton(int, const char *restrict, void *restrict);
Inclusion of the <arpa/inet.h> header may also make visible all symbols from <netinet/in.h> and <inttypes.h>.
The following sections are informative.
ngl "informative" means it's not the normative requirement part β but we're still reading it, because we don't skip sections in this house. π
π APPLICATION USAGE π
None.
literally nothing. the void. the silence. and that's valid. π
π§ RATIONALE π§
None.
no reasoning given, no notes, it just is. main character behavior honestly. β
π FUTURE DIRECTIONS π
None.
the future is unwritten and this header is not worried about it. periodt. π¦
π₯ SEE ALSO π₯
<inttypes.h><netinet_in.h>
and from the System Interfaces volume of POSIX.1β2017: htonl(), inet_addr(), inet_ntop()
go read those next bestie, they're the whole point of this header existing. iykyk. π
π COPYRIGHT π
Portions of this text are reprinted and reproduced in electronic form from IEEE Std 1003.1-2017, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 7, 2018 Edition, Copyright (C) 2018 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group.
In the event of any discrepancy between this version and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document.
The original Standard can be obtained online at http://www.opengroup.org/unix/online.html .
Any typographical or formatting errors that appear in this page are most likely to have been introduced during the conversion of the source files to man page format. To report such errors, see https://www.kernel.org/doc/man-pages/reporting_bugs.html .
and that's the whole page, bestie! this was IEEE/The Open Group, 2017, arpa_inet.h(0P) β thanks for reading with me, ily, go write some sockets πβ¨ππ¦πΈ
π¦ where this page comes from
- alpine 3.22: man-pages-posix 2017a-r0 Β· custom
- alpine 3.23: man-pages-posix 2017a-r0 Β· custom
- alpine 3.24: man-pages-posix 2017a-r0 Β· custom
- arch rolling: man-pages 6.19-1
- arch rolling: man-pages 6.20-1 Β· BSD-2-Clause AND BSD-3-Clause AND BSD-4.3TAHOE AND BSD-4-Clause-UC AND GPL-1.0-or-later AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-or-later AND LGPL-3.0-linking-exception AND LGPL-3.0-or-later AND LicenseRef-Public-Domain AND LicenseRef-UltraPermissive AND Linux-man-pages-1-para AND Linux-man-pages-copyleft AND Linux-man-pages-copyleft-2-para AND Linux-man-pages-copyleft-var AND MIT AND Spencer-94
- nixpkgs unstable: man-pages-posix 2017a
- opensuse-leap 16.0: man-pages-posix 2017a-160000.4.1 Β· SUSE-IEEE
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms