1266e564dSmrg/****************************************************************************** 2266e564dSmrg 3266e564dSmrg 4266e564dSmrgCopyright 1993, 1998 The Open Group 5266e564dSmrg 6266e564dSmrgPermission to use, copy, modify, distribute, and sell this software and its 7266e564dSmrgdocumentation for any purpose is hereby granted without fee, provided that 8266e564dSmrgthe above copyright notice appear in all copies and that both that 9266e564dSmrgcopyright notice and this permission notice appear in supporting 10266e564dSmrgdocumentation. 11266e564dSmrg 12266e564dSmrgThe above copyright notice and this permission notice shall be included in 13266e564dSmrgall copies or substantial portions of the Software. 14266e564dSmrg 15266e564dSmrgTHE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16266e564dSmrgIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17266e564dSmrgFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18266e564dSmrgOPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN 19266e564dSmrgAN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 20266e564dSmrgCONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21266e564dSmrg 22266e564dSmrgExcept as contained in this notice, the name of The Open Group shall not be 23266e564dSmrgused in advertising or otherwise to promote the sale, use or other dealings 24266e564dSmrgin this Software without prior written authorization from The Open Group. 25266e564dSmrg 26266e564dSmrgAuthor: Ralph Mor, X Consortium 27266e564dSmrg******************************************************************************/ 28266e564dSmrg 29266e564dSmrg#ifndef _ICEPROTO_H_ 30266e564dSmrg#define _ICEPROTO_H_ 31266e564dSmrg 32266e564dSmrg#include <X11/Xmd.h> 33266e564dSmrg 34266e564dSmrgtypedef struct { 35266e564dSmrg CARD8 majorOpcode; 36266e564dSmrg CARD8 minorOpcode; 37266e564dSmrg CARD8 data[2]; 38a3129944Smrg CARD32 length; 39266e564dSmrg} iceMsg; 40266e564dSmrg 41266e564dSmrgtypedef struct { 42266e564dSmrg CARD8 majorOpcode; 43266e564dSmrg CARD8 minorOpcode; 44a3129944Smrg CARD16 errorClass; 45a3129944Smrg CARD32 length; 46266e564dSmrg CARD8 offendingMinorOpcode; 47266e564dSmrg CARD8 severity; 48a3129944Smrg CARD16 unused; 49a3129944Smrg CARD32 offendingSequenceNum; 50266e564dSmrg /* n varying values */ 51266e564dSmrg /* p p = pad (n, 8) */ 52266e564dSmrg} iceErrorMsg; 53266e564dSmrg 54266e564dSmrgtypedef struct { 55266e564dSmrg CARD8 majorOpcode; 56266e564dSmrg CARD8 minorOpcode; 57266e564dSmrg CARD8 byteOrder; 58266e564dSmrg CARD8 unused; 59a3129944Smrg CARD32 length; 60266e564dSmrg} iceByteOrderMsg; 61266e564dSmrg 62266e564dSmrgtypedef struct { 63266e564dSmrg CARD8 majorOpcode; 64266e564dSmrg CARD8 minorOpcode; 65266e564dSmrg CARD8 versionCount; 66266e564dSmrg CARD8 authCount; 67a3129944Smrg CARD32 length; 68266e564dSmrg CARD8 mustAuthenticate; 69266e564dSmrg CARD8 unused[7]; 70266e564dSmrg /* i STRING vendor */ 71266e564dSmrg /* j STRING release */ 72266e564dSmrg /* k LIST of STRING authentication-protocol-names */ 73266e564dSmrg /* m LIST of VERSION version-list */ 74266e564dSmrg /* p p = pad (i+j+k+m, 8) */ 75266e564dSmrg} iceConnectionSetupMsg; 76266e564dSmrg 77266e564dSmrgtypedef struct { 78266e564dSmrg CARD8 majorOpcode; 79266e564dSmrg CARD8 minorOpcode; 80266e564dSmrg CARD8 authIndex; 81266e564dSmrg CARD8 unused1; 82a3129944Smrg CARD32 length; 83a3129944Smrg CARD16 authDataLength; 84266e564dSmrg CARD8 unused2[6]; 85266e564dSmrg /* n varying data */ 86266e564dSmrg /* p p = pad (n, 8) */ 87266e564dSmrg} iceAuthRequiredMsg; 88266e564dSmrg 89266e564dSmrgtypedef struct { 90266e564dSmrg CARD8 majorOpcode; 91266e564dSmrg CARD8 minorOpcode; 92266e564dSmrg CARD8 unused1[2]; 93a3129944Smrg CARD32 length; 94a3129944Smrg CARD16 authDataLength; 95266e564dSmrg CARD8 unused2[6]; 96266e564dSmrg /* n varying data */ 97266e564dSmrg /* p p = pad (n, 8) */ 98266e564dSmrg} iceAuthReplyMsg; 99266e564dSmrg 100266e564dSmrgtypedef struct { 101266e564dSmrg CARD8 majorOpcode; 102266e564dSmrg CARD8 minorOpcode; 103266e564dSmrg CARD8 unused1[2]; 104a3129944Smrg CARD32 length; 105a3129944Smrg CARD16 authDataLength; 106266e564dSmrg CARD8 unused2[6]; 107266e564dSmrg /* n varying data */ 108266e564dSmrg /* p p = pad (n, 8) */ 109266e564dSmrg} iceAuthNextPhaseMsg; 110266e564dSmrg 111266e564dSmrgtypedef struct { 112266e564dSmrg CARD8 majorOpcode; 113266e564dSmrg CARD8 minorOpcode; 114266e564dSmrg CARD8 versionIndex; 115266e564dSmrg CARD8 unused; 116a3129944Smrg CARD32 length; 117266e564dSmrg /* i STRING vendor */ 118266e564dSmrg /* j STRING release */ 119266e564dSmrg /* p p = pad (i+j, 8) */ 120266e564dSmrg} iceConnectionReplyMsg; 121266e564dSmrg 122266e564dSmrgtypedef struct { 123266e564dSmrg CARD8 majorOpcode; 124266e564dSmrg CARD8 minorOpcode; 125266e564dSmrg CARD8 protocolOpcode; 126266e564dSmrg CARD8 mustAuthenticate; 127a3129944Smrg CARD32 length; 128266e564dSmrg CARD8 versionCount; 129266e564dSmrg CARD8 authCount; 130266e564dSmrg CARD8 unused[6]; 131266e564dSmrg /* i STRING protocol-name */ 132266e564dSmrg /* j STRING vendor */ 133266e564dSmrg /* k STRING release */ 134266e564dSmrg /* m LIST of STRING authentication-protocol-names */ 135266e564dSmrg /* n LIST of VERSION version-list */ 136266e564dSmrg /* p p = pad (i+j+k+m+n, 8) */ 137266e564dSmrg} iceProtocolSetupMsg; 138266e564dSmrg 139266e564dSmrgtypedef struct { 140266e564dSmrg CARD8 majorOpcode; 141266e564dSmrg CARD8 minorOpcode; 142266e564dSmrg CARD8 versionIndex; 143266e564dSmrg CARD8 protocolOpcode; 144a3129944Smrg CARD32 length; 145266e564dSmrg /* i STRING vendor */ 146266e564dSmrg /* j STRING release */ 147266e564dSmrg /* p p = pad (i+j, 8) */ 148266e564dSmrg} iceProtocolReplyMsg; 149266e564dSmrg 150266e564dSmrgtypedef iceMsg icePingMsg; 151266e564dSmrgtypedef iceMsg icePingReplyMsg; 152266e564dSmrgtypedef iceMsg iceWantToCloseMsg; 153266e564dSmrgtypedef iceMsg iceNoCloseMsg; 154266e564dSmrg 155266e564dSmrg 156266e564dSmrg/* 157266e564dSmrg * SIZEOF values. These better be multiples of 8. 158266e564dSmrg */ 159266e564dSmrg 160266e564dSmrg#define sz_iceMsg 8 161266e564dSmrg#define sz_iceErrorMsg 16 162266e564dSmrg#define sz_iceByteOrderMsg 8 163266e564dSmrg#define sz_iceConnectionSetupMsg 16 164266e564dSmrg#define sz_iceAuthRequiredMsg 16 165266e564dSmrg#define sz_iceAuthReplyMsg 16 166266e564dSmrg#define sz_iceAuthNextPhaseMsg 16 167266e564dSmrg#define sz_iceConnectionReplyMsg 8 168266e564dSmrg#define sz_iceProtocolSetupMsg 16 169266e564dSmrg#define sz_iceProtocolReplyMsg 8 170266e564dSmrg#define sz_icePingMsg 8 171266e564dSmrg#define sz_icePingReplyMsg 8 172266e564dSmrg#define sz_iceWantToCloseMsg 8 173266e564dSmrg#define sz_iceNoCloseMsg 8 174266e564dSmrg 175266e564dSmrg#endif /* _ICEPROTO_H_ */ 176