diff options
author | Anton Kling <anton@kling.gg> | 2023-10-27 00:48:21 +0200 |
---|---|---|
committer | Anton Kling <anton@kling.gg> | 2023-10-30 21:49:48 +0100 |
commit | 5026f823fa2708404302aa59d03401635a435c0b (patch) | |
tree | 03d8db6da25416fa27b9744ae60df2cfa5fc1d2b /cpu/syscall.c | |
parent | f8e15da04472f5ed6a26e588de4a23cb3e1ba20b (diff) |
Kernel/Networking/LibC: Add syscalls and libc functions for UDP
This allows a UDP server to be created in userland and read data.
Currently it can't send data and is very very simplistic.
Code is horrible and probably needs some fixing until it can be further built
upon.
Diffstat (limited to 'cpu/syscall.c')
-rw-r--r-- | cpu/syscall.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/cpu/syscall.c b/cpu/syscall.c index c072053..6ad5514 100644 --- a/cpu/syscall.c +++ b/cpu/syscall.c @@ -9,15 +9,16 @@ #include <kmalloc.h> #include <scalls/accept.h> #include <scalls/bind.h> +#include <scalls/ftruncate.h> +#include <scalls/mkdir.h> #include <scalls/mmap.h> #include <scalls/msleep.h> #include <scalls/ppoll.h> +#include <scalls/recvfrom.h> #include <scalls/shm.h> -#include <scalls/ftruncate.h> #include <scalls/socket.h> #include <scalls/stat.h> #include <scalls/uptime.h> -#include <scalls/mkdir.h> #include <stdint.h> #include <string.h> @@ -162,6 +163,7 @@ void (*syscall_functions[])() = { (void(*))syscall_ftruncate, (void(*))syscall_stat, (void(*))syscall_msleep, (void(*))syscall_uptime, (void(*))syscall_mkdir, + (void(*))syscall_recvfrom, }; void syscall_function_handler(uint32_t eax, uint32_t arg1, uint32_t arg2, |