Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/compat/linux/arch/mips Added socket operations to Linux ...



details:   https://anonhg.NetBSD.org/src/rev/1d437e53c33f
branches:  trunk
changeset: 515860:1d437e53c33f
user:      manu <manu%NetBSD.org@localhost>
date:      Sat Oct 06 13:32:58 2001 +0000

description:
Added socket operations to Linux Mips emulation

diffstat:

 sys/compat/linux/arch/mips/linux_syscall.h     |  52 ++++++++++++++++++-
 sys/compat/linux/arch/mips/linux_syscallargs.h |  20 ++++++-
 sys/compat/linux/arch/mips/linux_syscalls.c    |  39 +++++++------
 sys/compat/linux/arch/mips/linux_sysent.c      |  71 +++++++++++++------------
 sys/compat/linux/arch/mips/linux_types.h       |   4 +-
 sys/compat/linux/arch/mips/syscalls.master     |  54 +++++++++++++------
 6 files changed, 162 insertions(+), 78 deletions(-)

diffs (truncated from 366 to 300 lines):

diff -r 198d5b6273a0 -r 1d437e53c33f sys/compat/linux/arch/mips/linux_syscall.h
--- a/sys/compat/linux/arch/mips/linux_syscall.h        Sat Oct 06 13:32:18 2001 +0000
+++ b/sys/compat/linux/arch/mips/linux_syscall.h        Sat Oct 06 13:32:58 2001 +0000
@@ -1,10 +1,10 @@
-/* $NetBSD: linux_syscall.h,v 1.2 2001/09/30 20:52:40 manu Exp $ */
+/* $NetBSD: linux_syscall.h,v 1.3 2001/10/06 13:32:58 manu Exp $ */
 
 /*
  * System call numbers.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from        NetBSD: syscalls.master,v 1.1 2001/09/22 21:14:37 manu Exp   
+ * created from        NetBSD: syscalls.master,v 1.2 2001/09/30 20:52:41 manu Exp   
  */
 
 /* syscall: "syscall" ret: "int" args: */
@@ -410,6 +410,54 @@
 /* syscall: "mremap" ret: "void *" args: "void *" "size_t" "size_t" "u_long" */
 #define        LINUX_SYS_mremap        167
 
+/* syscall: "accept" ret: "int" args: "int" "struct osockaddr *" "int *" */
+#define        LINUX_SYS_accept        168
+
+/* syscall: "bind" ret: "int" args: "int" "const struct osockaddr *" "int" */
+#define        LINUX_SYS_bind  169
+
+/* syscall: "connect" ret: "int" args: "int" "const struct sockaddr *" "int" */
+#define        LINUX_SYS_connect       170
+
+/* syscall: "getpeername" ret: "int" args: "int" "caddr_t" "int *" */
+#define        LINUX_SYS_getpeername   171
+
+/* syscall: "getsockname" ret: "int" args: "int" "caddr_t" "int *" */
+#define        LINUX_SYS_getsockname   172
+
+/* syscall: "getsockopt" ret: "int" args: "int" "int" "int" "void *" "int *" */
+#define        LINUX_SYS_getsockopt    173
+
+/* syscall: "listen" ret: "int" args: "int" "int" */
+#define        LINUX_SYS_listen        174
+
+/* syscall: "recv" ret: "int" args: "int" "void *" "int" "int" */
+#define        LINUX_SYS_recv  175
+
+/* syscall: "recvfrom" ret: "int" args: "int" "void *" "int" "int" "struct osockaddr *" "int *" */
+#define        LINUX_SYS_recvfrom      176
+
+/* syscall: "recvmsg" ret: "int" args: "int" "struct msghdr *" "u_int" */
+#define        LINUX_SYS_recvmsg       177
+
+/* syscall: "send" ret: "int" args: "int" "caddr_t" "int" "int" */
+#define        LINUX_SYS_send  178
+
+/* syscall: "sendmsg" ret: "int" args: "int" "struct msghdr *" "u_int" */
+#define        LINUX_SYS_sendmsg       179
+
+/* syscall: "sendto" ret: "int" args: "int" "void *" "int" "int" "struct osockaddr *" "int" */
+#define        LINUX_SYS_sendto        180
+
+/* syscall: "setsockopt" ret: "int" args: "int" "int" "int" "void *" "int" */
+#define        LINUX_SYS_setsockopt    181
+
+/* syscall: "socket" ret: "int" args: "int" "int" "int" */
+#define        LINUX_SYS_socket        183
+
+/* syscall: "socketpair" ret: "int" args: "int" "int" "int" "int *" */
+#define        LINUX_SYS_socketpair    184
+
 /* syscall: "setresuid" ret: "int" args: "uid_t" "uid_t" "uid_t" */
 #define        LINUX_SYS_setresuid     185
 
diff -r 198d5b6273a0 -r 1d437e53c33f sys/compat/linux/arch/mips/linux_syscallargs.h
--- a/sys/compat/linux/arch/mips/linux_syscallargs.h    Sat Oct 06 13:32:18 2001 +0000
+++ b/sys/compat/linux/arch/mips/linux_syscallargs.h    Sat Oct 06 13:32:58 2001 +0000
@@ -1,10 +1,10 @@
-/* $NetBSD: linux_syscallargs.h,v 1.2 2001/09/30 20:52:40 manu Exp $ */
+/* $NetBSD: linux_syscallargs.h,v 1.3 2001/10/06 13:32:58 manu Exp $ */
 
 /*
  * System call argument lists.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from        NetBSD: syscalls.master,v 1.1 2001/09/22 21:14:37 manu Exp   
+ * created from        NetBSD: syscalls.master,v 1.2 2001/09/30 20:52:41 manu Exp   
  */
 
 #ifndef _LINUX_SYS__SYSCALLARGS_H_
@@ -656,6 +656,22 @@
 int    linux_sys_sched_get_priority_min(struct proc *, void *, register_t *);
 int    sys_nanosleep(struct proc *, void *, register_t *);
 int    linux_sys_mremap(struct proc *, void *, register_t *);
+int    linux_sys_accept(struct proc *, void *, register_t *);
+int    linux_sys_bind(struct proc *, void *, register_t *);
+int    linux_sys_connect(struct proc *, void *, register_t *);
+int    linux_sys_getpeername(struct proc *, void *, register_t *);
+int    linux_sys_getsockname(struct proc *, void *, register_t *);
+int    linux_sys_getsockopt(struct proc *, void *, register_t *);
+int    sys_listen(struct proc *, void *, register_t *);
+int    linux_sys_recv(struct proc *, void *, register_t *);
+int    linux_sys_recvfrom(struct proc *, void *, register_t *);
+int    linux_sys_recvmsg(struct proc *, void *, register_t *);
+int    linux_sys_send(struct proc *, void *, register_t *);
+int    linux_sys_sendmsg(struct proc *, void *, register_t *);
+int    linux_sys_sendto(struct proc *, void *, register_t *);
+int    linux_sys_setsockopt(struct proc *, void *, register_t *);
+int    linux_sys_socket(struct proc *, void *, register_t *);
+int    linux_sys_socketpair(struct proc *, void *, register_t *);
 int    linux_sys_setresuid(struct proc *, void *, register_t *);
 int    linux_sys_getresuid(struct proc *, void *, register_t *);
 int    sys_poll(struct proc *, void *, register_t *);
diff -r 198d5b6273a0 -r 1d437e53c33f sys/compat/linux/arch/mips/linux_syscalls.c
--- a/sys/compat/linux/arch/mips/linux_syscalls.c       Sat Oct 06 13:32:18 2001 +0000
+++ b/sys/compat/linux/arch/mips/linux_syscalls.c       Sat Oct 06 13:32:58 2001 +0000
@@ -1,10 +1,10 @@
-/* $NetBSD: linux_syscalls.c,v 1.2 2001/09/30 20:52:40 manu Exp $ */
+/* $NetBSD: linux_syscalls.c,v 1.3 2001/10/06 13:32:59 manu Exp $ */
 
 /*
  * System call names.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from        NetBSD: syscalls.master,v 1.1 2001/09/22 21:14:37 manu Exp   
+ * created from        NetBSD: syscalls.master,v 1.2 2001/09/30 20:52:41 manu Exp   
  */
 
 #if defined(_KERNEL_OPT)
@@ -23,6 +23,7 @@
 #include <compat/linux/common/linux_siginfo.h>
 #include <compat/linux/common/linux_machdep.h>
 #include <compat/linux/common/linux_mmap.h>
+#include <compat/linux/common/linux_socketcall.h>
 #include <compat/linux/linux_syscallargs.h>
 #endif /* _KERNEL_OPT */
 
@@ -195,23 +196,23 @@
        "#165 (unimplemented sched_rr_get_interval)",           /* 165 = unimplemented sched_rr_get_interval */
        "nanosleep",                    /* 166 = nanosleep */
        "mremap",                       /* 167 = mremap */
-       "#168 (unimplemented accept)",          /* 168 = unimplemented accept */
-       "#169 (unimplemented bind)",            /* 169 = unimplemented bind */
-       "#170 (unimplemented connect)",         /* 170 = unimplemented connect */
-       "#171 (unimplemented getpeername)",             /* 171 = unimplemented getpeername */
-       "#172 (unimplemented getsockname)",             /* 172 = unimplemented getsockname */
-       "#173 (unimplemented getsockopt)",              /* 173 = unimplemented getsockopt */
-       "#174 (unimplemented listen)",          /* 174 = unimplemented listen */
-       "#175 (unimplemented recv)",            /* 175 = unimplemented recv */
-       "#176 (unimplemented recvfrom)",                /* 176 = unimplemented recvfrom */
-       "#177 (unimplemented recvmsg)",         /* 177 = unimplemented recvmsg */
-       "#178 (unimplemented send)",            /* 178 = unimplemented send */
-       "#179 (unimplemented sendmsg)",         /* 179 = unimplemented sendmsg */
-       "#180 (unimplemented sendto)",          /* 180 = unimplemented sendto */
-       "#181 (unimplemented setsockopt)",              /* 181 = unimplemented setsockopt */
-       "#182 (unimplemented shudown)",         /* 182 = unimplemented shudown */
-       "#183 (unimplemented socket)",          /* 183 = unimplemented socket */
-       "#184 (unimplemented socketpair)",              /* 184 = unimplemented socketpair */
+       "accept",                       /* 168 = accept */
+       "bind",                 /* 169 = bind */
+       "connect",                      /* 170 = connect */
+       "getpeername",                  /* 171 = getpeername */
+       "getsockname",                  /* 172 = getsockname */
+       "getsockopt",                   /* 173 = getsockopt */
+       "listen",                       /* 174 = listen */
+       "recv",                 /* 175 = recv */
+       "recvfrom",                     /* 176 = recvfrom */
+       "recvmsg",                      /* 177 = recvmsg */
+       "send",                 /* 178 = send */
+       "sendmsg",                      /* 179 = sendmsg */
+       "sendto",                       /* 180 = sendto */
+       "setsockopt",                   /* 181 = setsockopt */
+       "#182 (unimplemented shutdown)",                /* 182 = unimplemented shutdown */
+       "socket",                       /* 183 = socket */
+       "socketpair",                   /* 184 = socketpair */
        "setresuid",                    /* 185 = setresuid */
        "getresuid",                    /* 186 = getresuid */
        "#187 (unimplemented query_module)",            /* 187 = unimplemented query_module */
diff -r 198d5b6273a0 -r 1d437e53c33f sys/compat/linux/arch/mips/linux_sysent.c
--- a/sys/compat/linux/arch/mips/linux_sysent.c Sat Oct 06 13:32:18 2001 +0000
+++ b/sys/compat/linux/arch/mips/linux_sysent.c Sat Oct 06 13:32:58 2001 +0000
@@ -1,10 +1,10 @@
-/* $NetBSD: linux_sysent.c,v 1.2 2001/09/30 20:52:41 manu Exp $ */
+/* $NetBSD: linux_sysent.c,v 1.3 2001/10/06 13:32:59 manu Exp $ */
 
 /*
  * System call switch table.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from        NetBSD: syscalls.master,v 1.1 2001/09/22 21:14:37 manu Exp   
+ * created from        NetBSD: syscalls.master,v 1.2 2001/09/30 20:52:41 manu Exp   
  */
 
 #if defined(_KERNEL_OPT)
@@ -22,6 +22,7 @@
 #include <compat/linux/common/linux_siginfo.h>
 #include <compat/linux/common/linux_machdep.h>
 #include <compat/linux/common/linux_mmap.h>
+#include <compat/linux/common/linux_socketcall.h>
 #include <compat/linux/linux_syscallargs.h>
 
 #define        s(type) sizeof(type)
@@ -363,40 +364,40 @@
            sys_nanosleep },                    /* 166 = nanosleep */
        { 4, s(struct linux_sys_mremap_args), 0,
            linux_sys_mremap },                 /* 167 = mremap */
-       { 0, 0, 0,
-           sys_nosys },                        /* 168 = unimplemented accept */
-       { 0, 0, 0,
-           sys_nosys },                        /* 169 = unimplemented bind */
-       { 0, 0, 0,
-           sys_nosys },                        /* 170 = unimplemented connect */
-       { 0, 0, 0,
-           sys_nosys },                        /* 171 = unimplemented getpeername */
-       { 0, 0, 0,
-           sys_nosys },                        /* 172 = unimplemented getsockname */
-       { 0, 0, 0,
-           sys_nosys },                        /* 173 = unimplemented getsockopt */
-       { 0, 0, 0,
-           sys_nosys },                        /* 174 = unimplemented listen */
-       { 0, 0, 0,
-           sys_nosys },                        /* 175 = unimplemented recv */
+       { 3, s(struct linux_sys_accept_args), 0,
+           linux_sys_accept },                 /* 168 = accept */
+       { 3, s(struct linux_sys_bind_args), 0,
+           linux_sys_bind },                   /* 169 = bind */
+       { 3, s(struct linux_sys_connect_args), 0,
+           linux_sys_connect },                /* 170 = connect */
+       { 3, s(struct linux_sys_getpeername_args), 0,
+           linux_sys_getpeername },            /* 171 = getpeername */
+       { 3, s(struct linux_sys_getsockname_args), 0,
+           linux_sys_getsockname },            /* 172 = getsockname */
+       { 5, s(struct linux_sys_getsockopt_args), 0,
+           linux_sys_getsockopt },             /* 173 = getsockopt */
+       { 2, s(struct sys_listen_args), 0,
+           sys_listen },                       /* 174 = listen */
+       { 4, s(struct linux_sys_recv_args), 0,
+           linux_sys_recv },                   /* 175 = recv */
+       { 6, s(struct linux_sys_recvfrom_args), 0,
+           linux_sys_recvfrom },               /* 176 = recvfrom */
+       { 3, s(struct linux_sys_recvmsg_args), 0,
+           linux_sys_recvmsg },                /* 177 = recvmsg */
+       { 4, s(struct linux_sys_send_args), 0,
+           linux_sys_send },                   /* 178 = send */
+       { 3, s(struct linux_sys_sendmsg_args), 0,
+           linux_sys_sendmsg },                /* 179 = sendmsg */
+       { 6, s(struct linux_sys_sendto_args), 0,
+           linux_sys_sendto },                 /* 180 = sendto */
+       { 5, s(struct linux_sys_setsockopt_args), 0,
+           linux_sys_setsockopt },             /* 181 = setsockopt */
        { 0, 0, 0,
-           sys_nosys },                        /* 176 = unimplemented recvfrom */
-       { 0, 0, 0,
-           sys_nosys },                        /* 177 = unimplemented recvmsg */
-       { 0, 0, 0,
-           sys_nosys },                        /* 178 = unimplemented send */
-       { 0, 0, 0,
-           sys_nosys },                        /* 179 = unimplemented sendmsg */
-       { 0, 0, 0,
-           sys_nosys },                        /* 180 = unimplemented sendto */
-       { 0, 0, 0,
-           sys_nosys },                        /* 181 = unimplemented setsockopt */
-       { 0, 0, 0,
-           sys_nosys },                        /* 182 = unimplemented shudown */
-       { 0, 0, 0,
-           sys_nosys },                        /* 183 = unimplemented socket */
-       { 0, 0, 0,
-           sys_nosys },                        /* 184 = unimplemented socketpair */
+           sys_nosys },                        /* 182 = unimplemented shutdown */
+       { 3, s(struct linux_sys_socket_args), 0,
+           linux_sys_socket },                 /* 183 = socket */
+       { 4, s(struct linux_sys_socketpair_args), 0,
+           linux_sys_socketpair },             /* 184 = socketpair */
        { 3, s(struct linux_sys_setresuid_args), 0,
            linux_sys_setresuid },              /* 185 = setresuid */
        { 3, s(struct linux_sys_getresuid_args), 0,
diff -r 198d5b6273a0 -r 1d437e53c33f sys/compat/linux/arch/mips/linux_types.h
--- a/sys/compat/linux/arch/mips/linux_types.h  Sat Oct 06 13:32:18 2001 +0000
+++ b/sys/compat/linux/arch/mips/linux_types.h  Sat Oct 06 13:32:58 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: linux_types.h,v 1.3 2001/09/22 21:15:18 manu Exp $ */
+/*     $NetBSD: linux_types.h,v 1.4 2001/10/06 13:32:59 manu Exp $ */
 
 /*-
  * Copyright (c) 1995, 1998, 2001 The NetBSD Foundation, Inc.
@@ -167,7 +167,7 @@
        unsigned long   lreserved0;
        linux_time_t    lst_mtime;
        unsigned long   lreserved1;
-       linux_time_t     lst_ctime;
+       linux_time_t    lst_ctime;
        unsigned long   lreserved2;
        unsigned long   lst_blksize;
        long long       lst_blocks;
diff -r 198d5b6273a0 -r 1d437e53c33f sys/compat/linux/arch/mips/syscalls.master
--- a/sys/compat/linux/arch/mips/syscalls.master        Sat Oct 06 13:32:18 2001 +0000
+++ b/sys/compat/linux/arch/mips/syscalls.master        Sat Oct 06 13:32:58 2001 +0000
@@ -1,4 +1,4 @@
-       $NetBSD: syscalls.master,v 1.2 2001/09/30 20:52:41 manu Exp $  
+       $NetBSD: syscalls.master,v 1.3 2001/10/06 13:32:59 manu Exp $  
 
 ;      @(#)syscalls.master     8.1 (Berkeley) 7/19/93
 



Home | Main Index | Thread Index | Old Index