Actually merge OpenBSD changes and local changes (a diff should

be viewed relative to revision 1.24).
This commit is contained in:
Ruslan Ermilov 2006-08-31 16:26:50 +00:00
parent b92c93f2e9
commit a9f118adfd

View File

@ -31,7 +31,7 @@
.\" @(#)tip.1 8.4 (Berkeley) 4/18/94 .\" @(#)tip.1 8.4 (Berkeley) 4/18/94
.\" $FreeBSD$ .\" $FreeBSD$
.\" .\"
.Dd September 9, 2001 .Dd August 31, 2006
.Dt TIP 1 .Dt TIP 1
.Os .Os
.Sh NAME .Sh NAME
@ -43,14 +43,16 @@
.Op Fl Ar speed .Op Fl Ar speed
.Op Ar system-name .Op Ar system-name
.Sh DESCRIPTION .Sh DESCRIPTION
The
.Nm .Nm
utility
establishes a full-duplex connection to another machine, giving the establishes a full-duplex connection to another machine, giving the
appearance of being logged in directly on the remote CPU. appearance of being logged in directly on the remote CPU.
It goes without saying that you must have a login on the machine (or It goes without saying that you must have a login on the machine (or
equivalent) to which you wish to connect. equivalent) to which you wish to connect.
.Pp .Pp
The options are as follows: The options are as follows:
.Bl -tag -width 4n .Bl -tag -width indent
.It Fl n .It Fl n
No escape (disable tilde). No escape (disable tilde).
.It Fl v .It Fl v
@ -78,14 +80,17 @@ is specified but
.Ar system-name .Ar system-name
is not, is not,
.Ar system-name .Ar system-name
will be set to a value of 'tip' with will be set to a value of
.Dq Li tip
with
.Ar speed .Ar speed
appended. appended.
For example, For example,
.Ic tip -1200 .Nm Fl 1200
will set will set
.Ar system-name .Ar system-name
to 'tip1200'. to
.Dq Li tip1200 .
.Pp .Pp
Typed characters are normally transmitted directly to the remote Typed characters are normally transmitted directly to the remote
machine (which does the echoing as well). machine (which does the echoing as well).
@ -93,7 +98,7 @@ A tilde
.Pq Ql ~ .Pq Ql ~
appearing as the first character of a line is an escape signal; the appearing as the first character of a line is an escape signal; the
following are recognized: following are recognized:
.Bl -tag -offset indent -width Fl .Bl -tag -width indent
.It Ic ~^D No or Ic ~. .It Ic ~^D No or Ic ~.
Drop the connection and exit. Drop the connection and exit.
Only the connection is dropped \(en the login session is not terminated. Only the connection is dropped \(en the login session is not terminated.
@ -104,13 +109,17 @@ Change directory to
.It Ic ~! .It Ic ~!
Escape to a shell (exiting the shell will return to Escape to a shell (exiting the shell will return to
.Nm ) . .Nm ) .
.It Ic ~\*(Gt .It Ic ~>
Copy file from local to remote. Copy file from local to remote.
The
.Nm .Nm
utility
prompts for the name of a local file to transmit. prompts for the name of a local file to transmit.
.It Ic ~\*(Lt .It Ic ~<
Copy file from remote to local. Copy file from remote to local.
The
.Nm .Nm
utility
prompts first for the name of the file to be sent, then for a command prompts first for the name of the file to be sent, then for a command
to be executed on the remote machine. to be executed on the remote machine.
.It Ic ~p Ar from Op Ar to .It Ic ~p Ar from Op Ar to
@ -121,21 +130,20 @@ This command causes the remote
.Ux .Ux
system to run the following command string, system to run the following command string,
sending it the sending it the
.Sq from .Ar from
file: file:
.Bd -literal -offset indent .Pp
stty -echo; cat \*(Gt 'to'; stty echo .Dl "stty -echo; cat > 'to'; stty echo"
.Ed
.Pp .Pp
If the If the
.Sq to .Ar to
file isn't specified, the file is not specified, the
.Sq from .Ar from
file name is used. file name is used.
This command is actually a This command is actually a
.Ux .Ux
specific version of the specific version of the
.Ic ~\*(Gt .Ic ~>
command. command.
.It Ic ~t Ar from Op Ar to .It Ic ~t Ar from Op Ar to
Take a file from a remote Take a file from a remote
@ -144,16 +152,15 @@ host.
As in the As in the
.Ic ~p .Ic ~p
command, the command, the
.Sq to .Ar to
file defaults to the file defaults to the
.Sq from .Ar from
file name if it isn't specified. file name if it is not specified.
The remote host executes the following command string The remote host executes the following command string
to send the file to to send the file to
.Nm : .Nm :
.Bd -literal -offset indent .Pp
cat 'from'; echo '' | tr '\e012' '\e01' .Dl "cat 'from'; echo '' | tr '\e012' '\e01'"
.Ed
.It Ic ~| .It Ic ~|
Pipe the output from a remote command to a local Pipe the output from a remote command to a local
.Ux .Ux
@ -170,22 +177,24 @@ The command string sent to the local
system is processed by the shell. system is processed by the shell.
.It Ic ~C .It Ic ~C
Fork a child process on the local system to perform special protocols Fork a child process on the local system to perform special protocols
such as \s-1XMODEM\s+1. such as
.Tn XMODEM .
The child program will be run with the following arrangement of The child program will be run with the following arrangement of
file descriptors: file descriptors:
.Bd -literal -offset indent .Bd -literal -offset indent
0 \*(Lt-\*(Gt remote tty in 0 <-> remote tty in
1 \*(Lt-\*(Gt remote tty out 1 <-> remote tty out
2 \*(Lt-\*(Gt local tty stderr 2 <-> local tty stderr
.Ed .Ed
.It Ic ~# .It Ic ~#
Send a Send a
.Dv BREAK .Dv BREAK
to the remote system. to the remote system.
For systems which don't support the necessary For systems which do not support the necessary
.Fn ioctl .Fn ioctl
call, the break is simulated by a sequence of line speed changes and call, the break is simulated by a sequence of line speed changes and
DEL characters. .Dv DEL
characters.
.It Ic ~s .It Ic ~s
Set a variable (see the discussion below). Set a variable (see the discussion below).
.It Ic ~v .It Ic ~v
@ -196,11 +205,11 @@ Stop
(only available with job control). (only available with job control).
.It Ic ~^Y .It Ic ~^Y
Stop only the Stop only the
.Dq local side .Dq "local side"
of of
.Nm .Nm
(only available with job control); the (only available with job control); the
.Dq remote side .Dq "remote side"
of of
.Nm , .Nm ,
the side that displays output from the remote host, is left running. the side that displays output from the remote host, is left running.
@ -214,7 +223,7 @@ of
.Nm .Nm
searches for a system description with a name identical to searches for a system description with a name identical to
.Ar system-name . .Ar system-name .
The search order is The search order is as follows:
.Bl -enum -offset indent .Bl -enum -offset indent
.It .It
If the environment variable If the environment variable
@ -243,18 +252,18 @@ See
for full documentation on system descriptions. for full documentation on system descriptions.
.Pp .Pp
The The
.Ar br .Va br
capability is used in system descriptions to specify the baud rate capability is used in system descriptions to specify the baud rate
with which to establish a connection. with which to establish a connection.
If the value specified is not suitable, the baud rate to be used may If the value specified is not suitable, the baud rate to be used may
be given on the command line, e.g.\& be given on the command line, e.g.\&
.Ql tip -300 mds . .Dq Li "tip -300 mds" .
.Pp .Pp
When When
.Nm .Nm
establishes a connection, it sends out the connection message establishes a connection, it sends out the connection message
specified in the specified in the
.Ar cm .Va cm
capability of the system description being used. capability of the system description being used.
.Pp .Pp
When When
@ -264,69 +273,75 @@ line typed may be edited with the standard erase and kill characters.
A null line in response to a prompt, or an interrupt, will abort the A null line in response to a prompt, or an interrupt, will abort the
dialogue and return the user to the remote machine. dialogue and return the user to the remote machine.
.Pp .Pp
The
.Nm .Nm
utility
guards against multiple users connecting to a remote system by opening guards against multiple users connecting to a remote system by opening
modems and terminal lines with exclusive access, and by honoring the modems and terminal lines with exclusive access, and by honoring the
locking protocol used by locking protocol used by
.Xr uucico . .Xr uucico 8 Pq Pa ports/net/freebsd-uucp .
.Pp .Pp
During file transfers During file transfers
.Nm .Nm
provides a running count of the number of lines transferred. provides a running count of the number of lines transferred.
When using the When using the
.Ic ~\*(Gt .Ic ~>
and and
.Ic ~\*(Lt .Ic ~<
commands, the commands, the
.Dq eofread .Va eofread
and and
.Dq eofwrite .Va eofwrite
variables are used to recognize end-of-file when reading, and specify variables are used to recognize end-of-file when reading, and specify
end-of-file when writing (see below). end-of-file when writing (see below).
File transfers normally depend on hardwareflow or tandem mode for flow control. File transfers normally depend on hardwareflow or tandem mode for flow control.
If the remote system does not support hardwareflow or tandem mode, If the remote system does not support hardwareflow or tandem mode,
.Dq echocheck .Va echocheck
may be set to indicate may be set to indicate that
.Nm .Nm
should synchronize with the remote system on the echo of each should synchronize with the remote system on the echo of each
transmitted character. transmitted character.
.Pp .Pp
When When
.Nm .Nm
must dial a phone number to connect to a system it will print various must dial a phone number to connect to a system, it will print various
messages indicating its actions. messages indicating its actions.
The
.Nm .Nm
utility
supports a variety of auto-call units and modems with the supports a variety of auto-call units and modems with the
.Ar at .Va at
capability in system descriptions. capability in system descriptions.
.Pp .Pp
Support for Ventel 212+ (ventel), Hayes AT-style (hayes), Support for Ventel 212+ (ventel), Hayes AT-style (hayes),
USRobotics Courier (courier), Telebit T3000 (t3000) and USRobotics Courier (courier), Telebit T3000 (t3000) and
Racal-Vadic 831 (vadic) units is enabled by default. Racal-Vadic 831 (vadic) units is enabled by default.
.Pp .Pp
Support for Bizcomp 1031[fw] (biz31[fw]), Bizcomp 1022[fw] Support for Bizcomp 1031[fw] (biz31[fw]), Bizcomp 1022[fw]
(biz22[fw]), DEC DF0[23]-AC (df0[23]), DEC DN-11 (dn11) and (biz22[fw]), DEC DF0[23]-AC (df0[23]), DEC DN-11 (dn11) and
Racal-Vadic 3451 (v3451) units can be added by recompiling Racal-Vadic 3451 (v3451) units can be added by recompiling
.Nm tip .Nm
with the appropriate defines. with the appropriate defines.
.Pp .Pp
Note that if support for both the Racal-Vadic 831 and 3451 is enabled Note that if support for both the Racal-Vadic 831 and 3451 is enabled,
they are referred to as the v831 and v3451 respectively. they are referred to as the v831 and v3451, respectively.
If only one of the two is supported, it is referred to as vadic. If only one of the two is supported, it is referred to as vadic.
.Ss VARIABLES .Ss Variables
The
.Nm .Nm
utility
maintains a set of variables which control its operation. maintains a set of variables which control its operation.
Some of these variables are read-only to normal users (root is allowed Some of these variables are read-only to normal users (root is allowed
to change anything of interest). to change anything of interest).
Variables may be displayed and set through the Variables may be displayed and set through the
.Sq s .Ic ~s
escape. escape.
The syntax for variables is patterned after The syntax for variables is patterned after
.Xr vi 1 .Xr vi 1
and and
.Xr Mail 1 . .Xr Mail 1 .
Supplying Supplying
.Dq all .Dq Li all
as an argument to the set command displays all variables readable by as an argument to the set command displays all variables readable by
the user. the user.
Alternatively, the user may request display of a particular variable Alternatively, the user may request display of a particular variable
@ -334,7 +349,7 @@ by attaching a
.Ql \&? .Ql \&?
to the end. to the end.
For example, For example,
.Dq escape? .Dq Li escape?
displays the current escape character. displays the current escape character.
.Pp .Pp
Variables are numeric, string, character, or boolean values. Variables are numeric, string, character, or boolean values.
@ -350,7 +365,7 @@ A single set command may be used to interrogate as well as set a
number of variables. number of variables.
Variables may be initialized at run time by placing set commands Variables may be initialized at run time by placing set commands
(without the (without the
.Ql ~s .Ic ~s
prefix) in the initialization file prefix) in the initialization file
.Pa ~/.tiprc ; .Pa ~/.tiprc ;
the the
@ -361,154 +376,178 @@ to display the sets as they are made.
Certain common variables have abbreviations. Certain common variables have abbreviations.
The following is a list of common variables, their abbreviations, and The following is a list of common variables, their abbreviations, and
their default values: their default values:
.Bl -tag -width Ar .Bl -tag -width indent
.It Ar baudrate .It Va baudrate
(num) The baud rate at which the connection was established; .Pq Vt num
The baud rate at which the connection was established;
abbreviated abbreviated
.Ar ba . .Va ba .
.It Ar beautify .It Va beautify
(bool) Discard unprintable characters when a session is being .Pq Vt bool
Discard unprintable characters when a session is being
scripted; abbreviated scripted; abbreviated
.Ar be . .Va be .
.It Ar dialtimeout .It Va dialtimeout
(num) When dialing a phone number, the time (in seconds) to wait for a .Pq Vt num
When dialing a phone number, the time (in seconds) to wait for a
connection to be established; abbreviated connection to be established; abbreviated
.Ar dial . .Va dial .
.It Ar echocheck .It Va echocheck
(bool) Synchronize with the remote host during file transfer by .Pq Vt bool
Synchronize with the remote host during file transfer by
waiting for the echo of the last character transmitted; default is waiting for the echo of the last character transmitted; default is
.Ar off . .Cm off .
.It Ar eofread .It Va eofread
(str) The set of characters which signify an end-of-transmission .Pq Vt str
The set of characters which signify an end-of-transmission
during a during a
.Ic ~\*(Lt .Ic ~<
file transfer command; abbreviated file transfer command; abbreviated
.Ar eofr . .Va eofr .
.It Ar eofwrite .It Va eofwrite
(str) The string sent to indicate end-of-transmission during a .Pq Vt str
.Ic ~\*(Gt The string sent to indicate end-of-transmission during a
.Ic ~>
file transfer command; abbreviated file transfer command; abbreviated
.Ar eofw . .Va eofw .
.It Ar eol .It Va eol
(str) The set of characters which indicate an end-of-line. .Pq Vt str
The set of characters which indicate an end-of-line.
The
.Nm .Nm
utility
will recognize escape characters only after an end-of-line. will recognize escape characters only after an end-of-line.
.It Ar escape .It Va escape
(char) The command prefix (escape) character; abbreviated .Pq Vt char
.Ar es ; The command prefix (escape) character; abbreviated
.Va es ;
default value is default value is
.Ql ~ . .Ql ~ .
.It Ar exceptions .It Va exceptions
(str) The set of characters which should not be discarded due to the .Pq Vt str
The set of characters which should not be discarded due to the
beautification switch; abbreviated beautification switch; abbreviated
.Ar ex ; .Va ex ;
default value is default value is
.Dq \et\en\ef\eb . .Dq Li \et\en\ef\eb .
.It Ar force .It Va force
(char) The character used to force literal data transmission; .Pq Vt char
The character used to force literal data transmission;
abbreviated abbreviated
.Ar fo ; .Va fo ;
default value is default value is
.Ql ^P . .Ql ^P .
.It Ar framesize .It Va framesize
(num) The amount of data (in bytes) to buffer between filesystem .Pq Vt num
The amount of data (in bytes) to buffer between file system
writes when receiving files; abbreviated writes when receiving files; abbreviated
.Ar fr . .Va fr .
.It Ar hardwareflow .It Va hardwareflow
(bool) Whether hardware flow control (CRTSCTS) is enabled for the .Pq Vt bool
Whether hardware flow control (CRTSCTS) is enabled for the
connection; abbreviated connection; abbreviated
.Ar hf ; .Va hf ;
default value is default value is
.Ql off . .Cm off .
.It Ar host .It Va host
(str) The name of the host to which you are connected; abbreviated .Pq Vt str
.Ar ho . The name of the host to which you are connected; abbreviated
.It Ar linedisc .Va ho .
(num) The line discipline to use; abbreviated .It Va linedisc
.Ar ld . .Pq Vt num
.It Ar prompt The line discipline to use; abbreviated
(char) The character which indicates an end-of-line on the remote .Va ld .
.It Va prompt
.Pq Vt char
The character which indicates an end-of-line on the remote
host; abbreviated host; abbreviated
.Ar pr ; .Va pr ;
default value is default value is
.Ql \en . .Ql \en .
This value is used to synchronize during data transfers. This value is used to synchronize during data transfers.
The count of lines transferred during a file transfer command is based The count of lines transferred during a file transfer command is based
on receipt of this character. on receipt of this character.
.It Ar raise .It Va raise
(bool) Upper case mapping mode; abbreviated .Pq Vt bool
.Ar ra ; Upper case mapping mode; abbreviated
.Va ra ;
default value is default value is
.Ar off . .Cm off .
When this mode is enabled, all lowercase letters will be mapped to When this mode is enabled, all lowercase letters will be mapped to
uppercase by uppercase by
.Nm .Nm
for transmission to the remote machine. for transmission to the remote machine.
.It Ar raisechar .It Va raisechar
(char) The input character used to toggle uppercase mapping mode; .Pq Vt char
The input character used to toggle uppercase mapping mode;
abbreviated abbreviated
.Ar rc ; .Va rc ;
default value is default value is
.Ql ^A . .Ql ^A .
.It Ar record .It Va record
(str) The name of the file in which a session script is recorded; .Pq Vt str
The name of the file in which a session script is recorded;
abbreviated abbreviated
.Ar rec ; .Va rec ;
default value is default value is
.Dq tip.record . .Pa tip.record .
.It Ar script .It Va script
(bool) Session scripting mode; abbreviated .Pq Vt bool
.Ar sc ; Session scripting mode; abbreviated
.Va sc ;
default is default is
.Ar off . .Cm off .
When When
.Ar script .Va script
is is
.Li true , .Cm true ,
.Nm .Nm
will record everything transmitted by the remote machine in the script will record everything transmitted by the remote machine in the script
record file specified in record file specified in
.Ar record . .Va record .
If the If the
.Ar beautify .Va beautify
switch is on, only printable switch is on, only printable
.Tn ASCII .Tn ASCII
characters will be included in the script file (those characters characters will be included in the script file (those characters
between 040 and 0177). between 040 and 0177).
The variable The variable
.Ar exceptions .Va exceptions
is used to indicate characters which are an exception to the normal is used to indicate characters which are an exception to the normal
beautification rules. beautification rules.
.It Ar tabexpand .It Va tabexpand
(bool) Expand tabs to spaces during file transfers; abbreviated .Pq Vt bool
.Ar tab ; Expand tabs to spaces during file transfers; abbreviated
.Va tab ;
default value is default value is
.Ar false . .Cm false .
Each tab is expanded to 8 spaces. Each tab is expanded to 8 spaces.
.It Ar tandem .It Va tandem
(bool) Use XON/XOFF flow control to throttle data from the remote host; .Pq Vt bool
Use XON/XOFF flow control to throttle data from the remote host;
abbreviated abbreviated
.Ar ta . .Va ta .
The default value is The default value is
.Ar true .Cm true
unless the unless the
.Ar nt .Va nt
capability has been specified in capability has been specified in
.Pa /etc/remote , .Pa /etc/remote ,
in which case the default value is in which case the default value is
.Ar false . .Cm false .
.It Ar verbose .It Va verbose
(bool) Verbose mode; abbreviated .Pq Vt bool
.Ar verb ; Verbose mode; abbreviated
.Va verb ;
default is default is
.Ar true . .Cm true .
When verbose mode is enabled, When verbose mode is enabled,
.Nm .Nm
prints messages while dialing, shows the current number of lines prints messages while dialing, shows the current number of lines
transferred during a file transfer operations, and more. transferred during a file transfer operations, and more.
.El .El
.Sh ENVIRONMENT .Sh ENVIRONMENT
.Bl -tag -width Fl .Bl -tag -width indent
.It Ev HOME .It Ev HOME
The home directory to use for the The home directory to use for the
.Ic ~c .Ic ~c
@ -527,12 +566,12 @@ A system description, or an absolute path to a
system description database. system description database.
.It Ev SHELL .It Ev SHELL
The name of the shell to use for the The name of the shell to use for the
.Ic ~!\& .Ic ~!
command; default value is command; default value is
.Dq /bin/sh . .Dq Li /bin/sh .
.El .El
.Sh FILES .Sh FILES
.Bl -tag -width "/var/spool/lock/LCK..*" -compact .Bl -tag -width ".Pa /var/spool/lock/LCK..*" -compact
.It Pa ~/.tiprc .It Pa ~/.tiprc
initialization file initialization file
.It Pa tip.record .It Pa tip.record
@ -549,7 +588,7 @@ database
line access log line access log
.It Pa /var/spool/lock/LCK..* .It Pa /var/spool/lock/LCK..*
lock file to avoid conflicts with lock file to avoid conflicts with
.Xr uucp .Xr uucp 1 Pq Pa ports/net/freebsd-uucp
.El .El
.Sh SEE ALSO .Sh SEE ALSO
.Xr cu 1 , .Xr cu 1 ,