"Fossies" - the Fresh Open Source Software Archive

Member "cvs-1.11.23/windows-NT/rcmd.h" (30 Aug 1995, 1195 Bytes) of package /linux/misc/old/cvs-1.11.23.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "rcmd.h" see the Fossies "Dox" file reference documentation.

    1 /* rcmd.h --- interface to executing commands on remote hosts
    2    Jim Blandy <jimb@cyclic.com> --- August 1995  */
    3 
    4 /* Run the command CMD on the host *AHOST, and return a file descriptor for
    5    a bidirectional stream socket connected to the command's standard input
    6    and output.
    7 
    8    rcmd looks up *AHOST using gethostbyname, and sets *AHOST to the host's
    9    canonical name.  If *AHOST is not found, rcmd returns -1.
   10 
   11    rcmd connects to the remote host at TCP port INPORT.  This should
   12    probably be the "shell" service, port 514.
   13 
   14    LOCUSER is the name of the user on the local machine, and REMUSER is
   15    the name of the user on the remote machine; the remote machine uses this,
   16    along with the source address of the TCP connection, to authenticate
   17    the connection.
   18 
   19    CMD is the command to execute.  The remote host will tokenize it any way
   20    it damn well pleases.  Welcome to Unix.
   21 
   22    FD2P is a feature we don't support, but there's no point in making mindless
   23    deviations from the interface.  Callers should always pass this argument
   24    as zero.  */
   25 extern int rcmd (const char **AHOST,
   26          unsigned short INPORT,
   27          char *LOCUSER,
   28          char *REMUSER,
   29          char *CMD,
   30          int *fd2p);