about summary refs log tree commit diff
path: root/src/network/socket.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/network/socket.c')
-rw-r--r--src/network/socket.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/network/socket.c b/src/network/socket.c
new file mode 100644
index 00000000..afaeb411
--- /dev/null
+++ b/src/network/socket.c
@@ -0,0 +1,9 @@
+#include <sys/socket.h>
+#include "syscall.h"
+#include "socketcall.h"
+
+int socket(int domain, int type, int protocol)
+{
+	unsigned long args[] = { domain, type, protocol };
+	return syscall2(__NR_socketcall, SYS_SOCKET, (long)args);
+}