diff options
| author | Kacper <kacper@mail.openlinux.dev> | 2025-12-07 20:10:31 +0100 |
|---|---|---|
| committer | Kacper <kacper@mail.openlinux.dev> | 2025-12-07 20:10:31 +0100 |
| commit | fc00c656c96528112d05cf0edf8631bd5eaea446 (patch) | |
| tree | a6e0e6c588191a8bd1c64afc3b7a258e3e66c236 /include/arpa/inet.h | |
Add build system scaffolding and libc headers
Diffstat (limited to 'include/arpa/inet.h')
| -rw-r--r-- | include/arpa/inet.h | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/include/arpa/inet.h b/include/arpa/inet.h new file mode 100644 index 00000000..030f2f0c --- /dev/null +++ b/include/arpa/inet.h @@ -0,0 +1,26 @@ +#ifndef __ARPA_INET_H +#define __ARPA_INET_H + +#define __BITS_IN_ADDR_H_ +#include <bits/in_addr.h> +#undef __BITS_IN_ADDR_H_ + +#define INET_ADDRSTRLEN 16 +#define INET6_ADDRSTRLEN 46 + +typedef __UINT16_TYPE__ in_port_t; +typedef __UINT32_TYPE__ uint32_t; +typedef __UINT16_TYPE__ uint16_t; +typedef unsigned socklen_t; + +uint32_t htonl(uint32_t); +uint16_t htons(uint16_t); +uint32_t ntohl(uint32_t); +uint16_t ntohs(uint16_t); + +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); + +#endif |
