summaryrefslogtreecommitdiff
path: root/sys/include
diff options
context:
space:
mode:
authorIan Moffett <ian@osmora.org>2025-07-28 03:06:19 -0400
committerIan Moffett <ian@osmora.org>2025-07-28 03:31:26 -0400
commit8b599e8c8d32bdbbfe5a5ca696d4d9cdff5d5350 (patch)
treed768ed1065c2a0a0af97e2ea115cf2635a9a6ef5 /sys/include
parent275108db200f6303d84d5225b80081b58866fe22 (diff)
kernel: net: Add socket syscalls
Introduce the following syscalls: - SYS_socket - SYS_bind - SYS_recv - SYS_send Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'sys/include')
-rw-r--r--sys/include/sys/socket.h5
-rw-r--r--sys/include/sys/syscall.h4
2 files changed, 9 insertions, 0 deletions
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 */