From nobody  Tue Dec 29 02:14:15 1998
Received: (from nobody@localhost)
          by hub.freebsd.org (8.8.8/8.8.8) id CAA14975;
          Tue, 29 Dec 1998 02:14:15 -0800 (PST)
          (envelope-from nobody)
Message-Id: <199812291014.CAA14975@hub.freebsd.org>
Date: Tue, 29 Dec 1998 02:14:15 -0800 (PST)
From: marcel@scc.nl
To: freebsd-gnats-submit@freebsd.org
Subject: linux emu: socketcall: missing sendmsg and recvmsg support (PATCHES :-)
X-Send-Pr-Version: www-1.0

>Number:         9232
>Category:       i386
>Synopsis:       linux emu: socketcall: missing sendmsg and recvmsg support (PATCHES :-)
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    sos
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Dec 29 02:20:02 PST 1998
>Closed-Date:    Wed Dec 30 13:29:03 PST 1998
>Last-Modified:  Wed Dec 30 13:30:17 PST 1998
>Originator:     Marcel Moolenaar
>Release:        -current
>Organization:
SCC vof
>Environment:
FreeBSD scones.sup.scc.nl 3.0-CURRENT FreeBSD 3.0-CURRENT #0: Tue Dec 22 12:17:33 CET 1998     marcel@scones.sup.scc.nl:/usr/src/sys/compile/SCONES  i386

>Description:
The socketcall function in the linux emulator does not have support for
the sendmsg and recvmsg functions.

>How-To-Repeat:
n/a
>Fix:
Apply the following patches:

\begin{verbatim}
*** linux.h.orig        Mon Dec 28 21:11:36 1998
--- linux.h     Mon Dec 28 21:10:14 1998
***************
*** 472,477 ****
--- 472,479 ----
  #define LINUX_SHUTDOWN                13
  #define LINUX_SETSOCKOPT      14
  #define LINUX_GETSOCKOPT      15
+ #define LINUX_SENDMSG           16
+ #define LINUX_RECVMSG           17
  
  #define LINUX_AF_UNSPEC               0
  #define LINUX_AF_UNIX         1
\end{verbatim}

\begin{verbatim}
*** linux_socket.c.orig Mon Dec 28 21:25:16 1998
--- linux_socket.c      Mon Dec 28 21:29:08 1998
***************
*** 810,815 ****
--- 810,819 ----
        return linux_setsockopt(p, args->args);
      case LINUX_GETSOCKOPT:
        return linux_getsockopt(p, args->args);
+     case LINUX_SENDMSG:
+       return sendmsg(p, args->args);
+     case LINUX_RECVMSG:
+       return recvmsg(p, args->args);
      default:
        uprintf("LINUX: 'socket' typ=%d not implemented\n", args->what);
        return ENOSYS;
\end{verbatim}

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: sos 
State-Changed-When: Wed Dec 30 13:29:03 PST 1998 
State-Changed-Why:  
Patch committed. 


Responsible-Changed-From-To: freebsd-bugs->sos 
Responsible-Changed-By: sos 
Responsible-Changed-When: Wed Dec 30 13:29:03 PST 1998 
Responsible-Changed-Why:  
I'm the linuxulator guy. 
>Unformatted:
