Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ rex(NS) — OpenDesktop Software Development System 3.0.0

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

on(NC)

rexd(NADM)


 rex(NS)                        6 January 1993                        rex(NS)


 Name

    rex - remote execution protocol

 Syntax


    #include <rpcsvc/rex.h>


 Description

    This server will execute commands remotely.  The working directory and
    environment of the command can be specified and the standard input and
    output of the command can be arbitrarily redirected.  An option is pro-
    vided for interactive I/O for programs that expect to be running on ter-
    minals.  Note that this service is only provided with the TCP transport.

 rpc info

    program number:

       REXPROG

    xdr routines:

       int xdr_rex_start(xdrs, start);
               XDR *xdrs;
               struct rex_start *start;
       int  xdr_rex_result(xdrs, result);
               XDR *xdrs;
               struct rex_result *result;
       int xdr_rex_ttymode(xdrs, mode);
               XDR *xdrs;
               struct rex_ttymode *mode;
       int xdr_rex_ttysize(xdrs, size);
               XDR *xdrs;
               struct ttysize *size;

    procs:

       REXPROCSTART
            Takes a rexstart structure, starts a command executing, and
            returns a rexresult structure.

       REXPROCWAIT
            Takes no arguments, waits for a command to finish executing, and
            returns a rexresult structure.

       REXPROCMODES
            Takes a rexttymode structure and sends the tty modes.

       REXPROCWINCH
            Takes a ttysize structure and sends window size information.

    versions:

       REXVERSORIG
            Original version

    structures:

    struct B_sgttyb {
            char    bsg_ispeed;      /* input speed     */
            char    bsg_ospeed;      /* output speed    */
            char    bsg_erase;       /* erase character */
            char    bsg_kill;        /* kill character  */
            short   bsg_flags;
    };


    struct tchars {
            char    t_intrc;         /* interrupt    */
            char    t_quitc;         /* quit         */
            char    t_startc;        /* start output */
            char    t_stopc;         /* stop output  */
            char    t_eofc;          /* end-of-file  */
            char    t_brkc;          /* input delimiter (like nl) */
    };


    struct ltchars {
            char    t_suspc;         /* stop process signal         */
            char    t_dsuspc;        /* delayed stop process signal */
            char    t_rprntc;        /* reprint line                */
            char    t_flushc;        /* flush output (toggles)      */
            char    t_werasc;        /* word erase                  */
            char    t_lnextc;        /* literal next character      */
    };


    #define REX_INTERACTIVE         1       /* Interactive mode */

    struct rex_start {
            char    **rst_cmd;       /* list of command and args             */
            char    *rst_host;       /* working directory host name          */
            char    *rst_fsname;     /* working directory file system name   */
            char    *rst_dirwithin;  /* working directory within file system */
            char    **rst_env;       /* list of environment                  */
            ushort  rst_port0;       /* port for stdin                       */
            ushort  rst_port1;       /* port for stdin                       */
            ushort  rst_port2;       /* port for stdin                       */
            ulong   rst_flags;       /* options - see #defines above         */
    };


    struct rex_result {
            int     rlt_stat;        /* integer status code                  */
            char    *rlt_message;    /* string message for human consumption */
    };


    struct rex_ttymode {
            struct  B_sgttyb basic;  /* Berkeley unix tty flags          */
            struct  tchars more;     /* interrupt, kill characters, etc. */
            struct  ltchars yetmore; /* special Berkeley characters      */
            ulong   andmore;         /* and Berkeley modes               */
    };


    struct ttysize {
            int     ts_lines;        /* number of lines on terminal   */
            int     ts_cols;         /* number of columns on terminal */
    };


 See also

    on(NC) and rexd(NADM).


Typewritten Software • bear@typewritten.org • Edmonds, WA 98026