RCSid[]="$Header: /Nfs/heaton/glob/src/etc/x25d/src/RCS/README,v 1.13 1991/01/22 11:56:57 pb Exp $";

******************************* Beware *******************************
** This has code to use unreleased SunNet PinkBook code -- it MIGHT **
** cause problems -- if so, please mail pb@uk.ac.cam.cl ASAP.       **
**********************************************************************


This directory contains replacements for the SUN supplied x29 and ybts.inetd
programs (which listen for incoming terminal, FTP and MAIL X.25 calls).

They are intended to be upwards compatible, but I have found it quite hard to
find the spec of the SUN versions.

It has been extended to listen on multiple addresses (or subaddress) and
multiple networks and re-reads the auth file when necessary.

I have extended the format of the auth file by adding an extra colon
separated field which is a string for getopts(3).
This allows full regexp(3) [Bell V8] syntax, arguments to the called
programs, selective reverse charge calling (if/when sun fix the
facilities bug), selection by called DTE (crude at the moment, better
when I can read the called DTE!), can set the user and group of the
process, can relay calls on to TCP hosts (using x25r) and can act as an
X29/TS29 -> telnet gateway.

This means that a wide variety of gatewaying facilities can be provided
simply by using the auth file, e.g. destination selection by called
subaddress, by called YBTS string or CUDF.

But the main driving force for this is that it WORKS.


x29d tries to ask the kernel to tell it when the the tty structures
change due to ioctl calls.
If it fail, it has to leave the connection in native mode (i.e. no echo,
small timeout).

With an unmodified kernel, it uses the approach SUN is thought to use
in order to supress double echoing when in message mode, i.e. notice
that n characters have just been sent to the TTY, so discard the next n
characters output by the TTY (as they will be the echo).
[ this is still under development/test ]

An alternative is some mods to the tty_pty.o code by wja@uk.ac.nott.cs
which allow the terminal to run in half duplex mode, i.e. the stty
struct says it is in echo mode, but the tty code does not echo.
This is provided as a binary (sigh) and as source diff for those who can
make use of it.


There is also a TRIVIAL built-in pseudo-telnet relay function (saving a
process) but this needs some work on it -- if anyone understands telnet,
please let me know & explain what I have to do to keep the other end
happy.

More normally, x29d should run on the remote host, and x29d should exec x25r
to relay the X.25 packets over TCP.
The remote (TCP only) clients should have x29d invoked by inetd, e.g.
spad-secure stream tcp  nowait  /usr/etc/x29d   in.x29d -I
