Annotation of src/usr.bin/tip/tip.1, Revision 1.32
1.32 ! otto 1: .\" $OpenBSD: tip.1,v 1.31 2004/11/07 18:19:53 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
1.32 ! otto 185: .Ic cat > 'to' ,
1.6 aaron 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.32 ! otto 211: .Ic cat 'from';echo ''|tr '\e012' '\e01'
1.6 aaron 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.30 otto 231: The child program will be run with the following arrangement of
232: file descriptors:
1.14 krw 233: .Bd -literal -offset indent
1.30 otto 234: 0 <-> remote tty in
235: 1 <-> remote tty out
236: 2 <-> local tty stderr
1.14 krw 237: .Ed
1.1 deraadt 238: .It Ic \&~#
239: Send a
240: .Dv BREAK
241: to the remote system.
1.14 krw 242: For systems which don't support the necessary
1.4 aaron 243: .Fn ioctl
1.14 krw 244: call the break is simulated by a sequence of line speed changes and
245: DEL characters.
1.1 deraadt 246: .It Ic \&~s
247: Set a variable (see the discussion below).
1.16 millert 248: .It Ic \&~v
249: List all variables and their values (if set).
1.1 deraadt 250: .It Ic \&~^Z
251: Stop
1.6 aaron 252: .Nm
1.1 deraadt 253: (only available with job control).
254: .It Ic \&~^Y
1.6 aaron 255: Stop only the
256: .Dq local side
257: of
258: .Nm
1.14 krw 259: (only available with job control); the
1.6 aaron 260: .Dq remote side
261: of
1.4 aaron 262: .Nm tip ,
1.1 deraadt 263: the side that displays output from the remote host, is left running.
264: .It Ic \&~?
1.4 aaron 265: Get a summary of the tilde escapes.
1.1 deraadt 266: .El
267: .Pp
1.14 krw 268: To find the system description and thus the operating characteristics
269: of
270: .Ar system-name ,
1.6 aaron 271: .Nm
1.14 krw 272: searches for a system description with a name identical to
273: .Ar system-name .
274: The search order is
275: .Bl -enum -offset indent
276: .It
277: If the environment variable
278: .Ev REMOTE
279: does not start with a
280: .Ql \&/
281: it is assumed to be a system description, and is considered first.
282: .It
283: If the environment variable
284: .Ev REMOTE
285: begins with a
286: .Ql \&/
287: it is assumed to be a path to a
288: .Xr remote 5
289: database, and the specified database is searched.
1.25 jmc 290: .It
1.14 krw 291: The default
1.7 aaron 292: .Xr remote 5
1.14 krw 293: database,
294: .Pa /etc/remote ,
295: is searched.
296: .El
297: .Pp
298: See
299: .Xr remote 5
300: for full documentation on system descriptions.
301: .Pp
302: The
1.27 jmc 303: .Ar br
1.14 krw 304: capability is used in system descriptions to specify the baud rate
305: with which to establish a connection.
306: If the value specified is not suitable, the baud rate to be used may
307: be given on the command line, e.g.,
1.1 deraadt 308: .Ql "tip -300 mds" .
309: .Pp
310: When
1.6 aaron 311: .Nm
1.14 krw 312: establishes a connection it sends out the connection message
313: specified in the
314: .Ar cm
315: capability of the system description being used.
1.1 deraadt 316: .Pp
317: When
1.6 aaron 318: .Nm
1.14 krw 319: prompts for an argument (e.g., during setup of a file transfer) the
320: line typed may be edited with the standard erase and kill characters.
321: A null line in response to a prompt, or an interrupt, will abort the
322: dialogue and return you to the remote machine.
1.1 deraadt 323: .Pp
1.6 aaron 324: .Nm
1.14 krw 325: guards against multiple users connecting to a remote system by opening
326: modems and terminal lines with exclusive access, and by honoring the
327: locking protocol used by
1.23 jmc 328: .Xr uucico .
1.1 deraadt 329: .Pp
330: During file transfers
1.6 aaron 331: .Nm
1.1 deraadt 332: provides a running count of the number of lines transferred.
1.6 aaron 333: When using the
334: .Ic ~>
335: and
336: .Ic ~<
337: commands, the
338: .Dq eofread
339: and
340: .Dq eofwrite
1.14 krw 341: variables are used to recognize end-of-file when reading, and specify
342: end-of-file when writing (see below).
1.29 millert 343: File transfers normally depend on hardwareflow or tandem mode for flow control.
344: If the remote system does not support hardwareflow or tandem mode,
1.6 aaron 345: .Dq echocheck
346: may be set to indicate
347: .Nm
1.1 deraadt 348: should synchronize with the remote system on the echo of each
349: transmitted character.
350: .Pp
351: When
1.6 aaron 352: .Nm
1.14 krw 353: must dial a phone number to connect to a system it will print various
354: messages indicating its actions.
1.6 aaron 355: .Nm
1.14 krw 356: supports a variety of auto-call units and modems with the
357: .Ar at
358: capability in system descriptions.
359: .Pp
360: Support for Ventel 212+ (ventel), Hayes AT-style (hayes),
361: USRobotics Courier (courier), Telebit T3000 (t3000) and
362: Racal-Vadic 831 (vadic) units is enabled by default.
363: .Pp
364: Support for Bizcomp 1031[fw] (biz31[fw]), Bizcomp 1022[fw]
365: (biz22[fw]), DEC DF0[23]-AC (df0[23]), DEC DN-11 (dn11) and
366: Racal-Vadic 3451 (v3451) units can be added by recompiling
1.25 jmc 367: .Nm tip
1.14 krw 368: with the appropriate defines.
369: .Pp
370: Note that if support for both the Racal-Vadic 831 and 3451 is enabled
371: they are referred to as the v831 and v3451 respectively.
372: If only one of the two is supported, it is referred to as vadic.
1.1 deraadt 373: .Ss VARIABLES
1.6 aaron 374: .Nm
1.14 krw 375: maintains a set of variables which control its operation.
1.1 deraadt 376: Some of these variables are read-only to normal users (root is allowed
1.7 aaron 377: to change anything of interest).
378: Variables may be displayed and set through the
1.6 aaron 379: .Sq s
1.7 aaron 380: escape.
381: The syntax for variables is patterned after
1.6 aaron 382: .Xr vi 1
1.1 deraadt 383: and
1.6 aaron 384: .Xr Mail 1 .
385: Supplying
386: .Dq all
1.1 deraadt 387: as an argument to the set command displays all variables readable by
1.7 aaron 388: the user.
1.14 krw 389: Alternatively, the user may request display of a particular variable
390: by attaching a
1.26 jmc 391: .Ql \&?
1.7 aaron 392: to the end.
393: For example,
1.6 aaron 394: .Dq escape?
1.1 deraadt 395: displays the current escape character.
396: .Pp
1.7 aaron 397: Variables are numeric, string, character, or boolean values.
1.14 krw 398: Boolean variables are set merely by specifying their name; they may be
399: reset by prepending a
1.26 jmc 400: .Ql \&!
1.7 aaron 401: to the name.
402: Other variable types are set by concatenating an
1.6 aaron 403: .Ql =
1.7 aaron 404: and the value.
405: The entire assignment must not have any blanks in it.
1.14 krw 406: A single set command may be used to interrogate as well as set a
407: number of variables.
1.1 deraadt 408: Variables may be initialized at run time by placing set commands
1.6 aaron 409: (without the
410: .Ql ~s
411: prefix in a file
1.1 deraadt 412: .Pa .tiprc
1.7 aaron 413: in one's home directory).
414: The
1.1 deraadt 415: .Fl v
416: option causes
1.6 aaron 417: .Nm
1.1 deraadt 418: to display the sets as they are made.
419: Certain common variables have abbreviations.
1.14 krw 420: The following is a list of common variables, their abbreviations, and
421: their default values:
1.1 deraadt 422: .Bl -tag -width Ar
423: .It Ar beautify
1.14 krw 424: (bool) Discard unprintable characters when a session is being
425: scripted; abbreviated
1.4 aaron 426: .Ar be .
1.1 deraadt 427: .It Ar baudrate
428: (num) The baud rate at which the connection was established;
429: abbreviated
1.4 aaron 430: .Ar ba .
1.1 deraadt 431: .It Ar dialtimeout
1.14 krw 432: (num) When dialing a phone number, the time (in seconds) to wait for a
433: connection to be established; abbreviated
1.4 aaron 434: .Ar dial .
1.1 deraadt 435: .It Ar echocheck
436: (bool) Synchronize with the remote host during file transfer by
437: waiting for the echo of the last character transmitted; default is
1.4 aaron 438: .Ar off .
1.1 deraadt 439: .It Ar eofread
440: (str) The set of characters which signify an end-of-transmission
1.6 aaron 441: during a
442: .Ic ~<
443: file transfer command; abbreviated
1.4 aaron 444: .Ar eofr .
1.1 deraadt 445: .It Ar eofwrite
1.6 aaron 446: (str) The string sent to indicate end-of-transmission during a
447: .Ic ~>
448: file transfer command; abbreviated
1.4 aaron 449: .Ar eofw .
1.1 deraadt 450: .It Ar eol
451: (str) The set of characters which indicate an end-of-line.
1.6 aaron 452: .Nm
1.1 deraadt 453: will recognize escape characters only after an end-of-line.
454: .It Ar escape
455: (char) The command prefix (escape) character; abbreviated
1.6 aaron 456: .Ar es ;
457: default value is
458: .Ql ~ .
1.1 deraadt 459: .It Ar exceptions
1.14 krw 460: (str) The set of characters which should not be discarded due to the
461: beautification switch; abbreviated
1.7 aaron 462: .Ar ex ;
1.6 aaron 463: default value is
464: .Dq \et\en\ef\eb .
1.1 deraadt 465: .It Ar force
466: (char) The character used to force literal data transmission;
467: abbreviated
1.7 aaron 468: .Ar fo ;
1.6 aaron 469: default value is
470: .Ql ^P .
1.1 deraadt 471: .It Ar framesize
1.11 millert 472: (num) The amount of data (in bytes) to buffer between filesystem
1.1 deraadt 473: writes when receiving files; abbreviated
1.4 aaron 474: .Ar fr .
1.29 millert 475: .It Ar hardwareflow
476: (bool) Whether hardware flow control (CRTSCTS) is enabled for the
477: connection; abbreviated
478: .Ar hf ;
479: default value is
480: .Ql off .
1.1 deraadt 481: .It Ar host
482: (str) The name of the host to which you are connected; abbreviated
1.4 aaron 483: .Ar ho .
1.1 deraadt 484: .It Ar prompt
485: (char) The character which indicates an end-of-line on the remote
486: host; abbreviated
1.6 aaron 487: .Ar pr ;
488: default value is
489: .Ql \en .
1.7 aaron 490: This value is used to synchronize during data transfers.
1.14 krw 491: The count of lines transferred during a file transfer command is based
492: on receipt of this character.
1.1 deraadt 493: .It Ar raise
494: (bool) Upper case mapping mode; abbreviated
1.6 aaron 495: .Ar ra ;
1.1 deraadt 496: default value is
1.4 aaron 497: .Ar off .
1.11 millert 498: When this mode is enabled, all lowercase letters will be mapped to
499: uppercase by
1.6 aaron 500: .Nm
1.1 deraadt 501: for transmission to the remote machine.
502: .It Ar raisechar
1.11 millert 503: (char) The input character used to toggle uppercase mapping mode;
1.1 deraadt 504: abbreviated
1.6 aaron 505: .Ar rc ;
506: default value is
507: .Ql ^A .
1.1 deraadt 508: .It Ar record
509: (str) The name of the file in which a session script is recorded;
510: abbreviated
1.6 aaron 511: .Ar rec ;
512: default value is
513: .Dq tip.record .
1.1 deraadt 514: .It Ar script
515: (bool) Session scripting mode; abbreviated
1.7 aaron 516: .Ar sc ;
1.1 deraadt 517: default is
1.4 aaron 518: .Ar off .
1.1 deraadt 519: When
520: .Ar script
521: is
1.8 aaron 522: .Li true ,
1.6 aaron 523: .Nm
1.14 krw 524: will record everything transmitted by the remote machine in the script
525: record file specified in
1.4 aaron 526: .Ar record .
1.1 deraadt 527: If the
528: .Ar beautify
529: switch is on, only printable
530: .Tn ASCII
1.14 krw 531: characters will be included in the script file (those characters
532: between 040 and 0177).
1.7 aaron 533: The variable
1.1 deraadt 534: .Ar exceptions
535: is used to indicate characters which are an exception to the normal
536: beautification rules.
537: .It Ar tabexpand
538: (bool) Expand tabs to spaces during file transfers; abbreviated
1.7 aaron 539: .Ar tab ;
1.1 deraadt 540: default value is
1.4 aaron 541: .Ar false .
1.1 deraadt 542: Each tab is expanded to 8 spaces.
1.29 millert 543: .It Ar tandem
544: (bool) Use XON/XOFF flow control to throttle data from the remote host;
545: abbreviated
546: .Ar ta .
547: The default value is
548: .Ar true
549: unless the
550: .Ar nt
551: capability has been specified in
552: .Pa /etc/remote ,
553: in which case the default value is
1.31 jmc 554: .Ar false .
1.1 deraadt 555: .It Ar verbose
556: (bool) Verbose mode; abbreviated
1.7 aaron 557: .Ar verb ;
1.1 deraadt 558: default is
1.4 aaron 559: .Ar true .
1.1 deraadt 560: When verbose mode is enabled,
1.6 aaron 561: .Nm
1.14 krw 562: prints messages while dialing, shows the current number of lines
563: transferred during a file transfer operations, and more.
1.1 deraadt 564: .El
565: .Sh ENVIRONMENT
566: .Bl -tag -width Fl
567: .It Ev SHELL
1.14 krw 568: The name of the shell to use for the
1.28 jmc 569: .Ic ~!\&
1.6 aaron 570: command; default value is
1.14 krw 571: .Dq /bin/sh .
1.1 deraadt 572: .It Ev HOME
1.14 krw 573: The home directory to use for the
1.6 aaron 574: .Ic ~c
1.14 krw 575: command.
1.1 deraadt 576: .It Ev HOST
1.14 krw 577: The default value for
578: .Ar system-name
579: if none is specified via the command line.
580: .It Ev REMOTE
581: A system description, or an absolute path to a
582: .Xr remote 5
583: system description database.
584: .It Ev PHONES
585: A path to a
586: .Xr phones 5
587: database.
1.1 deraadt 588: .El
589: .Sh FILES
1.14 krw 590: .Bl -tag -width "/var/spool/lock/LCK..*" -compact
1.1 deraadt 591: .It Pa /etc/remote
1.14 krw 592: global
593: .Xr remote 5
594: database
1.1 deraadt 595: .It Pa /etc/phones
1.14 krw 596: default
597: .Xr phones 5
598: file
1.4 aaron 599: .It Pa ~/.tiprc
600: initialization file
1.1 deraadt 601: .It Pa tip.record
1.4 aaron 602: record file
603: .It Pa /var/log/aculog
604: line access log
1.1 deraadt 605: .It Pa /var/spool/lock/LCK..*
1.4 aaron 606: lock file to avoid conflicts with
607: .Xr uucp
1.1 deraadt 608: .El
609: .Sh SEE ALSO
1.4 aaron 610: .Xr phones 5 ,
611: .Xr remote 5
1.1 deraadt 612: .Sh HISTORY
613: The
1.6 aaron 614: .Nm
1.20 miod 615: command appeared in
1.1 deraadt 616: .Bx 4.2 .
617: .Sh BUGS
618: The full set of variables is undocumented and should, probably, be
619: pared down.