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