Age | Commit message (Collapse) | Author |
|
|
|
|
|
1. Move htonl() etc. from <arpa/inet.h> to <netinet/in.h> (which
<arpa/inet.h> includes).
The htonl(), htons(), ntohl(), and ntohs() functions shall be
available as described in <arpa/inet.h>. Inclusion of the
<netinet/in.h> header may also make visible all symbols from
<arpa/inet.h>.
- POSIX
2. Define IN6_IS_ADDR_LOOPBACK() and IN6_IS_ADDR_V4MAPPED()
|
|
The POSIX man-page states that inet_pton returns 0 if the input is not a
valid IPv4 dotted-decimal string or a valid IPv6 address string. This is
also how it is implemented in SerenityOS.
This means that we should treat a return value of 0 as an error to avoid
using an invalid address (or 0.0.0.0).
|
|
SPDX License Identifiers are a more compact / standardized
way of representing file license information.
See: https://spdx.dev/resources/use/#identifiers
This was done with the `ambr` search and replace tool.
ambr --no-parent-ignore --key-from-file --rep-from-file key.txt rep.txt *
|
|
Although serenity doesn't implement IPv6 yet, applications
will often declare buffers to be of size `INET6_ADDRSTRLEN`
so it's guaranteed to work in both IPv4 / IPv6 environments.
This is needed specifically for a port of Flexible IO Tester
https://fio.readthedocs.io
This is standardized here:
https://pubs.opengroup.org/onlinepubs/009695399/basedefs/netinet/in.h.html
|
|
|
|
According to the Single UNIX Specification, Version 2 the <arpa/inet.h>
header may optionally include <netinet/in.h> and <inttypes.h>. This
helps with porting software like c-ray that expects this to be the case.
|
|
This makes it work when compiling as C.
|
|
|