Commit | Line | Data |
---|---|---|
e0d7ce0e KM |
1 | .\" Copyright (c) 1983 Regents of the University of California. |
2 | .\" All rights reserved. The Berkeley software License Agreement | |
3 | .\" specifies the terms and conditions for redistribution. | |
4 | .\" | |
44278051 | 5 | .\" @(#)rmt.8 6.1 (Berkeley) %G% |
e0d7ce0e | 6 | .\" |
44278051 | 7 | .TH RMT 8C "" |
e0d7ce0e KM |
8 | .UC 5 |
9 | .SH NAME | |
10 | rmt \- remote magtape protocol module | |
11 | .SH SYNOPSIS | |
12 | .B /etc/rmt | |
13 | .SH DESCRIPTION | |
14 | .I Rmt | |
15 | is a program used by the remote dump and restore programs | |
16 | in manipulating a magnetic tape drive through an interprocess | |
17 | communication connection. | |
18 | .I Rmt | |
19 | is normally started up with an | |
20 | .IR rexec (3X) | |
21 | or | |
22 | .IR rcmd (3X) | |
23 | call. | |
24 | .PP | |
25 | The | |
26 | .I rmt | |
27 | program accepts requests specific to the manipulation of | |
28 | magnetic tapes, performs the commands, then responds with | |
29 | a status indication. All responses are in ASCII and in | |
30 | one of two forms. | |
31 | Successful commands have responses of | |
32 | .PP | |
33 | .ti +0.5i | |
34 | \fBA\fInumber\fR\en | |
35 | .PP | |
36 | where | |
37 | .I number | |
38 | is an ASCII representation of a decimal number. | |
39 | Unsuccessful commands are responded to with | |
40 | .PP | |
41 | .ti +0.5i | |
42 | \fBE\fIerror-number\fR\en\fIerror-message\fR\en, | |
43 | .PP | |
44 | where | |
45 | .I error-number | |
46 | is one of the possible error | |
47 | numbers described in | |
48 | .IR intro (2) | |
49 | and | |
50 | .I error-message | |
51 | is the corresponding error string as printed | |
52 | from a call to | |
53 | .IR perror (3). | |
54 | The protocol is comprised of the | |
55 | following commands (a space is present between each token). | |
56 | .TP 15 | |
57 | .B O device mode | |
58 | Open the specified | |
59 | .I device | |
60 | using the indicated | |
61 | .IR mode . | |
62 | .I Device | |
63 | is a full pathname and | |
64 | .I mode | |
65 | is an ASCII representation of a decimal | |
66 | number suitable for passing to | |
67 | .IR open (2). | |
68 | If a device had already been opened, it is | |
69 | closed before a new open is performed. | |
70 | .TP 15 | |
71 | .B C device | |
72 | Close the currently open device. The | |
73 | .I device | |
74 | specified is ignored. | |
75 | .TP 15 | |
76 | .B L whence offset | |
77 | Perform an | |
78 | .IR lseek (2) | |
79 | operation using the specified parameters. | |
80 | The response value is that returned from the | |
81 | .I lseek | |
82 | call. | |
83 | .TP 15 | |
84 | .B W count | |
85 | Write data onto the open device. | |
86 | .I Rmt | |
87 | reads | |
88 | .I count | |
89 | bytes from the connection, aborting if | |
90 | a premature end-of-file is encountered. | |
91 | The response value is that returned from | |
92 | the | |
93 | .IR write (2) | |
94 | call. | |
95 | .TP 15 | |
96 | .B R count | |
97 | Read | |
98 | .I count | |
99 | bytes of data from the open device. | |
100 | If | |
101 | .I count | |
102 | exceeds the size of the data buffer (10 kilobytes), it is | |
103 | truncated to the data buffer size. | |
104 | .I Rmt | |
105 | then performs the requested | |
106 | .IR read (2) | |
107 | and responds with | |
108 | \fBA\fIcount-read\fR\en if the read was | |
109 | successful; otherwise an error in the | |
110 | standard format is returned. If the read | |
111 | was successful, the data read is then sent. | |
112 | .TP 15 | |
113 | .B I operation count | |
114 | Perform a MTIOCOP | |
115 | .IR ioctl (2) | |
116 | command using the specified parameters. | |
117 | The parameters are interpreted as the | |
118 | ASCII representations of the decimal values | |
119 | to place in the | |
120 | .I mt_op | |
121 | and | |
122 | .I mt_count | |
123 | fields of the structure used in the | |
124 | .I ioctl | |
125 | call. The return value is the | |
126 | .I count | |
127 | parameter when the operation is successful. | |
128 | .TP 15 | |
129 | .B S | |
130 | Return the status of the open device, as | |
131 | obtained with a MTIOCGET | |
132 | .I ioctl | |
133 | call. If the operation was successful, | |
134 | an ``ack'' is sent with the size of the | |
135 | status buffer, then the status buffer is | |
136 | sent (in binary). | |
137 | .PP | |
138 | Any other command causes | |
139 | .I rmt | |
140 | to exit. | |
141 | .SH DIAGNOSTICS | |
142 | All responses are of the form described above. | |
143 | .SH "SEE ALSO" | |
144 | rcmd(3X), | |
145 | rexec(3X), | |
146 | mtio(4), | |
147 | rdump(8C), | |
148 | rrestore(8C) | |
149 | .SH BUGS | |
150 | People tempted to use this for a remote file access protocol | |
151 | are discouraged. |