summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibC/arpa
AgeCommit message (Collapse)Author
2022-04-01Everywhere: Run clang-formatIdan Horowitz
2022-03-08LibC: Add IPv6 support to inet_ntop and inet_ptonTom
2021-08-22LibC: Make <netinet/in.h> more POSIX compliantPeter Elliott
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()
2021-05-27Userland: Treat inet_pton returning 0 as an errorTim Schumacher
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).
2021-04-22Everything: Move to SPDX license identifiers in all files.Brian Gianforcaro
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 *
2021-04-21LibC: Add a definition for `INET6_ADDRSTRLEN`Brian Gianforcaro
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
2021-04-12LibC: Validate the len argument for inet_ntop()Gunnar Beutner
2021-04-11LibC: Include additional headers in <arpa/inet.h>Gunnar Beutner
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.
2021-02-18LibC: Use "static inline" for inline functions in arpa/inet.h (#5392)jonno85uk
This makes it work when compiling as C.
2021-01-12Libraries: Move to Userland/Libraries/Andreas Kling