From 5026f823fa2708404302aa59d03401635a435c0b Mon Sep 17 00:00:00 2001 From: Anton Kling <anton@kling.gg> Date: Fri, 27 Oct 2023 00:48:21 +0200 Subject: 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. --- cpu/syscall.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'cpu/syscall.c') 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, -- cgit v1.2.3