Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 16 Mar 95 10:29:38 MST
From:      terry@cs.weber.edu (Terry Lambert)
To:        peter@bonkers.taronga.com (Peter da Silva)
Cc:        hackers@FreeBSD.org
Subject:   Re: diskless and 3Com 509
Message-ID:  <9503161729.AA23582@cs.weber.edu>
In-Reply-To: <199503161339.HAA26203@bonkers.taronga.com> from "Peter da Silva" at Mar 16, 95 07:39:30 am

next in thread | previous in thread | raw e-mail | index | archive | help
> I've seen a lot of criticism of BSD-derived telnets because you can't use
> them for Q&D smtp or nntp information snarfing because they exit on EOF.
> Apparently USG-derived ones wait for the other end to shut down if stdin
> is a plain file. I'd like some inputs on the pros and cons of copying the
> USG behaviour in this case.

The main *valid* criticism of BSD telnets is the hack for option
negotiation order used to determine which version of TCP/IP the
telnetd is running to determine if the length byte on OOB data
is going to be valid or not, and thus whether OOB transmissions
should be used at all.

This is basically the result of a bug in the TCP/IP implementation
that was corrected between 4.2 and 4.3.


The criticism you are leveling is one of whether the telnetd waits
for its output queue to flush before exiting when the pty master
it is talking to has the last close on the pty slave take place.


I submit that this does not work in most implementation of TCP/IP
for System V -- it certainly does *NOT* work on Solaris or SunOS,
although it *does* work on UnixWare, as was found out when the
NetWare printer interfaces were ported to all three as part of the
NetWare for UNIX 4.x product.

The failure is in the connection wind down code.  The documentation
says that SunOS and Solaris support disconnect notification in the
Streams implementation of TLI, when in fact they pretend to but do
not actually do anything.

I don't believe that BSD supports this in the socket abstraction at
all, since there is not a distinction between "close" and "close"
as there is between "t_close" and "t_disconnect".

Unless you go off and implement "SO_RUNDOWN" or some other socket
option to change the close behaviour, I suspect that you will
find yourself rewriting TLI (I guess we could use a nice TLI
implementation, but it's a lot of work on your part).  Even then,
you will have to explicitly set this option in the telnetd.


					Terry Lambert
					terry@cs.weber.edu
---
Any opinions in this posting are my own and not those of my present
or previous employers.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?9503161729.AA23582>