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