1/****************************************************************************** 2 3 4Copyright 1993, 1998 The Open Group 5 6Permission to use, copy, modify, distribute, and sell this software and its 7documentation for any purpose is hereby granted without fee, provided that 8the above copyright notice appear in all copies and that both that 9copyright notice and this permission notice appear in supporting 10documentation. 11 12The above copyright notice and this permission notice shall be included in 13all copies or substantial portions of the Software. 14 15THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN 19AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 20CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 22Except as contained in this notice, the name of The Open Group shall not be 23used in advertising or otherwise to promote the sale, use or other dealings 24in this Software without prior written authorization from The Open Group. 25 26Author: Ralph Mor, X Consortium 27******************************************************************************/ 28 29#ifndef _ICEPROTO_H_ 30#define _ICEPROTO_H_ 31 32#include <X11/Xmd.h> 33 34typedef struct { 35 CARD8 majorOpcode; 36 CARD8 minorOpcode; 37 CARD8 data[2]; 38 CARD32 length; 39} iceMsg; 40 41typedef struct { 42 CARD8 majorOpcode; 43 CARD8 minorOpcode; 44 CARD16 errorClass; 45 CARD32 length; 46 CARD8 offendingMinorOpcode; 47 CARD8 severity; 48 CARD16 unused; 49 CARD32 offendingSequenceNum; 50 /* n varying values */ 51 /* p p = pad (n, 8) */ 52} iceErrorMsg; 53 54typedef struct { 55 CARD8 majorOpcode; 56 CARD8 minorOpcode; 57 CARD8 byteOrder; 58 CARD8 unused; 59 CARD32 length; 60} iceByteOrderMsg; 61 62typedef struct { 63 CARD8 majorOpcode; 64 CARD8 minorOpcode; 65 CARD8 versionCount; 66 CARD8 authCount; 67 CARD32 length; 68 CARD8 mustAuthenticate; 69 CARD8 unused[7]; 70 /* i STRING vendor */ 71 /* j STRING release */ 72 /* k LIST of STRING authentication-protocol-names */ 73 /* m LIST of VERSION version-list */ 74 /* p p = pad (i+j+k+m, 8) */ 75} iceConnectionSetupMsg; 76 77typedef struct { 78 CARD8 majorOpcode; 79 CARD8 minorOpcode; 80 CARD8 authIndex; 81 CARD8 unused1; 82 CARD32 length; 83 CARD16 authDataLength; 84 CARD8 unused2[6]; 85 /* n varying data */ 86 /* p p = pad (n, 8) */ 87} iceAuthRequiredMsg; 88 89typedef struct { 90 CARD8 majorOpcode; 91 CARD8 minorOpcode; 92 CARD8 unused1[2]; 93 CARD32 length; 94 CARD16 authDataLength; 95 CARD8 unused2[6]; 96 /* n varying data */ 97 /* p p = pad (n, 8) */ 98} iceAuthReplyMsg; 99 100typedef struct { 101 CARD8 majorOpcode; 102 CARD8 minorOpcode; 103 CARD8 unused1[2]; 104 CARD32 length; 105 CARD16 authDataLength; 106 CARD8 unused2[6]; 107 /* n varying data */ 108 /* p p = pad (n, 8) */ 109} iceAuthNextPhaseMsg; 110 111typedef struct { 112 CARD8 majorOpcode; 113 CARD8 minorOpcode; 114 CARD8 versionIndex; 115 CARD8 unused; 116 CARD32 length; 117 /* i STRING vendor */ 118 /* j STRING release */ 119 /* p p = pad (i+j, 8) */ 120} iceConnectionReplyMsg; 121 122typedef struct { 123 CARD8 majorOpcode; 124 CARD8 minorOpcode; 125 CARD8 protocolOpcode; 126 CARD8 mustAuthenticate; 127 CARD32 length; 128 CARD8 versionCount; 129 CARD8 authCount; 130 CARD8 unused[6]; 131 /* i STRING protocol-name */ 132 /* j STRING vendor */ 133 /* k STRING release */ 134 /* m LIST of STRING authentication-protocol-names */ 135 /* n LIST of VERSION version-list */ 136 /* p p = pad (i+j+k+m+n, 8) */ 137} iceProtocolSetupMsg; 138 139typedef struct { 140 CARD8 majorOpcode; 141 CARD8 minorOpcode; 142 CARD8 versionIndex; 143 CARD8 protocolOpcode; 144 CARD32 length; 145 /* i STRING vendor */ 146 /* j STRING release */ 147 /* p p = pad (i+j, 8) */ 148} iceProtocolReplyMsg; 149 150typedef iceMsg icePingMsg; 151typedef iceMsg icePingReplyMsg; 152typedef iceMsg iceWantToCloseMsg; 153typedef iceMsg iceNoCloseMsg; 154 155 156/* 157 * SIZEOF values. These better be multiples of 8. 158 */ 159 160#define sz_iceMsg 8 161#define sz_iceErrorMsg 16 162#define sz_iceByteOrderMsg 8 163#define sz_iceConnectionSetupMsg 16 164#define sz_iceAuthRequiredMsg 16 165#define sz_iceAuthReplyMsg 16 166#define sz_iceAuthNextPhaseMsg 16 167#define sz_iceConnectionReplyMsg 8 168#define sz_iceProtocolSetupMsg 16 169#define sz_iceProtocolReplyMsg 8 170#define sz_icePingMsg 8 171#define sz_icePingReplyMsg 8 172#define sz_iceWantToCloseMsg 8 173#define sz_iceNoCloseMsg 8 174 175#endif /* _ICEPROTO_H_ */ 176