1 .\" Copyright (c) 1983, 1991, 1993
2 .\" The Regents of the University of California. All rights reserved.
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\" notice, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\" notice, this list of conditions and the following disclaimer in the
11 .\" documentation and/or other materials provided with the distribution.
12 .\" 3. All advertising materials mentioning features or use of this software
13 .\" must display the following acknowledgement:
14 .\" This product includes software developed by the University of
15 .\" California, Berkeley and its contributors.
16 .\" 4. Neither the name of the University nor the names of its contributors
17 .\" may be used to endorse or promote products derived from this software
18 .\" without specific prior written permission.
20 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
21 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
24 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32 .\" @(#)rmt.8 8.3 (Berkeley) 6/1/94
33 .\" $FreeBSD: src/usr.sbin/rmt/rmt.8,v 1.5.2.5 2003/03/11 22:31:32 trhodes Exp $
34 .\" $DragonFly: src/usr.sbin/rmt/rmt.8,v 1.5 2007/11/23 23:03:57 swildner Exp $
41 .Nd remote magtape protocol module
47 utility is used by the remote dump and restore programs
48 in manipulating a magnetic tape drive through an interprocess
49 communication connection. It is normally started up with an
55 utility accepts requests specific to the manipulation of
56 magnetic tapes, performs the commands, then responds with
57 a status indication. All responses are in
61 Successful commands have responses of:
62 .Bd -ragged -offset indent
64 .Sy A Ar number No \en
71 representation of a decimal number.
72 Unsuccessful commands are responded to with:
73 .Bd -ragged -offset indent
75 .Xo Sy E Ar error-number
76 .No \en Ar error-message
83 is one of the possible error
88 is the corresponding error string as printed
91 The protocol is comprised of the
92 following commands, which are sent as indicated - no spaces are supplied
93 between the command and its arguments, or between its arguments, and
95 indicates that a newline should be supplied:
98 .It Xo Sy \&O Ar device
99 .No \en Ar mode No \en
107 is a full pathname and
111 representation of a decimal
112 number suitable for passing to
114 If a device had already been opened, it is
115 closed before a new open is performed.
117 .It Xo Sy C Ar device No \en
120 Close the currently open device. The
122 specified is ignored.
131 operation using the specified parameters.
132 The response value is that returned from the
136 .It Sy W Ar count No \en
138 Write data onto the open device.
143 bytes from the connection, aborting if
144 a premature end-of-file is encountered.
145 The response value is that returned from
150 .It Sy R Ar count No \en
154 bytes of data from the open device.
157 exceeds the size of the data buffer (10 kilobytes), it is
158 truncated to the data buffer size.
161 utility then performs the requested
165 .Sy A Ar count-read No \en
168 successful; otherwise an error in the
169 standard format is returned. If the read
170 was successful, the data read is then sent.
172 .It Xo Sy I Ar operation
173 .No \en Ar count No \en
179 command using the specified parameters.
180 The parameters are interpreted as the
182 representations of the decimal values
187 fields of the structure used in the
189 call. The return value is the
191 parameter when the operation is successful.
193 Return the status of the open device, as
197 call. If the operation was successful,
198 an ``ack'' is sent with the size of the
199 status buffer, then the status buffer is
203 Any other command causes
207 All responses are of the form described above.
219 People should be discouraged from using this for a remote
220 file access protocol.