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