RTTY Program
The following is an extract from the RTTY source code mentioned on page 87, explaining the
command usage. RTTY is provided on a limited-support basis for our customers, when used
with the PortServer and other Digi network products.
/**********************************************************
* NAME
* rtty - Connect a tty to a remote TCP port.
*
* SYNOPSIS
* rtty [-dhw] tty host port
*
*
DESCRIPTION
*
rtty attaches the master side of a named pseudo tty
*
to a TCP session.
*
*
This is most often useful to allow a TCP terminal server
*
port to appear as a local tty on some host computer.
*
*
-[0-9]
Wait for data to be written to the slave side of
*
the pseudo tty before opening the connection;
*
open the connection and sleep the given number
*
seconds [0-9] before writing the data to the port.
*
*
-d
Daemonize.
*
to perform the program function, ignoring all
*
signals.
*
*
-h
Hold the tty open so "stty" settings are not
*
disrupted and EOF's are not sent when the tty
*
is locally closed.
*
*
-q
Quit after one session is complete.
*
program loops to handle multiple sessions.
*
*
-s
Suppress the copyright notice.
*
*
-w
Wait for data to be written to the tty port before
*
executing the rsh command.
*
*
-x
Output debugging information.
*
twice produces even more output.
*
*
*
To associate "ttypf" with the dedicated printer device
*
connected to (PortServer) node ncx, port 4.
*
*
rtty -dh ttypf ncx 2104
*
*
To associate "ttysf" with a dial-in/dial-out (type mio)
*
modem attached to (PortServer) node dbps port 13.
*
*
rtty -1d ttysf dbps 2113
*/
static char *copyright[] =
{
"@(#)Copyright 1992, Digi International, All Rights Reserved.",
"@(#)An unlimited use and distribution license is granted for use with,",
A detached child process is spawned
Specifying "x"
Normally the
PortServer Terminal Server Ÿ Page 89