rlogin -8 uses RAW rather than CBREAK mode

Barry Margolin barmar at think.com
Sat Dec 22 05:59:59 AEST 1990


In article <88236 at lll-winken.LLNL.GOV> casey at gauss.llnl.gov (Casey Leedom) writes:
>  "-8" is used to implement an 8-bit transparent link.  

The documentation (on a MORE/4.3 system and a Sun) just says 8-bit; it says
nothing about transparency.

>							 Allowing START
>and STOP character processing would defeat that purpose.  I use "-8" to
>rlogin over from a terminal server and run a remote X server on a Sun
>host for instance.  Normally "-8" should be used with out of band or no
>flow control.

When you start the remote X server, doesn't it put the terminal in raw
mode?  That will cause rlogind to send the TIOC_NOSTOP command to rlogin,
which will cause it to disable the start and stop character processing.  At
this point you will have an 8-bit, transparent data path to the terminal.
Why would the purpose be defeated?

Actually, one possibility that has just occurred to me is that some people
might rlogin to a non-Unix host that doesn't actually have commands to
enable/disable flow control.  In fact, I once implemented an rlogin server
for such a host.  The right thing is for the server to send an immediate
TIOC_NOSTOP when the connection is first opened, since it's the one that
wants the transparent path.  Instead, this was put into the rlogin command
by overloading the -8 option.  If it must be in rlogin, it would probably
be better to have a separate -raw option.

>  It sounds like you have an application that generally wants to use
>8-bits, but doesn't care if some STOP and some START characters are
>sucked out of the data stream, and you don't have out of band flow
>control capability, and you need some form of flow control.

Yes.  I noticed this when using SunLink X.25.  We have a Sun that is
connected to all our dialup modems and an X.25 public network.  After
prompting for the user name and password it prompts for a host and executes
"rlogin -8 <host>"; we use -8 because some of our users have terminals with
meta keys that simply turn on the high-order bit, and Emacs recognizes this
use.  The X.25/X.29 protocol includes a mechanism for the host to tell the
PAD to perform XON/XOFF flow control, and I'd like to be able to use that
when the user is not in a raw-mode application such as Emacs
(single-character round-trip time in X.25 is not great).

>  Probably your
>best bet is to implement a "-cbreak" flag ("-c" for dyed in the wool
>single character Unix switch fans) to indicate that while you want LITOUT
>and PASS8, you want it to use CBREAK rather than the more intuitive RAW.

That's probably what I'll do.  I was mostly looking for warnings about
possible side-effects of the behavior that I wasn't aware of, and which
would be broken by such a mode.
--
Barry Margolin, Thinking Machines Corp.

barmar at think.com
{uunet,harvard}!think!barmar



More information about the Comp.bugs.4bsd.ucb-fixes mailing list