1 .\" $NetBSD: rmt.8,v 1.6 1997/10/17 13:03:15 lukem Exp $
3 .\" Copyright (c) 1983, 1991, 1993
4 .\" The Regents of the University of California. All rights reserved.
6 .\" Redistribution and use in source and binary forms, with or without
7 .\" modification, are permitted provided that the following conditions
9 .\" 1. Redistributions of source code must retain the above copyright
10 .\" notice, this list of conditions and the following disclaimer.
11 .\" 2. Redistributions in binary form must reproduce the above copyright
12 .\" notice, this list of conditions and the following disclaimer in the
13 .\" documentation and/or other materials provided with the distribution.
14 .\" 3. All advertising materials mentioning features or use of this software
15 .\" must display the following acknowledgement:
16 .\" This product includes software developed by the University of
17 .\" California, Berkeley and its contributors.
18 .\" 4. Neither the name of the University nor the names of its contributors
19 .\" may be used to endorse or promote products derived from this software
20 .\" without specific prior written permission.
22 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
23 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
25 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
26 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
27 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
28 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
29 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
31 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
34 .\" @(#)rmt.8 8.3 (Berkeley) 6/1/94
41 .Nd remote magtape protocol module
46 is a program used by the remote dump and restore programs
47 in manipulating a magnetic tape drive through an interprocess
48 communication connection.
50 is normally started up with an
58 program accepts requests specific to the manipulation of
59 magnetic tapes, performs the commands, then responds with
60 a status indication. All responses are in
64 Successful commands have responses of:
65 .Bd -filled -offset indent
67 .Sy A Ar number No \en
74 representation of a decimal number.
75 Unsuccessful commands are responded to with:
76 .Bd -filled -offset indent
78 .Xo Sy E Ar error-number
79 .No \en Ar error-message
86 is one of the possible error
91 is the corresponding error string as printed
94 The protocol is comprised of the
95 following commands, which are sent as indicated - no spaces are supplied
96 between the command and its arguments, or between its arguments, and
98 indicates that a newline should be supplied:
101 .It Xo Sy \&O Ar device
102 .No \en Ar mode No \en
109 is a full pathname and
113 representation of a decimal
114 number suitable for passing to
116 If a device had already been opened, it is
117 closed before a new open is performed.
118 .It Xo Sy C Ar device No \en
120 Close the currently open device. The
122 specified is ignored.
130 operation using the specified parameters.
131 The response value is that returned from the
135 .It Sy W Ar count No \en
137 Write data onto the open device.
141 bytes from the connection, aborting if
142 a premature end-of-file is encountered.
143 The response value is that returned from
148 .It Sy R Ar count No \en
152 bytes of data from the open device.
155 exceeds the size of the data buffer (10 kilobytes), it is
156 truncated to the data buffer size.
158 then performs the requested
162 .Sy A Ar count-read No \en
165 successful; otherwise an error in the
166 standard format is returned. If the read
167 was successful, the data read is then sent.
169 .It Xo Sy I Ar operation
170 .No \en Ar count No \en
176 command using the specified parameters.
177 The parameters are interpreted as the
179 representations of the decimal values
184 fields of the structure used in the
186 call. The return value is the
188 parameter when the operation is successful.
191 Return the status of the open device, as
195 call. If the operation was successful,
196 an ``ack'' is sent with the size of the
197 status buffer, then the status buffer is
202 Any other command causes
206 All responses are of the form described above.
214 People should be discouraged from using this for a remote
215 file access protocol.