diff options
author | Marvin Borner | 2020-11-18 13:49:19 +0100 |
---|---|---|
committer | Marvin Borner | 2020-11-18 13:49:19 +0100 |
commit | 431c88102153b8b41a15a1105e291ecf161c030e (patch) | |
tree | 63063babd988284871db7c27dbb96025d00f2444 /kernel/features/syscall.c | |
parent | cc85ffd8a1c4703051655c7f5727157e7e1ce96a (diff) |
Started libnet
Diffstat (limited to 'kernel/features/syscall.c')
-rw-r--r-- | kernel/features/syscall.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/kernel/features/syscall.c b/kernel/features/syscall.c index 63badd9..b601d96 100644 --- a/kernel/features/syscall.c +++ b/kernel/features/syscall.c @@ -6,6 +6,7 @@ #include <interrupts.h> #include <load.h> #include <mem.h> +#include <net.h> #include <print.h> #include <proc.h> #include <str.h> @@ -91,6 +92,22 @@ void syscall_handler(struct regs *r) r->eax = proc_current()->pid; break; } + case SYS_NET_OPEN: { + r->eax = (int)net_open(r->ebx); + break; + } + case SYS_NET_CLOSE: { + net_close((void *)r->ebx); + break; + } + case SYS_NET_CONNECT: { + r->eax = net_connect((void *)r->ebx, r->ecx, r->edx); + break; + } + case SYS_NET_SEND: { + net_send((void *)r->ebx, (void *)r->ecx, r->edx); + break; + } default: { print("Unknown syscall!\n"); break; |