From 8b599e8c8d32bdbbfe5a5ca696d4d9cdff5d5350 Mon Sep 17 00:00:00 2001 From: Ian Moffett Date: Mon, 28 Jul 2025 03:06:19 -0400 Subject: kernel: net: Add socket syscalls Introduce the following syscalls: - SYS_socket - SYS_bind - SYS_recv - SYS_send Signed-off-by: Ian Moffett --- sys/include/sys/socket.h | 5 +++++ sys/include/sys/syscall.h | 4 ++++ 2 files changed, 9 insertions(+) (limited to 'sys/include') diff --git a/sys/include/sys/socket.h b/sys/include/sys/socket.h index 7175da5..f01e2bf 100644 --- a/sys/include/sys/socket.h +++ b/sys/include/sys/socket.h @@ -81,6 +81,11 @@ struct ksocket { struct sockbuf buf; struct mutex *mtx; }; + +scret_t sys_socket(struct syscall_args *scargs); +scret_t sys_bind(struct syscall_args *scargs); +scret_t sys_recv(struct syscall_args *scargs); +scret_t sys_send(struct syscall_args *scargs); #endif /* _KERNEL */ int socket(int domain, int type, int protocol); diff --git a/sys/include/sys/syscall.h b/sys/include/sys/syscall.h index 02629a9..51a1016 100644 --- a/sys/include/sys/syscall.h +++ b/sys/include/sys/syscall.h @@ -59,6 +59,10 @@ #define SYS_setuid 18 #define SYS_getuid 19 #define SYS_waitpid 20 +#define SYS_socket 21 +#define SYS_bind 22 +#define SYS_recv 23 +#define SYS_send 24 #if defined(_KERNEL) /* Syscall return value and arg type */ -- cgit v1.2.3