From 4be1fd62131f7e186e6f92f1bb5a356dc1ac1951 Mon Sep 17 00:00:00 2001 From: dzwdz Date: Mon, 25 Dec 2023 20:12:44 +0100 Subject: user/libc: reorganize net stuff, basic hosts-only gethostbyname() /usr/share/hosts because i don't have /etc/ yet and i don't feel like creating it. --- src/libc/arpainet.c | 20 -------------------- 1 file changed, 20 deletions(-) delete mode 100644 src/libc/arpainet.c (limited to 'src/libc/arpainet.c') diff --git a/src/libc/arpainet.c b/src/libc/arpainet.c deleted file mode 100644 index 125a855..0000000 --- a/src/libc/arpainet.c +++ /dev/null @@ -1,20 +0,0 @@ -#include - -uint32_t htonl(uint32_t n) { - return ((n & 0xFF000000) >> 24) - | ((n & 0x00FF0000) >> 8) - | ((n & 0x0000FF00) << 8) - | ((n & 0x000000FF) << 24); -} - -uint16_t htons(uint16_t n) { - return (n >> 8) | (n << 8); -} - -uint32_t ntohl(uint32_t n) { - return htonl(n); -} - -uint16_t ntohs(uint16_t n) { - return htons(n); -} -- cgit v1.2.3