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