4.3BSD-Reno/share/man/cat8/rmt.0

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




RMT(8)			      1990			   RMT(8)



NNAAMMEE
     rmt - remote magtape protocol module

SSYYNNOOPPSSIISS
     //eettcc//rrmmtt

DDEESSCCRRIIPPTTIIOONN
     _R_m_t is a program used by the remote dump and restore pro-
     grams 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(3X) or _r_c_m_d(3X) call.

     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 and in
     one of two forms. Successful commands have responses of

	  AA_n_u_m_b_e_r\\nn

     where _n_u_m_b_e_r is an ASCII representation of a decimal number.
     Unsuccessful commands are responded to with

	  EE_e_r_r_o_r-_n_u_m_b_e_r\\nn_e_r_r_o_r-_m_e_s_s_a_g_e\\nn

     where _e_r_r_o_r-_n_u_m_b_e_r is one of the possible error numbers
     described in _i_n_t_r_o(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 _p_e_r_r_o_r(3).	The pro-
     tocol 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 \\nn indi-
     cates that a newline should be supplied:

     OO_d_e_v_i_c_e\\nn_m_o_d_e\\nn
		    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(2).  If a device
		    had already been opened, it is closed before
		    a new open is performed.

     CC_d_e_v_i_c_e\\nn	    Close the currently open device.  The _d_e_v_i_c_e
		    specified is ignored.

     LL_w_h_e_n_c_e\\nn_o_f_f_s_e_t\\nn
		    Perform an _l_s_e_e_k(2) operation using the
		    specified parameters.  The response value is
		    that returned from the _l_s_e_e_k call.

     WW_c_o_u_n_t\\nn	    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



Printed 7/27/90               June				1






RMT(8)			      1990			   RMT(8)



		    _w_r_i_t_e(2) call.

     RR_c_o_u_n_t\\nn	    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 (10 kilobytes), it is truncated to the
		    data buffer size.  _R_m_t then performs the
		    requested _r_e_a_d(2) and responds with AA_c_o_u_n_t-
		    _r_e_a_d\\nn if the read was successful; otherwise
		    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\\nn_c_o_u_n_t\\nn
		    Perform a MTIOCOP _i_o_c_t_l(2) command 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.

     SS		    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.

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 discouraged.

















Printed 7/27/90               June				2