Commit | Line | Data |
---|---|---|
1ecd0cc4 KB |
1 | .\" Copyright (c) 1983 The Regents of the University of California. |
2 | .\" All rights reserved. | |
e0d7ce0e | 3 | .\" |
1ecd0cc4 KB |
4 | .\" Redistribution and use in source and binary forms are permitted |
5 | .\" provided that the above copyright notice and this paragraph are | |
6 | .\" duplicated in all such forms and that any documentation, | |
7 | .\" advertising materials, and other materials related to such | |
8 | .\" distribution and use acknowledge that the software was developed | |
9 | .\" by the University of California, Berkeley. The name of the | |
10 | .\" University may not be used to endorse or promote products derived | |
11 | .\" from this software without specific prior written permission. | |
12 | .\" THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR | |
13 | .\" IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED | |
14 | .\" WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. | |
e0d7ce0e | 15 | .\" |
b4b1244b | 16 | .\" @(#)rmt.8 6.3 (Berkeley) %G% |
1ecd0cc4 KB |
17 | .\" |
18 | .TH RMT 8 "" | |
e0d7ce0e KM |
19 | .UC 5 |
20 | .SH NAME | |
21 | rmt \- remote magtape protocol module | |
22 | .SH SYNOPSIS | |
23 | .B /etc/rmt | |
24 | .SH DESCRIPTION | |
25 | .I Rmt | |
26 | is a program used by the remote dump and restore programs | |
27 | in manipulating a magnetic tape drive through an interprocess | |
28 | communication connection. | |
29 | .I Rmt | |
30 | is normally started up with an | |
31 | .IR rexec (3X) | |
32 | or | |
33 | .IR rcmd (3X) | |
34 | call. | |
35 | .PP | |
36 | The | |
37 | .I rmt | |
38 | program accepts requests specific to the manipulation of | |
39 | magnetic tapes, performs the commands, then responds with | |
40 | a status indication. All responses are in ASCII and in | |
41 | one of two forms. | |
42 | Successful commands have responses of | |
b4b1244b KM |
43 | .IP |
44 | .BI A number \en | |
e0d7ce0e KM |
45 | .PP |
46 | where | |
47 | .I number | |
48 | is an ASCII representation of a decimal number. | |
49 | Unsuccessful commands are responded to with | |
50 | .PP | |
b4b1244b KM |
51 | .IP |
52 | .BI E error-number \en error-message \en | |
e0d7ce0e KM |
53 | .PP |
54 | where | |
55 | .I error-number | |
56 | is one of the possible error | |
57 | numbers described in | |
58 | .IR intro (2) | |
59 | and | |
60 | .I error-message | |
61 | is the corresponding error string as printed | |
62 | from a call to | |
63 | .IR perror (3). | |
64 | The protocol is comprised of the | |
b4b1244b KM |
65 | following commands, which are sent as indicated - no spaces are supplied |
66 | between the command and its arguments, or between its arguments, and | |
67 | .B \en | |
68 | indicates that a newline should be supplied: | |
e0d7ce0e | 69 | .TP 15 |
b4b1244b | 70 | .BI O device \en mode \en |
e0d7ce0e KM |
71 | Open the specified |
72 | .I device | |
73 | using the indicated | |
74 | .IR mode . | |
75 | .I Device | |
76 | is a full pathname and | |
77 | .I mode | |
78 | is an ASCII representation of a decimal | |
79 | number suitable for passing to | |
80 | .IR open (2). | |
81 | If a device had already been opened, it is | |
82 | closed before a new open is performed. | |
83 | .TP 15 | |
b4b1244b | 84 | .BI C device \en |
e0d7ce0e KM |
85 | Close the currently open device. The |
86 | .I device | |
87 | specified is ignored. | |
88 | .TP 15 | |
b4b1244b | 89 | .BI L whence \en offset \en |
e0d7ce0e KM |
90 | Perform an |
91 | .IR lseek (2) | |
92 | operation using the specified parameters. | |
93 | The response value is that returned from the | |
94 | .I lseek | |
95 | call. | |
96 | .TP 15 | |
b4b1244b | 97 | .BI W count \en |
e0d7ce0e KM |
98 | Write data onto the open device. |
99 | .I Rmt | |
100 | reads | |
101 | .I count | |
102 | bytes from the connection, aborting if | |
103 | a premature end-of-file is encountered. | |
104 | The response value is that returned from | |
105 | the | |
106 | .IR write (2) | |
107 | call. | |
108 | .TP 15 | |
b4b1244b | 109 | .BI R count \en |
e0d7ce0e KM |
110 | Read |
111 | .I count | |
112 | bytes of data from the open device. | |
113 | If | |
114 | .I count | |
115 | exceeds the size of the data buffer (10 kilobytes), it is | |
116 | truncated to the data buffer size. | |
117 | .I Rmt | |
118 | then performs the requested | |
119 | .IR read (2) | |
120 | and responds with | |
b4b1244b KM |
121 | .BI A count-read \en |
122 | if the read was | |
e0d7ce0e KM |
123 | successful; otherwise an error in the |
124 | standard format is returned. If the read | |
125 | was successful, the data read is then sent. | |
126 | .TP 15 | |
b4b1244b | 127 | .BI I operation \en count \en |
e0d7ce0e KM |
128 | Perform a MTIOCOP |
129 | .IR ioctl (2) | |
130 | command using the specified parameters. | |
131 | The parameters are interpreted as the | |
132 | ASCII representations of the decimal values | |
133 | to place in the | |
134 | .I mt_op | |
135 | and | |
136 | .I mt_count | |
137 | fields of the structure used in the | |
138 | .I ioctl | |
139 | call. The return value is the | |
140 | .I count | |
141 | parameter when the operation is successful. | |
142 | .TP 15 | |
143 | .B S | |
144 | Return the status of the open device, as | |
145 | obtained with a MTIOCGET | |
146 | .I ioctl | |
147 | call. If the operation was successful, | |
148 | an ``ack'' is sent with the size of the | |
149 | status buffer, then the status buffer is | |
150 | sent (in binary). | |
151 | .PP | |
152 | Any other command causes | |
153 | .I rmt | |
154 | to exit. | |
155 | .SH DIAGNOSTICS | |
156 | All responses are of the form described above. | |
157 | .SH "SEE ALSO" | |
1ecd0cc4 | 158 | rcmd(3), rexec(3), mtio(4), rdump(8), rrestore(8) |
e0d7ce0e KM |
159 | .SH BUGS |
160 | People tempted to use this for a remote file access protocol | |
161 | are discouraged. |