RTELNET(8)

NAME
rtelnet - Annex reverse TELNET daemon

SYNOPSIS
rtelnet [ -bdfhmrtD ] annex port device-name

ARGUMENTS

-b  requests that rtelnet negotiate TELNET binary mode when communicating with the Annex. This is for devices like laser printers which use binary data that might be scrambled by TELNET's CR/LF conventions. (See also -t option below.)

-d  turns on socket-level debugging.

-f  enables the connect on the fly mode. The -m switch should also be used with this mode, to ensure that rtelnet will drop the connection when the slave device is not in use.

-h  tells rtelnet to send a reset port RPC to the Annex port when the slave pseudo device is closed. This must be used in conjuction with the -m switch. This uses the same NETADM protocol used by na. This will currently only work on Annexes without an annex_password parameter set.

-m  tells rtelnet to momentarily drop the network connection to the Annex port whenever the slave pseudo device is closed. This causes the Annex to drop DTR, which can be used to cause a dial-out modem to hang up when a program like tip exits.

-r  directs rtelnet to remove the device device-name if it already exists. Without -r, rtelnet will exit with an error message if device-name already exists.

-t  causes rtelnet to use a transparent TCP connection to the indicated Annex. This will cause the connection to be made through Annex ports in the 7000 range, rather than the 5000 range, and no TELNET option negotiation or CR/LF mapping will be used. Use this option to create a fast, completely transparent data path.

-D  turns on verbose debugging output. Rtelnet does not fork off a daemon in this case; instead, it displays TELNET option negotiation and all received data on the terminal where rtelnet was started.

annex
    The hostname or Internet address (in standard Internet dot separated notation) of the Annex.

port
    The serial port number on the Annex.

device-name
    name of psuedo device to create (usually in the /dev directory).

DESCRIPTION
Rtelnet is a modified version of the 4BSD telnetd program. Its purpose is to create a pseudo-tty device that is connected to an Annex serial port. This allows UNIX programs such as tip and uucp to access serial devices attached to Annex ports. Rtelnet works like a telnet daemon program (telnetd) except in a reverse fashion. Instead of accepting telnet connections from other network machines, rtelnet makes telnet connections to Annex ports. Rtelnet creates a new file-like device (in /dev) that programs can open and use like a normal tty.

Normally, rtelnet makes the connection to the Annex immediately. This ties the Annex port to exactly one host. This is useful for dedicated devices. On the otherhand, this will not interact correctly with a port set to the adaptive mode, which would normally be used for a dial-in/dial-out modem. Such a configuration should use the connect on the fly option. In that case, rtelnet will not make the connection immediately, but will instead wait until another process opens the slave device. When that happens, rtelnet will attempt to make the network connection. When the connection is up, data will flow as normal. If the connection cannot be made, rtelnet will try again using an exponential backoff.

Rtelnet should run as-is on any 4BSD-based system. To run on other systems may require some code modification. In particular, some systems name their psuedo-terminals differently. The source code has rudimentary support for some such systems.

Example usage:
    A dial-out modem is attached to port 15 of an Annex named "modem-annex". To enable its use via tip on a 4BSD host:

    1.  Configure port 15 using na to:

                "control_lines: modem_control"
                " mode: slave"

    2.  Start up rtelnet to create the pseudo-device:

                rtelnet -rbm modem-annex 15 /dev/modem1

        Normally, this would be added to the system startup file (/etc/rc).

    3.  Create new system definition in /etc/remote specifying /dev/modem1 as the device.

FILES
/dev/pty[p-s][0-9a-f]	default list of master pseudo-terminals
/dev/tty[p-s][0-9a-f]	default list of slave pseudo-terminals

SEE ALSO
Annex Network Administrator's Guide

DIAGNOSTICS
Messages should be self-explanatory.