4.4BSD/usr/share/man/cat8/rmt.0

Compare this file to the similar file:
Show the results in this format:

RMT(8)                    BSD System Manager's Manual                   RMT(8)

NNAAMMEE
     rrmmtt - remote magtape protocol module

SSYYNNOOPPSSIISS
     rrmmtt

DDEESSCCRRIIPPTTIIOONN
     RRmmtt is a program used by the remote dump and restore programs in manipu-
     lating a magnetic tape drive through an interprocess communication con-
     nection.  RRmmtt is normally started up with an rexec(3) or rcmd(3) call.

     The rrmmtt program accepts requests specific to the manipulation of magnetic
     tapes, performs the commands, then responds with a status indication.
     All responses are in ASCII and in one of two forms.  Successful commands
     have responses of:

           AA_n_u_m_b_e_r\n

     _N_u_m_b_e_r is an ASCII representation of a decimal number.  Unsuccessful com-
     mands are responded to with:

           EE_e_r_r_o_r_-_n_u_m_b_e_r\n_e_r_r_o_r_-_m_e_s_s_a_g_e\n

     _E_r_r_o_r_-_n_u_m_b_e_r is one of the possible error numbers described in intro(2)
     and _e_r_r_o_r_-_m_e_s_s_a_g_e is the corresponding error string as printed from a
     call to perror(3).  The protocol is comprised of the following commands,
     which are sent as indicated - no spaces are supplied between the command
     and its arguments, or between its arguments, and `\n' indicates that a
     newline should be supplied:

     OO_d_e_v_i_c_e\n_m_o_d_e\n
             Open the specified _d_e_v_i_c_e using the indicated _m_o_d_e. _D_e_v_i_c_e is a
             full pathname and _m_o_d_e is an ASCII representation of a decimal
             number suitable for passing to open(2).  If a device had already
             been opened, it is closed before a new open is performed.

     CC_d_e_v_i_c_e\n
             Close the currently open device.  The _d_e_v_i_c_e specified is ig-
             nored.

     LL_w_h_e_n_c_e\n_o_f_f_s_e_t\n
             Perform an lseek(2) operation using the specified parameters.
             The response value is that returned from the lseek call.

     WW_c_o_u_n_t\n
             Write data onto the open device.  RRmmtt reads _c_o_u_n_t bytes from the
             connection, aborting if a premature end-of-file is encountered.
             The response value is that returned from the write(2) call.

     RR_c_o_u_n_t\n
             Read _c_o_u_n_t bytes of data from the open device.  If _c_o_u_n_t exceeds
             the size of the data buffer (10 kilobytes), it is truncated to
             the data buffer size.  rrmmtt then performs the requested read(2)
             and responds with AA_c_o_u_n_t_-_r_e_a_d\n if the read was successful; oth-
             erwise an error in the standard format is returned.  If the read
             was successful, the data read is then sent.

     II_o_p_e_r_a_t_i_o_n\n_c_o_u_n_t\n
             Perform a MTIOCOP ioctl(2) command using the specified parame-
             ters.  The parameters are interpreted as the ASCII representa-
             tions of the decimal values to place in the _m_t___o_p and _m_t___c_o_u_n_t
             fields of the structure used in the ioctl call.  The return value

             is the _c_o_u_n_t parameter when the operation is successful.

     SS       Return the status of the open device, as obtained with a MTIOCGET
             ioctl 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).

     Any other command causes rrmmtt to exit.

DDIIAAGGNNOOSSTTIICCSS
     All responses are of the form described above.

SSEEEE AALLSSOO
     rcmd(3),  rexec(3),  mtio(4),  rdump(8),  rrestore(8)

BBUUGGSS
     People tempted to use this for a remote file access protocol are discour-
     aged.

HHIISSTTOORRYY
     The rrmmtt command appeared in 4.2BSD.

4.2 Berkeley Distribution        June 6, 1993                                2