1*0Sstevel@tonic-gate /* 2*0Sstevel@tonic-gate * CDDL HEADER START 3*0Sstevel@tonic-gate * 4*0Sstevel@tonic-gate * The contents of this file are subject to the terms of the 5*0Sstevel@tonic-gate * Common Development and Distribution License, Version 1.0 only 6*0Sstevel@tonic-gate * (the "License"). You may not use this file except in compliance 7*0Sstevel@tonic-gate * with the License. 8*0Sstevel@tonic-gate * 9*0Sstevel@tonic-gate * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 10*0Sstevel@tonic-gate * or http://www.opensolaris.org/os/licensing. 11*0Sstevel@tonic-gate * See the License for the specific language governing permissions 12*0Sstevel@tonic-gate * and limitations under the License. 13*0Sstevel@tonic-gate * 14*0Sstevel@tonic-gate * When distributing Covered Code, include this CDDL HEADER in each 15*0Sstevel@tonic-gate * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 16*0Sstevel@tonic-gate * If applicable, add the following below this CDDL HEADER, with the 17*0Sstevel@tonic-gate * fields enclosed by brackets "[]" replaced with your own identifying 18*0Sstevel@tonic-gate * information: Portions Copyright [yyyy] [name of copyright owner] 19*0Sstevel@tonic-gate * 20*0Sstevel@tonic-gate * CDDL HEADER END 21*0Sstevel@tonic-gate */ 22*0Sstevel@tonic-gate /* 23*0Sstevel@tonic-gate * rex - remote execution server definitions 24*0Sstevel@tonic-gate * 25*0Sstevel@tonic-gate * Copyright (c) 1985 Sun Microsystems, Inc. 26*0Sstevel@tonic-gate */ 27*0Sstevel@tonic-gate 28*0Sstevel@tonic-gate #ifndef _RPCSVC_REX_H 29*0Sstevel@tonic-gate #define _RPCSVC_REX_H 30*0Sstevel@tonic-gate 31*0Sstevel@tonic-gate #ident "%Z%%M% %I% %E% SMI" 32*0Sstevel@tonic-gate /* @(#)rex.h 1.7 89/10/02 Copyr 1985 SMI */ 33*0Sstevel@tonic-gate 34*0Sstevel@tonic-gate #define REXPROG 100017 35*0Sstevel@tonic-gate #define REXPROC_NULL 0 /* no operation */ 36*0Sstevel@tonic-gate #define REXPROC_START 1 /* start a command */ 37*0Sstevel@tonic-gate #define REXPROC_WAIT 2 /* wait for a command to complete */ 38*0Sstevel@tonic-gate #define REXPROC_MODES 3 /* send the tty modes */ 39*0Sstevel@tonic-gate #define REXPROC_WINCH 4 /* signal a window change */ 40*0Sstevel@tonic-gate #define REXPROC_SIGNAL 5 /* other signals */ 41*0Sstevel@tonic-gate 42*0Sstevel@tonic-gate #define REXVERS 1 43*0Sstevel@tonic-gate 44*0Sstevel@tonic-gate /* flags for rst_flags field */ 45*0Sstevel@tonic-gate #define REX_INTERACTIVE 1 /* Interative mode */ 46*0Sstevel@tonic-gate 47*0Sstevel@tonic-gate struct rex_start { 48*0Sstevel@tonic-gate /* 49*0Sstevel@tonic-gate * Structure passed as parameter to start function 50*0Sstevel@tonic-gate */ 51*0Sstevel@tonic-gate char **rst_cmd; /* list of command and args */ 52*0Sstevel@tonic-gate char *rst_host; /* working directory host name */ 53*0Sstevel@tonic-gate char *rst_fsname; /* working directory file system name */ 54*0Sstevel@tonic-gate char *rst_dirwithin; /* working directory within file system */ 55*0Sstevel@tonic-gate char **rst_env; /* list of environment */ 56*0Sstevel@tonic-gate u_short rst_port0; /* port for stdin */ 57*0Sstevel@tonic-gate u_short rst_port1; /* port for stdin */ 58*0Sstevel@tonic-gate u_short rst_port2; /* port for stdin */ 59*0Sstevel@tonic-gate u_long rst_flags; /* options - see #defines above */ 60*0Sstevel@tonic-gate }; 61*0Sstevel@tonic-gate 62*0Sstevel@tonic-gate bool_t xdr_rex_start(); 63*0Sstevel@tonic-gate 64*0Sstevel@tonic-gate struct rex_result { 65*0Sstevel@tonic-gate /* 66*0Sstevel@tonic-gate * Structure returned from the start function 67*0Sstevel@tonic-gate */ 68*0Sstevel@tonic-gate int rlt_stat; /* integer status code */ 69*0Sstevel@tonic-gate char *rlt_message; /* string message for human consumption */ 70*0Sstevel@tonic-gate }; 71*0Sstevel@tonic-gate bool_t xdr_rex_result(); 72*0Sstevel@tonic-gate bool_t xdr_tchars(); 73*0Sstevel@tonic-gate bool_t xdr_ltchars(); 74*0Sstevel@tonic-gate bool_t xdr_sgttyb(); 75*0Sstevel@tonic-gate 76*0Sstevel@tonic-gate /* 77*0Sstevel@tonic-gate * sgttyb structure changed from BSD to SVR4. Since we send it over the 78*0Sstevel@tonic-gate * protocol, we stick to the old one for compatability 79*0Sstevel@tonic-gate */ 80*0Sstevel@tonic-gate struct bsd_sgttyb { 81*0Sstevel@tonic-gate char sg_ispeed; /* input speed */ 82*0Sstevel@tonic-gate char sg_ospeed; /* output speed */ 83*0Sstevel@tonic-gate char sg_erase; /* erase character */ 84*0Sstevel@tonic-gate char sg_kill; /* kill character */ 85*0Sstevel@tonic-gate short sg_flags; /* mode flags */ 86*0Sstevel@tonic-gate }; 87*0Sstevel@tonic-gate 88*0Sstevel@tonic-gate struct rex_ttymode { 89*0Sstevel@tonic-gate /* 90*0Sstevel@tonic-gate * Structure sent to set-up the tty modes 91*0Sstevel@tonic-gate */ 92*0Sstevel@tonic-gate struct bsd_sgttyb basic; /* standard unix tty flags */ 93*0Sstevel@tonic-gate struct tchars more; /* interrupt, kill characters, etc. */ 94*0Sstevel@tonic-gate struct ltchars yetmore; /* special Bezerkeley characters */ 95*0Sstevel@tonic-gate u_long andmore; /* and Berkeley modes */ 96*0Sstevel@tonic-gate }; 97*0Sstevel@tonic-gate 98*0Sstevel@tonic-gate bool_t xdr_rex_ttymode(); 99*0Sstevel@tonic-gate 100*0Sstevel@tonic-gate struct rex_ttysize { 101*0Sstevel@tonic-gate int ts_lines; 102*0Sstevel@tonic-gate int ts_cols; 103*0Sstevel@tonic-gate }; 104*0Sstevel@tonic-gate typedef struct rex_ttysize rex_ttysize; 105*0Sstevel@tonic-gate bool_t xdr_rex_ttysize(); 106*0Sstevel@tonic-gate 107*0Sstevel@tonic-gate 108*0Sstevel@tonic-gate #endif /* _RPCSVC_REX_H */ 109