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
18 \fBrmt\fR is a program used by the remote dump and restore programs in
19 manipulating a magnetic tape drive through an interprocess communication
20 connection. \fBrmt\fR is normally started up with an \fBrexec\fR(3SOCKET) or
21 \fBrcmd\fR(3SOCKET) call.
24 The \fBrmt\fR program accepts requests that are specific to the manipulation of
25 magnetic tapes, performs the commands, then responds with a status indication.
26 All responses are in \fBASCII\fR and in one of two forms. Successful commands
39 \fB\fBA\fR\fInumber\fR\fB\en\fR\fR
42 where \fInumber\fR is an \fBASCII\fR representation of a decimal number.
47 Unsuccessful commands are responded to with:
51 \fB\fBE\fR\fIerror-number\fR\fB\en\fR\fIerror-message\fR\fB\en\fR\fR
55 where \fIerror-number\fR is one of the possible error numbers described in
56 \fBIntro\fR(3), and \fIerror-message\fR is the corresponding error string as
57 printed from a call to \fBperror\fR(3C).
62 The protocol consists of the following commands:
69 Return the status of the open device, as obtained with a \fBMTIOCGET\fR
70 \fBioctl\fR call. If the operation was successful, an "ack" is sent with the
71 size of the status buffer, then the status buffer is sent (in binary).
77 \fB\fBC\fR\fIdevice\fR\fB\en\fR\fR
80 Close the currently open device. The \fIdevice\fR specified is ignored.
86 \fB\fBI\fR\fIoperation\fR\fB\en\fR\fIcount\fR\fB\en\fR\fR
89 Perform a \fBMTIOCOP\fR \fBioctl\fR(2) command using the specified parameters.
90 The parameters are interpreted as the \fBASCII\fR representations of the
91 decimal values to place in the \fImt_op\fR and \fImt_count\fR fields of the
92 structure used in the \fBioctl\fR call. When the operation is successful the
93 return value is the \fIcount\fR parameter.
99 \fB\fBL\fR\fIoffset\fR\fB\en\fR\fBwhence\fR\fB\en\fR\fR
102 Perform an \fBlseek\fR(2) operation using the specified parameters. The
103 response value is returned from the \fBlseek\fR call.
109 \fB\fBO\fR\fIdevice\fR\fB\en\fR\fImode\fR\fB\en\fR\fR
112 Open the specified \fIdevice\fR using the indicated \fImode\fR. \fIdevice\fR is
113 a full pathname, and \fImode\fR is an \fBASCII\fR representation of a decimal
114 number suitable for passing to \fBopen\fR(9E). If a device is already open, it
115 is closed before a new open is performed.
121 \fB\fBR\fR\fIcount\fR\fB\en\fR\fR
124 Read \fIcount\fR bytes of data from the open device. \fBrmt\fR performs the
125 requested \fBread\fR(9E) and responds with \fBA\fR\fIcount-read\en\fR if the
126 read was successful; otherwise an error in standard format is returned. If the
127 read was successful, the data read is sent.
133 \fB\fBW\fR\fIcount\fR\fB\en\fR\fR
136 Write data onto the open device. \fBrmt\fR reads \fIcount\fR bytes from the
137 connection, aborting if a premature \fBEOF\fR is encountered. The response
138 value is returned from the \fBwrite\fR(9E) call.
143 Any other command causes \fBrmt\fR to exit.
146 \fBufsdump\fR(1M), \fBufsrestore\fR(1M), \fBIntro\fR(3), \fBioctl\fR(2),
147 \fBlseek\fR(2), \fBperror\fR(3C), \fBrcmd\fR(3SOCKET), \fBrexec\fR(3SOCKET),
148 \fBattributes\fR(5), \fBmtio\fR(7I), \fBopen\fR(9E), \fBread\fR(9E),
152 All responses are of the form described above.
155 Do not use this for a remote file access protocol.