version 2 showing authors affecting page license.
.
Rev |
Author |
# |
Line |
1 |
perry |
1 |
---- |
|
|
2 |
__NAME__ |
|
|
3 |
|
|
|
4 |
|
|
|
5 |
rmt - remote magtape protocol module |
|
|
6 |
__SYNOPSIS__ |
|
|
7 |
|
|
|
8 |
|
|
|
9 |
rmt |
|
|
10 |
__DESCRIPTION__ |
|
|
11 |
|
|
|
12 |
|
|
|
13 |
Rmt is a program used by tar, cpio, mt, and the remote dump |
|
|
14 |
and restore programs in manipulating a magnetic tape drive |
|
|
15 |
through an interprocess communication connection. Rmt is |
|
|
16 |
normally started up with an rexec(3) or |
|
|
17 |
rcmd(3) call or the rsh(1) |
|
|
18 |
command. |
|
|
19 |
|
|
|
20 |
|
|
|
21 |
The rmt program accepts requests specific to the manipula- tion of magnetic tapes, performs the commands, then responds with a status indication. All responses are in ASCII and in one of two forms. Successful commands have responses of: |
|
|
22 |
|
|
|
23 |
|
|
|
24 |
__A__numbern |
|
|
25 |
|
|
|
26 |
|
|
|
27 |
Number is an ASCII representation of a |
|
|
28 |
decimal number. Unsuccessful commands are responded to |
|
|
29 |
with: |
|
|
30 |
__ E__error-numbernerror-message |
|
|
31 |
n |
|
|
32 |
Error-number is one of the possible error numbers |
|
|
33 |
described in intro(2) and error-message is the |
|
|
34 |
corresponding error string as printed from a call to |
|
|
35 |
perror(3). The protocol is comprised of the |
|
|
36 |
following commands, which are sent as indi- cated - no |
|
|
37 |
spaces are supplied between the command and its arguments, |
|
|
38 |
or between its arguments, and n indicates that a |
|
|
39 |
newline should be supplied: |
|
|
40 |
__ O__devicenmoden |
|
|
41 |
|
|
|
42 |
|
|
|
43 |
Open the specified deviceusing the indicatedmode.Deviceis a full pathname and modeis anASCIIrepresentation of a decimal number suitable forpassing to open(2).If a device had already been opened, it is closed before a new open is performed. |
|
|
44 |
|
|
|
45 |
|
|
|
46 |
__C__devicen |
|
|
47 |
Close the currently open device. The devicespecified is |
|
|
48 |
ignored. |
|
|
49 |
|
|
|
50 |
|
|
|
51 |
__L__offsetn |
|
|
52 |
whencen |
|
|
53 |
Perform an lseek(2) operation using the specified |
|
|
54 |
parameters. The response value is that returned from the |
|
|
55 |
lseek call. |
|
|
56 |
|
|
|
57 |
|
|
|
58 |
__W__countn |
|
|
59 |
Write data onto the open device. Rmt reads count bytes from |
|
|
60 |
the connection, aborting if a premature end-of-file is |
|
|
61 |
encountered. The response value is that returned from the |
|
|
62 |
write(2) call. |
|
|
63 |
|
|
|
64 |
|
|
|
65 |
__R__countn |
|
|
66 |
Read count bytes of data from the open device. If count |
|
|
67 |
exceeds the size of the data buffer (10 kilo- bytes), it is |
|
|
68 |
truncated to the data buffer size. rmt then performs the |
|
|
69 |
requested read(2) and responds with |
|
|
70 |
__A__count-readn if the read was successful; otherwise an |
|
|
71 |
error in the standard format is returned. If the read was |
|
|
72 |
successful, the data read is then sent. |
|
|
73 |
|
|
|
74 |
|
|
|
75 |
__I__operationncountn |
|
|
76 |
Perform a MTIOCOP ioctl(2) command using the speci- |
|
|
77 |
fied parameters. The parameters are interpreted as the |
|
|
78 |
ASCII representations of the decimal values |
|
|
79 |
to place in the mt_op and mt_count fields of the struc- ture |
|
|
80 |
used in the ioctl call. The return value is the |
|
|
81 |
count parameter when the operation is |
|
|
82 |
successful. |
|
|
83 |
|
|
|
84 |
|
|
|
85 |
__S__ |
|
|
86 |
Return the status of the open device, as obtained with a |
|
|
87 |
MTIOCGET ioctl call. If the operation was |
|
|
88 |
successful, an ``ack'' is sent with the size of the status |
|
|
89 |
buffer, then the status buffer is sent (in |
|
|
90 |
binary). |
|
|
91 |
|
|
|
92 |
|
|
|
93 |
Any other command causes rmt to exit. |
|
|
94 |
|
|
|
95 |
|
|
|
96 |
__DIAGNOSTICS__ |
|
|
97 |
|
|
|
98 |
|
|
|
99 |
All responses are of the form described above. |
|
|
100 |
__SEE ALSO__ |
|
|
101 |
|
|
|
102 |
|
|
|
103 |
tar(1), cpio(1), mt(1), |
|
|
104 |
rsh(1), rcmd(3), rexec(3), |
|
|
105 |
mtio(4), rdump(8), |
|
|
106 |
rrestore(8) |
|
|
107 |
__BUGS__ |
|
|
108 |
|
|
|
109 |
|
|
|
110 |
People should be discouraged from using this for a remote |
|
|
111 |
file access protocol. |
|
|
112 |
__HISTORY__ |
|
|
113 |
|
|
|
114 |
|
|
|
115 |
The rmt command appeared in 4.2 BSD |
|
|
116 |
. |
|
|
117 |
|
|
|
118 |
|
|
|
119 |
4.2 Berkeley !DistributionDecember 11, 1993 1 |
|
|
120 |
---- |