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