]> git.corax.cc Git - corax/commitdiff
Call socreate() function from sys_socket()
authorMatthias Kruk <m@m10k.eu>
Thu, 3 Oct 2019 09:41:38 +0000 (18:41 +0900)
committerMatthias Kruk <m@m10k.eu>
Thu, 3 Oct 2019 09:41:38 +0000 (18:41 +0900)
kernel/core/cxnet.c

index 48104bcb0e2839301e4fc4ca53b0499c6b853574..4dca679290c3078ad58ce7819541a67e077a5b5a 100644 (file)
@@ -8,10 +8,21 @@
 #include <sys/time.h>
 #include <poll.h>
 #include <debug.h>
+#include "socket.h"
 
 int sys_socket(int domain, int type, int protocol)
 {
-       return(-ENOSYS);
+       int ret_val;
+
+       /*
+        * The Corax network stack isn't as complicated as the
+        * BSD or Linux network stacks, so this is all we have
+        * to do here.
+        */
+       ret_val = socreate(domain, type, protocol);
+       dbg_printf("socreate(0x%08x, 0x%08x, 0x%08x) = 0x%08x\n", domain, type, protocol, ret_val);
+
+       return(ret_val);
 }
 
 int sys_close(int sockfd)