summaryrefslogtreecommitdiff
path: root/Kernel/StdLib.h
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2019-03-11 23:21:38 +0100
committerAndreas Kling <awesomekling@gmail.com>2019-03-11 23:21:38 +0100
commit318b01e055a662fef05ef0ea4e03c1d269bbc4a8 (patch)
treee064de3c963e848bb3c50f9de44a8a9ed14bf912 /Kernel/StdLib.h
parent10dcd3a47f36f5f85fb07fd639fb2235496be155 (diff)
downloadserenity-318b01e055a662fef05ef0ea4e03c1d269bbc4a8.zip
Kernel: Bring up enough networking code that we can respond to ARP requests.
This is all pretty rickety but we can now respond to "arping" from the host while running inside QEMU. Very cool. :^)
Diffstat (limited to 'Kernel/StdLib.h')
-rw-r--r--Kernel/StdLib.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/Kernel/StdLib.h b/Kernel/StdLib.h
index 05525fb4a6..3af0ba98d7 100644
--- a/Kernel/StdLib.h
+++ b/Kernel/StdLib.h
@@ -16,4 +16,7 @@ char *strdup(const char*);
int memcmp(const void*, const void*, size_t);
char* strrchr(const char* str, int ch);
+inline word ntohs(word w) { return (w & 0xff) << 8 | ((w >> 8) & 0xff); }
+inline word htons(word w) { return (w & 0xff) << 8 | ((w >> 8) & 0xff); }
+
}