1 .\" $NetBSD: rmt.8,v 1.13 2003/08/07 11:25:42 agc 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. Neither the name of the University nor the names of its contributors
15 .\" may be used to endorse or promote products derived from this software
16 .\" without specific prior written permission.
18 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
19 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
22 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
26 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
27 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 .\" @(#)rmt.8 8.3 (Berkeley) 6/1/94
37 .Nd remote magtape protocol module
42 is a program used by the remote dump and restore programs
43 in manipulating a magnetic tape drive through an interprocess
44 communication connection.
46 is normally started up with an
54 program accepts requests specific to the manipulation of
55 magnetic tapes, performs the commands, then responds with
56 a status indication. All responses are in
60 Successful commands have responses of:
61 .Bd -filled -offset indent
63 .Sy A Ar number No \en
70 representation of a decimal number.
71 Unsuccessful commands are responded to with:
72 .Bd -filled -offset indent
74 .Xo Sy E Ar error-number
75 .No \en Ar error-message
82 is one of the possible error
87 is the corresponding error string as printed
90 The protocol comprises the
91 following commands, which are sent as indicated - no spaces are supplied
92 between the command and its arguments, or between its arguments, and
94 indicates that a newline should be supplied:
96 .It Sy \&O Ns Ar device Ns \en Ns Ar mode Ns \en
102 is a full pathname and
106 representation of a decimal
107 number suitable for passing to
109 If a device had already been opened, it is
110 closed before a new open is performed.
111 .It Sy C Ns Ar device Ns \en
112 Close the currently open device. The
114 specified is ignored.
115 .It Sy L Ns Ar offset Ns \en Ns Ar whence Ns \en
118 operation using the specified parameters.
119 The response value is that returned from the
123 .It Sy W Ar count No \en
125 Write data onto the open device.
129 bytes from the connection, aborting if
130 a premature end-of-file is encountered.
131 The response value is that returned from
136 .It Sy R Ar count No \en
140 bytes of data from the open device.
143 exceeds the size of the data buffer (10 kilobytes), it is
144 truncated to the data buffer size.
146 then performs the requested
150 .Sy A Ar count-read No \en
153 successful; otherwise an error in the
154 standard format is returned. If the read
155 was successful, the data read is then sent.
156 .It Sy I Ns Ar operation Ns \en Ns Ar count Ns \en
161 command using the specified parameters.
162 The parameters are interpreted as the
164 representations of the decimal values
169 fields of the structure used in the
171 call. The return value is the
173 parameter when the operation is successful.
175 Return the status of the open device, as
179 call. If the operation was successful,
180 an ``ack'' is sent with the size of the
181 status buffer, then the status buffer is
185 Any other command causes
189 All responses are of the form described above.
202 People should be discouraged from using this for a remote
203 file access protocol.