1*7c478bd9Sstevel@tonic-gate /* 2*7c478bd9Sstevel@tonic-gate * CDDL HEADER START 3*7c478bd9Sstevel@tonic-gate * 4*7c478bd9Sstevel@tonic-gate * The contents of this file are subject to the terms of the 5*7c478bd9Sstevel@tonic-gate * Common Development and Distribution License, Version 1.0 only 6*7c478bd9Sstevel@tonic-gate * (the "License"). You may not use this file except in compliance 7*7c478bd9Sstevel@tonic-gate * with the License. 8*7c478bd9Sstevel@tonic-gate * 9*7c478bd9Sstevel@tonic-gate * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 10*7c478bd9Sstevel@tonic-gate * or http://www.opensolaris.org/os/licensing. 11*7c478bd9Sstevel@tonic-gate * See the License for the specific language governing permissions 12*7c478bd9Sstevel@tonic-gate * and limitations under the License. 13*7c478bd9Sstevel@tonic-gate * 14*7c478bd9Sstevel@tonic-gate * When distributing Covered Code, include this CDDL HEADER in each 15*7c478bd9Sstevel@tonic-gate * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 16*7c478bd9Sstevel@tonic-gate * If applicable, add the following below this CDDL HEADER, with the 17*7c478bd9Sstevel@tonic-gate * fields enclosed by brackets "[]" replaced with your own identifying 18*7c478bd9Sstevel@tonic-gate * information: Portions Copyright [yyyy] [name of copyright owner] 19*7c478bd9Sstevel@tonic-gate * 20*7c478bd9Sstevel@tonic-gate * CDDL HEADER END 21*7c478bd9Sstevel@tonic-gate */ 22*7c478bd9Sstevel@tonic-gate /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ 23*7c478bd9Sstevel@tonic-gate /* All Rights Reserved */ 24*7c478bd9Sstevel@tonic-gate 25*7c478bd9Sstevel@tonic-gate 26*7c478bd9Sstevel@tonic-gate #ifndef _SYS_JIOCTL_H 27*7c478bd9Sstevel@tonic-gate #define _SYS_JIOCTL_H 28*7c478bd9Sstevel@tonic-gate 29*7c478bd9Sstevel@tonic-gate #pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 11.5 */ 30*7c478bd9Sstevel@tonic-gate 31*7c478bd9Sstevel@tonic-gate #ifdef __cplusplus 32*7c478bd9Sstevel@tonic-gate extern "C" { 33*7c478bd9Sstevel@tonic-gate #endif 34*7c478bd9Sstevel@tonic-gate 35*7c478bd9Sstevel@tonic-gate /* 36*7c478bd9Sstevel@tonic-gate * jioctl.h 37*7c478bd9Sstevel@tonic-gate * 38*7c478bd9Sstevel@tonic-gate * Low level control codes for communication between the host and a 39*7c478bd9Sstevel@tonic-gate * windowing terminal. See windows.h for additional messages used by 40*7c478bd9Sstevel@tonic-gate * libwindows. 41*7c478bd9Sstevel@tonic-gate * 42*7c478bd9Sstevel@tonic-gate * In case you are wondering what the "j" in jioctl stands for, 43*7c478bd9Sstevel@tonic-gate * the "j" stands for jerq which was the first windowing terminal. 44*7c478bd9Sstevel@tonic-gate * The jerq became the Blit which begot the 5620 DMD which begot 45*7c478bd9Sstevel@tonic-gate * the 615, the 620 and the 630 MTG. 46*7c478bd9Sstevel@tonic-gate */ 47*7c478bd9Sstevel@tonic-gate 48*7c478bd9Sstevel@tonic-gate 49*7c478bd9Sstevel@tonic-gate /* 50*7c478bd9Sstevel@tonic-gate * Ioctl requests sent to the xt driver. The types JMPX, JWINSIZE, 51*7c478bd9Sstevel@tonic-gate * and JTRUN are processed locally by xt. The others involve sending 52*7c478bd9Sstevel@tonic-gate * a control message to the terminal on channel 0 (the control 53*7c478bd9Sstevel@tonic-gate * channel). In the control message, the lower bytes of these defines 54*7c478bd9Sstevel@tonic-gate * are used as the first byte of the control message. 55*7c478bd9Sstevel@tonic-gate * 56*7c478bd9Sstevel@tonic-gate * Note that packets sent from the host to the terminal on channels 57*7c478bd9Sstevel@tonic-gate * other than 0 are implicitly data packets. 58*7c478bd9Sstevel@tonic-gate */ 59*7c478bd9Sstevel@tonic-gate 60*7c478bd9Sstevel@tonic-gate #define JTYPE ('j'<<8) 61*7c478bd9Sstevel@tonic-gate #define JBOOT (JTYPE|1) /* start a download in a window */ 62*7c478bd9Sstevel@tonic-gate #define JTERM (JTYPE|2) /* return to default terminal emulator */ 63*7c478bd9Sstevel@tonic-gate #define JMPX (JTYPE|3) /* currently running layers? */ 64*7c478bd9Sstevel@tonic-gate 65*7c478bd9Sstevel@tonic-gate /* 66*7c478bd9Sstevel@tonic-gate * Timeout in seconds. Not supported by streams xt, but reserve 67*7c478bd9Sstevel@tonic-gate * this number to avoid confusion. 68*7c478bd9Sstevel@tonic-gate * #define JTIMO (JTYPE|4) 69*7c478bd9Sstevel@tonic-gate */ 70*7c478bd9Sstevel@tonic-gate 71*7c478bd9Sstevel@tonic-gate #define JWINSIZE (JTYPE|5) /* inquire window size */ 72*7c478bd9Sstevel@tonic-gate #define JTIMOM (JTYPE|6) /* timeouts in millisecs */ 73*7c478bd9Sstevel@tonic-gate #define JZOMBOOT (JTYPE|7) /* JBOOT but wait for debugger to run */ 74*7c478bd9Sstevel@tonic-gate #define JAGENT (JTYPE|9) /* control for both directions */ 75*7c478bd9Sstevel@tonic-gate #define JTRUN (JTYPE|10) /* send runlayer command to layers cmd */ 76*7c478bd9Sstevel@tonic-gate #define JXTPROTO (JTYPE|11) /* set xt protocol type */ 77*7c478bd9Sstevel@tonic-gate 78*7c478bd9Sstevel@tonic-gate /* 79*7c478bd9Sstevel@tonic-gate * jwinsize structure used by JWINSIZE message. 80*7c478bd9Sstevel@tonic-gate */ 81*7c478bd9Sstevel@tonic-gate 82*7c478bd9Sstevel@tonic-gate struct jwinsize 83*7c478bd9Sstevel@tonic-gate { 84*7c478bd9Sstevel@tonic-gate char bytesx, bytesy; /* Window size in characters */ 85*7c478bd9Sstevel@tonic-gate short bitsx, bitsy; /* Window size in bits */ 86*7c478bd9Sstevel@tonic-gate }; 87*7c478bd9Sstevel@tonic-gate 88*7c478bd9Sstevel@tonic-gate /* 89*7c478bd9Sstevel@tonic-gate * Channel 0 control message format. 90*7c478bd9Sstevel@tonic-gate */ 91*7c478bd9Sstevel@tonic-gate 92*7c478bd9Sstevel@tonic-gate struct jerqmesg 93*7c478bd9Sstevel@tonic-gate { 94*7c478bd9Sstevel@tonic-gate char cmd; /* A control code above */ 95*7c478bd9Sstevel@tonic-gate char chan; /* Channel it refers to */ 96*7c478bd9Sstevel@tonic-gate }; 97*7c478bd9Sstevel@tonic-gate 98*7c478bd9Sstevel@tonic-gate /* 99*7c478bd9Sstevel@tonic-gate * The first byte of every xt packet from the terminal to the host 100*7c478bd9Sstevel@tonic-gate * is one of these control codes. Data packets start with either 101*7c478bd9Sstevel@tonic-gate * C_SENDCHAR or C_SENDNCHARS. 102*7c478bd9Sstevel@tonic-gate * 103*7c478bd9Sstevel@tonic-gate * The usual format is: [command][data] 104*7c478bd9Sstevel@tonic-gate */ 105*7c478bd9Sstevel@tonic-gate 106*7c478bd9Sstevel@tonic-gate #define C_SENDCHAR 1 /* Send character to layer process */ 107*7c478bd9Sstevel@tonic-gate #define C_NEW 2 /* Create a new layer */ 108*7c478bd9Sstevel@tonic-gate #define C_UNBLK 3 /* Unblock layer process */ 109*7c478bd9Sstevel@tonic-gate #define C_DELETE 4 /* Delete layer process group */ 110*7c478bd9Sstevel@tonic-gate #define C_EXIT 5 /* Exit layers */ 111*7c478bd9Sstevel@tonic-gate #define C_DEFUNCT 6 /* Send terminate signal to proc. group */ 112*7c478bd9Sstevel@tonic-gate #define C_SENDNCHARS 7 /* Send several characters to layer proc. */ 113*7c478bd9Sstevel@tonic-gate #define C_RESHAPE 8 /* Layer has been reshaped */ 114*7c478bd9Sstevel@tonic-gate #define C_RUN 9 /* Run command in layer (local to xt/layers) */ 115*7c478bd9Sstevel@tonic-gate #define C_NOFLOW 10 /* Disable network xt flow control */ 116*7c478bd9Sstevel@tonic-gate #define C_YESFLOW 11 /* Enable network xt flow control */ 117*7c478bd9Sstevel@tonic-gate 118*7c478bd9Sstevel@tonic-gate /* 119*7c478bd9Sstevel@tonic-gate * Format of JAGENT packets. 120*7c478bd9Sstevel@tonic-gate */ 121*7c478bd9Sstevel@tonic-gate 122*7c478bd9Sstevel@tonic-gate struct bagent { 123*7c478bd9Sstevel@tonic-gate int size; /* size of src string going in and dest string out */ 124*7c478bd9Sstevel@tonic-gate char * src; /* address of the source byte string */ 125*7c478bd9Sstevel@tonic-gate char * dest; /* address of the destination byte string */ 126*7c478bd9Sstevel@tonic-gate }; 127*7c478bd9Sstevel@tonic-gate 128*7c478bd9Sstevel@tonic-gate #ifdef __cplusplus 129*7c478bd9Sstevel@tonic-gate } 130*7c478bd9Sstevel@tonic-gate #endif 131*7c478bd9Sstevel@tonic-gate 132*7c478bd9Sstevel@tonic-gate #endif /* _SYS_JIOCTL_H */ 133