Annotation of src/usr.bin/tip/tip.1, Revision 1.11
1.11 ! millert 1: .\" $OpenBSD: tip.1,v 1.10 2000/12/17 21:33:01 millert Exp $
1.1 deraadt 2: .\" $NetBSD: tip.1,v 1.7 1994/12/08 09:31:05 jtc Exp $
3: .\"
4: .\" Copyright (c) 1980, 1990, 1993
5: .\" The Regents of the University of California. All rights reserved.
6: .\"
7: .\" Redistribution and use in source and binary forms, with or without
8: .\" modification, are permitted provided that the following conditions
9: .\" are met:
10: .\" 1. Redistributions of source code must retain the above copyright
11: .\" notice, this list of conditions and the following disclaimer.
12: .\" 2. Redistributions in binary form must reproduce the above copyright
13: .\" notice, this list of conditions and the following disclaimer in the
14: .\" documentation and/or other materials provided with the distribution.
15: .\" 3. All advertising materials mentioning features or use of this software
16: .\" must display the following acknowledgement:
17: .\" This product includes software developed by the University of
18: .\" California, Berkeley and its contributors.
19: .\" 4. Neither the name of the University nor the names of its contributors
20: .\" may be used to endorse or promote products derived from this software
21: .\" without specific prior written permission.
22: .\"
23: .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
24: .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
25: .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
26: .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
27: .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
28: .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
29: .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
30: .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
31: .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
32: .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
33: .\" SUCH DAMAGE.
34: .\"
35: .\" @(#)tip.1 8.4 (Berkeley) 4/18/94
36: .\"
37: .Dd April 18, 1994
38: .Dt TIP 1
1.6 aaron 39: .Os
1.1 deraadt 40: .Sh NAME
1.6 aaron 41: .Nm tip
1.1 deraadt 42: .\" .Nm cu
43: .Nd connect to a remote system
44: .Sh SYNOPSIS
45: .Nm tip
1.3 todd 46: .Op Fl nv
1.6 aaron 47: .Fl Ns Ns Ar speed
1.1 deraadt 48: .Ar system\-name
49: .Nm tip
1.3 todd 50: .Op Fl nv
1.6 aaron 51: .Fl Ns Ns Ar speed
1.1 deraadt 52: .Ar phone\-number
53: .\" .Nm cu
54: .\" .Ar phone\-number
55: .\" .Op Fl t
56: .\" .Op Fl s Ar speed
57: .\" .Op Fl a Ar acu
58: .\" .Op Fl l Ar line
59: .\" .Op Fl #
60: .Sh DESCRIPTION
1.7 aaron 61: .Nm
1.1 deraadt 62: .\" and
63: .\" .Nm cu
1.4 aaron 64: establishes a full-duplex connection to another machine,
1.1 deraadt 65: giving the appearance of being logged in directly on the
1.7 aaron 66: remote CPU.
67: It goes without saying that you must have a login
1.1 deraadt 68: on the machine (or equivalent) to which you wish to connect.
69: .\" The preferred interface is
1.4 aaron 70: .\" .Nm tip .
1.1 deraadt 71: .\" The
72: .\" .Nm cu
73: .\" interface is included for those people attached to the
74: .\" ``call
75: .\" .Ux Ns ''
76: .\" command of version 7. This manual page
77: .\" describes only
1.4 aaron 78: .\" .Nm tip .
1.1 deraadt 79: .Pp
1.6 aaron 80: The options are as follows:
1.9 aaron 81: .Bl -tag -width Ds
1.1 deraadt 82: .It Fl v
83: Set verbose mode.
1.3 todd 84: .It Fl n
85: No escape (disable tilde).
1.1 deraadt 86: .El
87: .Pp
88: Typed characters are normally transmitted directly to the remote
1.7 aaron 89: machine (which does the echoing as well).
90: A tilde
1.6 aaron 91: .Pq Ql ~
92: appearing
1.1 deraadt 93: as the first character of a line is an escape signal; the following
94: are recognized:
95: .Bl -tag -width flag
96: .It Ic \&~^D No or Ic \&~ .
97: Drop the connection and exit
98: (you may still be logged in on the
99: remote machine).
1.6 aaron 100: .It Ic \&~c Op Ar name
1.1 deraadt 101: Change directory to
102: .Ar name
103: (no argument
104: implies change to your home directory).
105: .It Ic \&~!
1.4 aaron 106: Escape to a shell (exiting the shell will return you to
107: .Nm tip Ns ).
1.1 deraadt 108: .It Ic \&~>
109: Copy file from local to remote.
1.7 aaron 110: .Nm
1.1 deraadt 111: prompts for the name of a local file to transmit.
112: .It Ic \&~<
113: Copy file from remote to local.
1.7 aaron 114: .Nm
1.1 deraadt 115: prompts first for the name of the file to be sent, then for
116: a command to be executed on the remote machine.
1.6 aaron 117: .It Ic \&~p Ar from Op Ar to
1.1 deraadt 118: Send a file to a remote
119: .Ux
1.7 aaron 120: host.
121: The put command causes the remote
1.1 deraadt 122: .Ux
1.6 aaron 123: system to run the command string
124: .Dq cat > 'to' ,
125: while
1.7 aaron 126: .Nm
1.6 aaron 127: sends it the
128: .Dq from
1.7 aaron 129: file.
130: If the
1.6 aaron 131: .Dq to
132: file isn't specified the
133: .Dq from
134: file name is used.
135: this command is actually a
1.1 deraadt 136: .Ux
1.6 aaron 137: specific version of the
138: .Ic ~>
139: command.
140: .It Ic \&~t Ar from Op Ar to
1.1 deraadt 141: Take a file from a remote
142: .Ux
143: host.
1.6 aaron 144: As in the put command the
145: .Dq to
146: file
147: defaults to the
148: .Dq from
149: file name if it isn't specified.
1.1 deraadt 150: The remote host
1.6 aaron 151: executes the command string
152: .Dq cat 'from';echo ^A
153: to send the file to
1.4 aaron 154: .Nm tip .
1.1 deraadt 155: .It Ic \&~|
156: Pipe the output from a remote command to a local
157: .Ux
158: process.
159: The command string sent to the local
160: .Ux
161: system is processed by the shell.
162: .It Ic \&~$
163: Pipe the output from a local
164: .Ux
165: process to the remote host.
166: The command string sent to the local
167: .Ux
168: system is processed by the shell.
169: .It Ic \&~C
170: Fork a child process on the local system to perform special protocols
1.7 aaron 171: such as \s-1XMODEM\s+1.
172: The child program will be run with the following
1.1 deraadt 173: somewhat unusual arrangement of file descriptors:
174: .nf
175: .in +1i
176: 0 <-> local tty in
177: 1 <-> local tty out
178: 2 <-> local tty out
179: 3 <-> remote tty in
180: 4 <-> remote tty out
181: .in -1i
182: .fi
183: .It Ic \&~#
184: Send a
185: .Dv BREAK
186: to the remote system.
187: For systems which don't support the
188: necessary
1.4 aaron 189: .Fn ioctl
1.1 deraadt 190: call the break is simulated by a sequence of line speed changes
1.6 aaron 191: and DEL characters.
1.1 deraadt 192: .It Ic \&~s
193: Set a variable (see the discussion below).
194: .It Ic \&~^Z
195: Stop
1.6 aaron 196: .Nm
1.1 deraadt 197: (only available with job control).
198: .It Ic \&~^Y
1.6 aaron 199: Stop only the
200: .Dq local side
201: of
202: .Nm
1.1 deraadt 203: (only available with job control);
1.6 aaron 204: the
205: .Dq remote side
206: of
1.4 aaron 207: .Nm tip ,
1.1 deraadt 208: the side that displays output from the remote host, is left running.
209: .It Ic \&~?
1.4 aaron 210: Get a summary of the tilde escapes.
1.1 deraadt 211: .El
212: .Pp
1.6 aaron 213: .Nm
1.1 deraadt 214: uses the file
215: .Pa /etc/remote
216: to find how to reach a particular
217: system and to find out how it should operate while talking
218: to the system;
219: refer to
1.7 aaron 220: .Xr remote 5
1.1 deraadt 221: for a full description.
222: Each system has a default baud rate with which to
1.7 aaron 223: establish a connection.
224: If this value is not suitable, the baud rate
225: to be used may be specified on the command line, e.g.,
1.1 deraadt 226: .Ql "tip -300 mds" .
227: .Pp
228: When
1.6 aaron 229: .Nm
1.1 deraadt 230: establishes a connection it sends out a
231: connection message to the remote system; the default value, if any,
232: is defined in
233: .Pa /etc/remote
234: (see
235: .Xr remote 5 ) .
236: .Pp
237: When
1.6 aaron 238: .Nm
1.7 aaron 239: prompts for an argument (e.g., during setup of
1.1 deraadt 240: a file transfer) the line typed may be edited with the standard
1.7 aaron 241: erase and kill characters.
242: A null line in response to a prompt,
1.1 deraadt 243: or an interrupt, will abort the dialogue and return you to the
244: remote machine.
245: .Pp
1.6 aaron 246: .Nm
1.1 deraadt 247: guards against multiple users connecting to a remote system
248: by opening modems and terminal lines with exclusive access,
249: and by honoring the locking protocol used by
250: .Xr uucico 8 .
251: .Pp
252: During file transfers
1.6 aaron 253: .Nm
1.1 deraadt 254: provides a running count of the number of lines transferred.
1.6 aaron 255: When using the
256: .Ic ~>
257: and
258: .Ic ~<
259: commands, the
260: .Dq eofread
261: and
262: .Dq eofwrite
1.1 deraadt 263: variables are used to recognize end-of-file when reading, and
1.7 aaron 264: specify end-of-file when writing (see below).
265: File transfers normally depend on tandem mode for flow control.
266: If the remote system does not support tandem mode,
1.6 aaron 267: .Dq echocheck
268: may be set to indicate
269: .Nm
1.1 deraadt 270: should synchronize with the remote system on the echo of each
271: transmitted character.
272: .Pp
273: When
1.6 aaron 274: .Nm
1.1 deraadt 275: must dial a phone number to connect to a system it will print
276: various messages indicating its actions.
1.6 aaron 277: .Nm
1.1 deraadt 278: supports the
279: .Tn DEC DN Ns-11
280: and
281: Racal-Vadic 831 auto-call-units;
282: the
283: .Tn DEC DF Ns \&02
284: and
285: .Tn DF Ns \&03 ,
286: Ventel 212+, Racal-Vadic 3451, and
287: Bizcomp 1031 and 1032 integral call unit/modems.
288: .Ss VARIABLES
1.6 aaron 289: .Nm
1.4 aaron 290: maintains a set of variables
1.1 deraadt 291: which control its operation.
292: Some of these variables are read-only to normal users (root is allowed
1.7 aaron 293: to change anything of interest).
294: Variables may be displayed and set through the
1.6 aaron 295: .Sq s
1.7 aaron 296: escape.
297: The syntax for variables is patterned after
1.6 aaron 298: .Xr vi 1
1.1 deraadt 299: and
1.6 aaron 300: .Xr Mail 1 .
301: Supplying
302: .Dq all
1.1 deraadt 303: as an argument to the set command displays all variables readable by
1.7 aaron 304: the user.
305: Alternatively, the user may request display of a particular
1.6 aaron 306: variable by attaching a
307: .Ql ?
1.7 aaron 308: to the end.
309: For example,
1.6 aaron 310: .Dq escape?
1.1 deraadt 311: displays the current escape character.
312: .Pp
1.7 aaron 313: Variables are numeric, string, character, or boolean values.
314: Boolean
1.1 deraadt 315: variables are set merely by specifying their name; they may be reset
1.6 aaron 316: by prepending a
317: .Ql !
1.7 aaron 318: to the name.
319: Other variable types are set by concatenating an
1.6 aaron 320: .Ql =
1.7 aaron 321: and the value.
322: The entire assignment must not have any blanks in it.
323: A single set command may be used to interrogate
1.1 deraadt 324: as well as set a number of variables.
325: Variables may be initialized at run time by placing set commands
1.6 aaron 326: (without the
327: .Ql ~s
328: prefix in a file
1.1 deraadt 329: .Pa .tiprc
1.7 aaron 330: in one's home directory).
331: The
1.1 deraadt 332: .Fl v
333: option causes
1.6 aaron 334: .Nm
1.1 deraadt 335: to display the sets as they are made.
336: Certain common variables have abbreviations.
337: The following is a list of common variables,
1.4 aaron 338: their abbreviations, and their default values:
1.1 deraadt 339: .Bl -tag -width Ar
340: .It Ar beautify
341: (bool) Discard unprintable characters when a session is being scripted;
342: abbreviated
1.4 aaron 343: .Ar be .
1.1 deraadt 344: .It Ar baudrate
345: (num) The baud rate at which the connection was established;
346: abbreviated
1.4 aaron 347: .Ar ba .
1.1 deraadt 348: .It Ar dialtimeout
349: (num) When dialing a phone number, the time (in seconds)
350: to wait for a connection to be established; abbreviated
1.4 aaron 351: .Ar dial .
1.1 deraadt 352: .It Ar echocheck
353: (bool) Synchronize with the remote host during file transfer by
354: waiting for the echo of the last character transmitted; default is
1.4 aaron 355: .Ar off .
1.1 deraadt 356: .It Ar eofread
357: (str) The set of characters which signify an end-of-transmission
1.6 aaron 358: during a
359: .Ic ~<
360: file transfer command; abbreviated
1.4 aaron 361: .Ar eofr .
1.1 deraadt 362: .It Ar eofwrite
1.6 aaron 363: (str) The string sent to indicate end-of-transmission during a
364: .Ic ~>
365: file transfer command; abbreviated
1.4 aaron 366: .Ar eofw .
1.1 deraadt 367: .It Ar eol
368: (str) The set of characters which indicate an end-of-line.
1.6 aaron 369: .Nm
1.1 deraadt 370: will recognize escape characters only after an end-of-line.
371: .It Ar escape
372: (char) The command prefix (escape) character; abbreviated
1.6 aaron 373: .Ar es ;
374: default value is
375: .Ql ~ .
1.1 deraadt 376: .It Ar exceptions
377: (str) The set of characters which should not be discarded
378: due to the beautification switch; abbreviated
1.7 aaron 379: .Ar ex ;
1.6 aaron 380: default value is
381: .Dq \et\en\ef\eb .
1.1 deraadt 382: .It Ar force
383: (char) The character used to force literal data transmission;
384: abbreviated
1.7 aaron 385: .Ar fo ;
1.6 aaron 386: default value is
387: .Ql ^P .
1.1 deraadt 388: .It Ar framesize
1.11 ! millert 389: (num) The amount of data (in bytes) to buffer between filesystem
1.1 deraadt 390: writes when receiving files; abbreviated
1.4 aaron 391: .Ar fr .
1.1 deraadt 392: .It Ar host
393: (str) The name of the host to which you are connected; abbreviated
1.4 aaron 394: .Ar ho .
1.1 deraadt 395: .It Ar prompt
396: (char) The character which indicates an end-of-line on the remote
397: host; abbreviated
1.6 aaron 398: .Ar pr ;
399: default value is
400: .Ql \en .
1.7 aaron 401: This value is used to synchronize during data transfers.
402: The count of lines transferred during a file transfer
1.1 deraadt 403: command is based on receipt of this character.
404: .It Ar raise
405: (bool) Upper case mapping mode; abbreviated
1.6 aaron 406: .Ar ra ;
1.1 deraadt 407: default value is
1.4 aaron 408: .Ar off .
1.11 ! millert 409: When this mode is enabled, all lowercase letters will be mapped to
! 410: uppercase by
1.6 aaron 411: .Nm
1.1 deraadt 412: for transmission to the remote machine.
413: .It Ar raisechar
1.11 ! millert 414: (char) The input character used to toggle uppercase mapping mode;
1.1 deraadt 415: abbreviated
1.6 aaron 416: .Ar rc ;
417: default value is
418: .Ql ^A .
1.1 deraadt 419: .It Ar record
420: (str) The name of the file in which a session script is recorded;
421: abbreviated
1.6 aaron 422: .Ar rec ;
423: default value is
424: .Dq tip.record .
1.1 deraadt 425: .It Ar script
426: (bool) Session scripting mode; abbreviated
1.7 aaron 427: .Ar sc ;
1.1 deraadt 428: default is
1.4 aaron 429: .Ar off .
1.1 deraadt 430: When
431: .Ar script
432: is
1.8 aaron 433: .Li true ,
1.6 aaron 434: .Nm
1.1 deraadt 435: will record everything transmitted by the remote machine in
436: the script record file specified in
1.4 aaron 437: .Ar record .
1.1 deraadt 438: If the
439: .Ar beautify
440: switch is on, only printable
441: .Tn ASCII
442: characters will be included in
1.7 aaron 443: the script file (those characters between 040 and 0177).
444: The variable
1.1 deraadt 445: .Ar exceptions
446: is used to indicate characters which are an exception to the normal
447: beautification rules.
448: .It Ar tabexpand
449: (bool) Expand tabs to spaces during file transfers; abbreviated
1.7 aaron 450: .Ar tab ;
1.1 deraadt 451: default value is
1.4 aaron 452: .Ar false .
1.1 deraadt 453: Each tab is expanded to 8 spaces.
454: .It Ar verbose
455: (bool) Verbose mode; abbreviated
1.7 aaron 456: .Ar verb ;
1.1 deraadt 457: default is
1.4 aaron 458: .Ar true .
1.1 deraadt 459: When verbose mode is enabled,
1.6 aaron 460: .Nm
1.1 deraadt 461: prints messages while dialing, shows the current number
462: of lines transferred during a file transfer operations,
463: and more.
464: .El
465: .Sh ENVIRONMENT
1.7 aaron 466: The following environment variables affect the execution of
467: .Nm tip :
1.1 deraadt 468: .Bl -tag -width Fl
469: .It Ev SHELL
1.6 aaron 470: (str) The name of the shell to use for the
471: .Ic ~!
472: command; default value is
473: .Dq /bin/sh ,
474: or taken from the environment.
1.1 deraadt 475: .It Ev HOME
1.6 aaron 476: (str) The home directory to use for the
477: .Ic ~c
478: command; default value is taken from the environment.
1.1 deraadt 479: .It Ev HOST
480: Check for a default host if none specified.
481: .El
482: .Pp
483: The variables
484: .Ev ${REMOTE}
485: and
486: .Ev ${PHONES}
487: are also exported.
488: .Sh FILES
489: .Bl -tag -width /var/spool/lock/LCK..* -compact
490: .It Pa /etc/remote
1.4 aaron 491: global system descriptions
1.1 deraadt 492: .It Pa /etc/phones
1.10 millert 493: global phone number database
1.1 deraadt 494: .It ${REMOTE}
1.4 aaron 495: private system descriptions
1.1 deraadt 496: .It ${PHONES}
1.4 aaron 497: private phone numbers
498: .It Pa ~/.tiprc
499: initialization file
1.1 deraadt 500: .It Pa tip.record
1.4 aaron 501: record file
502: .It Pa /var/log/aculog
503: line access log
1.1 deraadt 504: .It Pa /var/spool/lock/LCK..*
1.4 aaron 505: lock file to avoid conflicts with
506: .Xr uucp
1.1 deraadt 507: .El
508: .Sh SEE ALSO
1.4 aaron 509: .Xr phones 5 ,
510: .Xr remote 5
1.1 deraadt 511: .Sh HISTORY
512: The
1.6 aaron 513: .Nm
1.1 deraadt 514: appeared command in
515: .Bx 4.2 .
516: .Sh BUGS
517: The full set of variables is undocumented and should, probably, be
518: pared down.