about summary refs log tree commit diff
path: root/arch/i386/syscall.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/i386/syscall.h')
-rw-r--r--arch/i386/syscall.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/arch/i386/syscall.h b/arch/i386/syscall.h
index 114aa688..fcdae241 100644
--- a/arch/i386/syscall.h
+++ b/arch/i386/syscall.h
@@ -501,6 +501,27 @@ static inline long syscall6(long n, long a1, long a2, long a3, long a4, long a5,
 #define __NR_pread __NR_pread64
 #define __NR_pwrite __NR_pwrite64
 
+#define __SC_socket      1
+#define __SC_bind        2
+#define __SC_connect     3
+#define __SC_listen      4
+#define __SC_accept      5
+#define __SC_getsockname 6
+#define __SC_getpeername 7
+#define __SC_socketpair  8
+#define __SC_send        9
+#define __SC_recv        10
+#define __SC_sendto      11
+#define __SC_recvfrom    12
+#define __SC_shutdown    13
+#define __SC_setsockopt  14
+#define __SC_getsockopt  15
+#define __SC_sendmsg     16
+#define __SC_recvmsg     17
+
+
+#define socketcall(nm, a, b, c, d, e, f) syscall2(__NR_socketcall, __SC_##nm, \
+    (long)(long [6]){ (long)a, (long)b, (long)c, (long)d, (long)e, (long)f })
 
 
 #undef O_LARGEFILE