8980 BIOS clock is sometimes one hour fast
[unleashed.git] / usr / src / man / man1m / rmt.1m
blobb96237e7032a0ce4ce06de51fba65e0cd40e1866
1 '\" te
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.
6 .\" from UCB 4.3
7 .TH RMT 1M "Nov 6, 2000"
8 .SH NAME
9 rmt \- remote magtape protocol module
10 .SH SYNOPSIS
11 .LP
12 .nf
13 \fB/usr/sbin/rmt\fR
14 .fi
16 .SH DESCRIPTION
17 .LP
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.
22 .sp
23 .LP
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
27 have responses of:
28 .sp
29 .in +2
30 .nf
32 .fi
33 .in -2
34 .sp
36 .sp
37 .ne 2
38 .na
39 \fB\fBA\fR\fInumber\fR\fB\en\fR\fR
40 .ad
41 .RS 14n
42 where \fInumber\fR is an \fBASCII\fR representation of a decimal number.
43 .RE
45 .sp
46 .LP
47 Unsuccessful commands are responded to with:
48 .sp
49 .ne 2
50 .na
51 \fB\fBE\fR\fIerror-number\fR\fB\en\fR\fIerror-message\fR\fB\en\fR\fR
52 .ad
53 .sp .6
54 .RS 4n
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).
58 .RE
60 .sp
61 .LP
62  The protocol consists of the following commands:
63 .sp
64 .ne 2
65 .na
66 \fB\fBS\en\fR\fR
67 .ad
68 .RS 25n
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).
72 .RE
74 .sp
75 .ne 2
76 .na
77 \fB\fBC\fR\fIdevice\fR\fB\en\fR\fR
78 .ad
79 .RS 25n
80 Close the currently open device. The \fIdevice\fR specified is ignored.
81 .RE
83 .sp
84 .ne 2
85 .na
86 \fB\fBI\fR\fIoperation\fR\fB\en\fR\fIcount\fR\fB\en\fR\fR
87 .ad
88 .RS 25n
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.
94 .RE
96 .sp
97 .ne 2
98 .na
99 \fB\fBL\fR\fIoffset\fR\fB\en\fR\fBwhence\fR\fB\en\fR\fR
101 .RS 25n
102 Perform an \fBlseek\fR(2) operation using the specified parameters. The
103 response value is returned from the \fBlseek\fR call.
107 .ne 2
109 \fB\fBO\fR\fIdevice\fR\fB\en\fR\fImode\fR\fB\en\fR\fR
111 .RS 25n
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.
119 .ne 2
121 \fB\fBR\fR\fIcount\fR\fB\en\fR\fR
123 .RS 25n
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.
131 .ne 2
133 \fB\fBW\fR\fIcount\fR\fB\en\fR\fR
135 .RS 25n
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.
144 .SH SEE ALSO
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),
149 \fBwrite\fR(9E)
150 .SH DIAGNOSTICS
152 All responses are of the form described above.
153 .SH BUGS
155 Do not use this for a remote file access protocol.