2 .\" Copyright (c) 1983 Regents of the University
3 .\" of California. All rights reserved. The Berkeley software License Agreement
4 .\" specifies the terms and conditions for redistribution. Copyright (c) 1995
5 .\" Sun Microsystems, Inc. All Rights Reserved.
7 .TH RMT 1M "Nov 6, 2000"
9 rmt \- remote magtape protocol module
19 \fBrmt\fR is a program used by the remote dump and restore programs in
20 manipulating a magnetic tape drive through an interprocess communication
21 connection. \fBrmt\fR is normally started up with an \fBrexec\fR(3SOCKET) or
22 \fBrcmd\fR(3SOCKET) call.
25 The \fBrmt\fR program accepts requests that are specific to the manipulation of
26 magnetic tapes, performs the commands, then responds with a status indication.
27 All responses are in \fBASCII\fR and in one of two forms. Successful commands
40 \fB\fBA\fR\fInumber\fR\fB\en\fR\fR
43 where \fInumber\fR is an \fBASCII\fR representation of a decimal number.
48 Unsuccessful commands are responded to with:
52 \fB\fBE\fR\fIerror-number\fR\fB\en\fR\fIerror-message\fR\fB\en\fR\fR
56 where \fIerror-number\fR is one of the possible error numbers described in
57 \fBintro\fR(3), and \fIerror-message\fR is the corresponding error string as
58 printed from a call to \fBperror\fR(3C).
63 The protocol consists of the following commands:
70 Return the status of the open device, as obtained with a \fBMTIOCGET\fR
71 \fBioctl\fR call. If the operation was successful, an "ack" is sent with the
72 size of the status buffer, then the status buffer is sent (in binary).
78 \fB\fBC\fR\fIdevice\fR\fB\en\fR\fR
81 Close the currently open device. The \fIdevice\fR specified is ignored.
87 \fB\fBI\fR\fIoperation\fR\fB\en\fR\fIcount\fR\fB\en\fR\fR
90 Perform a \fBMTIOCOP\fR \fBioctl\fR(2) command using the specified parameters.
91 The parameters are interpreted as the \fBASCII\fR representations of the
92 decimal values to place in the \fImt_op\fR and \fImt_count\fR fields of the
93 structure used in the \fBioctl\fR call. When the operation is successful the
94 return value is the \fIcount\fR parameter.
100 \fB\fBL\fR\fIoffset\fR\fB\en\fR\fBwhence\fR\fB\en\fR\fR
103 Perform an \fBlseek\fR(2) operation using the specified parameters. The
104 response value is returned from the \fBlseek\fR call.
110 \fB\fBO\fR\fIdevice\fR\fB\en\fR\fImode\fR\fB\en\fR\fR
113 Open the specified \fIdevice\fR using the indicated \fImode\fR. \fIdevice\fR is
114 a full pathname, and \fImode\fR is an \fBASCII\fR representation of a decimal
115 number suitable for passing to \fBopen\fR(9E). If a device is already open, it
116 is closed before a new open is performed.
122 \fB\fBR\fR\fIcount\fR\fB\en\fR\fR
125 Read \fIcount\fR bytes of data from the open device. \fBrmt\fR performs the
126 requested \fBread\fR(9E) and responds with \fBA\fR\fIcount-read\en\fR if the
127 read was successful; otherwise an error in standard format is returned. If the
128 read was successful, the data read is sent.
134 \fB\fBW\fR\fIcount\fR\fB\en\fR\fR
137 Write data onto the open device. \fBrmt\fR reads \fIcount\fR bytes from the
138 connection, aborting if a premature \fBEOF\fR is encountered. The response
139 value is returned from the \fBwrite\fR(9E) call.
144 Any other command causes \fBrmt\fR to exit.
148 \fBufsdump\fR(1M), \fBufsrestore\fR(1M), \fBintro\fR(3), \fBioctl\fR(2),
149 \fBlseek\fR(2), \fBperror \fR(3C), \fBrcmd\fR(3SOCKET), \fBrexec\fR(3SOCKET),
150 \fBattributes\fR(5), \fBmtio\fR(7I), \fBopen\fR(9E), \fBread\fR(9E),
155 All responses are of the form described above.
159 Do not use this for a remote file access protocol.