Annotation of src/usr.bin/tip/tip.1, Revision 1.2
1.2 ! deraadt 1: .\" $OpenBSD: tip.1,v 1.7 1994/12/08 09:31:05 jtc 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
39: .Os BSD 4
40: .Sh NAME
41: .Nm tip
42: .\" .Nm cu
43: .Nd connect to a remote system
44: .Sh SYNOPSIS
45: .Nm tip
46: .Op Fl v
47: .Fl Ns Ns Ar speed
48: .Ar system\-name
49: .Nm tip
50: .Op Fl v
51: .Fl Ns Ns Ar speed
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
61: .Nm Tip
62: .\" and
63: .\" .Nm cu
64: establish a full-duplex connection to another machine,
65: giving the appearance of being logged in directly on the
66: remote cpu. It goes without saying that you must have a login
67: on the machine (or equivalent) to which you wish to connect.
68: .\" The preferred interface is
69: .\" .Nm tip .
70: .\" The
71: .\" .Nm cu
72: .\" interface is included for those people attached to the
73: .\" ``call
74: .\" .Ux Ns ''
75: .\" command of version 7. This manual page
76: .\" describes only
77: .\" .Nm tip .
78: .Pp
79: Available Option:
80: .Bl -tag -width indent
81: .It Fl v
82: Set verbose mode.
83: .El
84: .Pp
85: Typed characters are normally transmitted directly to the remote
86: machine (which does the echoing as well). A tilde (`~') appearing
87: as the first character of a line is an escape signal; the following
88: are recognized:
89: .Bl -tag -width flag
90: .It Ic \&~^D No or Ic \&~ .
91: Drop the connection and exit
92: (you may still be logged in on the
93: remote machine).
94: .It Ic \&~c Op Ar name
95: Change directory to
96: .Ar name
97: (no argument
98: implies change to your home directory).
99: .It Ic \&~!
100: Escape to a shell (exiting the shell will
101: return you to tip).
102: .It Ic \&~>
103: Copy file from local to remote.
104: .Nm Tip
105: prompts for the name of a local file to transmit.
106: .It Ic \&~<
107: Copy file from remote to local.
108: .Nm Tip
109: prompts first for the name of the file to be sent, then for
110: a command to be executed on the remote machine.
111: .It Ic \&~p Ar from Op Ar to
112: Send a file to a remote
113: .Ux
114: host. The put command causes the remote
115: .Ux
116: system to run the command string ``cat > 'to''', while
117: .Nm tip
118: sends it the ``from''
119: file. If the ``to'' file isn't specified the ``from'' file name is used.
120: This command is actually a
121: .Ux
122: specific version of the ``~>'' command.
123: .It Ic \&~t Ar from Op Ar to
124: Take a file from a remote
125: .Ux
126: host.
127: As in the put command the ``to'' file
128: defaults to the ``from'' file name if it isn't specified.
129: The remote host
130: executes the command string ``cat 'from';echo ^A'' to send the file to
131: .Nm tip .
132: .It Ic \&~|
133: Pipe the output from a remote command to a local
134: .Ux
135: process.
136: The command string sent to the local
137: .Ux
138: system is processed by the shell.
139: .It Ic \&~$
140: Pipe the output from a local
141: .Ux
142: process to the remote host.
143: The command string sent to the local
144: .Ux
145: system is processed by the shell.
146: .It Ic \&~C
147: Fork a child process on the local system to perform special protocols
148: such as \s-1XMODEM\s+1. The child program will be run with the following
149: somewhat unusual arrangement of file descriptors:
150: .nf
151: .in +1i
152: 0 <-> local tty in
153: 1 <-> local tty out
154: 2 <-> local tty out
155: 3 <-> remote tty in
156: 4 <-> remote tty out
157: .in -1i
158: .fi
159: .It Ic \&~#
160: Send a
161: .Dv BREAK
162: to the remote system.
163: For systems which don't support the
164: necessary
165: .Ar ioctl
166: call the break is simulated by a sequence of line speed changes
167: and
168: .Dv DEL
169: characters.
170: .It Ic \&~s
171: Set a variable (see the discussion below).
172: .It Ic \&~^Z
173: Stop
174: .Nm tip
175: (only available with job control).
176: .It Ic \&~^Y
177: Stop only the ``local side'' of
178: .Nm tip
179: (only available with job control);
180: the ``remote side'' of
181: .Nm tip ,
182: the side that displays output from the remote host, is left running.
183: .It Ic \&~?
184: Get a summary of the tilde escapes
185: .El
186: .Pp
187: .Nm Tip
188: uses the file
189: .Pa /etc/remote
190: to find how to reach a particular
191: system and to find out how it should operate while talking
192: to the system;
193: refer to
194: .Xr remote 5
195: for a full description.
196: Each system has a default baud rate with which to
197: establish a connection. If this value is not suitable, the baud rate
198: to be used may be specified on the command line, e.g.
199: .Ql "tip -300 mds" .
200: .Pp
201: When
202: .Nm tip
203: establishes a connection it sends out a
204: connection message to the remote system; the default value, if any,
205: is defined in
206: .Pa /etc/remote
207: (see
208: .Xr remote 5 ) .
209: .Pp
210: When
211: .Nm tip
212: prompts for an argument (e.g. during setup of
213: a file transfer) the line typed may be edited with the standard
214: erase and kill characters. A null line in response to a prompt,
215: or an interrupt, will abort the dialogue and return you to the
216: remote machine.
217: .Pp
218: .Nm Tip
219: guards against multiple users connecting to a remote system
220: by opening modems and terminal lines with exclusive access,
221: and by honoring the locking protocol used by
222: .Xr uucico 8 .
223: .Pp
224: During file transfers
225: .Nm tip
226: provides a running count of the number of lines transferred.
227: When using the ~> and ~< commands, the ``eofread'' and ``eofwrite''
228: variables are used to recognize end-of-file when reading, and
229: specify end-of-file when writing (see below). File transfers
230: normally depend on tandem mode for flow control. If the remote
231: system does not support tandem mode, ``echocheck'' may be set
232: to indicate
233: .Nm tip
234: should synchronize with the remote system on the echo of each
235: transmitted character.
236: .Pp
237: When
238: .Nm tip
239: must dial a phone number to connect to a system it will print
240: various messages indicating its actions.
241: .Nm Tip
242: supports the
243: .Tn DEC DN Ns-11
244: and
245: Racal-Vadic 831 auto-call-units;
246: the
247: .Tn DEC DF Ns \&02
248: and
249: .Tn DF Ns \&03 ,
250: Ventel 212+, Racal-Vadic 3451, and
251: Bizcomp 1031 and 1032 integral call unit/modems.
252: .Ss VARIABLES
253: .Nm Tip
254: maintains a set of
255: .Ar variables
256: which control its operation.
257: Some of these variables are read-only to normal users (root is allowed
258: to change anything of interest). Variables may be displayed
259: and set through the ``s'' escape. The syntax for variables is patterned
260: after
261: .Xr vi 1
262: and
263: .Xr Mail 1 .
264: Supplying ``all''
265: as an argument to the set command displays all variables readable by
266: the user. Alternatively, the user may request display of a particular
267: variable by attaching a `?' to the end. For example ``escape?''
268: displays the current escape character.
269: .Pp
270: Variables are numeric, string, character, or boolean values. Boolean
271: variables are set merely by specifying their name; they may be reset
272: by prepending a `!' to the name. Other variable types are set by
273: concatenating an `=' and the value. The entire assignment must not
274: have any blanks in it. A single set command may be used to interrogate
275: as well as set a number of variables.
276: Variables may be initialized at run time by placing set commands
277: (without the ``~s'' prefix in a file
278: .Pa .tiprc
279: in one's home directory). The
280: .Fl v
281: option causes
282: .Nm tip
283: to display the sets as they are made.
284: Certain common variables have abbreviations.
285: The following is a list of common variables,
286: their abbreviations, and their default values.
287: .Bl -tag -width Ar
288: .It Ar beautify
289: (bool) Discard unprintable characters when a session is being scripted;
290: abbreviated
291: .Ar be .
292: .It Ar baudrate
293: (num) The baud rate at which the connection was established;
294: abbreviated
295: .Ar ba .
296: .It Ar dialtimeout
297: (num) When dialing a phone number, the time (in seconds)
298: to wait for a connection to be established; abbreviated
299: .Ar dial .
300: .It Ar echocheck
301: (bool) Synchronize with the remote host during file transfer by
302: waiting for the echo of the last character transmitted; default is
303: .Ar off .
304: .It Ar eofread
305: (str) The set of characters which signify an end-of-transmission
306: during a ~< file transfer command; abbreviated
307: .Ar eofr .
308: .It Ar eofwrite
309: (str) The string sent to indicate end-of-transmission during
310: a ~> file transfer command; abbreviated
311: .Ar eofw .
312: .It Ar eol
313: (str) The set of characters which indicate an end-of-line.
314: .Nm Tip
315: will recognize escape characters only after an end-of-line.
316: .It Ar escape
317: (char) The command prefix (escape) character; abbreviated
318: .Ar es ;
319: default value is `~'.
320: .It Ar exceptions
321: (str) The set of characters which should not be discarded
322: due to the beautification switch; abbreviated
323: .Ar ex ;
324: default value is ``\et\en\ef\eb''.
325: .It Ar force
326: (char) The character used to force literal data transmission;
327: abbreviated
328: .Ar fo ;
329: default value is `^P'.
330: .It Ar framesize
331: (num) The amount of data (in bytes) to buffer between file system
332: writes when receiving files; abbreviated
333: .Ar fr .
334: .It Ar host
335: (str) The name of the host to which you are connected; abbreviated
336: .Ar ho .
337: .It Ar prompt
338: (char) The character which indicates an end-of-line on the remote
339: host; abbreviated
340: .Ar pr ;
341: default value is `\en'. This value is used to synchronize during
342: data transfers. The count of lines transferred during a file transfer
343: command is based on receipt of this character.
344: .It Ar raise
345: (bool) Upper case mapping mode; abbreviated
346: .Ar ra ;
347: default value is
348: .Ar off .
349: When this mode is enabled, all lower case letters will be mapped to
350: upper case by
351: .Nm tip
352: for transmission to the remote machine.
353: .It Ar raisechar
354: (char) The input character used to toggle upper case mapping mode;
355: abbreviated
356: .Ar rc ;
357: default value is `^A'.
358: .It Ar record
359: (str) The name of the file in which a session script is recorded;
360: abbreviated
361: .Ar rec ;
362: default value is ``tip.record''.
363: .It Ar script
364: (bool) Session scripting mode; abbreviated
365: .Ar sc ;
366: default is
367: .Ar off .
368: When
369: .Ar script
370: is
371: .Li true ,
372: .Nm tip
373: will record everything transmitted by the remote machine in
374: the script record file specified in
375: .Ar record .
376: If the
377: .Ar beautify
378: switch is on, only printable
379: .Tn ASCII
380: characters will be included in
381: the script file (those characters between 040 and 0177). The
382: variable
383: .Ar exceptions
384: is used to indicate characters which are an exception to the normal
385: beautification rules.
386: .It Ar tabexpand
387: (bool) Expand tabs to spaces during file transfers; abbreviated
388: .Ar tab ;
389: default value is
390: .Ar false .
391: Each tab is expanded to 8 spaces.
392: .It Ar verbose
393: (bool) Verbose mode; abbreviated
394: .Ar verb ;
395: default is
396: .Ar true .
397: When verbose mode is enabled,
398: .Nm tip
399: prints messages while dialing, shows the current number
400: of lines transferred during a file transfer operations,
401: and more.
402: .El
403: .Sh ENVIRONMENT
404: .Nm Tip
405: uses the following environment variables:
406: .Bl -tag -width Fl
407: .It Ev SHELL
408: (str) The name of the shell to use for the ~! command; default
409: value is ``/bin/sh'', or taken from the environment.
410: .It Ev HOME
411: (str) The home directory to use for the ~c command; default
412: value is taken from the environment.
413: .It Ev HOST
414: Check for a default host if none specified.
415: .El
416: .Pp
417: The variables
418: .Ev ${REMOTE}
419: and
420: .Ev ${PHONES}
421: are also exported.
422: .Sh FILES
423: .Bl -tag -width /var/spool/lock/LCK..* -compact
424: .It Pa /etc/remote
425: Global system descriptions.
426: .It Pa /etc/phones
427: Global phone number data base.
428: .It ${REMOTE}
429: Private system descriptions.
430: .It ${PHONES}
431: Private phone numbers.
432: .It ~/.tiprc
433: Initialization file.
434: .It Pa tip.record
435: Record file.
436: .It /var/log/aculog
437: Line access log.
438: .It Pa /var/spool/lock/LCK..*
439: Lock file to avoid conflicts with
440: .Xr uucp .
441: .El
442: .Sh DIAGNOSTICS
443: Diagnostics are, hopefully, self explanatory.
444: .Sh SEE ALSO
445: .Xr remote 5 ,
446: .Xr phones 5
447: .Sh HISTORY
448: The
449: .Nm tip
450: appeared command in
451: .Bx 4.2 .
452: .Sh BUGS
453: The full set of variables is undocumented and should, probably, be
454: pared down.