rmt(1M)rmt(1M)NAMErmt - remote magnetic-tape protocol module
SYNOPSISDESCRIPTION
is a program used by the remote dump and restore programs for manipu‐
lating a magnetic tape drive through an interprocess communication
(IPC) connection. The and commands also use to achieve remote backup
capability (see fbackup(1M) and frecover(1M)). is normally started up
with an or call (see rexec(3N) and rcmd(3N)).
accepts requests specific to the manipulation of magnetic tapes, per‐
forms the commands, then responds with a status indication. DDS
devices that emulate magnetic tapes are also supported. All responses
are in ASCII and in one of two forms. Successful commands have
responses of
where number is an ASCII representation of a decimal number. Unsuc‐
cessful commands are responded to with
where error-number is one of the possible error numbers described in
errno(2) and error-message is the corresponding error string as printed
from a call to (see perror(3C)). The protocol is comprised of the fol‐
lowing commands:
Open the specified device using the indicated mode. device is
a full pathname and mode is an ASCII repre‐
sentation of a decimal number suitable for
passing to (see open(2)). If a device is
already open, it is closed before a new
open is performed.
Open the specified device using the indicated mode. device is
a full pathname and mode is an ASCII repre‐
sentation of an octal number suitable for
passing to If a device is already open, it
is closed before a new open is performed.
Close the currently open device.
The device specified is ignored.
Perform an operation using the specified parameters
(see lseek(2)). The response value is that
returned from by
Write data onto the open device.
reads count bytes from the connection,
aborting if a premature end-of-file is
encountered. The response value is that
returned from by (see write(2)).
Read count bytes of data from the open device.
If count exceeds the size of the data buf‐
fer (10 Kbytes), it is truncated to the
data buffer size. then performs the
requested and responds with if the read was
successful. Otherwise an error is returned
in the standard format. If the read was
successful, the data read is then sent.
Perform a command using the specified parameters.
Parameters are interpreted as ASCII repre‐
sentations of the decimal values to be
placed in the and fields of the structure
used in the call. The return value is the
count parameter when the operation is suc‐
cessful.
Return the status of the open device, as obtained with a
call. If the operation was successful, an
ACK is sent with the size of the status
buffer, then the status buffer is sent (in
binary).
Return the status of the open device, as obtained with a
call. If the operation was successful, an
ACK is sent with the size of the status
buffer, then the status buffer is sent (in
binary). Return the status of the open
device, as obtained with a call. If the
operation was successful, an ACK is sent
with the size of the status buffer, then
the status buffer is sent in the following
ASCII format:
machine<blank>value<newline>
stat_struct_member_name<blank>value<newline>
The end of the data is indicated by an
ASCII NULL character. See for the defini‐
tion. In addition to the struct stat
information, there is an entry in the buf‐
fer describing the machine type as returned
from a call (see uname(2)). In the above
format ``machine'' is a key word. All
fields except of the are returned.
Return the status of the open device, as obtained with a
call. If the operation was successful, an
is sent with the size of the status buffer,
then the status buffer is sent in the fol‐
lowing ASCII format:
machine<blank>value<newline>
mtget_struct_member_name<blank>value<newline>
The end of the data is indicated by an
ASCII NULL character. See for the defini‐
tion. In addition to the struct mtget
information there is an entry in the buffer
describing the machine type as returned
from a call. In the above format "machine"
is a keyword.
Any other command causes to exit.
RETURN VALUE
Device status is returned in the field contains defined macros for
checking the status bits.
DIAGNOSTICS
All responses are of the form described above.
WARNINGS
Use of this command for remote file access protocol is discouraged.
AUTHOR
was developed by the University of California, Berkeley.
SEE ALSOftio(1), fbackup(1M), frecover(1M), dump(1M), restore(1M), rcmd(3N),
rexec(3N).
rmt(1M)