Subject: SVR4 emulation and network connections
To: None <port-sparc@netbsd.org>
From: John Ruschmeyer <jruschme@comcast.net>
List: port-sparc
Date: 02/26/2003 10:11:34
A couple of weeks ago, I posted a note regarding problems I was having
with SVR4 emulation and network connections when using a /usr tree
mounted from a box running Solaris 2.5.1.

Basically, I get the following if I try to use the Solaris telnet client
to connect to this (or any) box:

  crobin# /emul/svr4/usr/bin/telnet localhost
  Trying 127.0.0.1...
  Connected to localhost.
  Escape character is '^]'.
  localhost: Invalid argument
  Connection closed by foreign host.
  crobin#

At the time, I wondered if the problem was due to the library version.
However, in doing some research on Google, I found an old post by Mark
Newton from 8/24/98. In that post, he describes some issues with
svr4_sys_putmsg() and svr4_sys_getmsg() and provides a patch that
purports to get most TCP-based services working.

Looking at the 1.6 sources for /usr/src/sys/compat/svr4/svr4_stream.c, I
can see Mark's changes, but they are bounded by '#ifdef notyet' blocks.
If I change the source to enable the code and rebuild the kernel the
resulting kernel definately works "better" (i.e, Solaris telnet will
connect, but with some DNS (presumably UDP) issues which Mark notes in
his original post.

So, a few questions:

1) Anybody know why this code was included, but disabled? Is there a
hidden gotcha?
2) Does *anybody* use Solaris emulation on a Sparc with TCP-based
applications? If so, which ones and what is the trick to getting them to
work?
3) Does this all go away if I use newer Solaris libs?

Thanks...
-- 
John Ruschmeyer <jruschme@comcast.net>