


_O_n_l_i_n_e _M_a_n_u_a_l        System Manager Commands              rmt(8c)



NNNNAAAAMMMMEEEE
     rmt - remote magtape protocol module

SSSSYYYYNNNNTTTTAAAAXXXX
     ////eeeettttcccc////rrrrmmmmtttt [_d_e_b_u_g-_f_i_l_e]

DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
     _r_m_t is a program used by the remote dump/restore and tar/dd
     programs in manipulating a magnetic tape drive through an
     interprocess communication connection.  _r_m_t is normally
     started up with an _r_e_x_e_c or _r_c_m_d library call.  If _d_e_b_u_g-
     _f_i_l_e is specified all commands and error messages are copied
     to this file.

     The _r_m_t program accepts requests specific to the manipula-
     tion of magnetic tapes, performs the commands, then responds
     with a status indication. All responses are in ASCII, as
     described under Diagnostics.

     The protocol has following commands.  (Use a new line after
     each parameter. No extra spaces are allowed, however numeric
     parameters ignore leading spaces.)

     OOOO _d_e_v_i_c_e _m_o_d_e  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 _o_p_e_n.  If a device
                    had already been opened, it is closed before
                    a new open is performed.

     CCCC _d_e_v_i_c_e       Close the currently open device.  The _d_e_v_i_c_e
                    specified is ignored.

     LLLL _w_h_e_n_c_e _o_f_f_s_e_t
                    Perform an _l_s_e_e_k system call using the speci-
                    fied parameters.  The response value is that
                    returned from the _l_s_e_e_k call.

     WWWW _c_o_u_n_t        Write data onto the open device.  _r_m_t 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
                    _w_r_i_t_e system call.

     RRRR _c_o_u_n_t        Read _c_o_u_n_t bytes of data from the open dev-
                    ice.  If _c_o_u_n_t exceeds the size of the data
                    buffer (64 kilobytes), it is truncated to the
                    data buffer size.  _r_m_t then performs the
                    requested _r_e_a_d system call and responds with
                    number of bytes read if the read was success-
                    ful; otherwise an error in the standard for-
                    mat is returned.  If the read was successful,
                    the data read is then sent.

     IIII _o_p_e_r_a_t_i_o_n _c_o_u_n_t
                    Perform a MTIOCOP _i_o_c_t_l system call using the
                    specified parameters.  The parameters are
                    interpreted as the ASCII representations 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
                    _i_o_c_t_l call.  The return value is the _c_o_u_n_t
                    parameter when the operation is successful.

     SSSS              Return the status of the open device, as
                    obtained with a MTIOCGET _i_o_c_t_l 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 _r_m_t to exit.

DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
     Succesful messages have the following form:
          AAAA_n_u_m_b_e_r\n
     _n_u_m_b_e_r is the ASCII representation of a decimal number as
     described above.

     Error messages have the following form:
          EEEE_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-_m_e_s_s_a_g_e is the corresponding error string as printed
     from a call to library function _p_e_r_r_o_r.

SSSSEEEEEEEE AAAALLLLSSSSOOOO
     User Commands (1):  rdd, rtar
     System Calls (2):  ioctl, lseek, open, read, write
     Library Functions (3):  perror, rcmd, rexec
     System Facilities (4):  mtio
     System Manager Commands (8):  rdump, rrestore

LLLLIIIIMMMMIIIITTTTAAAATTTTIIIIOOOONNNNSSSS
     We do not recommend use of this protocol for remote access.

December 1989                      TX System Manager's Reference


























