Wireshark 4.5.0
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
x11-extension-implementation.h
1/* Do not modify this file. */
2/* It was automatically generated by ../../tools/process-x11-xcb.pl
3 using xcbproto version xcb-proto-1.17.0 */
4/*
5 * Copyright 2008, 2009, 2013, 2014 Open Text Corporation <pharris[AT]opentext.com>
6 *
7 * Wireshark - Network traffic analyzer
8 * By Gerald Combs <gerald[AT]wireshark.org>
9 * Copyright 1998 Gerald Combs
10 *
11 * SPDX-License-Identifier: GPL-2.0-or-later
12 */
13
14#include "x11-glx-render-enum.h"
15
16static void mesa_CallList(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
17{
18 proto_tree_add_item(t, hf_x11_glx_render_CallList_list, tvb, *offsetp, 4, byte_order);
19 *offsetp += 4;
20}
21
22static void mesa_CallLists(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
23{
24 int n;
25 int type;
26 n = tvb_get_uint32(tvb, *offsetp, byte_order);
27 proto_tree_add_item(t, hf_x11_glx_render_CallLists_n, tvb, *offsetp, 4, byte_order);
28 *offsetp += 4;
29 type = tvb_get_uint32(tvb, *offsetp, byte_order);
30 proto_tree_add_item(t, hf_x11_glx_render_CallLists_type, tvb, *offsetp, 4, byte_order);
31 *offsetp += 4;
32 switch(type) {
33 case 0x1400: /* BYTE */
34 listOfByte(tvb, offsetp, t, hf_x11_glx_render_CallLists_lists_signed, n, byte_order);
35 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, (length - 8 - n), ENC_NA);
36 *offsetp += (length - 8 - n);
37 break;
38 case 0x1401: /* UNSIGNED_BYTE */
39 listOfByte(tvb, offsetp, t, hf_x11_glx_render_CallLists_lists_unsigned, n, byte_order);
40 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, (length - 8 - n), ENC_NA);
41 *offsetp += (length - 8 - n);
42 break;
43 case 0x1402: /* SHORT */
44 listOfInt16(tvb, offsetp, t, hf_x11_glx_render_CallLists_lists, hf_x11_glx_render_CallLists_lists_item_int16, n, byte_order);
45 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, (length - 8 - 2 * n), ENC_NA);
46 *offsetp += (length - 8 - 2 * n);
47 break;
48 case 0x1403: /* UNSIGNED_SHORT */
49 listOfCard16(tvb, offsetp, t, hf_x11_glx_render_CallLists_lists, hf_x11_glx_render_CallLists_lists_item_card16, n, byte_order);
50 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, (length - 8 - 2 * n), ENC_NA);
51 *offsetp += (length - 8 - 2 * n);
52 break;
53 case 0x1404: /* INT */
54 listOfInt32(tvb, offsetp, t, hf_x11_glx_render_CallLists_lists, hf_x11_glx_render_CallLists_lists_item_int32, n, byte_order);
55 break;
56 case 0x1405: /* UNSIGNED_INT */
57 listOfCard32(tvb, offsetp, t, hf_x11_glx_render_CallLists_lists, hf_x11_glx_render_CallLists_lists_item_card32, n, byte_order);
58 break;
59 case 0x1406: /* FLOAT */
60 listOfFloat(tvb, offsetp, t, hf_x11_glx_render_CallLists_lists, hf_x11_glx_render_CallLists_lists_item_float, n, byte_order);
61 break;
62 case 0x1407: /* 2_BYTES */
63 listOfCard16(tvb, offsetp, t, hf_x11_glx_render_CallLists_lists, hf_x11_glx_render_CallLists_lists_item_card16, n, ENC_BIG_ENDIAN);
64 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, (length - 8 - 2 * n), ENC_NA);
65 *offsetp += (length - 8 - 2 * n);
66 break;
67 case 0x1408: /* 3_BYTES */
68 UNDECODED(3 * n);
69 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, (length - 8 - 3 * n), ENC_NA);
70 *offsetp += (length - 8 - 3 * n);
71 break;
72 case 0x1409: /* 4_BYTES */
73 listOfCard32(tvb, offsetp, t, hf_x11_glx_render_CallLists_lists, hf_x11_glx_render_CallLists_lists_item_card32, n, ENC_BIG_ENDIAN);
74 break;
75 case 0x140B: /* HALF_FLOAT */
76 UNDECODED(2 * n);
77 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, (length - 8 - 2 * n), ENC_NA);
78 *offsetp += (length - 8 - 2 * n);
79 break;
80 default: /* Unknown */
81 UNDECODED(length - 8);
82 break;
83 }
84}
85
86static void mesa_ListBase(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
87{
88 proto_tree_add_item(t, hf_x11_glx_render_ListBase_base, tvb, *offsetp, 4, byte_order);
89 *offsetp += 4;
90}
91
92static void mesa_Begin(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
93{
94 proto_tree_add_item(t, hf_x11_glx_render_Begin_mode, tvb, *offsetp, 4, byte_order);
95 *offsetp += 4;
96}
97
98static void mesa_Bitmap(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
99{
100 proto_tree_add_item(t, hf_x11_glx_render_Bitmap_swapbytes, tvb, *offsetp, 1, byte_order);
101 *offsetp += 1;
102 proto_tree_add_item(t, hf_x11_glx_render_Bitmap_lsbfirst, tvb, *offsetp, 1, byte_order);
103 *offsetp += 1;
104 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 2, ENC_NA);
105 *offsetp += 2;
106 proto_tree_add_item(t, hf_x11_glx_render_Bitmap_rowlength, tvb, *offsetp, 4, byte_order);
107 *offsetp += 4;
108 proto_tree_add_item(t, hf_x11_glx_render_Bitmap_skiprows, tvb, *offsetp, 4, byte_order);
109 *offsetp += 4;
110 proto_tree_add_item(t, hf_x11_glx_render_Bitmap_skippixels, tvb, *offsetp, 4, byte_order);
111 *offsetp += 4;
112 proto_tree_add_item(t, hf_x11_glx_render_Bitmap_alignment, tvb, *offsetp, 4, byte_order);
113 *offsetp += 4;
114 proto_tree_add_item(t, hf_x11_glx_render_Bitmap_width, tvb, *offsetp, 4, byte_order);
115 *offsetp += 4;
116 proto_tree_add_item(t, hf_x11_glx_render_Bitmap_height, tvb, *offsetp, 4, byte_order);
117 *offsetp += 4;
118 proto_tree_add_item(t, hf_x11_glx_render_Bitmap_xorig, tvb, *offsetp, 4, byte_order);
119 *offsetp += 4;
120 proto_tree_add_item(t, hf_x11_glx_render_Bitmap_yorig, tvb, *offsetp, 4, byte_order);
121 *offsetp += 4;
122 proto_tree_add_item(t, hf_x11_glx_render_Bitmap_xmove, tvb, *offsetp, 4, byte_order);
123 *offsetp += 4;
124 proto_tree_add_item(t, hf_x11_glx_render_Bitmap_ymove, tvb, *offsetp, 4, byte_order);
125 *offsetp += 4;
126 listOfByte(tvb, offsetp, t, hf_x11_glx_render_Bitmap_bitmap, (length - 44) / 1, byte_order);
127}
128
129static void mesa_Color3bv(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
130{
131 listOfByte(tvb, offsetp, t, hf_x11_glx_render_Color3bv_v, 3, byte_order);
132}
133
134static void mesa_Color3dv(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
135{
136 listOfDouble(tvb, offsetp, t, hf_x11_glx_render_Color3dv_v, hf_x11_glx_render_Color3dv_v_item, 3, byte_order);
137}
138
139static void mesa_Color3fv(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
140{
141 listOfFloat(tvb, offsetp, t, hf_x11_glx_render_Color3fv_v, hf_x11_glx_render_Color3fv_v_item, 3, byte_order);
142}
143
144static void mesa_Color3iv(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
145{
146 listOfInt32(tvb, offsetp, t, hf_x11_glx_render_Color3iv_v, hf_x11_glx_render_Color3iv_v_item, 3, byte_order);
147}
148
149static void mesa_Color3sv(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
150{
151 listOfInt16(tvb, offsetp, t, hf_x11_glx_render_Color3sv_v, hf_x11_glx_render_Color3sv_v_item, 3, byte_order);
152}
153
154static void mesa_Color3ubv(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
155{
156 listOfByte(tvb, offsetp, t, hf_x11_glx_render_Color3ubv_v, 3, byte_order);
157}
158
159static void mesa_Color3uiv(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
160{
161 listOfCard32(tvb, offsetp, t, hf_x11_glx_render_Color3uiv_v, hf_x11_glx_render_Color3uiv_v_item, 3, byte_order);
162}
163
164static void mesa_Color3usv(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
165{
166 listOfCard16(tvb, offsetp, t, hf_x11_glx_render_Color3usv_v, hf_x11_glx_render_Color3usv_v_item, 3, byte_order);
167}
168
169static void mesa_Color4bv(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
170{
171 listOfByte(tvb, offsetp, t, hf_x11_glx_render_Color4bv_v, 4, byte_order);
172}
173
174static void mesa_Color4dv(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
175{
176 listOfDouble(tvb, offsetp, t, hf_x11_glx_render_Color4dv_v, hf_x11_glx_render_Color4dv_v_item, 4, byte_order);
177}
178
179static void mesa_Color4fv(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
180{
181 listOfFloat(tvb, offsetp, t, hf_x11_glx_render_Color4fv_v, hf_x11_glx_render_Color4fv_v_item, 4, byte_order);
182}
183
184static void mesa_Color4iv(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
185{
186 listOfInt32(tvb, offsetp, t, hf_x11_glx_render_Color4iv_v, hf_x11_glx_render_Color4iv_v_item, 4, byte_order);
187}
188
189static void mesa_Color4sv(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
190{
191 listOfInt16(tvb, offsetp, t, hf_x11_glx_render_Color4sv_v, hf_x11_glx_render_Color4sv_v_item, 4, byte_order);
192}
193
194static void mesa_Color4ubv(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
195{
196 listOfByte(tvb, offsetp, t, hf_x11_glx_render_Color4ubv_v, 4, byte_order);
197}
198
199static void mesa_Color4uiv(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
200{
201 listOfCard32(tvb, offsetp, t, hf_x11_glx_render_Color4uiv_v, hf_x11_glx_render_Color4uiv_v_item, 4, byte_order);
202}
203
204static void mesa_Color4usv(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
205{
206 listOfCard16(tvb, offsetp, t, hf_x11_glx_render_Color4usv_v, hf_x11_glx_render_Color4usv_v_item, 4, byte_order);
207}
208
209static void mesa_EdgeFlagv(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
210{
211 listOfByte(tvb, offsetp, t, hf_x11_glx_render_EdgeFlagv_flag, 1, byte_order);
212}
213
214static void mesa_End(tvbuff_t *tvb _U_, int *offsetp _U_, proto_tree *t _U_, unsigned byte_order _U_, int length _U_)
215{
216}
217
218static void mesa_Indexdv(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
219{
220 listOfDouble(tvb, offsetp, t, hf_x11_glx_render_Indexdv_c, hf_x11_glx_render_Indexdv_c_item, 1, byte_order);
221}
222
223static void mesa_Indexfv(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
224{
225 listOfFloat(tvb, offsetp, t, hf_x11_glx_render_Indexfv_c, hf_x11_glx_render_Indexfv_c_item, 1, byte_order);
226}
227
228static void mesa_Indexiv(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
229{
230 listOfInt32(tvb, offsetp, t, hf_x11_glx_render_Indexiv_c, hf_x11_glx_render_Indexiv_c_item, 1, byte_order);
231}
232
233static void mesa_Indexsv(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
234{
235 listOfInt16(tvb, offsetp, t, hf_x11_glx_render_Indexsv_c, hf_x11_glx_render_Indexsv_c_item, 1, byte_order);
236}
237
238static void mesa_Normal3bv(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
239{
240 listOfByte(tvb, offsetp, t, hf_x11_glx_render_Normal3bv_v, 3, byte_order);
241}
242
243static void mesa_Normal3dv(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
244{
245 listOfDouble(tvb, offsetp, t, hf_x11_glx_render_Normal3dv_v, hf_x11_glx_render_Normal3dv_v_item, 3, byte_order);
246}
247
248static void mesa_Normal3fv(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
249{
250 listOfFloat(tvb, offsetp, t, hf_x11_glx_render_Normal3fv_v, hf_x11_glx_render_Normal3fv_v_item, 3, byte_order);
251}
252
253static void mesa_Normal3iv(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
254{
255 listOfInt32(tvb, offsetp, t, hf_x11_glx_render_Normal3iv_v, hf_x11_glx_render_Normal3iv_v_item, 3, byte_order);
256}
257
258static void mesa_Normal3sv(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
259{
260 listOfInt16(tvb, offsetp, t, hf_x11_glx_render_Normal3sv_v, hf_x11_glx_render_Normal3sv_v_item, 3, byte_order);
261}
262
263static void mesa_RasterPos2dv(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
264{
265 listOfDouble(tvb, offsetp, t, hf_x11_glx_render_RasterPos2dv_v, hf_x11_glx_render_RasterPos2dv_v_item, 2, byte_order);
266}
267
268static void mesa_RasterPos2fv(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
269{
270 listOfFloat(tvb, offsetp, t, hf_x11_glx_render_RasterPos2fv_v, hf_x11_glx_render_RasterPos2fv_v_item, 2, byte_order);
271}
272
273static void mesa_RasterPos2iv(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
274{
275 listOfInt32(tvb, offsetp, t, hf_x11_glx_render_RasterPos2iv_v, hf_x11_glx_render_RasterPos2iv_v_item, 2, byte_order);
276}
277
278static void mesa_RasterPos2sv(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
279{
280 listOfInt16(tvb, offsetp, t, hf_x11_glx_render_RasterPos2sv_v, hf_x11_glx_render_RasterPos2sv_v_item, 2, byte_order);
281}
282
283static void mesa_RasterPos3dv(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
284{
285 listOfDouble(tvb, offsetp, t, hf_x11_glx_render_RasterPos3dv_v, hf_x11_glx_render_RasterPos3dv_v_item, 3, byte_order);
286}
287
288static void mesa_RasterPos3fv(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
289{
290 listOfFloat(tvb, offsetp, t, hf_x11_glx_render_RasterPos3fv_v, hf_x11_glx_render_RasterPos3fv_v_item, 3, byte_order);
291}
292
293static void mesa_RasterPos3iv(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
294{
295 listOfInt32(tvb, offsetp, t, hf_x11_glx_render_RasterPos3iv_v, hf_x11_glx_render_RasterPos3iv_v_item, 3, byte_order);
296}
297
298static void mesa_RasterPos3sv(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
299{
300 listOfInt16(tvb, offsetp, t, hf_x11_glx_render_RasterPos3sv_v, hf_x11_glx_render_RasterPos3sv_v_item, 3, byte_order);
301}
302
303static void mesa_RasterPos4dv(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
304{
305 listOfDouble(tvb, offsetp, t, hf_x11_glx_render_RasterPos4dv_v, hf_x11_glx_render_RasterPos4dv_v_item, 4, byte_order);
306}
307
308static void mesa_RasterPos4fv(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
309{
310 listOfFloat(tvb, offsetp, t, hf_x11_glx_render_RasterPos4fv_v, hf_x11_glx_render_RasterPos4fv_v_item, 4, byte_order);
311}
312
313static void mesa_RasterPos4iv(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
314{
315 listOfInt32(tvb, offsetp, t, hf_x11_glx_render_RasterPos4iv_v, hf_x11_glx_render_RasterPos4iv_v_item, 4, byte_order);
316}
317
318static void mesa_RasterPos4sv(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
319{
320 listOfInt16(tvb, offsetp, t, hf_x11_glx_render_RasterPos4sv_v, hf_x11_glx_render_RasterPos4sv_v_item, 4, byte_order);
321}
322
323static void mesa_Rectdv(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
324{
325 listOfDouble(tvb, offsetp, t, hf_x11_glx_render_Rectdv_v1, hf_x11_glx_render_Rectdv_v1_item, 2, byte_order);
326 listOfDouble(tvb, offsetp, t, hf_x11_glx_render_Rectdv_v2, hf_x11_glx_render_Rectdv_v2_item, 2, byte_order);
327}
328
329static void mesa_Rectfv(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
330{
331 listOfFloat(tvb, offsetp, t, hf_x11_glx_render_Rectfv_v1, hf_x11_glx_render_Rectfv_v1_item, 2, byte_order);
332 listOfFloat(tvb, offsetp, t, hf_x11_glx_render_Rectfv_v2, hf_x11_glx_render_Rectfv_v2_item, 2, byte_order);
333}
334
335static void mesa_Rectiv(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
336{
337 listOfInt32(tvb, offsetp, t, hf_x11_glx_render_Rectiv_v1, hf_x11_glx_render_Rectiv_v1_item, 2, byte_order);
338 listOfInt32(tvb, offsetp, t, hf_x11_glx_render_Rectiv_v2, hf_x11_glx_render_Rectiv_v2_item, 2, byte_order);
339}
340
341static void mesa_Rectsv(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
342{
343 listOfInt16(tvb, offsetp, t, hf_x11_glx_render_Rectsv_v1, hf_x11_glx_render_Rectsv_v1_item, 2, byte_order);
344 listOfInt16(tvb, offsetp, t, hf_x11_glx_render_Rectsv_v2, hf_x11_glx_render_Rectsv_v2_item, 2, byte_order);
345}
346
347static void mesa_TexCoord1dv(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
348{
349 listOfDouble(tvb, offsetp, t, hf_x11_glx_render_TexCoord1dv_v, hf_x11_glx_render_TexCoord1dv_v_item, 1, byte_order);
350}
351
352static void mesa_TexCoord1fv(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
353{
354 listOfFloat(tvb, offsetp, t, hf_x11_glx_render_TexCoord1fv_v, hf_x11_glx_render_TexCoord1fv_v_item, 1, byte_order);
355}
356
357static void mesa_TexCoord1iv(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
358{
359 listOfInt32(tvb, offsetp, t, hf_x11_glx_render_TexCoord1iv_v, hf_x11_glx_render_TexCoord1iv_v_item, 1, byte_order);
360}
361
362static void mesa_TexCoord1sv(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
363{
364 listOfInt16(tvb, offsetp, t, hf_x11_glx_render_TexCoord1sv_v, hf_x11_glx_render_TexCoord1sv_v_item, 1, byte_order);
365}
366
367static void mesa_TexCoord2dv(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
368{
369 listOfDouble(tvb, offsetp, t, hf_x11_glx_render_TexCoord2dv_v, hf_x11_glx_render_TexCoord2dv_v_item, 2, byte_order);
370}
371
372static void mesa_TexCoord2fv(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
373{
374 listOfFloat(tvb, offsetp, t, hf_x11_glx_render_TexCoord2fv_v, hf_x11_glx_render_TexCoord2fv_v_item, 2, byte_order);
375}
376
377static void mesa_TexCoord2iv(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
378{
379 listOfInt32(tvb, offsetp, t, hf_x11_glx_render_TexCoord2iv_v, hf_x11_glx_render_TexCoord2iv_v_item, 2, byte_order);
380}
381
382static void mesa_TexCoord2sv(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
383{
384 listOfInt16(tvb, offsetp, t, hf_x11_glx_render_TexCoord2sv_v, hf_x11_glx_render_TexCoord2sv_v_item, 2, byte_order);
385}
386
387static void mesa_TexCoord3dv(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
388{
389 listOfDouble(tvb, offsetp, t, hf_x11_glx_render_TexCoord3dv_v, hf_x11_glx_render_TexCoord3dv_v_item, 3, byte_order);
390}
391
392static void mesa_TexCoord3fv(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
393{
394 listOfFloat(tvb, offsetp, t, hf_x11_glx_render_TexCoord3fv_v, hf_x11_glx_render_TexCoord3fv_v_item, 3, byte_order);
395}
396
397static void mesa_TexCoord3iv(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
398{
399 listOfInt32(tvb, offsetp, t, hf_x11_glx_render_TexCoord3iv_v, hf_x11_glx_render_TexCoord3iv_v_item, 3, byte_order);
400}
401
402static void mesa_TexCoord3sv(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
403{
404 listOfInt16(tvb, offsetp, t, hf_x11_glx_render_TexCoord3sv_v, hf_x11_glx_render_TexCoord3sv_v_item, 3, byte_order);
405}
406
407static void mesa_TexCoord4dv(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
408{
409 listOfDouble(tvb, offsetp, t, hf_x11_glx_render_TexCoord4dv_v, hf_x11_glx_render_TexCoord4dv_v_item, 4, byte_order);
410}
411
412static void mesa_TexCoord4fv(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
413{
414 listOfFloat(tvb, offsetp, t, hf_x11_glx_render_TexCoord4fv_v, hf_x11_glx_render_TexCoord4fv_v_item, 4, byte_order);
415}
416
417static void mesa_TexCoord4iv(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
418{
419 listOfInt32(tvb, offsetp, t, hf_x11_glx_render_TexCoord4iv_v, hf_x11_glx_render_TexCoord4iv_v_item, 4, byte_order);
420}
421
422static void mesa_TexCoord4sv(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
423{
424 listOfInt16(tvb, offsetp, t, hf_x11_glx_render_TexCoord4sv_v, hf_x11_glx_render_TexCoord4sv_v_item, 4, byte_order);
425}
426
427static void mesa_Vertex2dv(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
428{
429 listOfDouble(tvb, offsetp, t, hf_x11_glx_render_Vertex2dv_v, hf_x11_glx_render_Vertex2dv_v_item, 2, byte_order);
430}
431
432static void mesa_Vertex2fv(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
433{
434 listOfFloat(tvb, offsetp, t, hf_x11_glx_render_Vertex2fv_v, hf_x11_glx_render_Vertex2fv_v_item, 2, byte_order);
435}
436
437static void mesa_Vertex2iv(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
438{
439 listOfInt32(tvb, offsetp, t, hf_x11_glx_render_Vertex2iv_v, hf_x11_glx_render_Vertex2iv_v_item, 2, byte_order);
440}
441
442static void mesa_Vertex2sv(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
443{
444 listOfInt16(tvb, offsetp, t, hf_x11_glx_render_Vertex2sv_v, hf_x11_glx_render_Vertex2sv_v_item, 2, byte_order);
445}
446
447static void mesa_Vertex3dv(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
448{
449 listOfDouble(tvb, offsetp, t, hf_x11_glx_render_Vertex3dv_v, hf_x11_glx_render_Vertex3dv_v_item, 3, byte_order);
450}
451
452static void mesa_Vertex3fv(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
453{
454 listOfFloat(tvb, offsetp, t, hf_x11_glx_render_Vertex3fv_v, hf_x11_glx_render_Vertex3fv_v_item, 3, byte_order);
455}
456
457static void mesa_Vertex3iv(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
458{
459 listOfInt32(tvb, offsetp, t, hf_x11_glx_render_Vertex3iv_v, hf_x11_glx_render_Vertex3iv_v_item, 3, byte_order);
460}
461
462static void mesa_Vertex3sv(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
463{
464 listOfInt16(tvb, offsetp, t, hf_x11_glx_render_Vertex3sv_v, hf_x11_glx_render_Vertex3sv_v_item, 3, byte_order);
465}
466
467static void mesa_Vertex4dv(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
468{
469 listOfDouble(tvb, offsetp, t, hf_x11_glx_render_Vertex4dv_v, hf_x11_glx_render_Vertex4dv_v_item, 4, byte_order);
470}
471
472static void mesa_Vertex4fv(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
473{
474 listOfFloat(tvb, offsetp, t, hf_x11_glx_render_Vertex4fv_v, hf_x11_glx_render_Vertex4fv_v_item, 4, byte_order);
475}
476
477static void mesa_Vertex4iv(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
478{
479 listOfInt32(tvb, offsetp, t, hf_x11_glx_render_Vertex4iv_v, hf_x11_glx_render_Vertex4iv_v_item, 4, byte_order);
480}
481
482static void mesa_Vertex4sv(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
483{
484 listOfInt16(tvb, offsetp, t, hf_x11_glx_render_Vertex4sv_v, hf_x11_glx_render_Vertex4sv_v_item, 4, byte_order);
485}
486
487static void mesa_ClipPlane(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
488{
489 proto_tree_add_item(t, hf_x11_glx_render_ClipPlane_plane, tvb, *offsetp, 4, byte_order);
490 *offsetp += 4;
491 listOfDouble(tvb, offsetp, t, hf_x11_glx_render_ClipPlane_equation, hf_x11_glx_render_ClipPlane_equation_item, 4, byte_order);
492}
493
494static void mesa_ColorMaterial(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
495{
496 proto_tree_add_item(t, hf_x11_glx_render_ColorMaterial_face, tvb, *offsetp, 4, byte_order);
497 *offsetp += 4;
498 proto_tree_add_item(t, hf_x11_glx_render_ColorMaterial_mode, tvb, *offsetp, 4, byte_order);
499 *offsetp += 4;
500}
501
502static void mesa_CullFace(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
503{
504 proto_tree_add_item(t, hf_x11_glx_render_CullFace_mode, tvb, *offsetp, 4, byte_order);
505 *offsetp += 4;
506}
507
508static void mesa_Fogf(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
509{
510 proto_tree_add_item(t, hf_x11_glx_render_Fogf_pname, tvb, *offsetp, 4, byte_order);
511 *offsetp += 4;
512 proto_tree_add_item(t, hf_x11_glx_render_Fogf_param, tvb, *offsetp, 4, byte_order);
513 *offsetp += 4;
514}
515
516static void mesa_Fogfv(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
517{
518 proto_tree_add_item(t, hf_x11_glx_render_Fogfv_pname, tvb, *offsetp, 4, byte_order);
519 *offsetp += 4;
520 listOfFloat(tvb, offsetp, t, hf_x11_glx_render_Fogfv_params, hf_x11_glx_render_Fogfv_params_item, (length - 4) / 4, byte_order);
521}
522
523static void mesa_Fogi(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
524{
525 proto_tree_add_item(t, hf_x11_glx_render_Fogi_pname, tvb, *offsetp, 4, byte_order);
526 *offsetp += 4;
527 proto_tree_add_item(t, hf_x11_glx_render_Fogi_param, tvb, *offsetp, 4, byte_order);
528 *offsetp += 4;
529}
530
531static void mesa_Fogiv(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
532{
533 proto_tree_add_item(t, hf_x11_glx_render_Fogiv_pname, tvb, *offsetp, 4, byte_order);
534 *offsetp += 4;
535 listOfInt32(tvb, offsetp, t, hf_x11_glx_render_Fogiv_params, hf_x11_glx_render_Fogiv_params_item, (length - 4) / 4, byte_order);
536}
537
538static void mesa_FrontFace(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
539{
540 proto_tree_add_item(t, hf_x11_glx_render_FrontFace_mode, tvb, *offsetp, 4, byte_order);
541 *offsetp += 4;
542}
543
544static void mesa_Hint(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
545{
546 proto_tree_add_item(t, hf_x11_glx_render_Hint_target, tvb, *offsetp, 4, byte_order);
547 *offsetp += 4;
548 proto_tree_add_item(t, hf_x11_glx_render_Hint_mode, tvb, *offsetp, 4, byte_order);
549 *offsetp += 4;
550}
551
552static void mesa_Lightf(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
553{
554 proto_tree_add_item(t, hf_x11_glx_render_Lightf_light, tvb, *offsetp, 4, byte_order);
555 *offsetp += 4;
556 proto_tree_add_item(t, hf_x11_glx_render_Lightf_pname, tvb, *offsetp, 4, byte_order);
557 *offsetp += 4;
558 proto_tree_add_item(t, hf_x11_glx_render_Lightf_param, tvb, *offsetp, 4, byte_order);
559 *offsetp += 4;
560}
561
562static void mesa_Lightfv(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
563{
564 proto_tree_add_item(t, hf_x11_glx_render_Lightfv_light, tvb, *offsetp, 4, byte_order);
565 *offsetp += 4;
566 proto_tree_add_item(t, hf_x11_glx_render_Lightfv_pname, tvb, *offsetp, 4, byte_order);
567 *offsetp += 4;
568 listOfFloat(tvb, offsetp, t, hf_x11_glx_render_Lightfv_params, hf_x11_glx_render_Lightfv_params_item, (length - 8) / 4, byte_order);
569}
570
571static void mesa_Lighti(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
572{
573 proto_tree_add_item(t, hf_x11_glx_render_Lighti_light, tvb, *offsetp, 4, byte_order);
574 *offsetp += 4;
575 proto_tree_add_item(t, hf_x11_glx_render_Lighti_pname, tvb, *offsetp, 4, byte_order);
576 *offsetp += 4;
577 proto_tree_add_item(t, hf_x11_glx_render_Lighti_param, tvb, *offsetp, 4, byte_order);
578 *offsetp += 4;
579}
580
581static void mesa_Lightiv(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
582{
583 proto_tree_add_item(t, hf_x11_glx_render_Lightiv_light, tvb, *offsetp, 4, byte_order);
584 *offsetp += 4;
585 proto_tree_add_item(t, hf_x11_glx_render_Lightiv_pname, tvb, *offsetp, 4, byte_order);
586 *offsetp += 4;
587 listOfInt32(tvb, offsetp, t, hf_x11_glx_render_Lightiv_params, hf_x11_glx_render_Lightiv_params_item, (length - 8) / 4, byte_order);
588}
589
590static void mesa_LightModelf(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
591{
592 proto_tree_add_item(t, hf_x11_glx_render_LightModelf_pname, tvb, *offsetp, 4, byte_order);
593 *offsetp += 4;
594 proto_tree_add_item(t, hf_x11_glx_render_LightModelf_param, tvb, *offsetp, 4, byte_order);
595 *offsetp += 4;
596}
597
598static void mesa_LightModelfv(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
599{
600 proto_tree_add_item(t, hf_x11_glx_render_LightModelfv_pname, tvb, *offsetp, 4, byte_order);
601 *offsetp += 4;
602 listOfFloat(tvb, offsetp, t, hf_x11_glx_render_LightModelfv_params, hf_x11_glx_render_LightModelfv_params_item, (length - 4) / 4, byte_order);
603}
604
605static void mesa_LightModeli(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
606{
607 proto_tree_add_item(t, hf_x11_glx_render_LightModeli_pname, tvb, *offsetp, 4, byte_order);
608 *offsetp += 4;
609 proto_tree_add_item(t, hf_x11_glx_render_LightModeli_param, tvb, *offsetp, 4, byte_order);
610 *offsetp += 4;
611}
612
613static void mesa_LightModeliv(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
614{
615 proto_tree_add_item(t, hf_x11_glx_render_LightModeliv_pname, tvb, *offsetp, 4, byte_order);
616 *offsetp += 4;
617 listOfInt32(tvb, offsetp, t, hf_x11_glx_render_LightModeliv_params, hf_x11_glx_render_LightModeliv_params_item, (length - 4) / 4, byte_order);
618}
619
620static void mesa_LineStipple(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
621{
622 proto_tree_add_item(t, hf_x11_glx_render_LineStipple_factor, tvb, *offsetp, 4, byte_order);
623 *offsetp += 4;
624 proto_tree_add_item(t, hf_x11_glx_render_LineStipple_pattern, tvb, *offsetp, 2, byte_order);
625 *offsetp += 2;
626}
627
628static void mesa_LineWidth(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
629{
630 proto_tree_add_item(t, hf_x11_glx_render_LineWidth_width, tvb, *offsetp, 4, byte_order);
631 *offsetp += 4;
632}
633
634static void mesa_Materialf(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
635{
636 proto_tree_add_item(t, hf_x11_glx_render_Materialf_face, tvb, *offsetp, 4, byte_order);
637 *offsetp += 4;
638 proto_tree_add_item(t, hf_x11_glx_render_Materialf_pname, tvb, *offsetp, 4, byte_order);
639 *offsetp += 4;
640 proto_tree_add_item(t, hf_x11_glx_render_Materialf_param, tvb, *offsetp, 4, byte_order);
641 *offsetp += 4;
642}
643
644static void mesa_Materialfv(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
645{
646 proto_tree_add_item(t, hf_x11_glx_render_Materialfv_face, tvb, *offsetp, 4, byte_order);
647 *offsetp += 4;
648 proto_tree_add_item(t, hf_x11_glx_render_Materialfv_pname, tvb, *offsetp, 4, byte_order);
649 *offsetp += 4;
650 listOfFloat(tvb, offsetp, t, hf_x11_glx_render_Materialfv_params, hf_x11_glx_render_Materialfv_params_item, (length - 8) / 4, byte_order);
651}
652
653static void mesa_Materiali(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
654{
655 proto_tree_add_item(t, hf_x11_glx_render_Materiali_face, tvb, *offsetp, 4, byte_order);
656 *offsetp += 4;
657 proto_tree_add_item(t, hf_x11_glx_render_Materiali_pname, tvb, *offsetp, 4, byte_order);
658 *offsetp += 4;
659 proto_tree_add_item(t, hf_x11_glx_render_Materiali_param, tvb, *offsetp, 4, byte_order);
660 *offsetp += 4;
661}
662
663static void mesa_Materialiv(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
664{
665 proto_tree_add_item(t, hf_x11_glx_render_Materialiv_face, tvb, *offsetp, 4, byte_order);
666 *offsetp += 4;
667 proto_tree_add_item(t, hf_x11_glx_render_Materialiv_pname, tvb, *offsetp, 4, byte_order);
668 *offsetp += 4;
669 listOfInt32(tvb, offsetp, t, hf_x11_glx_render_Materialiv_params, hf_x11_glx_render_Materialiv_params_item, (length - 8) / 4, byte_order);
670}
671
672static void mesa_PointSize(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
673{
674 proto_tree_add_item(t, hf_x11_glx_render_PointSize_size, tvb, *offsetp, 4, byte_order);
675 *offsetp += 4;
676}
677
678static void mesa_PolygonMode(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
679{
680 proto_tree_add_item(t, hf_x11_glx_render_PolygonMode_face, tvb, *offsetp, 4, byte_order);
681 *offsetp += 4;
682 proto_tree_add_item(t, hf_x11_glx_render_PolygonMode_mode, tvb, *offsetp, 4, byte_order);
683 *offsetp += 4;
684}
685
686static void mesa_PolygonStipple(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
687{
688 proto_tree_add_item(t, hf_x11_glx_render_PolygonStipple_swapbytes, tvb, *offsetp, 1, byte_order);
689 *offsetp += 1;
690 proto_tree_add_item(t, hf_x11_glx_render_PolygonStipple_lsbfirst, tvb, *offsetp, 1, byte_order);
691 *offsetp += 1;
692 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 2, ENC_NA);
693 *offsetp += 2;
694 proto_tree_add_item(t, hf_x11_glx_render_PolygonStipple_rowlength, tvb, *offsetp, 4, byte_order);
695 *offsetp += 4;
696 proto_tree_add_item(t, hf_x11_glx_render_PolygonStipple_skiprows, tvb, *offsetp, 4, byte_order);
697 *offsetp += 4;
698 proto_tree_add_item(t, hf_x11_glx_render_PolygonStipple_skippixels, tvb, *offsetp, 4, byte_order);
699 *offsetp += 4;
700 proto_tree_add_item(t, hf_x11_glx_render_PolygonStipple_alignment, tvb, *offsetp, 4, byte_order);
701 *offsetp += 4;
702 listOfByte(tvb, offsetp, t, hf_x11_glx_render_PolygonStipple_mask, (length - 20) / 1, byte_order);
703}
704
705static void mesa_Scissor(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
706{
707 proto_tree_add_item(t, hf_x11_glx_render_Scissor_x, tvb, *offsetp, 4, byte_order);
708 *offsetp += 4;
709 proto_tree_add_item(t, hf_x11_glx_render_Scissor_y, tvb, *offsetp, 4, byte_order);
710 *offsetp += 4;
711 proto_tree_add_item(t, hf_x11_glx_render_Scissor_width, tvb, *offsetp, 4, byte_order);
712 *offsetp += 4;
713 proto_tree_add_item(t, hf_x11_glx_render_Scissor_height, tvb, *offsetp, 4, byte_order);
714 *offsetp += 4;
715}
716
717static void mesa_ShadeModel(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
718{
719 proto_tree_add_item(t, hf_x11_glx_render_ShadeModel_mode, tvb, *offsetp, 4, byte_order);
720 *offsetp += 4;
721}
722
723static void mesa_TexParameterf(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
724{
725 proto_tree_add_item(t, hf_x11_glx_render_TexParameterf_target, tvb, *offsetp, 4, byte_order);
726 *offsetp += 4;
727 proto_tree_add_item(t, hf_x11_glx_render_TexParameterf_pname, tvb, *offsetp, 4, byte_order);
728 *offsetp += 4;
729 proto_tree_add_item(t, hf_x11_glx_render_TexParameterf_param, tvb, *offsetp, 4, byte_order);
730 *offsetp += 4;
731}
732
733static void mesa_TexParameterfv(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
734{
735 proto_tree_add_item(t, hf_x11_glx_render_TexParameterfv_target, tvb, *offsetp, 4, byte_order);
736 *offsetp += 4;
737 proto_tree_add_item(t, hf_x11_glx_render_TexParameterfv_pname, tvb, *offsetp, 4, byte_order);
738 *offsetp += 4;
739 listOfFloat(tvb, offsetp, t, hf_x11_glx_render_TexParameterfv_params, hf_x11_glx_render_TexParameterfv_params_item, (length - 8) / 4, byte_order);
740}
741
742static void mesa_TexParameteri(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
743{
744 proto_tree_add_item(t, hf_x11_glx_render_TexParameteri_target, tvb, *offsetp, 4, byte_order);
745 *offsetp += 4;
746 proto_tree_add_item(t, hf_x11_glx_render_TexParameteri_pname, tvb, *offsetp, 4, byte_order);
747 *offsetp += 4;
748 proto_tree_add_item(t, hf_x11_glx_render_TexParameteri_param, tvb, *offsetp, 4, byte_order);
749 *offsetp += 4;
750}
751
752static void mesa_TexParameteriv(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
753{
754 proto_tree_add_item(t, hf_x11_glx_render_TexParameteriv_target, tvb, *offsetp, 4, byte_order);
755 *offsetp += 4;
756 proto_tree_add_item(t, hf_x11_glx_render_TexParameteriv_pname, tvb, *offsetp, 4, byte_order);
757 *offsetp += 4;
758 listOfInt32(tvb, offsetp, t, hf_x11_glx_render_TexParameteriv_params, hf_x11_glx_render_TexParameteriv_params_item, (length - 8) / 4, byte_order);
759}
760
761static void mesa_TexImage1D(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
762{
763 proto_tree_add_item(t, hf_x11_glx_render_TexImage1D_swapbytes, tvb, *offsetp, 1, byte_order);
764 *offsetp += 1;
765 proto_tree_add_item(t, hf_x11_glx_render_TexImage1D_lsbfirst, tvb, *offsetp, 1, byte_order);
766 *offsetp += 1;
767 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 2, ENC_NA);
768 *offsetp += 2;
769 proto_tree_add_item(t, hf_x11_glx_render_TexImage1D_rowlength, tvb, *offsetp, 4, byte_order);
770 *offsetp += 4;
771 proto_tree_add_item(t, hf_x11_glx_render_TexImage1D_skiprows, tvb, *offsetp, 4, byte_order);
772 *offsetp += 4;
773 proto_tree_add_item(t, hf_x11_glx_render_TexImage1D_skippixels, tvb, *offsetp, 4, byte_order);
774 *offsetp += 4;
775 proto_tree_add_item(t, hf_x11_glx_render_TexImage1D_alignment, tvb, *offsetp, 4, byte_order);
776 *offsetp += 4;
777 proto_tree_add_item(t, hf_x11_glx_render_TexImage1D_target, tvb, *offsetp, 4, byte_order);
778 *offsetp += 4;
779 proto_tree_add_item(t, hf_x11_glx_render_TexImage1D_level, tvb, *offsetp, 4, byte_order);
780 *offsetp += 4;
781 proto_tree_add_item(t, hf_x11_glx_render_TexImage1D_internalformat, tvb, *offsetp, 4, byte_order);
782 *offsetp += 4;
783 proto_tree_add_item(t, hf_x11_glx_render_TexImage1D_width, tvb, *offsetp, 4, byte_order);
784 *offsetp += 4;
785 proto_tree_add_item(t, hf_x11_glx_render_TexImage1D_border, tvb, *offsetp, 4, byte_order);
786 *offsetp += 4;
787 proto_tree_add_item(t, hf_x11_glx_render_TexImage1D_format, tvb, *offsetp, 4, byte_order);
788 *offsetp += 4;
789 proto_tree_add_item(t, hf_x11_glx_render_TexImage1D_type, tvb, *offsetp, 4, byte_order);
790 *offsetp += 4;
791 listOfByte(tvb, offsetp, t, hf_x11_glx_render_TexImage1D_pixels, (length - 48) / 1, byte_order);
792}
793
794static void mesa_TexImage2D(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
795{
796 proto_tree_add_item(t, hf_x11_glx_render_TexImage2D_swapbytes, tvb, *offsetp, 1, byte_order);
797 *offsetp += 1;
798 proto_tree_add_item(t, hf_x11_glx_render_TexImage2D_lsbfirst, tvb, *offsetp, 1, byte_order);
799 *offsetp += 1;
800 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 2, ENC_NA);
801 *offsetp += 2;
802 proto_tree_add_item(t, hf_x11_glx_render_TexImage2D_rowlength, tvb, *offsetp, 4, byte_order);
803 *offsetp += 4;
804 proto_tree_add_item(t, hf_x11_glx_render_TexImage2D_skiprows, tvb, *offsetp, 4, byte_order);
805 *offsetp += 4;
806 proto_tree_add_item(t, hf_x11_glx_render_TexImage2D_skippixels, tvb, *offsetp, 4, byte_order);
807 *offsetp += 4;
808 proto_tree_add_item(t, hf_x11_glx_render_TexImage2D_alignment, tvb, *offsetp, 4, byte_order);
809 *offsetp += 4;
810 proto_tree_add_item(t, hf_x11_glx_render_TexImage2D_target, tvb, *offsetp, 4, byte_order);
811 *offsetp += 4;
812 proto_tree_add_item(t, hf_x11_glx_render_TexImage2D_level, tvb, *offsetp, 4, byte_order);
813 *offsetp += 4;
814 proto_tree_add_item(t, hf_x11_glx_render_TexImage2D_internalformat, tvb, *offsetp, 4, byte_order);
815 *offsetp += 4;
816 proto_tree_add_item(t, hf_x11_glx_render_TexImage2D_width, tvb, *offsetp, 4, byte_order);
817 *offsetp += 4;
818 proto_tree_add_item(t, hf_x11_glx_render_TexImage2D_height, tvb, *offsetp, 4, byte_order);
819 *offsetp += 4;
820 proto_tree_add_item(t, hf_x11_glx_render_TexImage2D_border, tvb, *offsetp, 4, byte_order);
821 *offsetp += 4;
822 proto_tree_add_item(t, hf_x11_glx_render_TexImage2D_format, tvb, *offsetp, 4, byte_order);
823 *offsetp += 4;
824 proto_tree_add_item(t, hf_x11_glx_render_TexImage2D_type, tvb, *offsetp, 4, byte_order);
825 *offsetp += 4;
826 listOfByte(tvb, offsetp, t, hf_x11_glx_render_TexImage2D_pixels, (length - 52) / 1, byte_order);
827}
828
829static void mesa_TexEnvf(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
830{
831 proto_tree_add_item(t, hf_x11_glx_render_TexEnvf_target, tvb, *offsetp, 4, byte_order);
832 *offsetp += 4;
833 proto_tree_add_item(t, hf_x11_glx_render_TexEnvf_pname, tvb, *offsetp, 4, byte_order);
834 *offsetp += 4;
835 proto_tree_add_item(t, hf_x11_glx_render_TexEnvf_param, tvb, *offsetp, 4, byte_order);
836 *offsetp += 4;
837}
838
839static void mesa_TexEnvfv(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
840{
841 proto_tree_add_item(t, hf_x11_glx_render_TexEnvfv_target, tvb, *offsetp, 4, byte_order);
842 *offsetp += 4;
843 proto_tree_add_item(t, hf_x11_glx_render_TexEnvfv_pname, tvb, *offsetp, 4, byte_order);
844 *offsetp += 4;
845 listOfFloat(tvb, offsetp, t, hf_x11_glx_render_TexEnvfv_params, hf_x11_glx_render_TexEnvfv_params_item, (length - 8) / 4, byte_order);
846}
847
848static void mesa_TexEnvi(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
849{
850 proto_tree_add_item(t, hf_x11_glx_render_TexEnvi_target, tvb, *offsetp, 4, byte_order);
851 *offsetp += 4;
852 proto_tree_add_item(t, hf_x11_glx_render_TexEnvi_pname, tvb, *offsetp, 4, byte_order);
853 *offsetp += 4;
854 proto_tree_add_item(t, hf_x11_glx_render_TexEnvi_param, tvb, *offsetp, 4, byte_order);
855 *offsetp += 4;
856}
857
858static void mesa_TexEnviv(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
859{
860 proto_tree_add_item(t, hf_x11_glx_render_TexEnviv_target, tvb, *offsetp, 4, byte_order);
861 *offsetp += 4;
862 proto_tree_add_item(t, hf_x11_glx_render_TexEnviv_pname, tvb, *offsetp, 4, byte_order);
863 *offsetp += 4;
864 listOfInt32(tvb, offsetp, t, hf_x11_glx_render_TexEnviv_params, hf_x11_glx_render_TexEnviv_params_item, (length - 8) / 4, byte_order);
865}
866
867static void mesa_TexGend(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
868{
869 proto_tree_add_item(t, hf_x11_glx_render_TexGend_coord, tvb, *offsetp, 4, byte_order);
870 *offsetp += 4;
871 proto_tree_add_item(t, hf_x11_glx_render_TexGend_pname, tvb, *offsetp, 4, byte_order);
872 *offsetp += 4;
873 proto_tree_add_item(t, hf_x11_glx_render_TexGend_param, tvb, *offsetp, 8, byte_order);
874 *offsetp += 8;
875}
876
877static void mesa_TexGendv(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
878{
879 proto_tree_add_item(t, hf_x11_glx_render_TexGendv_coord, tvb, *offsetp, 4, byte_order);
880 *offsetp += 4;
881 proto_tree_add_item(t, hf_x11_glx_render_TexGendv_pname, tvb, *offsetp, 4, byte_order);
882 *offsetp += 4;
883 listOfDouble(tvb, offsetp, t, hf_x11_glx_render_TexGendv_params, hf_x11_glx_render_TexGendv_params_item, (length - 8) / 8, byte_order);
884}
885
886static void mesa_TexGenf(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
887{
888 proto_tree_add_item(t, hf_x11_glx_render_TexGenf_coord, tvb, *offsetp, 4, byte_order);
889 *offsetp += 4;
890 proto_tree_add_item(t, hf_x11_glx_render_TexGenf_pname, tvb, *offsetp, 4, byte_order);
891 *offsetp += 4;
892 proto_tree_add_item(t, hf_x11_glx_render_TexGenf_param, tvb, *offsetp, 4, byte_order);
893 *offsetp += 4;
894}
895
896static void mesa_TexGenfv(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
897{
898 proto_tree_add_item(t, hf_x11_glx_render_TexGenfv_coord, tvb, *offsetp, 4, byte_order);
899 *offsetp += 4;
900 proto_tree_add_item(t, hf_x11_glx_render_TexGenfv_pname, tvb, *offsetp, 4, byte_order);
901 *offsetp += 4;
902 listOfFloat(tvb, offsetp, t, hf_x11_glx_render_TexGenfv_params, hf_x11_glx_render_TexGenfv_params_item, (length - 8) / 4, byte_order);
903}
904
905static void mesa_TexGeni(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
906{
907 proto_tree_add_item(t, hf_x11_glx_render_TexGeni_coord, tvb, *offsetp, 4, byte_order);
908 *offsetp += 4;
909 proto_tree_add_item(t, hf_x11_glx_render_TexGeni_pname, tvb, *offsetp, 4, byte_order);
910 *offsetp += 4;
911 proto_tree_add_item(t, hf_x11_glx_render_TexGeni_param, tvb, *offsetp, 4, byte_order);
912 *offsetp += 4;
913}
914
915static void mesa_TexGeniv(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
916{
917 proto_tree_add_item(t, hf_x11_glx_render_TexGeniv_coord, tvb, *offsetp, 4, byte_order);
918 *offsetp += 4;
919 proto_tree_add_item(t, hf_x11_glx_render_TexGeniv_pname, tvb, *offsetp, 4, byte_order);
920 *offsetp += 4;
921 listOfInt32(tvb, offsetp, t, hf_x11_glx_render_TexGeniv_params, hf_x11_glx_render_TexGeniv_params_item, (length - 8) / 4, byte_order);
922}
923
924static void mesa_InitNames(tvbuff_t *tvb _U_, int *offsetp _U_, proto_tree *t _U_, unsigned byte_order _U_, int length _U_)
925{
926}
927
928static void mesa_LoadName(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
929{
930 proto_tree_add_item(t, hf_x11_glx_render_LoadName_name, tvb, *offsetp, 4, byte_order);
931 *offsetp += 4;
932}
933
934static void mesa_PassThrough(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
935{
936 proto_tree_add_item(t, hf_x11_glx_render_PassThrough_token, tvb, *offsetp, 4, byte_order);
937 *offsetp += 4;
938}
939
940static void mesa_PopName(tvbuff_t *tvb _U_, int *offsetp _U_, proto_tree *t _U_, unsigned byte_order _U_, int length _U_)
941{
942}
943
944static void mesa_PushName(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
945{
946 proto_tree_add_item(t, hf_x11_glx_render_PushName_name, tvb, *offsetp, 4, byte_order);
947 *offsetp += 4;
948}
949
950static void mesa_DrawBuffer(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
951{
952 proto_tree_add_item(t, hf_x11_glx_render_DrawBuffer_mode, tvb, *offsetp, 4, byte_order);
953 *offsetp += 4;
954}
955
956static void mesa_Clear(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
957{
958 proto_tree_add_item(t, hf_x11_glx_render_Clear_mask, tvb, *offsetp, 4, byte_order);
959 *offsetp += 4;
960}
961
962static void mesa_ClearAccum(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
963{
964 proto_tree_add_item(t, hf_x11_glx_render_ClearAccum_red, tvb, *offsetp, 4, byte_order);
965 *offsetp += 4;
966 proto_tree_add_item(t, hf_x11_glx_render_ClearAccum_green, tvb, *offsetp, 4, byte_order);
967 *offsetp += 4;
968 proto_tree_add_item(t, hf_x11_glx_render_ClearAccum_blue, tvb, *offsetp, 4, byte_order);
969 *offsetp += 4;
970 proto_tree_add_item(t, hf_x11_glx_render_ClearAccum_alpha, tvb, *offsetp, 4, byte_order);
971 *offsetp += 4;
972}
973
974static void mesa_ClearIndex(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
975{
976 proto_tree_add_item(t, hf_x11_glx_render_ClearIndex_c, tvb, *offsetp, 4, byte_order);
977 *offsetp += 4;
978}
979
980static void mesa_ClearColor(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
981{
982 proto_tree_add_item(t, hf_x11_glx_render_ClearColor_red, tvb, *offsetp, 4, byte_order);
983 *offsetp += 4;
984 proto_tree_add_item(t, hf_x11_glx_render_ClearColor_green, tvb, *offsetp, 4, byte_order);
985 *offsetp += 4;
986 proto_tree_add_item(t, hf_x11_glx_render_ClearColor_blue, tvb, *offsetp, 4, byte_order);
987 *offsetp += 4;
988 proto_tree_add_item(t, hf_x11_glx_render_ClearColor_alpha, tvb, *offsetp, 4, byte_order);
989 *offsetp += 4;
990}
991
992static void mesa_ClearStencil(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
993{
994 proto_tree_add_item(t, hf_x11_glx_render_ClearStencil_s, tvb, *offsetp, 4, byte_order);
995 *offsetp += 4;
996}
997
998static void mesa_ClearDepth(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
999{
1000 proto_tree_add_item(t, hf_x11_glx_render_ClearDepth_depth, tvb, *offsetp, 8, byte_order);
1001 *offsetp += 8;
1002}
1003
1004static void mesa_StencilMask(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
1005{
1006 proto_tree_add_item(t, hf_x11_glx_render_StencilMask_mask, tvb, *offsetp, 4, byte_order);
1007 *offsetp += 4;
1008}
1009
1010static void mesa_ColorMask(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
1011{
1012 proto_tree_add_item(t, hf_x11_glx_render_ColorMask_red, tvb, *offsetp, 1, byte_order);
1013 *offsetp += 1;
1014 proto_tree_add_item(t, hf_x11_glx_render_ColorMask_green, tvb, *offsetp, 1, byte_order);
1015 *offsetp += 1;
1016 proto_tree_add_item(t, hf_x11_glx_render_ColorMask_blue, tvb, *offsetp, 1, byte_order);
1017 *offsetp += 1;
1018 proto_tree_add_item(t, hf_x11_glx_render_ColorMask_alpha, tvb, *offsetp, 1, byte_order);
1019 *offsetp += 1;
1020}
1021
1022static void mesa_DepthMask(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
1023{
1024 proto_tree_add_item(t, hf_x11_glx_render_DepthMask_flag, tvb, *offsetp, 1, byte_order);
1025 *offsetp += 1;
1026}
1027
1028static void mesa_IndexMask(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
1029{
1030 proto_tree_add_item(t, hf_x11_glx_render_IndexMask_mask, tvb, *offsetp, 4, byte_order);
1031 *offsetp += 4;
1032}
1033
1034static void mesa_Accum(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
1035{
1036 proto_tree_add_item(t, hf_x11_glx_render_Accum_op, tvb, *offsetp, 4, byte_order);
1037 *offsetp += 4;
1038 proto_tree_add_item(t, hf_x11_glx_render_Accum_value, tvb, *offsetp, 4, byte_order);
1039 *offsetp += 4;
1040}
1041
1042static void mesa_Disable(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
1043{
1044 proto_tree_add_item(t, hf_x11_glx_render_Disable_cap, tvb, *offsetp, 4, byte_order);
1045 *offsetp += 4;
1046}
1047
1048static void mesa_Enable(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
1049{
1050 proto_tree_add_item(t, hf_x11_glx_render_Enable_cap, tvb, *offsetp, 4, byte_order);
1051 *offsetp += 4;
1052}
1053
1054static void mesa_PopAttrib(tvbuff_t *tvb _U_, int *offsetp _U_, proto_tree *t _U_, unsigned byte_order _U_, int length _U_)
1055{
1056}
1057
1058static void mesa_PushAttrib(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
1059{
1060 proto_tree_add_item(t, hf_x11_glx_render_PushAttrib_mask, tvb, *offsetp, 4, byte_order);
1061 *offsetp += 4;
1062}
1063
1064static void mesa_Map1d(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
1065{
1066 proto_tree_add_item(t, hf_x11_glx_render_Map1d_target, tvb, *offsetp, 4, byte_order);
1067 *offsetp += 4;
1068 proto_tree_add_item(t, hf_x11_glx_render_Map1d_u1, tvb, *offsetp, 8, byte_order);
1069 *offsetp += 8;
1070 proto_tree_add_item(t, hf_x11_glx_render_Map1d_u2, tvb, *offsetp, 8, byte_order);
1071 *offsetp += 8;
1072 proto_tree_add_item(t, hf_x11_glx_render_Map1d_stride, tvb, *offsetp, 4, byte_order);
1073 *offsetp += 4;
1074 proto_tree_add_item(t, hf_x11_glx_render_Map1d_order, tvb, *offsetp, 4, byte_order);
1075 *offsetp += 4;
1076 listOfDouble(tvb, offsetp, t, hf_x11_glx_render_Map1d_points, hf_x11_glx_render_Map1d_points_item, (length - 28) / 8, byte_order);
1077}
1078
1079static void mesa_Map1f(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
1080{
1081 proto_tree_add_item(t, hf_x11_glx_render_Map1f_target, tvb, *offsetp, 4, byte_order);
1082 *offsetp += 4;
1083 proto_tree_add_item(t, hf_x11_glx_render_Map1f_u1, tvb, *offsetp, 4, byte_order);
1084 *offsetp += 4;
1085 proto_tree_add_item(t, hf_x11_glx_render_Map1f_u2, tvb, *offsetp, 4, byte_order);
1086 *offsetp += 4;
1087 proto_tree_add_item(t, hf_x11_glx_render_Map1f_stride, tvb, *offsetp, 4, byte_order);
1088 *offsetp += 4;
1089 proto_tree_add_item(t, hf_x11_glx_render_Map1f_order, tvb, *offsetp, 4, byte_order);
1090 *offsetp += 4;
1091 listOfFloat(tvb, offsetp, t, hf_x11_glx_render_Map1f_points, hf_x11_glx_render_Map1f_points_item, (length - 20) / 4, byte_order);
1092}
1093
1094static void mesa_Map2d(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
1095{
1096 proto_tree_add_item(t, hf_x11_glx_render_Map2d_target, tvb, *offsetp, 4, byte_order);
1097 *offsetp += 4;
1098 proto_tree_add_item(t, hf_x11_glx_render_Map2d_u1, tvb, *offsetp, 8, byte_order);
1099 *offsetp += 8;
1100 proto_tree_add_item(t, hf_x11_glx_render_Map2d_u2, tvb, *offsetp, 8, byte_order);
1101 *offsetp += 8;
1102 proto_tree_add_item(t, hf_x11_glx_render_Map2d_ustride, tvb, *offsetp, 4, byte_order);
1103 *offsetp += 4;
1104 proto_tree_add_item(t, hf_x11_glx_render_Map2d_uorder, tvb, *offsetp, 4, byte_order);
1105 *offsetp += 4;
1106 proto_tree_add_item(t, hf_x11_glx_render_Map2d_v1, tvb, *offsetp, 8, byte_order);
1107 *offsetp += 8;
1108 proto_tree_add_item(t, hf_x11_glx_render_Map2d_v2, tvb, *offsetp, 8, byte_order);
1109 *offsetp += 8;
1110 proto_tree_add_item(t, hf_x11_glx_render_Map2d_vstride, tvb, *offsetp, 4, byte_order);
1111 *offsetp += 4;
1112 proto_tree_add_item(t, hf_x11_glx_render_Map2d_vorder, tvb, *offsetp, 4, byte_order);
1113 *offsetp += 4;
1114 listOfDouble(tvb, offsetp, t, hf_x11_glx_render_Map2d_points, hf_x11_glx_render_Map2d_points_item, (length - 52) / 8, byte_order);
1115}
1116
1117static void mesa_Map2f(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
1118{
1119 proto_tree_add_item(t, hf_x11_glx_render_Map2f_target, tvb, *offsetp, 4, byte_order);
1120 *offsetp += 4;
1121 proto_tree_add_item(t, hf_x11_glx_render_Map2f_u1, tvb, *offsetp, 4, byte_order);
1122 *offsetp += 4;
1123 proto_tree_add_item(t, hf_x11_glx_render_Map2f_u2, tvb, *offsetp, 4, byte_order);
1124 *offsetp += 4;
1125 proto_tree_add_item(t, hf_x11_glx_render_Map2f_ustride, tvb, *offsetp, 4, byte_order);
1126 *offsetp += 4;
1127 proto_tree_add_item(t, hf_x11_glx_render_Map2f_uorder, tvb, *offsetp, 4, byte_order);
1128 *offsetp += 4;
1129 proto_tree_add_item(t, hf_x11_glx_render_Map2f_v1, tvb, *offsetp, 4, byte_order);
1130 *offsetp += 4;
1131 proto_tree_add_item(t, hf_x11_glx_render_Map2f_v2, tvb, *offsetp, 4, byte_order);
1132 *offsetp += 4;
1133 proto_tree_add_item(t, hf_x11_glx_render_Map2f_vstride, tvb, *offsetp, 4, byte_order);
1134 *offsetp += 4;
1135 proto_tree_add_item(t, hf_x11_glx_render_Map2f_vorder, tvb, *offsetp, 4, byte_order);
1136 *offsetp += 4;
1137 listOfFloat(tvb, offsetp, t, hf_x11_glx_render_Map2f_points, hf_x11_glx_render_Map2f_points_item, (length - 36) / 4, byte_order);
1138}
1139
1140static void mesa_MapGrid1d(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
1141{
1142 proto_tree_add_item(t, hf_x11_glx_render_MapGrid1d_un, tvb, *offsetp, 4, byte_order);
1143 *offsetp += 4;
1144 proto_tree_add_item(t, hf_x11_glx_render_MapGrid1d_u1, tvb, *offsetp, 8, byte_order);
1145 *offsetp += 8;
1146 proto_tree_add_item(t, hf_x11_glx_render_MapGrid1d_u2, tvb, *offsetp, 8, byte_order);
1147 *offsetp += 8;
1148}
1149
1150static void mesa_MapGrid1f(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
1151{
1152 proto_tree_add_item(t, hf_x11_glx_render_MapGrid1f_un, tvb, *offsetp, 4, byte_order);
1153 *offsetp += 4;
1154 proto_tree_add_item(t, hf_x11_glx_render_MapGrid1f_u1, tvb, *offsetp, 4, byte_order);
1155 *offsetp += 4;
1156 proto_tree_add_item(t, hf_x11_glx_render_MapGrid1f_u2, tvb, *offsetp, 4, byte_order);
1157 *offsetp += 4;
1158}
1159
1160static void mesa_MapGrid2d(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
1161{
1162 proto_tree_add_item(t, hf_x11_glx_render_MapGrid2d_un, tvb, *offsetp, 4, byte_order);
1163 *offsetp += 4;
1164 proto_tree_add_item(t, hf_x11_glx_render_MapGrid2d_u1, tvb, *offsetp, 8, byte_order);
1165 *offsetp += 8;
1166 proto_tree_add_item(t, hf_x11_glx_render_MapGrid2d_u2, tvb, *offsetp, 8, byte_order);
1167 *offsetp += 8;
1168 proto_tree_add_item(t, hf_x11_glx_render_MapGrid2d_vn, tvb, *offsetp, 4, byte_order);
1169 *offsetp += 4;
1170 proto_tree_add_item(t, hf_x11_glx_render_MapGrid2d_v1, tvb, *offsetp, 8, byte_order);
1171 *offsetp += 8;
1172 proto_tree_add_item(t, hf_x11_glx_render_MapGrid2d_v2, tvb, *offsetp, 8, byte_order);
1173 *offsetp += 8;
1174}
1175
1176static void mesa_MapGrid2f(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
1177{
1178 proto_tree_add_item(t, hf_x11_glx_render_MapGrid2f_un, tvb, *offsetp, 4, byte_order);
1179 *offsetp += 4;
1180 proto_tree_add_item(t, hf_x11_glx_render_MapGrid2f_u1, tvb, *offsetp, 4, byte_order);
1181 *offsetp += 4;
1182 proto_tree_add_item(t, hf_x11_glx_render_MapGrid2f_u2, tvb, *offsetp, 4, byte_order);
1183 *offsetp += 4;
1184 proto_tree_add_item(t, hf_x11_glx_render_MapGrid2f_vn, tvb, *offsetp, 4, byte_order);
1185 *offsetp += 4;
1186 proto_tree_add_item(t, hf_x11_glx_render_MapGrid2f_v1, tvb, *offsetp, 4, byte_order);
1187 *offsetp += 4;
1188 proto_tree_add_item(t, hf_x11_glx_render_MapGrid2f_v2, tvb, *offsetp, 4, byte_order);
1189 *offsetp += 4;
1190}
1191
1192static void mesa_EvalCoord1dv(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
1193{
1194 listOfDouble(tvb, offsetp, t, hf_x11_glx_render_EvalCoord1dv_u, hf_x11_glx_render_EvalCoord1dv_u_item, 1, byte_order);
1195}
1196
1197static void mesa_EvalCoord1fv(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
1198{
1199 listOfFloat(tvb, offsetp, t, hf_x11_glx_render_EvalCoord1fv_u, hf_x11_glx_render_EvalCoord1fv_u_item, 1, byte_order);
1200}
1201
1202static void mesa_EvalCoord2dv(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
1203{
1204 listOfDouble(tvb, offsetp, t, hf_x11_glx_render_EvalCoord2dv_u, hf_x11_glx_render_EvalCoord2dv_u_item, 2, byte_order);
1205}
1206
1207static void mesa_EvalCoord2fv(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
1208{
1209 listOfFloat(tvb, offsetp, t, hf_x11_glx_render_EvalCoord2fv_u, hf_x11_glx_render_EvalCoord2fv_u_item, 2, byte_order);
1210}
1211
1212static void mesa_EvalMesh1(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
1213{
1214 proto_tree_add_item(t, hf_x11_glx_render_EvalMesh1_mode, tvb, *offsetp, 4, byte_order);
1215 *offsetp += 4;
1216 proto_tree_add_item(t, hf_x11_glx_render_EvalMesh1_i1, tvb, *offsetp, 4, byte_order);
1217 *offsetp += 4;
1218 proto_tree_add_item(t, hf_x11_glx_render_EvalMesh1_i2, tvb, *offsetp, 4, byte_order);
1219 *offsetp += 4;
1220}
1221
1222static void mesa_EvalPoint1(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
1223{
1224 proto_tree_add_item(t, hf_x11_glx_render_EvalPoint1_i, tvb, *offsetp, 4, byte_order);
1225 *offsetp += 4;
1226}
1227
1228static void mesa_EvalMesh2(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
1229{
1230 proto_tree_add_item(t, hf_x11_glx_render_EvalMesh2_mode, tvb, *offsetp, 4, byte_order);
1231 *offsetp += 4;
1232 proto_tree_add_item(t, hf_x11_glx_render_EvalMesh2_i1, tvb, *offsetp, 4, byte_order);
1233 *offsetp += 4;
1234 proto_tree_add_item(t, hf_x11_glx_render_EvalMesh2_i2, tvb, *offsetp, 4, byte_order);
1235 *offsetp += 4;
1236 proto_tree_add_item(t, hf_x11_glx_render_EvalMesh2_j1, tvb, *offsetp, 4, byte_order);
1237 *offsetp += 4;
1238 proto_tree_add_item(t, hf_x11_glx_render_EvalMesh2_j2, tvb, *offsetp, 4, byte_order);
1239 *offsetp += 4;
1240}
1241
1242static void mesa_EvalPoint2(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
1243{
1244 proto_tree_add_item(t, hf_x11_glx_render_EvalPoint2_i, tvb, *offsetp, 4, byte_order);
1245 *offsetp += 4;
1246 proto_tree_add_item(t, hf_x11_glx_render_EvalPoint2_j, tvb, *offsetp, 4, byte_order);
1247 *offsetp += 4;
1248}
1249
1250static void mesa_AlphaFunc(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
1251{
1252 proto_tree_add_item(t, hf_x11_glx_render_AlphaFunc_func, tvb, *offsetp, 4, byte_order);
1253 *offsetp += 4;
1254 proto_tree_add_item(t, hf_x11_glx_render_AlphaFunc_ref, tvb, *offsetp, 4, byte_order);
1255 *offsetp += 4;
1256}
1257
1258static void mesa_BlendFunc(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
1259{
1260 proto_tree_add_item(t, hf_x11_glx_render_BlendFunc_sfactor, tvb, *offsetp, 4, byte_order);
1261 *offsetp += 4;
1262 proto_tree_add_item(t, hf_x11_glx_render_BlendFunc_dfactor, tvb, *offsetp, 4, byte_order);
1263 *offsetp += 4;
1264}
1265
1266static void mesa_LogicOp(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
1267{
1268 proto_tree_add_item(t, hf_x11_glx_render_LogicOp_opcode, tvb, *offsetp, 4, byte_order);
1269 *offsetp += 4;
1270}
1271
1272static void mesa_StencilFunc(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
1273{
1274 proto_tree_add_item(t, hf_x11_glx_render_StencilFunc_func, tvb, *offsetp, 4, byte_order);
1275 *offsetp += 4;
1276 proto_tree_add_item(t, hf_x11_glx_render_StencilFunc_ref, tvb, *offsetp, 4, byte_order);
1277 *offsetp += 4;
1278 proto_tree_add_item(t, hf_x11_glx_render_StencilFunc_mask, tvb, *offsetp, 4, byte_order);
1279 *offsetp += 4;
1280}
1281
1282static void mesa_StencilOp(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
1283{
1284 proto_tree_add_item(t, hf_x11_glx_render_StencilOp_fail, tvb, *offsetp, 4, byte_order);
1285 *offsetp += 4;
1286 proto_tree_add_item(t, hf_x11_glx_render_StencilOp_zfail, tvb, *offsetp, 4, byte_order);
1287 *offsetp += 4;
1288 proto_tree_add_item(t, hf_x11_glx_render_StencilOp_zpass, tvb, *offsetp, 4, byte_order);
1289 *offsetp += 4;
1290}
1291
1292static void mesa_DepthFunc(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
1293{
1294 proto_tree_add_item(t, hf_x11_glx_render_DepthFunc_func, tvb, *offsetp, 4, byte_order);
1295 *offsetp += 4;
1296}
1297
1298static void mesa_PixelZoom(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
1299{
1300 proto_tree_add_item(t, hf_x11_glx_render_PixelZoom_xfactor, tvb, *offsetp, 4, byte_order);
1301 *offsetp += 4;
1302 proto_tree_add_item(t, hf_x11_glx_render_PixelZoom_yfactor, tvb, *offsetp, 4, byte_order);
1303 *offsetp += 4;
1304}
1305
1306static void mesa_PixelTransferf(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
1307{
1308 proto_tree_add_item(t, hf_x11_glx_render_PixelTransferf_pname, tvb, *offsetp, 4, byte_order);
1309 *offsetp += 4;
1310 proto_tree_add_item(t, hf_x11_glx_render_PixelTransferf_param, tvb, *offsetp, 4, byte_order);
1311 *offsetp += 4;
1312}
1313
1314static void mesa_PixelTransferi(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
1315{
1316 proto_tree_add_item(t, hf_x11_glx_render_PixelTransferi_pname, tvb, *offsetp, 4, byte_order);
1317 *offsetp += 4;
1318 proto_tree_add_item(t, hf_x11_glx_render_PixelTransferi_param, tvb, *offsetp, 4, byte_order);
1319 *offsetp += 4;
1320}
1321
1322static void mesa_PixelMapfv(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
1323{
1324 int mapsize;
1325 proto_tree_add_item(t, hf_x11_glx_render_PixelMapfv_map, tvb, *offsetp, 4, byte_order);
1326 *offsetp += 4;
1327 mapsize = tvb_get_uint32(tvb, *offsetp, byte_order);
1328 proto_tree_add_item(t, hf_x11_glx_render_PixelMapfv_mapsize, tvb, *offsetp, 4, byte_order);
1329 *offsetp += 4;
1330 listOfFloat(tvb, offsetp, t, hf_x11_glx_render_PixelMapfv_values, hf_x11_glx_render_PixelMapfv_values_item, mapsize, byte_order);
1331}
1332
1333static void mesa_PixelMapuiv(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
1334{
1335 int mapsize;
1336 proto_tree_add_item(t, hf_x11_glx_render_PixelMapuiv_map, tvb, *offsetp, 4, byte_order);
1337 *offsetp += 4;
1338 mapsize = tvb_get_uint32(tvb, *offsetp, byte_order);
1339 proto_tree_add_item(t, hf_x11_glx_render_PixelMapuiv_mapsize, tvb, *offsetp, 4, byte_order);
1340 *offsetp += 4;
1341 listOfCard32(tvb, offsetp, t, hf_x11_glx_render_PixelMapuiv_values, hf_x11_glx_render_PixelMapuiv_values_item, mapsize, byte_order);
1342}
1343
1344static void mesa_PixelMapusv(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
1345{
1346 int mapsize;
1347 proto_tree_add_item(t, hf_x11_glx_render_PixelMapusv_map, tvb, *offsetp, 4, byte_order);
1348 *offsetp += 4;
1349 mapsize = tvb_get_uint32(tvb, *offsetp, byte_order);
1350 proto_tree_add_item(t, hf_x11_glx_render_PixelMapusv_mapsize, tvb, *offsetp, 4, byte_order);
1351 *offsetp += 4;
1352 listOfCard16(tvb, offsetp, t, hf_x11_glx_render_PixelMapusv_values, hf_x11_glx_render_PixelMapusv_values_item, mapsize, byte_order);
1353}
1354
1355static void mesa_ReadBuffer(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
1356{
1357 proto_tree_add_item(t, hf_x11_glx_render_ReadBuffer_mode, tvb, *offsetp, 4, byte_order);
1358 *offsetp += 4;
1359}
1360
1361static void mesa_CopyPixels(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
1362{
1363 proto_tree_add_item(t, hf_x11_glx_render_CopyPixels_x, tvb, *offsetp, 4, byte_order);
1364 *offsetp += 4;
1365 proto_tree_add_item(t, hf_x11_glx_render_CopyPixels_y, tvb, *offsetp, 4, byte_order);
1366 *offsetp += 4;
1367 proto_tree_add_item(t, hf_x11_glx_render_CopyPixels_width, tvb, *offsetp, 4, byte_order);
1368 *offsetp += 4;
1369 proto_tree_add_item(t, hf_x11_glx_render_CopyPixels_height, tvb, *offsetp, 4, byte_order);
1370 *offsetp += 4;
1371 proto_tree_add_item(t, hf_x11_glx_render_CopyPixels_type, tvb, *offsetp, 4, byte_order);
1372 *offsetp += 4;
1373}
1374
1375static void mesa_DrawPixels(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
1376{
1377 proto_tree_add_item(t, hf_x11_glx_render_DrawPixels_swapbytes, tvb, *offsetp, 1, byte_order);
1378 *offsetp += 1;
1379 proto_tree_add_item(t, hf_x11_glx_render_DrawPixels_lsbfirst, tvb, *offsetp, 1, byte_order);
1380 *offsetp += 1;
1381 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 2, ENC_NA);
1382 *offsetp += 2;
1383 proto_tree_add_item(t, hf_x11_glx_render_DrawPixels_rowlength, tvb, *offsetp, 4, byte_order);
1384 *offsetp += 4;
1385 proto_tree_add_item(t, hf_x11_glx_render_DrawPixels_skiprows, tvb, *offsetp, 4, byte_order);
1386 *offsetp += 4;
1387 proto_tree_add_item(t, hf_x11_glx_render_DrawPixels_skippixels, tvb, *offsetp, 4, byte_order);
1388 *offsetp += 4;
1389 proto_tree_add_item(t, hf_x11_glx_render_DrawPixels_alignment, tvb, *offsetp, 4, byte_order);
1390 *offsetp += 4;
1391 proto_tree_add_item(t, hf_x11_glx_render_DrawPixels_width, tvb, *offsetp, 4, byte_order);
1392 *offsetp += 4;
1393 proto_tree_add_item(t, hf_x11_glx_render_DrawPixels_height, tvb, *offsetp, 4, byte_order);
1394 *offsetp += 4;
1395 proto_tree_add_item(t, hf_x11_glx_render_DrawPixels_format, tvb, *offsetp, 4, byte_order);
1396 *offsetp += 4;
1397 proto_tree_add_item(t, hf_x11_glx_render_DrawPixels_type, tvb, *offsetp, 4, byte_order);
1398 *offsetp += 4;
1399 listOfByte(tvb, offsetp, t, hf_x11_glx_render_DrawPixels_pixels, (length - 36) / 1, byte_order);
1400}
1401
1402static void mesa_DepthRange(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
1403{
1404 proto_tree_add_item(t, hf_x11_glx_render_DepthRange_zNear, tvb, *offsetp, 8, byte_order);
1405 *offsetp += 8;
1406 proto_tree_add_item(t, hf_x11_glx_render_DepthRange_zFar, tvb, *offsetp, 8, byte_order);
1407 *offsetp += 8;
1408}
1409
1410static void mesa_Frustum(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
1411{
1412 proto_tree_add_item(t, hf_x11_glx_render_Frustum_left, tvb, *offsetp, 8, byte_order);
1413 *offsetp += 8;
1414 proto_tree_add_item(t, hf_x11_glx_render_Frustum_right, tvb, *offsetp, 8, byte_order);
1415 *offsetp += 8;
1416 proto_tree_add_item(t, hf_x11_glx_render_Frustum_bottom, tvb, *offsetp, 8, byte_order);
1417 *offsetp += 8;
1418 proto_tree_add_item(t, hf_x11_glx_render_Frustum_top, tvb, *offsetp, 8, byte_order);
1419 *offsetp += 8;
1420 proto_tree_add_item(t, hf_x11_glx_render_Frustum_zNear, tvb, *offsetp, 8, byte_order);
1421 *offsetp += 8;
1422 proto_tree_add_item(t, hf_x11_glx_render_Frustum_zFar, tvb, *offsetp, 8, byte_order);
1423 *offsetp += 8;
1424}
1425
1426static void mesa_LoadIdentity(tvbuff_t *tvb _U_, int *offsetp _U_, proto_tree *t _U_, unsigned byte_order _U_, int length _U_)
1427{
1428}
1429
1430static void mesa_LoadMatrixf(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
1431{
1432 listOfFloat(tvb, offsetp, t, hf_x11_glx_render_LoadMatrixf_m, hf_x11_glx_render_LoadMatrixf_m_item, 16, byte_order);
1433}
1434
1435static void mesa_LoadMatrixd(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
1436{
1437 listOfDouble(tvb, offsetp, t, hf_x11_glx_render_LoadMatrixd_m, hf_x11_glx_render_LoadMatrixd_m_item, 16, byte_order);
1438}
1439
1440static void mesa_MatrixMode(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
1441{
1442 proto_tree_add_item(t, hf_x11_glx_render_MatrixMode_mode, tvb, *offsetp, 4, byte_order);
1443 *offsetp += 4;
1444}
1445
1446static void mesa_MultMatrixf(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
1447{
1448 listOfFloat(tvb, offsetp, t, hf_x11_glx_render_MultMatrixf_m, hf_x11_glx_render_MultMatrixf_m_item, 16, byte_order);
1449}
1450
1451static void mesa_MultMatrixd(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
1452{
1453 listOfDouble(tvb, offsetp, t, hf_x11_glx_render_MultMatrixd_m, hf_x11_glx_render_MultMatrixd_m_item, 16, byte_order);
1454}
1455
1456static void mesa_Ortho(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
1457{
1458 proto_tree_add_item(t, hf_x11_glx_render_Ortho_left, tvb, *offsetp, 8, byte_order);
1459 *offsetp += 8;
1460 proto_tree_add_item(t, hf_x11_glx_render_Ortho_right, tvb, *offsetp, 8, byte_order);
1461 *offsetp += 8;
1462 proto_tree_add_item(t, hf_x11_glx_render_Ortho_bottom, tvb, *offsetp, 8, byte_order);
1463 *offsetp += 8;
1464 proto_tree_add_item(t, hf_x11_glx_render_Ortho_top, tvb, *offsetp, 8, byte_order);
1465 *offsetp += 8;
1466 proto_tree_add_item(t, hf_x11_glx_render_Ortho_zNear, tvb, *offsetp, 8, byte_order);
1467 *offsetp += 8;
1468 proto_tree_add_item(t, hf_x11_glx_render_Ortho_zFar, tvb, *offsetp, 8, byte_order);
1469 *offsetp += 8;
1470}
1471
1472static void mesa_PopMatrix(tvbuff_t *tvb _U_, int *offsetp _U_, proto_tree *t _U_, unsigned byte_order _U_, int length _U_)
1473{
1474}
1475
1476static void mesa_PushMatrix(tvbuff_t *tvb _U_, int *offsetp _U_, proto_tree *t _U_, unsigned byte_order _U_, int length _U_)
1477{
1478}
1479
1480static void mesa_Rotated(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
1481{
1482 proto_tree_add_item(t, hf_x11_glx_render_Rotated_angle, tvb, *offsetp, 8, byte_order);
1483 *offsetp += 8;
1484 proto_tree_add_item(t, hf_x11_glx_render_Rotated_x, tvb, *offsetp, 8, byte_order);
1485 *offsetp += 8;
1486 proto_tree_add_item(t, hf_x11_glx_render_Rotated_y, tvb, *offsetp, 8, byte_order);
1487 *offsetp += 8;
1488 proto_tree_add_item(t, hf_x11_glx_render_Rotated_z, tvb, *offsetp, 8, byte_order);
1489 *offsetp += 8;
1490}
1491
1492static void mesa_Rotatef(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
1493{
1494 proto_tree_add_item(t, hf_x11_glx_render_Rotatef_angle, tvb, *offsetp, 4, byte_order);
1495 *offsetp += 4;
1496 proto_tree_add_item(t, hf_x11_glx_render_Rotatef_x, tvb, *offsetp, 4, byte_order);
1497 *offsetp += 4;
1498 proto_tree_add_item(t, hf_x11_glx_render_Rotatef_y, tvb, *offsetp, 4, byte_order);
1499 *offsetp += 4;
1500 proto_tree_add_item(t, hf_x11_glx_render_Rotatef_z, tvb, *offsetp, 4, byte_order);
1501 *offsetp += 4;
1502}
1503
1504static void mesa_Scaled(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
1505{
1506 proto_tree_add_item(t, hf_x11_glx_render_Scaled_x, tvb, *offsetp, 8, byte_order);
1507 *offsetp += 8;
1508 proto_tree_add_item(t, hf_x11_glx_render_Scaled_y, tvb, *offsetp, 8, byte_order);
1509 *offsetp += 8;
1510 proto_tree_add_item(t, hf_x11_glx_render_Scaled_z, tvb, *offsetp, 8, byte_order);
1511 *offsetp += 8;
1512}
1513
1514static void mesa_Scalef(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
1515{
1516 proto_tree_add_item(t, hf_x11_glx_render_Scalef_x, tvb, *offsetp, 4, byte_order);
1517 *offsetp += 4;
1518 proto_tree_add_item(t, hf_x11_glx_render_Scalef_y, tvb, *offsetp, 4, byte_order);
1519 *offsetp += 4;
1520 proto_tree_add_item(t, hf_x11_glx_render_Scalef_z, tvb, *offsetp, 4, byte_order);
1521 *offsetp += 4;
1522}
1523
1524static void mesa_Translated(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
1525{
1526 proto_tree_add_item(t, hf_x11_glx_render_Translated_x, tvb, *offsetp, 8, byte_order);
1527 *offsetp += 8;
1528 proto_tree_add_item(t, hf_x11_glx_render_Translated_y, tvb, *offsetp, 8, byte_order);
1529 *offsetp += 8;
1530 proto_tree_add_item(t, hf_x11_glx_render_Translated_z, tvb, *offsetp, 8, byte_order);
1531 *offsetp += 8;
1532}
1533
1534static void mesa_Translatef(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
1535{
1536 proto_tree_add_item(t, hf_x11_glx_render_Translatef_x, tvb, *offsetp, 4, byte_order);
1537 *offsetp += 4;
1538 proto_tree_add_item(t, hf_x11_glx_render_Translatef_y, tvb, *offsetp, 4, byte_order);
1539 *offsetp += 4;
1540 proto_tree_add_item(t, hf_x11_glx_render_Translatef_z, tvb, *offsetp, 4, byte_order);
1541 *offsetp += 4;
1542}
1543
1544static void mesa_Viewport(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
1545{
1546 proto_tree_add_item(t, hf_x11_glx_render_Viewport_x, tvb, *offsetp, 4, byte_order);
1547 *offsetp += 4;
1548 proto_tree_add_item(t, hf_x11_glx_render_Viewport_y, tvb, *offsetp, 4, byte_order);
1549 *offsetp += 4;
1550 proto_tree_add_item(t, hf_x11_glx_render_Viewport_width, tvb, *offsetp, 4, byte_order);
1551 *offsetp += 4;
1552 proto_tree_add_item(t, hf_x11_glx_render_Viewport_height, tvb, *offsetp, 4, byte_order);
1553 *offsetp += 4;
1554}
1555
1556static void mesa_DrawArrays(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
1557{
1558 proto_tree_add_item(t, hf_x11_glx_render_DrawArrays_mode, tvb, *offsetp, 4, byte_order);
1559 *offsetp += 4;
1560 proto_tree_add_item(t, hf_x11_glx_render_DrawArrays_first, tvb, *offsetp, 4, byte_order);
1561 *offsetp += 4;
1562 proto_tree_add_item(t, hf_x11_glx_render_DrawArrays_count, tvb, *offsetp, 4, byte_order);
1563 *offsetp += 4;
1564}
1565
1566static void mesa_PolygonOffset(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
1567{
1568 proto_tree_add_item(t, hf_x11_glx_render_PolygonOffset_factor, tvb, *offsetp, 4, byte_order);
1569 *offsetp += 4;
1570 proto_tree_add_item(t, hf_x11_glx_render_PolygonOffset_units, tvb, *offsetp, 4, byte_order);
1571 *offsetp += 4;
1572}
1573
1574static void mesa_CopyTexImage1D(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
1575{
1576 proto_tree_add_item(t, hf_x11_glx_render_CopyTexImage1D_target, tvb, *offsetp, 4, byte_order);
1577 *offsetp += 4;
1578 proto_tree_add_item(t, hf_x11_glx_render_CopyTexImage1D_level, tvb, *offsetp, 4, byte_order);
1579 *offsetp += 4;
1580 proto_tree_add_item(t, hf_x11_glx_render_CopyTexImage1D_internalformat, tvb, *offsetp, 4, byte_order);
1581 *offsetp += 4;
1582 proto_tree_add_item(t, hf_x11_glx_render_CopyTexImage1D_x, tvb, *offsetp, 4, byte_order);
1583 *offsetp += 4;
1584 proto_tree_add_item(t, hf_x11_glx_render_CopyTexImage1D_y, tvb, *offsetp, 4, byte_order);
1585 *offsetp += 4;
1586 proto_tree_add_item(t, hf_x11_glx_render_CopyTexImage1D_width, tvb, *offsetp, 4, byte_order);
1587 *offsetp += 4;
1588 proto_tree_add_item(t, hf_x11_glx_render_CopyTexImage1D_border, tvb, *offsetp, 4, byte_order);
1589 *offsetp += 4;
1590}
1591
1592static void mesa_CopyTexImage2D(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
1593{
1594 proto_tree_add_item(t, hf_x11_glx_render_CopyTexImage2D_target, tvb, *offsetp, 4, byte_order);
1595 *offsetp += 4;
1596 proto_tree_add_item(t, hf_x11_glx_render_CopyTexImage2D_level, tvb, *offsetp, 4, byte_order);
1597 *offsetp += 4;
1598 proto_tree_add_item(t, hf_x11_glx_render_CopyTexImage2D_internalformat, tvb, *offsetp, 4, byte_order);
1599 *offsetp += 4;
1600 proto_tree_add_item(t, hf_x11_glx_render_CopyTexImage2D_x, tvb, *offsetp, 4, byte_order);
1601 *offsetp += 4;
1602 proto_tree_add_item(t, hf_x11_glx_render_CopyTexImage2D_y, tvb, *offsetp, 4, byte_order);
1603 *offsetp += 4;
1604 proto_tree_add_item(t, hf_x11_glx_render_CopyTexImage2D_width, tvb, *offsetp, 4, byte_order);
1605 *offsetp += 4;
1606 proto_tree_add_item(t, hf_x11_glx_render_CopyTexImage2D_height, tvb, *offsetp, 4, byte_order);
1607 *offsetp += 4;
1608 proto_tree_add_item(t, hf_x11_glx_render_CopyTexImage2D_border, tvb, *offsetp, 4, byte_order);
1609 *offsetp += 4;
1610}
1611
1612static void mesa_CopyTexSubImage1D(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
1613{
1614 proto_tree_add_item(t, hf_x11_glx_render_CopyTexSubImage1D_target, tvb, *offsetp, 4, byte_order);
1615 *offsetp += 4;
1616 proto_tree_add_item(t, hf_x11_glx_render_CopyTexSubImage1D_level, tvb, *offsetp, 4, byte_order);
1617 *offsetp += 4;
1618 proto_tree_add_item(t, hf_x11_glx_render_CopyTexSubImage1D_xoffset, tvb, *offsetp, 4, byte_order);
1619 *offsetp += 4;
1620 proto_tree_add_item(t, hf_x11_glx_render_CopyTexSubImage1D_x, tvb, *offsetp, 4, byte_order);
1621 *offsetp += 4;
1622 proto_tree_add_item(t, hf_x11_glx_render_CopyTexSubImage1D_y, tvb, *offsetp, 4, byte_order);
1623 *offsetp += 4;
1624 proto_tree_add_item(t, hf_x11_glx_render_CopyTexSubImage1D_width, tvb, *offsetp, 4, byte_order);
1625 *offsetp += 4;
1626}
1627
1628static void mesa_CopyTexSubImage2D(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
1629{
1630 proto_tree_add_item(t, hf_x11_glx_render_CopyTexSubImage2D_target, tvb, *offsetp, 4, byte_order);
1631 *offsetp += 4;
1632 proto_tree_add_item(t, hf_x11_glx_render_CopyTexSubImage2D_level, tvb, *offsetp, 4, byte_order);
1633 *offsetp += 4;
1634 proto_tree_add_item(t, hf_x11_glx_render_CopyTexSubImage2D_xoffset, tvb, *offsetp, 4, byte_order);
1635 *offsetp += 4;
1636 proto_tree_add_item(t, hf_x11_glx_render_CopyTexSubImage2D_yoffset, tvb, *offsetp, 4, byte_order);
1637 *offsetp += 4;
1638 proto_tree_add_item(t, hf_x11_glx_render_CopyTexSubImage2D_x, tvb, *offsetp, 4, byte_order);
1639 *offsetp += 4;
1640 proto_tree_add_item(t, hf_x11_glx_render_CopyTexSubImage2D_y, tvb, *offsetp, 4, byte_order);
1641 *offsetp += 4;
1642 proto_tree_add_item(t, hf_x11_glx_render_CopyTexSubImage2D_width, tvb, *offsetp, 4, byte_order);
1643 *offsetp += 4;
1644 proto_tree_add_item(t, hf_x11_glx_render_CopyTexSubImage2D_height, tvb, *offsetp, 4, byte_order);
1645 *offsetp += 4;
1646}
1647
1648static void mesa_TexSubImage1D(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
1649{
1650 proto_tree_add_item(t, hf_x11_glx_render_TexSubImage1D_swapbytes, tvb, *offsetp, 1, byte_order);
1651 *offsetp += 1;
1652 proto_tree_add_item(t, hf_x11_glx_render_TexSubImage1D_lsbfirst, tvb, *offsetp, 1, byte_order);
1653 *offsetp += 1;
1654 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 2, ENC_NA);
1655 *offsetp += 2;
1656 proto_tree_add_item(t, hf_x11_glx_render_TexSubImage1D_rowlength, tvb, *offsetp, 4, byte_order);
1657 *offsetp += 4;
1658 proto_tree_add_item(t, hf_x11_glx_render_TexSubImage1D_skiprows, tvb, *offsetp, 4, byte_order);
1659 *offsetp += 4;
1660 proto_tree_add_item(t, hf_x11_glx_render_TexSubImage1D_skippixels, tvb, *offsetp, 4, byte_order);
1661 *offsetp += 4;
1662 proto_tree_add_item(t, hf_x11_glx_render_TexSubImage1D_alignment, tvb, *offsetp, 4, byte_order);
1663 *offsetp += 4;
1664 proto_tree_add_item(t, hf_x11_glx_render_TexSubImage1D_target, tvb, *offsetp, 4, byte_order);
1665 *offsetp += 4;
1666 proto_tree_add_item(t, hf_x11_glx_render_TexSubImage1D_level, tvb, *offsetp, 4, byte_order);
1667 *offsetp += 4;
1668 proto_tree_add_item(t, hf_x11_glx_render_TexSubImage1D_xoffset, tvb, *offsetp, 4, byte_order);
1669 *offsetp += 4;
1670 proto_tree_add_item(t, hf_x11_glx_render_TexSubImage1D_width, tvb, *offsetp, 4, byte_order);
1671 *offsetp += 4;
1672 proto_tree_add_item(t, hf_x11_glx_render_TexSubImage1D_format, tvb, *offsetp, 4, byte_order);
1673 *offsetp += 4;
1674 proto_tree_add_item(t, hf_x11_glx_render_TexSubImage1D_type, tvb, *offsetp, 4, byte_order);
1675 *offsetp += 4;
1676 proto_tree_add_item(t, hf_x11_glx_render_TexSubImage1D_UNUSED, tvb, *offsetp, 4, byte_order);
1677 *offsetp += 4;
1678 listOfByte(tvb, offsetp, t, hf_x11_glx_render_TexSubImage1D_pixels, (length - 48) / 1, byte_order);
1679}
1680
1681static void mesa_TexSubImage2D(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
1682{
1683 proto_tree_add_item(t, hf_x11_glx_render_TexSubImage2D_swapbytes, tvb, *offsetp, 1, byte_order);
1684 *offsetp += 1;
1685 proto_tree_add_item(t, hf_x11_glx_render_TexSubImage2D_lsbfirst, tvb, *offsetp, 1, byte_order);
1686 *offsetp += 1;
1687 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 2, ENC_NA);
1688 *offsetp += 2;
1689 proto_tree_add_item(t, hf_x11_glx_render_TexSubImage2D_rowlength, tvb, *offsetp, 4, byte_order);
1690 *offsetp += 4;
1691 proto_tree_add_item(t, hf_x11_glx_render_TexSubImage2D_skiprows, tvb, *offsetp, 4, byte_order);
1692 *offsetp += 4;
1693 proto_tree_add_item(t, hf_x11_glx_render_TexSubImage2D_skippixels, tvb, *offsetp, 4, byte_order);
1694 *offsetp += 4;
1695 proto_tree_add_item(t, hf_x11_glx_render_TexSubImage2D_alignment, tvb, *offsetp, 4, byte_order);
1696 *offsetp += 4;
1697 proto_tree_add_item(t, hf_x11_glx_render_TexSubImage2D_target, tvb, *offsetp, 4, byte_order);
1698 *offsetp += 4;
1699 proto_tree_add_item(t, hf_x11_glx_render_TexSubImage2D_level, tvb, *offsetp, 4, byte_order);
1700 *offsetp += 4;
1701 proto_tree_add_item(t, hf_x11_glx_render_TexSubImage2D_xoffset, tvb, *offsetp, 4, byte_order);
1702 *offsetp += 4;
1703 proto_tree_add_item(t, hf_x11_glx_render_TexSubImage2D_yoffset, tvb, *offsetp, 4, byte_order);
1704 *offsetp += 4;
1705 proto_tree_add_item(t, hf_x11_glx_render_TexSubImage2D_width, tvb, *offsetp, 4, byte_order);
1706 *offsetp += 4;
1707 proto_tree_add_item(t, hf_x11_glx_render_TexSubImage2D_height, tvb, *offsetp, 4, byte_order);
1708 *offsetp += 4;
1709 proto_tree_add_item(t, hf_x11_glx_render_TexSubImage2D_format, tvb, *offsetp, 4, byte_order);
1710 *offsetp += 4;
1711 proto_tree_add_item(t, hf_x11_glx_render_TexSubImage2D_type, tvb, *offsetp, 4, byte_order);
1712 *offsetp += 4;
1713 proto_tree_add_item(t, hf_x11_glx_render_TexSubImage2D_UNUSED, tvb, *offsetp, 4, byte_order);
1714 *offsetp += 4;
1715 listOfByte(tvb, offsetp, t, hf_x11_glx_render_TexSubImage2D_pixels, (length - 56) / 1, byte_order);
1716}
1717
1718static void mesa_BindTexture(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
1719{
1720 proto_tree_add_item(t, hf_x11_glx_render_BindTexture_target, tvb, *offsetp, 4, byte_order);
1721 *offsetp += 4;
1722 proto_tree_add_item(t, hf_x11_glx_render_BindTexture_texture, tvb, *offsetp, 4, byte_order);
1723 *offsetp += 4;
1724}
1725
1726static void mesa_PrioritizeTextures(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
1727{
1728 int n;
1729 n = tvb_get_uint32(tvb, *offsetp, byte_order);
1730 proto_tree_add_item(t, hf_x11_glx_render_PrioritizeTextures_n, tvb, *offsetp, 4, byte_order);
1731 *offsetp += 4;
1732 listOfCard32(tvb, offsetp, t, hf_x11_glx_render_PrioritizeTextures_textures, hf_x11_glx_render_PrioritizeTextures_textures_item, n, byte_order);
1733 listOfFloat(tvb, offsetp, t, hf_x11_glx_render_PrioritizeTextures_priorities, hf_x11_glx_render_PrioritizeTextures_priorities_item, n, byte_order);
1734}
1735
1736static void mesa_Indexubv(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
1737{
1738 listOfByte(tvb, offsetp, t, hf_x11_glx_render_Indexubv_c, 1, byte_order);
1739}
1740
1741static void mesa_BlendColor(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
1742{
1743 proto_tree_add_item(t, hf_x11_glx_render_BlendColor_red, tvb, *offsetp, 4, byte_order);
1744 *offsetp += 4;
1745 proto_tree_add_item(t, hf_x11_glx_render_BlendColor_green, tvb, *offsetp, 4, byte_order);
1746 *offsetp += 4;
1747 proto_tree_add_item(t, hf_x11_glx_render_BlendColor_blue, tvb, *offsetp, 4, byte_order);
1748 *offsetp += 4;
1749 proto_tree_add_item(t, hf_x11_glx_render_BlendColor_alpha, tvb, *offsetp, 4, byte_order);
1750 *offsetp += 4;
1751}
1752
1753static void mesa_BlendEquation(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
1754{
1755 proto_tree_add_item(t, hf_x11_glx_render_BlendEquation_mode, tvb, *offsetp, 4, byte_order);
1756 *offsetp += 4;
1757}
1758
1759static void mesa_ColorTable(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
1760{
1761 proto_tree_add_item(t, hf_x11_glx_render_ColorTable_swapbytes, tvb, *offsetp, 1, byte_order);
1762 *offsetp += 1;
1763 proto_tree_add_item(t, hf_x11_glx_render_ColorTable_lsbfirst, tvb, *offsetp, 1, byte_order);
1764 *offsetp += 1;
1765 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 2, ENC_NA);
1766 *offsetp += 2;
1767 proto_tree_add_item(t, hf_x11_glx_render_ColorTable_rowlength, tvb, *offsetp, 4, byte_order);
1768 *offsetp += 4;
1769 proto_tree_add_item(t, hf_x11_glx_render_ColorTable_skiprows, tvb, *offsetp, 4, byte_order);
1770 *offsetp += 4;
1771 proto_tree_add_item(t, hf_x11_glx_render_ColorTable_skippixels, tvb, *offsetp, 4, byte_order);
1772 *offsetp += 4;
1773 proto_tree_add_item(t, hf_x11_glx_render_ColorTable_alignment, tvb, *offsetp, 4, byte_order);
1774 *offsetp += 4;
1775 proto_tree_add_item(t, hf_x11_glx_render_ColorTable_target, tvb, *offsetp, 4, byte_order);
1776 *offsetp += 4;
1777 proto_tree_add_item(t, hf_x11_glx_render_ColorTable_internalformat, tvb, *offsetp, 4, byte_order);
1778 *offsetp += 4;
1779 proto_tree_add_item(t, hf_x11_glx_render_ColorTable_width, tvb, *offsetp, 4, byte_order);
1780 *offsetp += 4;
1781 proto_tree_add_item(t, hf_x11_glx_render_ColorTable_format, tvb, *offsetp, 4, byte_order);
1782 *offsetp += 4;
1783 proto_tree_add_item(t, hf_x11_glx_render_ColorTable_type, tvb, *offsetp, 4, byte_order);
1784 *offsetp += 4;
1785 listOfByte(tvb, offsetp, t, hf_x11_glx_render_ColorTable_table, (length - 40) / 1, byte_order);
1786}
1787
1788static void mesa_ColorTableParameterfv(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
1789{
1790 proto_tree_add_item(t, hf_x11_glx_render_ColorTableParameterfv_target, tvb, *offsetp, 4, byte_order);
1791 *offsetp += 4;
1792 proto_tree_add_item(t, hf_x11_glx_render_ColorTableParameterfv_pname, tvb, *offsetp, 4, byte_order);
1793 *offsetp += 4;
1794 listOfFloat(tvb, offsetp, t, hf_x11_glx_render_ColorTableParameterfv_params, hf_x11_glx_render_ColorTableParameterfv_params_item, (length - 8) / 4, byte_order);
1795}
1796
1797static void mesa_ColorTableParameteriv(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
1798{
1799 proto_tree_add_item(t, hf_x11_glx_render_ColorTableParameteriv_target, tvb, *offsetp, 4, byte_order);
1800 *offsetp += 4;
1801 proto_tree_add_item(t, hf_x11_glx_render_ColorTableParameteriv_pname, tvb, *offsetp, 4, byte_order);
1802 *offsetp += 4;
1803 listOfInt32(tvb, offsetp, t, hf_x11_glx_render_ColorTableParameteriv_params, hf_x11_glx_render_ColorTableParameteriv_params_item, (length - 8) / 4, byte_order);
1804}
1805
1806static void mesa_CopyColorTable(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
1807{
1808 proto_tree_add_item(t, hf_x11_glx_render_CopyColorTable_target, tvb, *offsetp, 4, byte_order);
1809 *offsetp += 4;
1810 proto_tree_add_item(t, hf_x11_glx_render_CopyColorTable_internalformat, tvb, *offsetp, 4, byte_order);
1811 *offsetp += 4;
1812 proto_tree_add_item(t, hf_x11_glx_render_CopyColorTable_x, tvb, *offsetp, 4, byte_order);
1813 *offsetp += 4;
1814 proto_tree_add_item(t, hf_x11_glx_render_CopyColorTable_y, tvb, *offsetp, 4, byte_order);
1815 *offsetp += 4;
1816 proto_tree_add_item(t, hf_x11_glx_render_CopyColorTable_width, tvb, *offsetp, 4, byte_order);
1817 *offsetp += 4;
1818}
1819
1820static void mesa_ColorSubTable(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
1821{
1822 proto_tree_add_item(t, hf_x11_glx_render_ColorSubTable_swapbytes, tvb, *offsetp, 1, byte_order);
1823 *offsetp += 1;
1824 proto_tree_add_item(t, hf_x11_glx_render_ColorSubTable_lsbfirst, tvb, *offsetp, 1, byte_order);
1825 *offsetp += 1;
1826 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 2, ENC_NA);
1827 *offsetp += 2;
1828 proto_tree_add_item(t, hf_x11_glx_render_ColorSubTable_rowlength, tvb, *offsetp, 4, byte_order);
1829 *offsetp += 4;
1830 proto_tree_add_item(t, hf_x11_glx_render_ColorSubTable_skiprows, tvb, *offsetp, 4, byte_order);
1831 *offsetp += 4;
1832 proto_tree_add_item(t, hf_x11_glx_render_ColorSubTable_skippixels, tvb, *offsetp, 4, byte_order);
1833 *offsetp += 4;
1834 proto_tree_add_item(t, hf_x11_glx_render_ColorSubTable_alignment, tvb, *offsetp, 4, byte_order);
1835 *offsetp += 4;
1836 proto_tree_add_item(t, hf_x11_glx_render_ColorSubTable_target, tvb, *offsetp, 4, byte_order);
1837 *offsetp += 4;
1838 proto_tree_add_item(t, hf_x11_glx_render_ColorSubTable_start, tvb, *offsetp, 4, byte_order);
1839 *offsetp += 4;
1840 proto_tree_add_item(t, hf_x11_glx_render_ColorSubTable_count, tvb, *offsetp, 4, byte_order);
1841 *offsetp += 4;
1842 proto_tree_add_item(t, hf_x11_glx_render_ColorSubTable_format, tvb, *offsetp, 4, byte_order);
1843 *offsetp += 4;
1844 proto_tree_add_item(t, hf_x11_glx_render_ColorSubTable_type, tvb, *offsetp, 4, byte_order);
1845 *offsetp += 4;
1846 listOfByte(tvb, offsetp, t, hf_x11_glx_render_ColorSubTable_data, (length - 40) / 1, byte_order);
1847}
1848
1849static void mesa_CopyColorSubTable(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
1850{
1851 proto_tree_add_item(t, hf_x11_glx_render_CopyColorSubTable_target, tvb, *offsetp, 4, byte_order);
1852 *offsetp += 4;
1853 proto_tree_add_item(t, hf_x11_glx_render_CopyColorSubTable_start, tvb, *offsetp, 4, byte_order);
1854 *offsetp += 4;
1855 proto_tree_add_item(t, hf_x11_glx_render_CopyColorSubTable_x, tvb, *offsetp, 4, byte_order);
1856 *offsetp += 4;
1857 proto_tree_add_item(t, hf_x11_glx_render_CopyColorSubTable_y, tvb, *offsetp, 4, byte_order);
1858 *offsetp += 4;
1859 proto_tree_add_item(t, hf_x11_glx_render_CopyColorSubTable_width, tvb, *offsetp, 4, byte_order);
1860 *offsetp += 4;
1861}
1862
1863static void mesa_ConvolutionFilter1D(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
1864{
1865 proto_tree_add_item(t, hf_x11_glx_render_ConvolutionFilter1D_swapbytes, tvb, *offsetp, 1, byte_order);
1866 *offsetp += 1;
1867 proto_tree_add_item(t, hf_x11_glx_render_ConvolutionFilter1D_lsbfirst, tvb, *offsetp, 1, byte_order);
1868 *offsetp += 1;
1869 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 2, ENC_NA);
1870 *offsetp += 2;
1871 proto_tree_add_item(t, hf_x11_glx_render_ConvolutionFilter1D_rowlength, tvb, *offsetp, 4, byte_order);
1872 *offsetp += 4;
1873 proto_tree_add_item(t, hf_x11_glx_render_ConvolutionFilter1D_skiprows, tvb, *offsetp, 4, byte_order);
1874 *offsetp += 4;
1875 proto_tree_add_item(t, hf_x11_glx_render_ConvolutionFilter1D_skippixels, tvb, *offsetp, 4, byte_order);
1876 *offsetp += 4;
1877 proto_tree_add_item(t, hf_x11_glx_render_ConvolutionFilter1D_alignment, tvb, *offsetp, 4, byte_order);
1878 *offsetp += 4;
1879 proto_tree_add_item(t, hf_x11_glx_render_ConvolutionFilter1D_target, tvb, *offsetp, 4, byte_order);
1880 *offsetp += 4;
1881 proto_tree_add_item(t, hf_x11_glx_render_ConvolutionFilter1D_internalformat, tvb, *offsetp, 4, byte_order);
1882 *offsetp += 4;
1883 proto_tree_add_item(t, hf_x11_glx_render_ConvolutionFilter1D_width, tvb, *offsetp, 4, byte_order);
1884 *offsetp += 4;
1885 proto_tree_add_item(t, hf_x11_glx_render_ConvolutionFilter1D_format, tvb, *offsetp, 4, byte_order);
1886 *offsetp += 4;
1887 proto_tree_add_item(t, hf_x11_glx_render_ConvolutionFilter1D_type, tvb, *offsetp, 4, byte_order);
1888 *offsetp += 4;
1889 listOfByte(tvb, offsetp, t, hf_x11_glx_render_ConvolutionFilter1D_image, (length - 40) / 1, byte_order);
1890}
1891
1892static void mesa_ConvolutionFilter2D(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
1893{
1894 proto_tree_add_item(t, hf_x11_glx_render_ConvolutionFilter2D_swapbytes, tvb, *offsetp, 1, byte_order);
1895 *offsetp += 1;
1896 proto_tree_add_item(t, hf_x11_glx_render_ConvolutionFilter2D_lsbfirst, tvb, *offsetp, 1, byte_order);
1897 *offsetp += 1;
1898 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 2, ENC_NA);
1899 *offsetp += 2;
1900 proto_tree_add_item(t, hf_x11_glx_render_ConvolutionFilter2D_rowlength, tvb, *offsetp, 4, byte_order);
1901 *offsetp += 4;
1902 proto_tree_add_item(t, hf_x11_glx_render_ConvolutionFilter2D_skiprows, tvb, *offsetp, 4, byte_order);
1903 *offsetp += 4;
1904 proto_tree_add_item(t, hf_x11_glx_render_ConvolutionFilter2D_skippixels, tvb, *offsetp, 4, byte_order);
1905 *offsetp += 4;
1906 proto_tree_add_item(t, hf_x11_glx_render_ConvolutionFilter2D_alignment, tvb, *offsetp, 4, byte_order);
1907 *offsetp += 4;
1908 proto_tree_add_item(t, hf_x11_glx_render_ConvolutionFilter2D_target, tvb, *offsetp, 4, byte_order);
1909 *offsetp += 4;
1910 proto_tree_add_item(t, hf_x11_glx_render_ConvolutionFilter2D_internalformat, tvb, *offsetp, 4, byte_order);
1911 *offsetp += 4;
1912 proto_tree_add_item(t, hf_x11_glx_render_ConvolutionFilter2D_width, tvb, *offsetp, 4, byte_order);
1913 *offsetp += 4;
1914 proto_tree_add_item(t, hf_x11_glx_render_ConvolutionFilter2D_height, tvb, *offsetp, 4, byte_order);
1915 *offsetp += 4;
1916 proto_tree_add_item(t, hf_x11_glx_render_ConvolutionFilter2D_format, tvb, *offsetp, 4, byte_order);
1917 *offsetp += 4;
1918 proto_tree_add_item(t, hf_x11_glx_render_ConvolutionFilter2D_type, tvb, *offsetp, 4, byte_order);
1919 *offsetp += 4;
1920 listOfByte(tvb, offsetp, t, hf_x11_glx_render_ConvolutionFilter2D_image, (length - 44) / 1, byte_order);
1921}
1922
1923static void mesa_ConvolutionParameterf(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
1924{
1925 proto_tree_add_item(t, hf_x11_glx_render_ConvolutionParameterf_target, tvb, *offsetp, 4, byte_order);
1926 *offsetp += 4;
1927 proto_tree_add_item(t, hf_x11_glx_render_ConvolutionParameterf_pname, tvb, *offsetp, 4, byte_order);
1928 *offsetp += 4;
1929 proto_tree_add_item(t, hf_x11_glx_render_ConvolutionParameterf_params, tvb, *offsetp, 4, byte_order);
1930 *offsetp += 4;
1931}
1932
1933static void mesa_ConvolutionParameterfv(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
1934{
1935 proto_tree_add_item(t, hf_x11_glx_render_ConvolutionParameterfv_target, tvb, *offsetp, 4, byte_order);
1936 *offsetp += 4;
1937 proto_tree_add_item(t, hf_x11_glx_render_ConvolutionParameterfv_pname, tvb, *offsetp, 4, byte_order);
1938 *offsetp += 4;
1939 listOfFloat(tvb, offsetp, t, hf_x11_glx_render_ConvolutionParameterfv_params, hf_x11_glx_render_ConvolutionParameterfv_params_item, (length - 8) / 4, byte_order);
1940}
1941
1942static void mesa_ConvolutionParameteri(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
1943{
1944 proto_tree_add_item(t, hf_x11_glx_render_ConvolutionParameteri_target, tvb, *offsetp, 4, byte_order);
1945 *offsetp += 4;
1946 proto_tree_add_item(t, hf_x11_glx_render_ConvolutionParameteri_pname, tvb, *offsetp, 4, byte_order);
1947 *offsetp += 4;
1948 proto_tree_add_item(t, hf_x11_glx_render_ConvolutionParameteri_params, tvb, *offsetp, 4, byte_order);
1949 *offsetp += 4;
1950}
1951
1952static void mesa_ConvolutionParameteriv(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
1953{
1954 proto_tree_add_item(t, hf_x11_glx_render_ConvolutionParameteriv_target, tvb, *offsetp, 4, byte_order);
1955 *offsetp += 4;
1956 proto_tree_add_item(t, hf_x11_glx_render_ConvolutionParameteriv_pname, tvb, *offsetp, 4, byte_order);
1957 *offsetp += 4;
1958 listOfInt32(tvb, offsetp, t, hf_x11_glx_render_ConvolutionParameteriv_params, hf_x11_glx_render_ConvolutionParameteriv_params_item, (length - 8) / 4, byte_order);
1959}
1960
1961static void mesa_CopyConvolutionFilter1D(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
1962{
1963 proto_tree_add_item(t, hf_x11_glx_render_CopyConvolutionFilter1D_target, tvb, *offsetp, 4, byte_order);
1964 *offsetp += 4;
1965 proto_tree_add_item(t, hf_x11_glx_render_CopyConvolutionFilter1D_internalformat, tvb, *offsetp, 4, byte_order);
1966 *offsetp += 4;
1967 proto_tree_add_item(t, hf_x11_glx_render_CopyConvolutionFilter1D_x, tvb, *offsetp, 4, byte_order);
1968 *offsetp += 4;
1969 proto_tree_add_item(t, hf_x11_glx_render_CopyConvolutionFilter1D_y, tvb, *offsetp, 4, byte_order);
1970 *offsetp += 4;
1971 proto_tree_add_item(t, hf_x11_glx_render_CopyConvolutionFilter1D_width, tvb, *offsetp, 4, byte_order);
1972 *offsetp += 4;
1973}
1974
1975static void mesa_CopyConvolutionFilter2D(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
1976{
1977 proto_tree_add_item(t, hf_x11_glx_render_CopyConvolutionFilter2D_target, tvb, *offsetp, 4, byte_order);
1978 *offsetp += 4;
1979 proto_tree_add_item(t, hf_x11_glx_render_CopyConvolutionFilter2D_internalformat, tvb, *offsetp, 4, byte_order);
1980 *offsetp += 4;
1981 proto_tree_add_item(t, hf_x11_glx_render_CopyConvolutionFilter2D_x, tvb, *offsetp, 4, byte_order);
1982 *offsetp += 4;
1983 proto_tree_add_item(t, hf_x11_glx_render_CopyConvolutionFilter2D_y, tvb, *offsetp, 4, byte_order);
1984 *offsetp += 4;
1985 proto_tree_add_item(t, hf_x11_glx_render_CopyConvolutionFilter2D_width, tvb, *offsetp, 4, byte_order);
1986 *offsetp += 4;
1987 proto_tree_add_item(t, hf_x11_glx_render_CopyConvolutionFilter2D_height, tvb, *offsetp, 4, byte_order);
1988 *offsetp += 4;
1989}
1990
1991static void mesa_SeparableFilter2D(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
1992{
1993 proto_tree_add_item(t, hf_x11_glx_render_SeparableFilter2D_target, tvb, *offsetp, 4, byte_order);
1994 *offsetp += 4;
1995 proto_tree_add_item(t, hf_x11_glx_render_SeparableFilter2D_internalformat, tvb, *offsetp, 4, byte_order);
1996 *offsetp += 4;
1997 proto_tree_add_item(t, hf_x11_glx_render_SeparableFilter2D_width, tvb, *offsetp, 4, byte_order);
1998 *offsetp += 4;
1999 proto_tree_add_item(t, hf_x11_glx_render_SeparableFilter2D_height, tvb, *offsetp, 4, byte_order);
2000 *offsetp += 4;
2001 proto_tree_add_item(t, hf_x11_glx_render_SeparableFilter2D_format, tvb, *offsetp, 4, byte_order);
2002 *offsetp += 4;
2003 proto_tree_add_item(t, hf_x11_glx_render_SeparableFilter2D_type, tvb, *offsetp, 4, byte_order);
2004 *offsetp += 4;
2005 listOfByte(tvb, offsetp, t, hf_x11_glx_render_SeparableFilter2D_row, (length - 24) / 1, byte_order);
2006 listOfByte(tvb, offsetp, t, hf_x11_glx_render_SeparableFilter2D_column, (length - 24) / 1, byte_order);
2007}
2008
2009static void mesa_Histogram(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
2010{
2011 proto_tree_add_item(t, hf_x11_glx_render_Histogram_target, tvb, *offsetp, 4, byte_order);
2012 *offsetp += 4;
2013 proto_tree_add_item(t, hf_x11_glx_render_Histogram_width, tvb, *offsetp, 4, byte_order);
2014 *offsetp += 4;
2015 proto_tree_add_item(t, hf_x11_glx_render_Histogram_internalformat, tvb, *offsetp, 4, byte_order);
2016 *offsetp += 4;
2017 proto_tree_add_item(t, hf_x11_glx_render_Histogram_sink, tvb, *offsetp, 1, byte_order);
2018 *offsetp += 1;
2019}
2020
2021static void mesa_Minmax(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
2022{
2023 proto_tree_add_item(t, hf_x11_glx_render_Minmax_target, tvb, *offsetp, 4, byte_order);
2024 *offsetp += 4;
2025 proto_tree_add_item(t, hf_x11_glx_render_Minmax_internalformat, tvb, *offsetp, 4, byte_order);
2026 *offsetp += 4;
2027 proto_tree_add_item(t, hf_x11_glx_render_Minmax_sink, tvb, *offsetp, 1, byte_order);
2028 *offsetp += 1;
2029}
2030
2031static void mesa_ResetHistogram(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
2032{
2033 proto_tree_add_item(t, hf_x11_glx_render_ResetHistogram_target, tvb, *offsetp, 4, byte_order);
2034 *offsetp += 4;
2035}
2036
2037static void mesa_ResetMinmax(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
2038{
2039 proto_tree_add_item(t, hf_x11_glx_render_ResetMinmax_target, tvb, *offsetp, 4, byte_order);
2040 *offsetp += 4;
2041}
2042
2043static void mesa_TexImage3D(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
2044{
2045 proto_tree_add_item(t, hf_x11_glx_render_TexImage3D_swapbytes, tvb, *offsetp, 1, byte_order);
2046 *offsetp += 1;
2047 proto_tree_add_item(t, hf_x11_glx_render_TexImage3D_lsbfirst, tvb, *offsetp, 1, byte_order);
2048 *offsetp += 1;
2049 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 2, ENC_NA);
2050 *offsetp += 2;
2051 proto_tree_add_item(t, hf_x11_glx_render_TexImage3D_rowlength, tvb, *offsetp, 4, byte_order);
2052 *offsetp += 4;
2053 proto_tree_add_item(t, hf_x11_glx_render_TexImage3D_skiprows, tvb, *offsetp, 4, byte_order);
2054 *offsetp += 4;
2055 proto_tree_add_item(t, hf_x11_glx_render_TexImage3D_skippixels, tvb, *offsetp, 4, byte_order);
2056 *offsetp += 4;
2057 proto_tree_add_item(t, hf_x11_glx_render_TexImage3D_alignment, tvb, *offsetp, 4, byte_order);
2058 *offsetp += 4;
2059 proto_tree_add_item(t, hf_x11_glx_render_TexImage3D_target, tvb, *offsetp, 4, byte_order);
2060 *offsetp += 4;
2061 proto_tree_add_item(t, hf_x11_glx_render_TexImage3D_level, tvb, *offsetp, 4, byte_order);
2062 *offsetp += 4;
2063 proto_tree_add_item(t, hf_x11_glx_render_TexImage3D_internalformat, tvb, *offsetp, 4, byte_order);
2064 *offsetp += 4;
2065 proto_tree_add_item(t, hf_x11_glx_render_TexImage3D_width, tvb, *offsetp, 4, byte_order);
2066 *offsetp += 4;
2067 proto_tree_add_item(t, hf_x11_glx_render_TexImage3D_height, tvb, *offsetp, 4, byte_order);
2068 *offsetp += 4;
2069 proto_tree_add_item(t, hf_x11_glx_render_TexImage3D_depth, tvb, *offsetp, 4, byte_order);
2070 *offsetp += 4;
2071 proto_tree_add_item(t, hf_x11_glx_render_TexImage3D_border, tvb, *offsetp, 4, byte_order);
2072 *offsetp += 4;
2073 proto_tree_add_item(t, hf_x11_glx_render_TexImage3D_format, tvb, *offsetp, 4, byte_order);
2074 *offsetp += 4;
2075 proto_tree_add_item(t, hf_x11_glx_render_TexImage3D_type, tvb, *offsetp, 4, byte_order);
2076 *offsetp += 4;
2077 listOfByte(tvb, offsetp, t, hf_x11_glx_render_TexImage3D_pixels, (length - 56) / 1, byte_order);
2078}
2079
2080static void mesa_TexSubImage3D(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
2081{
2082 proto_tree_add_item(t, hf_x11_glx_render_TexSubImage3D_swapbytes, tvb, *offsetp, 1, byte_order);
2083 *offsetp += 1;
2084 proto_tree_add_item(t, hf_x11_glx_render_TexSubImage3D_lsbfirst, tvb, *offsetp, 1, byte_order);
2085 *offsetp += 1;
2086 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 2, ENC_NA);
2087 *offsetp += 2;
2088 proto_tree_add_item(t, hf_x11_glx_render_TexSubImage3D_rowlength, tvb, *offsetp, 4, byte_order);
2089 *offsetp += 4;
2090 proto_tree_add_item(t, hf_x11_glx_render_TexSubImage3D_skiprows, tvb, *offsetp, 4, byte_order);
2091 *offsetp += 4;
2092 proto_tree_add_item(t, hf_x11_glx_render_TexSubImage3D_skippixels, tvb, *offsetp, 4, byte_order);
2093 *offsetp += 4;
2094 proto_tree_add_item(t, hf_x11_glx_render_TexSubImage3D_alignment, tvb, *offsetp, 4, byte_order);
2095 *offsetp += 4;
2096 proto_tree_add_item(t, hf_x11_glx_render_TexSubImage3D_target, tvb, *offsetp, 4, byte_order);
2097 *offsetp += 4;
2098 proto_tree_add_item(t, hf_x11_glx_render_TexSubImage3D_level, tvb, *offsetp, 4, byte_order);
2099 *offsetp += 4;
2100 proto_tree_add_item(t, hf_x11_glx_render_TexSubImage3D_xoffset, tvb, *offsetp, 4, byte_order);
2101 *offsetp += 4;
2102 proto_tree_add_item(t, hf_x11_glx_render_TexSubImage3D_yoffset, tvb, *offsetp, 4, byte_order);
2103 *offsetp += 4;
2104 proto_tree_add_item(t, hf_x11_glx_render_TexSubImage3D_zoffset, tvb, *offsetp, 4, byte_order);
2105 *offsetp += 4;
2106 proto_tree_add_item(t, hf_x11_glx_render_TexSubImage3D_width, tvb, *offsetp, 4, byte_order);
2107 *offsetp += 4;
2108 proto_tree_add_item(t, hf_x11_glx_render_TexSubImage3D_height, tvb, *offsetp, 4, byte_order);
2109 *offsetp += 4;
2110 proto_tree_add_item(t, hf_x11_glx_render_TexSubImage3D_depth, tvb, *offsetp, 4, byte_order);
2111 *offsetp += 4;
2112 proto_tree_add_item(t, hf_x11_glx_render_TexSubImage3D_format, tvb, *offsetp, 4, byte_order);
2113 *offsetp += 4;
2114 proto_tree_add_item(t, hf_x11_glx_render_TexSubImage3D_type, tvb, *offsetp, 4, byte_order);
2115 *offsetp += 4;
2116 proto_tree_add_item(t, hf_x11_glx_render_TexSubImage3D_UNUSED, tvb, *offsetp, 4, byte_order);
2117 *offsetp += 4;
2118 listOfByte(tvb, offsetp, t, hf_x11_glx_render_TexSubImage3D_pixels, (length - 64) / 1, byte_order);
2119}
2120
2121static void mesa_CopyTexSubImage3D(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
2122{
2123 proto_tree_add_item(t, hf_x11_glx_render_CopyTexSubImage3D_target, tvb, *offsetp, 4, byte_order);
2124 *offsetp += 4;
2125 proto_tree_add_item(t, hf_x11_glx_render_CopyTexSubImage3D_level, tvb, *offsetp, 4, byte_order);
2126 *offsetp += 4;
2127 proto_tree_add_item(t, hf_x11_glx_render_CopyTexSubImage3D_xoffset, tvb, *offsetp, 4, byte_order);
2128 *offsetp += 4;
2129 proto_tree_add_item(t, hf_x11_glx_render_CopyTexSubImage3D_yoffset, tvb, *offsetp, 4, byte_order);
2130 *offsetp += 4;
2131 proto_tree_add_item(t, hf_x11_glx_render_CopyTexSubImage3D_zoffset, tvb, *offsetp, 4, byte_order);
2132 *offsetp += 4;
2133 proto_tree_add_item(t, hf_x11_glx_render_CopyTexSubImage3D_x, tvb, *offsetp, 4, byte_order);
2134 *offsetp += 4;
2135 proto_tree_add_item(t, hf_x11_glx_render_CopyTexSubImage3D_y, tvb, *offsetp, 4, byte_order);
2136 *offsetp += 4;
2137 proto_tree_add_item(t, hf_x11_glx_render_CopyTexSubImage3D_width, tvb, *offsetp, 4, byte_order);
2138 *offsetp += 4;
2139 proto_tree_add_item(t, hf_x11_glx_render_CopyTexSubImage3D_height, tvb, *offsetp, 4, byte_order);
2140 *offsetp += 4;
2141}
2142
2143static void mesa_ActiveTexture(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
2144{
2145 proto_tree_add_item(t, hf_x11_glx_render_ActiveTexture_texture, tvb, *offsetp, 4, byte_order);
2146 *offsetp += 4;
2147}
2148
2149static void mesa_MultiTexCoord1dv(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
2150{
2151 proto_tree_add_item(t, hf_x11_glx_render_MultiTexCoord1dv_target, tvb, *offsetp, 4, byte_order);
2152 *offsetp += 4;
2153 listOfDouble(tvb, offsetp, t, hf_x11_glx_render_MultiTexCoord1dv_v, hf_x11_glx_render_MultiTexCoord1dv_v_item, 1, byte_order);
2154}
2155
2156static void mesa_MultiTexCoord1iv(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
2157{
2158 proto_tree_add_item(t, hf_x11_glx_render_MultiTexCoord1iv_target, tvb, *offsetp, 4, byte_order);
2159 *offsetp += 4;
2160 listOfInt32(tvb, offsetp, t, hf_x11_glx_render_MultiTexCoord1iv_v, hf_x11_glx_render_MultiTexCoord1iv_v_item, 1, byte_order);
2161}
2162
2163static void mesa_MultiTexCoord1sv(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
2164{
2165 proto_tree_add_item(t, hf_x11_glx_render_MultiTexCoord1sv_target, tvb, *offsetp, 4, byte_order);
2166 *offsetp += 4;
2167 listOfInt16(tvb, offsetp, t, hf_x11_glx_render_MultiTexCoord1sv_v, hf_x11_glx_render_MultiTexCoord1sv_v_item, 1, byte_order);
2168}
2169
2170static void mesa_MultiTexCoord2dv(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
2171{
2172 proto_tree_add_item(t, hf_x11_glx_render_MultiTexCoord2dv_target, tvb, *offsetp, 4, byte_order);
2173 *offsetp += 4;
2174 listOfDouble(tvb, offsetp, t, hf_x11_glx_render_MultiTexCoord2dv_v, hf_x11_glx_render_MultiTexCoord2dv_v_item, 2, byte_order);
2175}
2176
2177static void mesa_MultiTexCoord2iv(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
2178{
2179 proto_tree_add_item(t, hf_x11_glx_render_MultiTexCoord2iv_target, tvb, *offsetp, 4, byte_order);
2180 *offsetp += 4;
2181 listOfInt32(tvb, offsetp, t, hf_x11_glx_render_MultiTexCoord2iv_v, hf_x11_glx_render_MultiTexCoord2iv_v_item, 2, byte_order);
2182}
2183
2184static void mesa_MultiTexCoord2sv(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
2185{
2186 proto_tree_add_item(t, hf_x11_glx_render_MultiTexCoord2sv_target, tvb, *offsetp, 4, byte_order);
2187 *offsetp += 4;
2188 listOfInt16(tvb, offsetp, t, hf_x11_glx_render_MultiTexCoord2sv_v, hf_x11_glx_render_MultiTexCoord2sv_v_item, 2, byte_order);
2189}
2190
2191static void mesa_MultiTexCoord3dv(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
2192{
2193 proto_tree_add_item(t, hf_x11_glx_render_MultiTexCoord3dv_target, tvb, *offsetp, 4, byte_order);
2194 *offsetp += 4;
2195 listOfDouble(tvb, offsetp, t, hf_x11_glx_render_MultiTexCoord3dv_v, hf_x11_glx_render_MultiTexCoord3dv_v_item, 3, byte_order);
2196}
2197
2198static void mesa_MultiTexCoord3iv(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
2199{
2200 proto_tree_add_item(t, hf_x11_glx_render_MultiTexCoord3iv_target, tvb, *offsetp, 4, byte_order);
2201 *offsetp += 4;
2202 listOfInt32(tvb, offsetp, t, hf_x11_glx_render_MultiTexCoord3iv_v, hf_x11_glx_render_MultiTexCoord3iv_v_item, 3, byte_order);
2203}
2204
2205static void mesa_MultiTexCoord3sv(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
2206{
2207 proto_tree_add_item(t, hf_x11_glx_render_MultiTexCoord3sv_target, tvb, *offsetp, 4, byte_order);
2208 *offsetp += 4;
2209 listOfInt16(tvb, offsetp, t, hf_x11_glx_render_MultiTexCoord3sv_v, hf_x11_glx_render_MultiTexCoord3sv_v_item, 3, byte_order);
2210}
2211
2212static void mesa_MultiTexCoord4dv(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
2213{
2214 proto_tree_add_item(t, hf_x11_glx_render_MultiTexCoord4dv_target, tvb, *offsetp, 4, byte_order);
2215 *offsetp += 4;
2216 listOfDouble(tvb, offsetp, t, hf_x11_glx_render_MultiTexCoord4dv_v, hf_x11_glx_render_MultiTexCoord4dv_v_item, 4, byte_order);
2217}
2218
2219static void mesa_MultiTexCoord4iv(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
2220{
2221 proto_tree_add_item(t, hf_x11_glx_render_MultiTexCoord4iv_target, tvb, *offsetp, 4, byte_order);
2222 *offsetp += 4;
2223 listOfInt32(tvb, offsetp, t, hf_x11_glx_render_MultiTexCoord4iv_v, hf_x11_glx_render_MultiTexCoord4iv_v_item, 4, byte_order);
2224}
2225
2226static void mesa_MultiTexCoord4sv(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
2227{
2228 proto_tree_add_item(t, hf_x11_glx_render_MultiTexCoord4sv_target, tvb, *offsetp, 4, byte_order);
2229 *offsetp += 4;
2230 listOfInt16(tvb, offsetp, t, hf_x11_glx_render_MultiTexCoord4sv_v, hf_x11_glx_render_MultiTexCoord4sv_v_item, 4, byte_order);
2231}
2232
2233static void mesa_SampleCoverage(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
2234{
2235 proto_tree_add_item(t, hf_x11_glx_render_SampleCoverage_value, tvb, *offsetp, 4, byte_order);
2236 *offsetp += 4;
2237 proto_tree_add_item(t, hf_x11_glx_render_SampleCoverage_invert, tvb, *offsetp, 1, byte_order);
2238 *offsetp += 1;
2239}
2240
2241static void mesa_CompressedTexImage3D(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
2242{
2243 int imageSize;
2244 proto_tree_add_item(t, hf_x11_glx_render_CompressedTexImage3D_target, tvb, *offsetp, 4, byte_order);
2245 *offsetp += 4;
2246 proto_tree_add_item(t, hf_x11_glx_render_CompressedTexImage3D_level, tvb, *offsetp, 4, byte_order);
2247 *offsetp += 4;
2248 proto_tree_add_item(t, hf_x11_glx_render_CompressedTexImage3D_internalformat, tvb, *offsetp, 4, byte_order);
2249 *offsetp += 4;
2250 proto_tree_add_item(t, hf_x11_glx_render_CompressedTexImage3D_width, tvb, *offsetp, 4, byte_order);
2251 *offsetp += 4;
2252 proto_tree_add_item(t, hf_x11_glx_render_CompressedTexImage3D_height, tvb, *offsetp, 4, byte_order);
2253 *offsetp += 4;
2254 proto_tree_add_item(t, hf_x11_glx_render_CompressedTexImage3D_depth, tvb, *offsetp, 4, byte_order);
2255 *offsetp += 4;
2256 proto_tree_add_item(t, hf_x11_glx_render_CompressedTexImage3D_border, tvb, *offsetp, 4, byte_order);
2257 *offsetp += 4;
2258 imageSize = tvb_get_uint32(tvb, *offsetp, byte_order);
2259 proto_tree_add_item(t, hf_x11_glx_render_CompressedTexImage3D_imageSize, tvb, *offsetp, 4, byte_order);
2260 *offsetp += 4;
2261 listOfByte(tvb, offsetp, t, hf_x11_glx_render_CompressedTexImage3D_data, imageSize, byte_order);
2262}
2263
2264static void mesa_CompressedTexImage2D(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
2265{
2266 int imageSize;
2267 proto_tree_add_item(t, hf_x11_glx_render_CompressedTexImage2D_target, tvb, *offsetp, 4, byte_order);
2268 *offsetp += 4;
2269 proto_tree_add_item(t, hf_x11_glx_render_CompressedTexImage2D_level, tvb, *offsetp, 4, byte_order);
2270 *offsetp += 4;
2271 proto_tree_add_item(t, hf_x11_glx_render_CompressedTexImage2D_internalformat, tvb, *offsetp, 4, byte_order);
2272 *offsetp += 4;
2273 proto_tree_add_item(t, hf_x11_glx_render_CompressedTexImage2D_width, tvb, *offsetp, 4, byte_order);
2274 *offsetp += 4;
2275 proto_tree_add_item(t, hf_x11_glx_render_CompressedTexImage2D_height, tvb, *offsetp, 4, byte_order);
2276 *offsetp += 4;
2277 proto_tree_add_item(t, hf_x11_glx_render_CompressedTexImage2D_border, tvb, *offsetp, 4, byte_order);
2278 *offsetp += 4;
2279 imageSize = tvb_get_uint32(tvb, *offsetp, byte_order);
2280 proto_tree_add_item(t, hf_x11_glx_render_CompressedTexImage2D_imageSize, tvb, *offsetp, 4, byte_order);
2281 *offsetp += 4;
2282 listOfByte(tvb, offsetp, t, hf_x11_glx_render_CompressedTexImage2D_data, imageSize, byte_order);
2283}
2284
2285static void mesa_CompressedTexImage1D(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
2286{
2287 int imageSize;
2288 proto_tree_add_item(t, hf_x11_glx_render_CompressedTexImage1D_target, tvb, *offsetp, 4, byte_order);
2289 *offsetp += 4;
2290 proto_tree_add_item(t, hf_x11_glx_render_CompressedTexImage1D_level, tvb, *offsetp, 4, byte_order);
2291 *offsetp += 4;
2292 proto_tree_add_item(t, hf_x11_glx_render_CompressedTexImage1D_internalformat, tvb, *offsetp, 4, byte_order);
2293 *offsetp += 4;
2294 proto_tree_add_item(t, hf_x11_glx_render_CompressedTexImage1D_width, tvb, *offsetp, 4, byte_order);
2295 *offsetp += 4;
2296 proto_tree_add_item(t, hf_x11_glx_render_CompressedTexImage1D_border, tvb, *offsetp, 4, byte_order);
2297 *offsetp += 4;
2298 imageSize = tvb_get_uint32(tvb, *offsetp, byte_order);
2299 proto_tree_add_item(t, hf_x11_glx_render_CompressedTexImage1D_imageSize, tvb, *offsetp, 4, byte_order);
2300 *offsetp += 4;
2301 listOfByte(tvb, offsetp, t, hf_x11_glx_render_CompressedTexImage1D_data, imageSize, byte_order);
2302}
2303
2304static void mesa_CompressedTexSubImage3D(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
2305{
2306 int imageSize;
2307 proto_tree_add_item(t, hf_x11_glx_render_CompressedTexSubImage3D_target, tvb, *offsetp, 4, byte_order);
2308 *offsetp += 4;
2309 proto_tree_add_item(t, hf_x11_glx_render_CompressedTexSubImage3D_level, tvb, *offsetp, 4, byte_order);
2310 *offsetp += 4;
2311 proto_tree_add_item(t, hf_x11_glx_render_CompressedTexSubImage3D_xoffset, tvb, *offsetp, 4, byte_order);
2312 *offsetp += 4;
2313 proto_tree_add_item(t, hf_x11_glx_render_CompressedTexSubImage3D_yoffset, tvb, *offsetp, 4, byte_order);
2314 *offsetp += 4;
2315 proto_tree_add_item(t, hf_x11_glx_render_CompressedTexSubImage3D_zoffset, tvb, *offsetp, 4, byte_order);
2316 *offsetp += 4;
2317 proto_tree_add_item(t, hf_x11_glx_render_CompressedTexSubImage3D_width, tvb, *offsetp, 4, byte_order);
2318 *offsetp += 4;
2319 proto_tree_add_item(t, hf_x11_glx_render_CompressedTexSubImage3D_height, tvb, *offsetp, 4, byte_order);
2320 *offsetp += 4;
2321 proto_tree_add_item(t, hf_x11_glx_render_CompressedTexSubImage3D_depth, tvb, *offsetp, 4, byte_order);
2322 *offsetp += 4;
2323 proto_tree_add_item(t, hf_x11_glx_render_CompressedTexSubImage3D_format, tvb, *offsetp, 4, byte_order);
2324 *offsetp += 4;
2325 imageSize = tvb_get_uint32(tvb, *offsetp, byte_order);
2326 proto_tree_add_item(t, hf_x11_glx_render_CompressedTexSubImage3D_imageSize, tvb, *offsetp, 4, byte_order);
2327 *offsetp += 4;
2328 listOfByte(tvb, offsetp, t, hf_x11_glx_render_CompressedTexSubImage3D_data, imageSize, byte_order);
2329}
2330
2331static void mesa_CompressedTexSubImage2D(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
2332{
2333 int imageSize;
2334 proto_tree_add_item(t, hf_x11_glx_render_CompressedTexSubImage2D_target, tvb, *offsetp, 4, byte_order);
2335 *offsetp += 4;
2336 proto_tree_add_item(t, hf_x11_glx_render_CompressedTexSubImage2D_level, tvb, *offsetp, 4, byte_order);
2337 *offsetp += 4;
2338 proto_tree_add_item(t, hf_x11_glx_render_CompressedTexSubImage2D_xoffset, tvb, *offsetp, 4, byte_order);
2339 *offsetp += 4;
2340 proto_tree_add_item(t, hf_x11_glx_render_CompressedTexSubImage2D_yoffset, tvb, *offsetp, 4, byte_order);
2341 *offsetp += 4;
2342 proto_tree_add_item(t, hf_x11_glx_render_CompressedTexSubImage2D_width, tvb, *offsetp, 4, byte_order);
2343 *offsetp += 4;
2344 proto_tree_add_item(t, hf_x11_glx_render_CompressedTexSubImage2D_height, tvb, *offsetp, 4, byte_order);
2345 *offsetp += 4;
2346 proto_tree_add_item(t, hf_x11_glx_render_CompressedTexSubImage2D_format, tvb, *offsetp, 4, byte_order);
2347 *offsetp += 4;
2348 imageSize = tvb_get_uint32(tvb, *offsetp, byte_order);
2349 proto_tree_add_item(t, hf_x11_glx_render_CompressedTexSubImage2D_imageSize, tvb, *offsetp, 4, byte_order);
2350 *offsetp += 4;
2351 listOfByte(tvb, offsetp, t, hf_x11_glx_render_CompressedTexSubImage2D_data, imageSize, byte_order);
2352}
2353
2354static void mesa_CompressedTexSubImage1D(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
2355{
2356 int imageSize;
2357 proto_tree_add_item(t, hf_x11_glx_render_CompressedTexSubImage1D_target, tvb, *offsetp, 4, byte_order);
2358 *offsetp += 4;
2359 proto_tree_add_item(t, hf_x11_glx_render_CompressedTexSubImage1D_level, tvb, *offsetp, 4, byte_order);
2360 *offsetp += 4;
2361 proto_tree_add_item(t, hf_x11_glx_render_CompressedTexSubImage1D_xoffset, tvb, *offsetp, 4, byte_order);
2362 *offsetp += 4;
2363 proto_tree_add_item(t, hf_x11_glx_render_CompressedTexSubImage1D_width, tvb, *offsetp, 4, byte_order);
2364 *offsetp += 4;
2365 proto_tree_add_item(t, hf_x11_glx_render_CompressedTexSubImage1D_format, tvb, *offsetp, 4, byte_order);
2366 *offsetp += 4;
2367 imageSize = tvb_get_uint32(tvb, *offsetp, byte_order);
2368 proto_tree_add_item(t, hf_x11_glx_render_CompressedTexSubImage1D_imageSize, tvb, *offsetp, 4, byte_order);
2369 *offsetp += 4;
2370 listOfByte(tvb, offsetp, t, hf_x11_glx_render_CompressedTexSubImage1D_data, imageSize, byte_order);
2371}
2372
2373static void mesa_BlendFuncSeparate(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
2374{
2375 proto_tree_add_item(t, hf_x11_glx_render_BlendFuncSeparate_sfactorRGB, tvb, *offsetp, 4, byte_order);
2376 *offsetp += 4;
2377 proto_tree_add_item(t, hf_x11_glx_render_BlendFuncSeparate_dfactorRGB, tvb, *offsetp, 4, byte_order);
2378 *offsetp += 4;
2379 proto_tree_add_item(t, hf_x11_glx_render_BlendFuncSeparate_sfactorAlpha, tvb, *offsetp, 4, byte_order);
2380 *offsetp += 4;
2381 proto_tree_add_item(t, hf_x11_glx_render_BlendFuncSeparate_dfactorAlpha, tvb, *offsetp, 4, byte_order);
2382 *offsetp += 4;
2383}
2384
2385static void mesa_FogCoorddv(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
2386{
2387 listOfDouble(tvb, offsetp, t, hf_x11_glx_render_FogCoorddv_coord, hf_x11_glx_render_FogCoorddv_coord_item, 1, byte_order);
2388}
2389
2390static void mesa_PointParameterf(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
2391{
2392 proto_tree_add_item(t, hf_x11_glx_render_PointParameterf_pname, tvb, *offsetp, 4, byte_order);
2393 *offsetp += 4;
2394 proto_tree_add_item(t, hf_x11_glx_render_PointParameterf_param, tvb, *offsetp, 4, byte_order);
2395 *offsetp += 4;
2396}
2397
2398static void mesa_PointParameterfv(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
2399{
2400 proto_tree_add_item(t, hf_x11_glx_render_PointParameterfv_pname, tvb, *offsetp, 4, byte_order);
2401 *offsetp += 4;
2402 listOfFloat(tvb, offsetp, t, hf_x11_glx_render_PointParameterfv_params, hf_x11_glx_render_PointParameterfv_params_item, (length - 4) / 4, byte_order);
2403}
2404
2405static void mesa_PointParameteri(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
2406{
2407 proto_tree_add_item(t, hf_x11_glx_render_PointParameteri_pname, tvb, *offsetp, 4, byte_order);
2408 *offsetp += 4;
2409 proto_tree_add_item(t, hf_x11_glx_render_PointParameteri_param, tvb, *offsetp, 4, byte_order);
2410 *offsetp += 4;
2411}
2412
2413static void mesa_PointParameteriv(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
2414{
2415 proto_tree_add_item(t, hf_x11_glx_render_PointParameteriv_pname, tvb, *offsetp, 4, byte_order);
2416 *offsetp += 4;
2417 listOfInt32(tvb, offsetp, t, hf_x11_glx_render_PointParameteriv_params, hf_x11_glx_render_PointParameteriv_params_item, (length - 4) / 4, byte_order);
2418}
2419
2420static void mesa_SecondaryColor3bv(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
2421{
2422 listOfByte(tvb, offsetp, t, hf_x11_glx_render_SecondaryColor3bv_v, 3, byte_order);
2423}
2424
2425static void mesa_SecondaryColor3dv(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
2426{
2427 listOfDouble(tvb, offsetp, t, hf_x11_glx_render_SecondaryColor3dv_v, hf_x11_glx_render_SecondaryColor3dv_v_item, 3, byte_order);
2428}
2429
2430static void mesa_SecondaryColor3iv(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
2431{
2432 listOfInt32(tvb, offsetp, t, hf_x11_glx_render_SecondaryColor3iv_v, hf_x11_glx_render_SecondaryColor3iv_v_item, 3, byte_order);
2433}
2434
2435static void mesa_SecondaryColor3sv(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
2436{
2437 listOfInt16(tvb, offsetp, t, hf_x11_glx_render_SecondaryColor3sv_v, hf_x11_glx_render_SecondaryColor3sv_v_item, 3, byte_order);
2438}
2439
2440static void mesa_SecondaryColor3ubv(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
2441{
2442 listOfByte(tvb, offsetp, t, hf_x11_glx_render_SecondaryColor3ubv_v, 3, byte_order);
2443}
2444
2445static void mesa_SecondaryColor3uiv(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
2446{
2447 listOfCard32(tvb, offsetp, t, hf_x11_glx_render_SecondaryColor3uiv_v, hf_x11_glx_render_SecondaryColor3uiv_v_item, 3, byte_order);
2448}
2449
2450static void mesa_SecondaryColor3usv(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
2451{
2452 listOfCard16(tvb, offsetp, t, hf_x11_glx_render_SecondaryColor3usv_v, hf_x11_glx_render_SecondaryColor3usv_v_item, 3, byte_order);
2453}
2454
2455static void mesa_WindowPos3fv(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
2456{
2457 listOfFloat(tvb, offsetp, t, hf_x11_glx_render_WindowPos3fv_v, hf_x11_glx_render_WindowPos3fv_v_item, 3, byte_order);
2458}
2459
2460static void mesa_BeginQuery(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
2461{
2462 proto_tree_add_item(t, hf_x11_glx_render_BeginQuery_target, tvb, *offsetp, 4, byte_order);
2463 *offsetp += 4;
2464 proto_tree_add_item(t, hf_x11_glx_render_BeginQuery_id, tvb, *offsetp, 4, byte_order);
2465 *offsetp += 4;
2466}
2467
2468static void mesa_EndQuery(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
2469{
2470 proto_tree_add_item(t, hf_x11_glx_render_EndQuery_target, tvb, *offsetp, 4, byte_order);
2471 *offsetp += 4;
2472}
2473
2474static void mesa_BlendEquationSeparate(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
2475{
2476 proto_tree_add_item(t, hf_x11_glx_render_BlendEquationSeparate_modeRGB, tvb, *offsetp, 4, byte_order);
2477 *offsetp += 4;
2478 proto_tree_add_item(t, hf_x11_glx_render_BlendEquationSeparate_modeA, tvb, *offsetp, 4, byte_order);
2479 *offsetp += 4;
2480}
2481
2482static void mesa_DrawBuffers(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
2483{
2484 int n;
2485 n = tvb_get_uint32(tvb, *offsetp, byte_order);
2486 proto_tree_add_item(t, hf_x11_glx_render_DrawBuffers_n, tvb, *offsetp, 4, byte_order);
2487 *offsetp += 4;
2488 listOfCard32(tvb, offsetp, t, hf_x11_glx_render_DrawBuffers_bufs, hf_x11_glx_render_DrawBuffers_bufs_item, n, byte_order);
2489}
2490
2491static void mesa_VertexAttrib1dv(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
2492{
2493 proto_tree_add_item(t, hf_x11_glx_render_VertexAttrib1dv_index, tvb, *offsetp, 4, byte_order);
2494 *offsetp += 4;
2495 listOfDouble(tvb, offsetp, t, hf_x11_glx_render_VertexAttrib1dv_v, hf_x11_glx_render_VertexAttrib1dv_v_item, 1, byte_order);
2496}
2497
2498static void mesa_VertexAttrib1sv(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
2499{
2500 proto_tree_add_item(t, hf_x11_glx_render_VertexAttrib1sv_index, tvb, *offsetp, 4, byte_order);
2501 *offsetp += 4;
2502 listOfInt16(tvb, offsetp, t, hf_x11_glx_render_VertexAttrib1sv_v, hf_x11_glx_render_VertexAttrib1sv_v_item, 1, byte_order);
2503}
2504
2505static void mesa_VertexAttrib2dv(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
2506{
2507 proto_tree_add_item(t, hf_x11_glx_render_VertexAttrib2dv_index, tvb, *offsetp, 4, byte_order);
2508 *offsetp += 4;
2509 listOfDouble(tvb, offsetp, t, hf_x11_glx_render_VertexAttrib2dv_v, hf_x11_glx_render_VertexAttrib2dv_v_item, 2, byte_order);
2510}
2511
2512static void mesa_VertexAttrib2sv(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
2513{
2514 proto_tree_add_item(t, hf_x11_glx_render_VertexAttrib2sv_index, tvb, *offsetp, 4, byte_order);
2515 *offsetp += 4;
2516 listOfInt16(tvb, offsetp, t, hf_x11_glx_render_VertexAttrib2sv_v, hf_x11_glx_render_VertexAttrib2sv_v_item, 2, byte_order);
2517}
2518
2519static void mesa_VertexAttrib3dv(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
2520{
2521 proto_tree_add_item(t, hf_x11_glx_render_VertexAttrib3dv_index, tvb, *offsetp, 4, byte_order);
2522 *offsetp += 4;
2523 listOfDouble(tvb, offsetp, t, hf_x11_glx_render_VertexAttrib3dv_v, hf_x11_glx_render_VertexAttrib3dv_v_item, 3, byte_order);
2524}
2525
2526static void mesa_VertexAttrib3sv(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
2527{
2528 proto_tree_add_item(t, hf_x11_glx_render_VertexAttrib3sv_index, tvb, *offsetp, 4, byte_order);
2529 *offsetp += 4;
2530 listOfInt16(tvb, offsetp, t, hf_x11_glx_render_VertexAttrib3sv_v, hf_x11_glx_render_VertexAttrib3sv_v_item, 3, byte_order);
2531}
2532
2533static void mesa_VertexAttrib4Nbv(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
2534{
2535 proto_tree_add_item(t, hf_x11_glx_render_VertexAttrib4Nbv_index, tvb, *offsetp, 4, byte_order);
2536 *offsetp += 4;
2537 listOfByte(tvb, offsetp, t, hf_x11_glx_render_VertexAttrib4Nbv_v, 4, byte_order);
2538}
2539
2540static void mesa_VertexAttrib4Niv(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
2541{
2542 proto_tree_add_item(t, hf_x11_glx_render_VertexAttrib4Niv_index, tvb, *offsetp, 4, byte_order);
2543 *offsetp += 4;
2544 listOfInt32(tvb, offsetp, t, hf_x11_glx_render_VertexAttrib4Niv_v, hf_x11_glx_render_VertexAttrib4Niv_v_item, 4, byte_order);
2545}
2546
2547static void mesa_VertexAttrib4Nsv(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
2548{
2549 proto_tree_add_item(t, hf_x11_glx_render_VertexAttrib4Nsv_index, tvb, *offsetp, 4, byte_order);
2550 *offsetp += 4;
2551 listOfInt16(tvb, offsetp, t, hf_x11_glx_render_VertexAttrib4Nsv_v, hf_x11_glx_render_VertexAttrib4Nsv_v_item, 4, byte_order);
2552}
2553
2554static void mesa_VertexAttrib4Nubv(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
2555{
2556 proto_tree_add_item(t, hf_x11_glx_render_VertexAttrib4Nubv_index, tvb, *offsetp, 4, byte_order);
2557 *offsetp += 4;
2558 listOfByte(tvb, offsetp, t, hf_x11_glx_render_VertexAttrib4Nubv_v, 4, byte_order);
2559}
2560
2561static void mesa_VertexAttrib4Nuiv(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
2562{
2563 proto_tree_add_item(t, hf_x11_glx_render_VertexAttrib4Nuiv_index, tvb, *offsetp, 4, byte_order);
2564 *offsetp += 4;
2565 listOfCard32(tvb, offsetp, t, hf_x11_glx_render_VertexAttrib4Nuiv_v, hf_x11_glx_render_VertexAttrib4Nuiv_v_item, 4, byte_order);
2566}
2567
2568static void mesa_VertexAttrib4Nusv(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
2569{
2570 proto_tree_add_item(t, hf_x11_glx_render_VertexAttrib4Nusv_index, tvb, *offsetp, 4, byte_order);
2571 *offsetp += 4;
2572 listOfCard16(tvb, offsetp, t, hf_x11_glx_render_VertexAttrib4Nusv_v, hf_x11_glx_render_VertexAttrib4Nusv_v_item, 4, byte_order);
2573}
2574
2575static void mesa_VertexAttrib4bv(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
2576{
2577 proto_tree_add_item(t, hf_x11_glx_render_VertexAttrib4bv_index, tvb, *offsetp, 4, byte_order);
2578 *offsetp += 4;
2579 listOfByte(tvb, offsetp, t, hf_x11_glx_render_VertexAttrib4bv_v, 4, byte_order);
2580}
2581
2582static void mesa_VertexAttrib4dv(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
2583{
2584 proto_tree_add_item(t, hf_x11_glx_render_VertexAttrib4dv_index, tvb, *offsetp, 4, byte_order);
2585 *offsetp += 4;
2586 listOfDouble(tvb, offsetp, t, hf_x11_glx_render_VertexAttrib4dv_v, hf_x11_glx_render_VertexAttrib4dv_v_item, 4, byte_order);
2587}
2588
2589static void mesa_VertexAttrib4iv(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
2590{
2591 proto_tree_add_item(t, hf_x11_glx_render_VertexAttrib4iv_index, tvb, *offsetp, 4, byte_order);
2592 *offsetp += 4;
2593 listOfInt32(tvb, offsetp, t, hf_x11_glx_render_VertexAttrib4iv_v, hf_x11_glx_render_VertexAttrib4iv_v_item, 4, byte_order);
2594}
2595
2596static void mesa_VertexAttrib4sv(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
2597{
2598 proto_tree_add_item(t, hf_x11_glx_render_VertexAttrib4sv_index, tvb, *offsetp, 4, byte_order);
2599 *offsetp += 4;
2600 listOfInt16(tvb, offsetp, t, hf_x11_glx_render_VertexAttrib4sv_v, hf_x11_glx_render_VertexAttrib4sv_v_item, 4, byte_order);
2601}
2602
2603static void mesa_VertexAttrib4ubv(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
2604{
2605 proto_tree_add_item(t, hf_x11_glx_render_VertexAttrib4ubv_index, tvb, *offsetp, 4, byte_order);
2606 *offsetp += 4;
2607 listOfByte(tvb, offsetp, t, hf_x11_glx_render_VertexAttrib4ubv_v, 4, byte_order);
2608}
2609
2610static void mesa_VertexAttrib4uiv(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
2611{
2612 proto_tree_add_item(t, hf_x11_glx_render_VertexAttrib4uiv_index, tvb, *offsetp, 4, byte_order);
2613 *offsetp += 4;
2614 listOfCard32(tvb, offsetp, t, hf_x11_glx_render_VertexAttrib4uiv_v, hf_x11_glx_render_VertexAttrib4uiv_v_item, 4, byte_order);
2615}
2616
2617static void mesa_VertexAttrib4usv(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
2618{
2619 proto_tree_add_item(t, hf_x11_glx_render_VertexAttrib4usv_index, tvb, *offsetp, 4, byte_order);
2620 *offsetp += 4;
2621 listOfCard16(tvb, offsetp, t, hf_x11_glx_render_VertexAttrib4usv_v, hf_x11_glx_render_VertexAttrib4usv_v_item, 4, byte_order);
2622}
2623
2624static void mesa_MultiTexCoord1fvARB(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
2625{
2626 proto_tree_add_item(t, hf_x11_glx_render_MultiTexCoord1fvARB_target, tvb, *offsetp, 4, byte_order);
2627 *offsetp += 4;
2628 listOfFloat(tvb, offsetp, t, hf_x11_glx_render_MultiTexCoord1fvARB_v, hf_x11_glx_render_MultiTexCoord1fvARB_v_item, 1, byte_order);
2629}
2630
2631static void mesa_MultiTexCoord2fvARB(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
2632{
2633 proto_tree_add_item(t, hf_x11_glx_render_MultiTexCoord2fvARB_target, tvb, *offsetp, 4, byte_order);
2634 *offsetp += 4;
2635 listOfFloat(tvb, offsetp, t, hf_x11_glx_render_MultiTexCoord2fvARB_v, hf_x11_glx_render_MultiTexCoord2fvARB_v_item, 2, byte_order);
2636}
2637
2638static void mesa_MultiTexCoord3fvARB(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
2639{
2640 proto_tree_add_item(t, hf_x11_glx_render_MultiTexCoord3fvARB_target, tvb, *offsetp, 4, byte_order);
2641 *offsetp += 4;
2642 listOfFloat(tvb, offsetp, t, hf_x11_glx_render_MultiTexCoord3fvARB_v, hf_x11_glx_render_MultiTexCoord3fvARB_v_item, 3, byte_order);
2643}
2644
2645static void mesa_MultiTexCoord4fvARB(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
2646{
2647 proto_tree_add_item(t, hf_x11_glx_render_MultiTexCoord4fvARB_target, tvb, *offsetp, 4, byte_order);
2648 *offsetp += 4;
2649 listOfFloat(tvb, offsetp, t, hf_x11_glx_render_MultiTexCoord4fvARB_v, hf_x11_glx_render_MultiTexCoord4fvARB_v_item, 4, byte_order);
2650}
2651
2652static void mesa_CurrentPaletteMatrixARB(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
2653{
2654 proto_tree_add_item(t, hf_x11_glx_render_CurrentPaletteMatrixARB_index, tvb, *offsetp, 4, byte_order);
2655 *offsetp += 4;
2656}
2657
2658static void mesa_MatrixIndexubvARB(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
2659{
2660 int size;
2661 size = tvb_get_uint32(tvb, *offsetp, byte_order);
2662 proto_tree_add_item(t, hf_x11_glx_render_MatrixIndexubvARB_size, tvb, *offsetp, 4, byte_order);
2663 *offsetp += 4;
2664 listOfByte(tvb, offsetp, t, hf_x11_glx_render_MatrixIndexubvARB_indices, size, byte_order);
2665}
2666
2667static void mesa_MatrixIndexusvARB(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
2668{
2669 int size;
2670 size = tvb_get_uint32(tvb, *offsetp, byte_order);
2671 proto_tree_add_item(t, hf_x11_glx_render_MatrixIndexusvARB_size, tvb, *offsetp, 4, byte_order);
2672 *offsetp += 4;
2673 listOfCard16(tvb, offsetp, t, hf_x11_glx_render_MatrixIndexusvARB_indices, hf_x11_glx_render_MatrixIndexusvARB_indices_item, size, byte_order);
2674}
2675
2676static void mesa_MatrixIndexuivARB(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
2677{
2678 int size;
2679 size = tvb_get_uint32(tvb, *offsetp, byte_order);
2680 proto_tree_add_item(t, hf_x11_glx_render_MatrixIndexuivARB_size, tvb, *offsetp, 4, byte_order);
2681 *offsetp += 4;
2682 listOfCard32(tvb, offsetp, t, hf_x11_glx_render_MatrixIndexuivARB_indices, hf_x11_glx_render_MatrixIndexuivARB_indices_item, size, byte_order);
2683}
2684
2685static void mesa_VertexAttrib1fvARB(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
2686{
2687 proto_tree_add_item(t, hf_x11_glx_render_VertexAttrib1fvARB_index, tvb, *offsetp, 4, byte_order);
2688 *offsetp += 4;
2689 listOfFloat(tvb, offsetp, t, hf_x11_glx_render_VertexAttrib1fvARB_v, hf_x11_glx_render_VertexAttrib1fvARB_v_item, 1, byte_order);
2690}
2691
2692static void mesa_VertexAttrib2fvARB(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
2693{
2694 proto_tree_add_item(t, hf_x11_glx_render_VertexAttrib2fvARB_index, tvb, *offsetp, 4, byte_order);
2695 *offsetp += 4;
2696 listOfFloat(tvb, offsetp, t, hf_x11_glx_render_VertexAttrib2fvARB_v, hf_x11_glx_render_VertexAttrib2fvARB_v_item, 2, byte_order);
2697}
2698
2699static void mesa_VertexAttrib3fvARB(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
2700{
2701 proto_tree_add_item(t, hf_x11_glx_render_VertexAttrib3fvARB_index, tvb, *offsetp, 4, byte_order);
2702 *offsetp += 4;
2703 listOfFloat(tvb, offsetp, t, hf_x11_glx_render_VertexAttrib3fvARB_v, hf_x11_glx_render_VertexAttrib3fvARB_v_item, 3, byte_order);
2704}
2705
2706static void mesa_VertexAttrib4fvARB(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
2707{
2708 proto_tree_add_item(t, hf_x11_glx_render_VertexAttrib4fvARB_index, tvb, *offsetp, 4, byte_order);
2709 *offsetp += 4;
2710 listOfFloat(tvb, offsetp, t, hf_x11_glx_render_VertexAttrib4fvARB_v, hf_x11_glx_render_VertexAttrib4fvARB_v_item, 4, byte_order);
2711}
2712
2713static void mesa_ProgramStringARB(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
2714{
2715 int len;
2716 proto_tree_add_item(t, hf_x11_glx_render_ProgramStringARB_target, tvb, *offsetp, 4, byte_order);
2717 *offsetp += 4;
2718 proto_tree_add_item(t, hf_x11_glx_render_ProgramStringARB_format, tvb, *offsetp, 4, byte_order);
2719 *offsetp += 4;
2720 len = tvb_get_uint32(tvb, *offsetp, byte_order);
2721 proto_tree_add_item(t, hf_x11_glx_render_ProgramStringARB_len, tvb, *offsetp, 4, byte_order);
2722 *offsetp += 4;
2723 listOfByte(tvb, offsetp, t, hf_x11_glx_render_ProgramStringARB_string, len, byte_order);
2724}
2725
2726static void mesa_BindProgramARB(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
2727{
2728 proto_tree_add_item(t, hf_x11_glx_render_BindProgramARB_target, tvb, *offsetp, 4, byte_order);
2729 *offsetp += 4;
2730 proto_tree_add_item(t, hf_x11_glx_render_BindProgramARB_program, tvb, *offsetp, 4, byte_order);
2731 *offsetp += 4;
2732}
2733
2734static void mesa_ProgramEnvParameter4dvARB(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
2735{
2736 proto_tree_add_item(t, hf_x11_glx_render_ProgramEnvParameter4dvARB_target, tvb, *offsetp, 4, byte_order);
2737 *offsetp += 4;
2738 proto_tree_add_item(t, hf_x11_glx_render_ProgramEnvParameter4dvARB_index, tvb, *offsetp, 4, byte_order);
2739 *offsetp += 4;
2740 listOfDouble(tvb, offsetp, t, hf_x11_glx_render_ProgramEnvParameter4dvARB_params, hf_x11_glx_render_ProgramEnvParameter4dvARB_params_item, 4, byte_order);
2741}
2742
2743static void mesa_ProgramEnvParameter4fvARB(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
2744{
2745 proto_tree_add_item(t, hf_x11_glx_render_ProgramEnvParameter4fvARB_target, tvb, *offsetp, 4, byte_order);
2746 *offsetp += 4;
2747 proto_tree_add_item(t, hf_x11_glx_render_ProgramEnvParameter4fvARB_index, tvb, *offsetp, 4, byte_order);
2748 *offsetp += 4;
2749 listOfFloat(tvb, offsetp, t, hf_x11_glx_render_ProgramEnvParameter4fvARB_params, hf_x11_glx_render_ProgramEnvParameter4fvARB_params_item, 4, byte_order);
2750}
2751
2752static void mesa_ProgramLocalParameter4dvARB(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
2753{
2754 proto_tree_add_item(t, hf_x11_glx_render_ProgramLocalParameter4dvARB_target, tvb, *offsetp, 4, byte_order);
2755 *offsetp += 4;
2756 proto_tree_add_item(t, hf_x11_glx_render_ProgramLocalParameter4dvARB_index, tvb, *offsetp, 4, byte_order);
2757 *offsetp += 4;
2758 listOfDouble(tvb, offsetp, t, hf_x11_glx_render_ProgramLocalParameter4dvARB_params, hf_x11_glx_render_ProgramLocalParameter4dvARB_params_item, 4, byte_order);
2759}
2760
2761static void mesa_ProgramLocalParameter4fvARB(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
2762{
2763 proto_tree_add_item(t, hf_x11_glx_render_ProgramLocalParameter4fvARB_target, tvb, *offsetp, 4, byte_order);
2764 *offsetp += 4;
2765 proto_tree_add_item(t, hf_x11_glx_render_ProgramLocalParameter4fvARB_index, tvb, *offsetp, 4, byte_order);
2766 *offsetp += 4;
2767 listOfFloat(tvb, offsetp, t, hf_x11_glx_render_ProgramLocalParameter4fvARB_params, hf_x11_glx_render_ProgramLocalParameter4fvARB_params_item, 4, byte_order);
2768}
2769
2770static void mesa_TexFilterFuncSGIS(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
2771{
2772 int n;
2773 proto_tree_add_item(t, hf_x11_glx_render_TexFilterFuncSGIS_target, tvb, *offsetp, 4, byte_order);
2774 *offsetp += 4;
2775 proto_tree_add_item(t, hf_x11_glx_render_TexFilterFuncSGIS_filter, tvb, *offsetp, 4, byte_order);
2776 *offsetp += 4;
2777 n = tvb_get_uint32(tvb, *offsetp, byte_order);
2778 proto_tree_add_item(t, hf_x11_glx_render_TexFilterFuncSGIS_n, tvb, *offsetp, 4, byte_order);
2779 *offsetp += 4;
2780 listOfFloat(tvb, offsetp, t, hf_x11_glx_render_TexFilterFuncSGIS_weights, hf_x11_glx_render_TexFilterFuncSGIS_weights_item, n, byte_order);
2781}
2782
2783static void mesa_TexImage4DSGIS(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
2784{
2785 proto_tree_add_item(t, hf_x11_glx_render_TexImage4DSGIS_swapbytes, tvb, *offsetp, 1, byte_order);
2786 *offsetp += 1;
2787 proto_tree_add_item(t, hf_x11_glx_render_TexImage4DSGIS_lsbfirst, tvb, *offsetp, 1, byte_order);
2788 *offsetp += 1;
2789 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 2, ENC_NA);
2790 *offsetp += 2;
2791 proto_tree_add_item(t, hf_x11_glx_render_TexImage4DSGIS_rowlength, tvb, *offsetp, 4, byte_order);
2792 *offsetp += 4;
2793 proto_tree_add_item(t, hf_x11_glx_render_TexImage4DSGIS_skiprows, tvb, *offsetp, 4, byte_order);
2794 *offsetp += 4;
2795 proto_tree_add_item(t, hf_x11_glx_render_TexImage4DSGIS_skippixels, tvb, *offsetp, 4, byte_order);
2796 *offsetp += 4;
2797 proto_tree_add_item(t, hf_x11_glx_render_TexImage4DSGIS_alignment, tvb, *offsetp, 4, byte_order);
2798 *offsetp += 4;
2799 proto_tree_add_item(t, hf_x11_glx_render_TexImage4DSGIS_target, tvb, *offsetp, 4, byte_order);
2800 *offsetp += 4;
2801 proto_tree_add_item(t, hf_x11_glx_render_TexImage4DSGIS_level, tvb, *offsetp, 4, byte_order);
2802 *offsetp += 4;
2803 proto_tree_add_item(t, hf_x11_glx_render_TexImage4DSGIS_internalformat, tvb, *offsetp, 4, byte_order);
2804 *offsetp += 4;
2805 proto_tree_add_item(t, hf_x11_glx_render_TexImage4DSGIS_width, tvb, *offsetp, 4, byte_order);
2806 *offsetp += 4;
2807 proto_tree_add_item(t, hf_x11_glx_render_TexImage4DSGIS_height, tvb, *offsetp, 4, byte_order);
2808 *offsetp += 4;
2809 proto_tree_add_item(t, hf_x11_glx_render_TexImage4DSGIS_depth, tvb, *offsetp, 4, byte_order);
2810 *offsetp += 4;
2811 proto_tree_add_item(t, hf_x11_glx_render_TexImage4DSGIS_size4d, tvb, *offsetp, 4, byte_order);
2812 *offsetp += 4;
2813 proto_tree_add_item(t, hf_x11_glx_render_TexImage4DSGIS_border, tvb, *offsetp, 4, byte_order);
2814 *offsetp += 4;
2815 proto_tree_add_item(t, hf_x11_glx_render_TexImage4DSGIS_format, tvb, *offsetp, 4, byte_order);
2816 *offsetp += 4;
2817 proto_tree_add_item(t, hf_x11_glx_render_TexImage4DSGIS_type, tvb, *offsetp, 4, byte_order);
2818 *offsetp += 4;
2819 listOfByte(tvb, offsetp, t, hf_x11_glx_render_TexImage4DSGIS_pixels, (length - 60) / 1, byte_order);
2820}
2821
2822static void mesa_TexSubImage4DSGIS(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
2823{
2824 proto_tree_add_item(t, hf_x11_glx_render_TexSubImage4DSGIS_swapbytes, tvb, *offsetp, 1, byte_order);
2825 *offsetp += 1;
2826 proto_tree_add_item(t, hf_x11_glx_render_TexSubImage4DSGIS_lsbfirst, tvb, *offsetp, 1, byte_order);
2827 *offsetp += 1;
2828 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 2, ENC_NA);
2829 *offsetp += 2;
2830 proto_tree_add_item(t, hf_x11_glx_render_TexSubImage4DSGIS_rowlength, tvb, *offsetp, 4, byte_order);
2831 *offsetp += 4;
2832 proto_tree_add_item(t, hf_x11_glx_render_TexSubImage4DSGIS_skiprows, tvb, *offsetp, 4, byte_order);
2833 *offsetp += 4;
2834 proto_tree_add_item(t, hf_x11_glx_render_TexSubImage4DSGIS_skippixels, tvb, *offsetp, 4, byte_order);
2835 *offsetp += 4;
2836 proto_tree_add_item(t, hf_x11_glx_render_TexSubImage4DSGIS_alignment, tvb, *offsetp, 4, byte_order);
2837 *offsetp += 4;
2838 proto_tree_add_item(t, hf_x11_glx_render_TexSubImage4DSGIS_target, tvb, *offsetp, 4, byte_order);
2839 *offsetp += 4;
2840 proto_tree_add_item(t, hf_x11_glx_render_TexSubImage4DSGIS_level, tvb, *offsetp, 4, byte_order);
2841 *offsetp += 4;
2842 proto_tree_add_item(t, hf_x11_glx_render_TexSubImage4DSGIS_xoffset, tvb, *offsetp, 4, byte_order);
2843 *offsetp += 4;
2844 proto_tree_add_item(t, hf_x11_glx_render_TexSubImage4DSGIS_yoffset, tvb, *offsetp, 4, byte_order);
2845 *offsetp += 4;
2846 proto_tree_add_item(t, hf_x11_glx_render_TexSubImage4DSGIS_zoffset, tvb, *offsetp, 4, byte_order);
2847 *offsetp += 4;
2848 proto_tree_add_item(t, hf_x11_glx_render_TexSubImage4DSGIS_woffset, tvb, *offsetp, 4, byte_order);
2849 *offsetp += 4;
2850 proto_tree_add_item(t, hf_x11_glx_render_TexSubImage4DSGIS_width, tvb, *offsetp, 4, byte_order);
2851 *offsetp += 4;
2852 proto_tree_add_item(t, hf_x11_glx_render_TexSubImage4DSGIS_height, tvb, *offsetp, 4, byte_order);
2853 *offsetp += 4;
2854 proto_tree_add_item(t, hf_x11_glx_render_TexSubImage4DSGIS_depth, tvb, *offsetp, 4, byte_order);
2855 *offsetp += 4;
2856 proto_tree_add_item(t, hf_x11_glx_render_TexSubImage4DSGIS_size4d, tvb, *offsetp, 4, byte_order);
2857 *offsetp += 4;
2858 proto_tree_add_item(t, hf_x11_glx_render_TexSubImage4DSGIS_format, tvb, *offsetp, 4, byte_order);
2859 *offsetp += 4;
2860 proto_tree_add_item(t, hf_x11_glx_render_TexSubImage4DSGIS_type, tvb, *offsetp, 4, byte_order);
2861 *offsetp += 4;
2862 proto_tree_add_item(t, hf_x11_glx_render_TexSubImage4DSGIS_UNUSED, tvb, *offsetp, 4, byte_order);
2863 *offsetp += 4;
2864 listOfByte(tvb, offsetp, t, hf_x11_glx_render_TexSubImage4DSGIS_pixels, (length - 72) / 1, byte_order);
2865}
2866
2867static void mesa_DetailTexFuncSGIS(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
2868{
2869 int n;
2870 proto_tree_add_item(t, hf_x11_glx_render_DetailTexFuncSGIS_target, tvb, *offsetp, 4, byte_order);
2871 *offsetp += 4;
2872 n = tvb_get_uint32(tvb, *offsetp, byte_order);
2873 proto_tree_add_item(t, hf_x11_glx_render_DetailTexFuncSGIS_n, tvb, *offsetp, 4, byte_order);
2874 *offsetp += 4;
2875 listOfFloat(tvb, offsetp, t, hf_x11_glx_render_DetailTexFuncSGIS_points, hf_x11_glx_render_DetailTexFuncSGIS_points_item, n, byte_order);
2876}
2877
2878static void mesa_SharpenTexFuncSGIS(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
2879{
2880 int n;
2881 proto_tree_add_item(t, hf_x11_glx_render_SharpenTexFuncSGIS_target, tvb, *offsetp, 4, byte_order);
2882 *offsetp += 4;
2883 n = tvb_get_uint32(tvb, *offsetp, byte_order);
2884 proto_tree_add_item(t, hf_x11_glx_render_SharpenTexFuncSGIS_n, tvb, *offsetp, 4, byte_order);
2885 *offsetp += 4;
2886 listOfFloat(tvb, offsetp, t, hf_x11_glx_render_SharpenTexFuncSGIS_points, hf_x11_glx_render_SharpenTexFuncSGIS_points_item, n, byte_order);
2887}
2888
2889static void mesa_SampleMaskSGIS(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
2890{
2891 proto_tree_add_item(t, hf_x11_glx_render_SampleMaskSGIS_value, tvb, *offsetp, 4, byte_order);
2892 *offsetp += 4;
2893 proto_tree_add_item(t, hf_x11_glx_render_SampleMaskSGIS_invert, tvb, *offsetp, 1, byte_order);
2894 *offsetp += 1;
2895}
2896
2897static void mesa_SamplePatternSGIS(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
2898{
2899 proto_tree_add_item(t, hf_x11_glx_render_SamplePatternSGIS_pattern, tvb, *offsetp, 4, byte_order);
2900 *offsetp += 4;
2901}
2902
2903static void mesa_FrameZoomSGIX(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
2904{
2905 proto_tree_add_item(t, hf_x11_glx_render_FrameZoomSGIX_factor, tvb, *offsetp, 4, byte_order);
2906 *offsetp += 4;
2907}
2908
2909static void mesa_TagSampleBufferSGIX(tvbuff_t *tvb _U_, int *offsetp _U_, proto_tree *t _U_, unsigned byte_order _U_, int length _U_)
2910{
2911}
2912
2913static void mesa_ReferencePlaneSGIX(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
2914{
2915 listOfDouble(tvb, offsetp, t, hf_x11_glx_render_ReferencePlaneSGIX_equation, hf_x11_glx_render_ReferencePlaneSGIX_equation_item, 4, byte_order);
2916}
2917
2918static void mesa_FogFuncSGIS(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
2919{
2920 int n;
2921 n = tvb_get_uint32(tvb, *offsetp, byte_order);
2922 proto_tree_add_item(t, hf_x11_glx_render_FogFuncSGIS_n, tvb, *offsetp, 4, byte_order);
2923 *offsetp += 4;
2924 listOfFloat(tvb, offsetp, t, hf_x11_glx_render_FogFuncSGIS_points, hf_x11_glx_render_FogFuncSGIS_points_item, n, byte_order);
2925}
2926
2927static void mesa_SecondaryColor3fvEXT(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
2928{
2929 listOfFloat(tvb, offsetp, t, hf_x11_glx_render_SecondaryColor3fvEXT_v, hf_x11_glx_render_SecondaryColor3fvEXT_v_item, 3, byte_order);
2930}
2931
2932static void mesa_FogCoordfvEXT(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
2933{
2934 listOfFloat(tvb, offsetp, t, hf_x11_glx_render_FogCoordfvEXT_coord, hf_x11_glx_render_FogCoordfvEXT_coord_item, 1, byte_order);
2935}
2936
2937static void mesa_PixelTexGenSGIX(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
2938{
2939 proto_tree_add_item(t, hf_x11_glx_render_PixelTexGenSGIX_mode, tvb, *offsetp, 4, byte_order);
2940 *offsetp += 4;
2941}
2942
2943static void mesa_VertexWeightfvEXT(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
2944{
2945 listOfFloat(tvb, offsetp, t, hf_x11_glx_render_VertexWeightfvEXT_weight, hf_x11_glx_render_VertexWeightfvEXT_weight_item, 1, byte_order);
2946}
2947
2948static void mesa_CombinerParameterfvNV(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
2949{
2950 proto_tree_add_item(t, hf_x11_glx_render_CombinerParameterfvNV_pname, tvb, *offsetp, 4, byte_order);
2951 *offsetp += 4;
2952 listOfFloat(tvb, offsetp, t, hf_x11_glx_render_CombinerParameterfvNV_params, hf_x11_glx_render_CombinerParameterfvNV_params_item, (length - 4) / 4, byte_order);
2953}
2954
2955static void mesa_CombinerParameterfNV(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
2956{
2957 proto_tree_add_item(t, hf_x11_glx_render_CombinerParameterfNV_pname, tvb, *offsetp, 4, byte_order);
2958 *offsetp += 4;
2959 proto_tree_add_item(t, hf_x11_glx_render_CombinerParameterfNV_param, tvb, *offsetp, 4, byte_order);
2960 *offsetp += 4;
2961}
2962
2963static void mesa_CombinerParameterivNV(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
2964{
2965 proto_tree_add_item(t, hf_x11_glx_render_CombinerParameterivNV_pname, tvb, *offsetp, 4, byte_order);
2966 *offsetp += 4;
2967 listOfInt32(tvb, offsetp, t, hf_x11_glx_render_CombinerParameterivNV_params, hf_x11_glx_render_CombinerParameterivNV_params_item, (length - 4) / 4, byte_order);
2968}
2969
2970static void mesa_CombinerParameteriNV(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
2971{
2972 proto_tree_add_item(t, hf_x11_glx_render_CombinerParameteriNV_pname, tvb, *offsetp, 4, byte_order);
2973 *offsetp += 4;
2974 proto_tree_add_item(t, hf_x11_glx_render_CombinerParameteriNV_param, tvb, *offsetp, 4, byte_order);
2975 *offsetp += 4;
2976}
2977
2978static void mesa_CombinerInputNV(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
2979{
2980 proto_tree_add_item(t, hf_x11_glx_render_CombinerInputNV_stage, tvb, *offsetp, 4, byte_order);
2981 *offsetp += 4;
2982 proto_tree_add_item(t, hf_x11_glx_render_CombinerInputNV_portion, tvb, *offsetp, 4, byte_order);
2983 *offsetp += 4;
2984 proto_tree_add_item(t, hf_x11_glx_render_CombinerInputNV_variable, tvb, *offsetp, 4, byte_order);
2985 *offsetp += 4;
2986 proto_tree_add_item(t, hf_x11_glx_render_CombinerInputNV_input, tvb, *offsetp, 4, byte_order);
2987 *offsetp += 4;
2988 proto_tree_add_item(t, hf_x11_glx_render_CombinerInputNV_mapping, tvb, *offsetp, 4, byte_order);
2989 *offsetp += 4;
2990 proto_tree_add_item(t, hf_x11_glx_render_CombinerInputNV_componentUsage, tvb, *offsetp, 4, byte_order);
2991 *offsetp += 4;
2992}
2993
2994static void mesa_CombinerOutputNV(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
2995{
2996 proto_tree_add_item(t, hf_x11_glx_render_CombinerOutputNV_stage, tvb, *offsetp, 4, byte_order);
2997 *offsetp += 4;
2998 proto_tree_add_item(t, hf_x11_glx_render_CombinerOutputNV_portion, tvb, *offsetp, 4, byte_order);
2999 *offsetp += 4;
3000 proto_tree_add_item(t, hf_x11_glx_render_CombinerOutputNV_abOutput, tvb, *offsetp, 4, byte_order);
3001 *offsetp += 4;
3002 proto_tree_add_item(t, hf_x11_glx_render_CombinerOutputNV_cdOutput, tvb, *offsetp, 4, byte_order);
3003 *offsetp += 4;
3004 proto_tree_add_item(t, hf_x11_glx_render_CombinerOutputNV_sumOutput, tvb, *offsetp, 4, byte_order);
3005 *offsetp += 4;
3006 proto_tree_add_item(t, hf_x11_glx_render_CombinerOutputNV_scale, tvb, *offsetp, 4, byte_order);
3007 *offsetp += 4;
3008 proto_tree_add_item(t, hf_x11_glx_render_CombinerOutputNV_bias, tvb, *offsetp, 4, byte_order);
3009 *offsetp += 4;
3010 proto_tree_add_item(t, hf_x11_glx_render_CombinerOutputNV_abDotProduct, tvb, *offsetp, 1, byte_order);
3011 *offsetp += 1;
3012 proto_tree_add_item(t, hf_x11_glx_render_CombinerOutputNV_cdDotProduct, tvb, *offsetp, 1, byte_order);
3013 *offsetp += 1;
3014 proto_tree_add_item(t, hf_x11_glx_render_CombinerOutputNV_muxSum, tvb, *offsetp, 1, byte_order);
3015 *offsetp += 1;
3016}
3017
3018static void mesa_FinalCombinerInputNV(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
3019{
3020 proto_tree_add_item(t, hf_x11_glx_render_FinalCombinerInputNV_variable, tvb, *offsetp, 4, byte_order);
3021 *offsetp += 4;
3022 proto_tree_add_item(t, hf_x11_glx_render_FinalCombinerInputNV_input, tvb, *offsetp, 4, byte_order);
3023 *offsetp += 4;
3024 proto_tree_add_item(t, hf_x11_glx_render_FinalCombinerInputNV_mapping, tvb, *offsetp, 4, byte_order);
3025 *offsetp += 4;
3026 proto_tree_add_item(t, hf_x11_glx_render_FinalCombinerInputNV_componentUsage, tvb, *offsetp, 4, byte_order);
3027 *offsetp += 4;
3028}
3029
3030static void mesa_TextureColorMaskSGIS(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
3031{
3032 proto_tree_add_item(t, hf_x11_glx_render_TextureColorMaskSGIS_red, tvb, *offsetp, 1, byte_order);
3033 *offsetp += 1;
3034 proto_tree_add_item(t, hf_x11_glx_render_TextureColorMaskSGIS_green, tvb, *offsetp, 1, byte_order);
3035 *offsetp += 1;
3036 proto_tree_add_item(t, hf_x11_glx_render_TextureColorMaskSGIS_blue, tvb, *offsetp, 1, byte_order);
3037 *offsetp += 1;
3038 proto_tree_add_item(t, hf_x11_glx_render_TextureColorMaskSGIS_alpha, tvb, *offsetp, 1, byte_order);
3039 *offsetp += 1;
3040}
3041
3042static void mesa_ExecuteProgramNV(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
3043{
3044 proto_tree_add_item(t, hf_x11_glx_render_ExecuteProgramNV_target, tvb, *offsetp, 4, byte_order);
3045 *offsetp += 4;
3046 proto_tree_add_item(t, hf_x11_glx_render_ExecuteProgramNV_id, tvb, *offsetp, 4, byte_order);
3047 *offsetp += 4;
3048 listOfFloat(tvb, offsetp, t, hf_x11_glx_render_ExecuteProgramNV_params, hf_x11_glx_render_ExecuteProgramNV_params_item, 4, byte_order);
3049}
3050
3051static void mesa_LoadProgramNV(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
3052{
3053 int len;
3054 proto_tree_add_item(t, hf_x11_glx_render_LoadProgramNV_target, tvb, *offsetp, 4, byte_order);
3055 *offsetp += 4;
3056 proto_tree_add_item(t, hf_x11_glx_render_LoadProgramNV_id, tvb, *offsetp, 4, byte_order);
3057 *offsetp += 4;
3058 len = tvb_get_uint32(tvb, *offsetp, byte_order);
3059 proto_tree_add_item(t, hf_x11_glx_render_LoadProgramNV_len, tvb, *offsetp, 4, byte_order);
3060 *offsetp += 4;
3061 listOfByte(tvb, offsetp, t, hf_x11_glx_render_LoadProgramNV_program, len, byte_order);
3062}
3063
3064static void mesa_ProgramParameters4dvNV(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
3065{
3066 int num;
3067 proto_tree_add_item(t, hf_x11_glx_render_ProgramParameters4dvNV_target, tvb, *offsetp, 4, byte_order);
3068 *offsetp += 4;
3069 proto_tree_add_item(t, hf_x11_glx_render_ProgramParameters4dvNV_index, tvb, *offsetp, 4, byte_order);
3070 *offsetp += 4;
3071 num = tvb_get_uint32(tvb, *offsetp, byte_order);
3072 proto_tree_add_item(t, hf_x11_glx_render_ProgramParameters4dvNV_num, tvb, *offsetp, 4, byte_order);
3073 *offsetp += 4;
3074 listOfDouble(tvb, offsetp, t, hf_x11_glx_render_ProgramParameters4dvNV_params, hf_x11_glx_render_ProgramParameters4dvNV_params_item, num, byte_order);
3075}
3076
3077static void mesa_ProgramParameters4fvNV(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
3078{
3079 int num;
3080 proto_tree_add_item(t, hf_x11_glx_render_ProgramParameters4fvNV_target, tvb, *offsetp, 4, byte_order);
3081 *offsetp += 4;
3082 proto_tree_add_item(t, hf_x11_glx_render_ProgramParameters4fvNV_index, tvb, *offsetp, 4, byte_order);
3083 *offsetp += 4;
3084 num = tvb_get_uint32(tvb, *offsetp, byte_order);
3085 proto_tree_add_item(t, hf_x11_glx_render_ProgramParameters4fvNV_num, tvb, *offsetp, 4, byte_order);
3086 *offsetp += 4;
3087 listOfFloat(tvb, offsetp, t, hf_x11_glx_render_ProgramParameters4fvNV_params, hf_x11_glx_render_ProgramParameters4fvNV_params_item, num, byte_order);
3088}
3089
3090static void mesa_RequestResidentProgramsNV(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
3091{
3092 int n;
3093 n = tvb_get_uint32(tvb, *offsetp, byte_order);
3094 proto_tree_add_item(t, hf_x11_glx_render_RequestResidentProgramsNV_n, tvb, *offsetp, 4, byte_order);
3095 *offsetp += 4;
3096 listOfCard32(tvb, offsetp, t, hf_x11_glx_render_RequestResidentProgramsNV_ids, hf_x11_glx_render_RequestResidentProgramsNV_ids_item, n, byte_order);
3097}
3098
3099static void mesa_TrackMatrixNV(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
3100{
3101 proto_tree_add_item(t, hf_x11_glx_render_TrackMatrixNV_target, tvb, *offsetp, 4, byte_order);
3102 *offsetp += 4;
3103 proto_tree_add_item(t, hf_x11_glx_render_TrackMatrixNV_address, tvb, *offsetp, 4, byte_order);
3104 *offsetp += 4;
3105 proto_tree_add_item(t, hf_x11_glx_render_TrackMatrixNV_matrix, tvb, *offsetp, 4, byte_order);
3106 *offsetp += 4;
3107 proto_tree_add_item(t, hf_x11_glx_render_TrackMatrixNV_transform, tvb, *offsetp, 4, byte_order);
3108 *offsetp += 4;
3109}
3110
3111static void mesa_VertexAttrib1svNV(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
3112{
3113 proto_tree_add_item(t, hf_x11_glx_render_VertexAttrib1svNV_index, tvb, *offsetp, 4, byte_order);
3114 *offsetp += 4;
3115 listOfInt16(tvb, offsetp, t, hf_x11_glx_render_VertexAttrib1svNV_v, hf_x11_glx_render_VertexAttrib1svNV_v_item, 1, byte_order);
3116}
3117
3118static void mesa_VertexAttrib2svNV(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
3119{
3120 proto_tree_add_item(t, hf_x11_glx_render_VertexAttrib2svNV_index, tvb, *offsetp, 4, byte_order);
3121 *offsetp += 4;
3122 listOfInt16(tvb, offsetp, t, hf_x11_glx_render_VertexAttrib2svNV_v, hf_x11_glx_render_VertexAttrib2svNV_v_item, 2, byte_order);
3123}
3124
3125static void mesa_VertexAttrib3svNV(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
3126{
3127 proto_tree_add_item(t, hf_x11_glx_render_VertexAttrib3svNV_index, tvb, *offsetp, 4, byte_order);
3128 *offsetp += 4;
3129 listOfInt16(tvb, offsetp, t, hf_x11_glx_render_VertexAttrib3svNV_v, hf_x11_glx_render_VertexAttrib3svNV_v_item, 3, byte_order);
3130}
3131
3132static void mesa_VertexAttrib4svNV(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
3133{
3134 proto_tree_add_item(t, hf_x11_glx_render_VertexAttrib4svNV_index, tvb, *offsetp, 4, byte_order);
3135 *offsetp += 4;
3136 listOfInt16(tvb, offsetp, t, hf_x11_glx_render_VertexAttrib4svNV_v, hf_x11_glx_render_VertexAttrib4svNV_v_item, 4, byte_order);
3137}
3138
3139static void mesa_VertexAttrib1fvNV(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
3140{
3141 proto_tree_add_item(t, hf_x11_glx_render_VertexAttrib1fvNV_index, tvb, *offsetp, 4, byte_order);
3142 *offsetp += 4;
3143 listOfFloat(tvb, offsetp, t, hf_x11_glx_render_VertexAttrib1fvNV_v, hf_x11_glx_render_VertexAttrib1fvNV_v_item, 1, byte_order);
3144}
3145
3146static void mesa_VertexAttrib2fvNV(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
3147{
3148 proto_tree_add_item(t, hf_x11_glx_render_VertexAttrib2fvNV_index, tvb, *offsetp, 4, byte_order);
3149 *offsetp += 4;
3150 listOfFloat(tvb, offsetp, t, hf_x11_glx_render_VertexAttrib2fvNV_v, hf_x11_glx_render_VertexAttrib2fvNV_v_item, 2, byte_order);
3151}
3152
3153static void mesa_VertexAttrib3fvNV(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
3154{
3155 proto_tree_add_item(t, hf_x11_glx_render_VertexAttrib3fvNV_index, tvb, *offsetp, 4, byte_order);
3156 *offsetp += 4;
3157 listOfFloat(tvb, offsetp, t, hf_x11_glx_render_VertexAttrib3fvNV_v, hf_x11_glx_render_VertexAttrib3fvNV_v_item, 3, byte_order);
3158}
3159
3160static void mesa_VertexAttrib4fvNV(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
3161{
3162 proto_tree_add_item(t, hf_x11_glx_render_VertexAttrib4fvNV_index, tvb, *offsetp, 4, byte_order);
3163 *offsetp += 4;
3164 listOfFloat(tvb, offsetp, t, hf_x11_glx_render_VertexAttrib4fvNV_v, hf_x11_glx_render_VertexAttrib4fvNV_v_item, 4, byte_order);
3165}
3166
3167static void mesa_VertexAttrib1dvNV(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
3168{
3169 proto_tree_add_item(t, hf_x11_glx_render_VertexAttrib1dvNV_index, tvb, *offsetp, 4, byte_order);
3170 *offsetp += 4;
3171 listOfDouble(tvb, offsetp, t, hf_x11_glx_render_VertexAttrib1dvNV_v, hf_x11_glx_render_VertexAttrib1dvNV_v_item, 1, byte_order);
3172}
3173
3174static void mesa_VertexAttrib2dvNV(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
3175{
3176 proto_tree_add_item(t, hf_x11_glx_render_VertexAttrib2dvNV_index, tvb, *offsetp, 4, byte_order);
3177 *offsetp += 4;
3178 listOfDouble(tvb, offsetp, t, hf_x11_glx_render_VertexAttrib2dvNV_v, hf_x11_glx_render_VertexAttrib2dvNV_v_item, 2, byte_order);
3179}
3180
3181static void mesa_VertexAttrib3dvNV(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
3182{
3183 proto_tree_add_item(t, hf_x11_glx_render_VertexAttrib3dvNV_index, tvb, *offsetp, 4, byte_order);
3184 *offsetp += 4;
3185 listOfDouble(tvb, offsetp, t, hf_x11_glx_render_VertexAttrib3dvNV_v, hf_x11_glx_render_VertexAttrib3dvNV_v_item, 3, byte_order);
3186}
3187
3188static void mesa_VertexAttrib4dvNV(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
3189{
3190 proto_tree_add_item(t, hf_x11_glx_render_VertexAttrib4dvNV_index, tvb, *offsetp, 4, byte_order);
3191 *offsetp += 4;
3192 listOfDouble(tvb, offsetp, t, hf_x11_glx_render_VertexAttrib4dvNV_v, hf_x11_glx_render_VertexAttrib4dvNV_v_item, 4, byte_order);
3193}
3194
3195static void mesa_VertexAttrib4ubvNV(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
3196{
3197 proto_tree_add_item(t, hf_x11_glx_render_VertexAttrib4ubvNV_index, tvb, *offsetp, 4, byte_order);
3198 *offsetp += 4;
3199 listOfByte(tvb, offsetp, t, hf_x11_glx_render_VertexAttrib4ubvNV_v, 4, byte_order);
3200}
3201
3202static void mesa_VertexAttribs1svNV(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
3203{
3204 int n;
3205 proto_tree_add_item(t, hf_x11_glx_render_VertexAttribs1svNV_index, tvb, *offsetp, 4, byte_order);
3206 *offsetp += 4;
3207 n = tvb_get_uint32(tvb, *offsetp, byte_order);
3208 proto_tree_add_item(t, hf_x11_glx_render_VertexAttribs1svNV_n, tvb, *offsetp, 4, byte_order);
3209 *offsetp += 4;
3210 listOfInt16(tvb, offsetp, t, hf_x11_glx_render_VertexAttribs1svNV_v, hf_x11_glx_render_VertexAttribs1svNV_v_item, n, byte_order);
3211}
3212
3213static void mesa_VertexAttribs2svNV(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
3214{
3215 int n;
3216 proto_tree_add_item(t, hf_x11_glx_render_VertexAttribs2svNV_index, tvb, *offsetp, 4, byte_order);
3217 *offsetp += 4;
3218 n = tvb_get_uint32(tvb, *offsetp, byte_order);
3219 proto_tree_add_item(t, hf_x11_glx_render_VertexAttribs2svNV_n, tvb, *offsetp, 4, byte_order);
3220 *offsetp += 4;
3221 listOfInt16(tvb, offsetp, t, hf_x11_glx_render_VertexAttribs2svNV_v, hf_x11_glx_render_VertexAttribs2svNV_v_item, n, byte_order);
3222}
3223
3224static void mesa_VertexAttribs3svNV(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
3225{
3226 int n;
3227 proto_tree_add_item(t, hf_x11_glx_render_VertexAttribs3svNV_index, tvb, *offsetp, 4, byte_order);
3228 *offsetp += 4;
3229 n = tvb_get_uint32(tvb, *offsetp, byte_order);
3230 proto_tree_add_item(t, hf_x11_glx_render_VertexAttribs3svNV_n, tvb, *offsetp, 4, byte_order);
3231 *offsetp += 4;
3232 listOfInt16(tvb, offsetp, t, hf_x11_glx_render_VertexAttribs3svNV_v, hf_x11_glx_render_VertexAttribs3svNV_v_item, n, byte_order);
3233}
3234
3235static void mesa_VertexAttribs4svNV(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
3236{
3237 int n;
3238 proto_tree_add_item(t, hf_x11_glx_render_VertexAttribs4svNV_index, tvb, *offsetp, 4, byte_order);
3239 *offsetp += 4;
3240 n = tvb_get_uint32(tvb, *offsetp, byte_order);
3241 proto_tree_add_item(t, hf_x11_glx_render_VertexAttribs4svNV_n, tvb, *offsetp, 4, byte_order);
3242 *offsetp += 4;
3243 listOfInt16(tvb, offsetp, t, hf_x11_glx_render_VertexAttribs4svNV_v, hf_x11_glx_render_VertexAttribs4svNV_v_item, n, byte_order);
3244}
3245
3246static void mesa_VertexAttribs1fvNV(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
3247{
3248 int n;
3249 proto_tree_add_item(t, hf_x11_glx_render_VertexAttribs1fvNV_index, tvb, *offsetp, 4, byte_order);
3250 *offsetp += 4;
3251 n = tvb_get_uint32(tvb, *offsetp, byte_order);
3252 proto_tree_add_item(t, hf_x11_glx_render_VertexAttribs1fvNV_n, tvb, *offsetp, 4, byte_order);
3253 *offsetp += 4;
3254 listOfFloat(tvb, offsetp, t, hf_x11_glx_render_VertexAttribs1fvNV_v, hf_x11_glx_render_VertexAttribs1fvNV_v_item, n, byte_order);
3255}
3256
3257static void mesa_VertexAttribs2fvNV(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
3258{
3259 int n;
3260 proto_tree_add_item(t, hf_x11_glx_render_VertexAttribs2fvNV_index, tvb, *offsetp, 4, byte_order);
3261 *offsetp += 4;
3262 n = tvb_get_uint32(tvb, *offsetp, byte_order);
3263 proto_tree_add_item(t, hf_x11_glx_render_VertexAttribs2fvNV_n, tvb, *offsetp, 4, byte_order);
3264 *offsetp += 4;
3265 listOfFloat(tvb, offsetp, t, hf_x11_glx_render_VertexAttribs2fvNV_v, hf_x11_glx_render_VertexAttribs2fvNV_v_item, n, byte_order);
3266}
3267
3268static void mesa_VertexAttribs3fvNV(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
3269{
3270 int n;
3271 proto_tree_add_item(t, hf_x11_glx_render_VertexAttribs3fvNV_index, tvb, *offsetp, 4, byte_order);
3272 *offsetp += 4;
3273 n = tvb_get_uint32(tvb, *offsetp, byte_order);
3274 proto_tree_add_item(t, hf_x11_glx_render_VertexAttribs3fvNV_n, tvb, *offsetp, 4, byte_order);
3275 *offsetp += 4;
3276 listOfFloat(tvb, offsetp, t, hf_x11_glx_render_VertexAttribs3fvNV_v, hf_x11_glx_render_VertexAttribs3fvNV_v_item, n, byte_order);
3277}
3278
3279static void mesa_VertexAttribs4fvNV(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
3280{
3281 int n;
3282 proto_tree_add_item(t, hf_x11_glx_render_VertexAttribs4fvNV_index, tvb, *offsetp, 4, byte_order);
3283 *offsetp += 4;
3284 n = tvb_get_uint32(tvb, *offsetp, byte_order);
3285 proto_tree_add_item(t, hf_x11_glx_render_VertexAttribs4fvNV_n, tvb, *offsetp, 4, byte_order);
3286 *offsetp += 4;
3287 listOfFloat(tvb, offsetp, t, hf_x11_glx_render_VertexAttribs4fvNV_v, hf_x11_glx_render_VertexAttribs4fvNV_v_item, n, byte_order);
3288}
3289
3290static void mesa_VertexAttribs1dvNV(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
3291{
3292 int n;
3293 proto_tree_add_item(t, hf_x11_glx_render_VertexAttribs1dvNV_index, tvb, *offsetp, 4, byte_order);
3294 *offsetp += 4;
3295 n = tvb_get_uint32(tvb, *offsetp, byte_order);
3296 proto_tree_add_item(t, hf_x11_glx_render_VertexAttribs1dvNV_n, tvb, *offsetp, 4, byte_order);
3297 *offsetp += 4;
3298 listOfDouble(tvb, offsetp, t, hf_x11_glx_render_VertexAttribs1dvNV_v, hf_x11_glx_render_VertexAttribs1dvNV_v_item, n, byte_order);
3299}
3300
3301static void mesa_VertexAttribs2dvNV(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
3302{
3303 int n;
3304 proto_tree_add_item(t, hf_x11_glx_render_VertexAttribs2dvNV_index, tvb, *offsetp, 4, byte_order);
3305 *offsetp += 4;
3306 n = tvb_get_uint32(tvb, *offsetp, byte_order);
3307 proto_tree_add_item(t, hf_x11_glx_render_VertexAttribs2dvNV_n, tvb, *offsetp, 4, byte_order);
3308 *offsetp += 4;
3309 listOfDouble(tvb, offsetp, t, hf_x11_glx_render_VertexAttribs2dvNV_v, hf_x11_glx_render_VertexAttribs2dvNV_v_item, n, byte_order);
3310}
3311
3312static void mesa_VertexAttribs3dvNV(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
3313{
3314 int n;
3315 proto_tree_add_item(t, hf_x11_glx_render_VertexAttribs3dvNV_index, tvb, *offsetp, 4, byte_order);
3316 *offsetp += 4;
3317 n = tvb_get_uint32(tvb, *offsetp, byte_order);
3318 proto_tree_add_item(t, hf_x11_glx_render_VertexAttribs3dvNV_n, tvb, *offsetp, 4, byte_order);
3319 *offsetp += 4;
3320 listOfDouble(tvb, offsetp, t, hf_x11_glx_render_VertexAttribs3dvNV_v, hf_x11_glx_render_VertexAttribs3dvNV_v_item, n, byte_order);
3321}
3322
3323static void mesa_VertexAttribs4dvNV(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
3324{
3325 int n;
3326 proto_tree_add_item(t, hf_x11_glx_render_VertexAttribs4dvNV_index, tvb, *offsetp, 4, byte_order);
3327 *offsetp += 4;
3328 n = tvb_get_uint32(tvb, *offsetp, byte_order);
3329 proto_tree_add_item(t, hf_x11_glx_render_VertexAttribs4dvNV_n, tvb, *offsetp, 4, byte_order);
3330 *offsetp += 4;
3331 listOfDouble(tvb, offsetp, t, hf_x11_glx_render_VertexAttribs4dvNV_v, hf_x11_glx_render_VertexAttribs4dvNV_v_item, n, byte_order);
3332}
3333
3334static void mesa_VertexAttribs4ubvNV(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
3335{
3336 int n;
3337 proto_tree_add_item(t, hf_x11_glx_render_VertexAttribs4ubvNV_index, tvb, *offsetp, 4, byte_order);
3338 *offsetp += 4;
3339 n = tvb_get_uint32(tvb, *offsetp, byte_order);
3340 proto_tree_add_item(t, hf_x11_glx_render_VertexAttribs4ubvNV_n, tvb, *offsetp, 4, byte_order);
3341 *offsetp += 4;
3342 listOfByte(tvb, offsetp, t, hf_x11_glx_render_VertexAttribs4ubvNV_v, n, byte_order);
3343}
3344
3345static void mesa_ActiveStencilFaceEXT(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
3346{
3347 proto_tree_add_item(t, hf_x11_glx_render_ActiveStencilFaceEXT_face, tvb, *offsetp, 4, byte_order);
3348 *offsetp += 4;
3349}
3350
3351static void mesa_ProgramNamedParameter4fvNV(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
3352{
3353 int len;
3354 proto_tree_add_item(t, hf_x11_glx_render_ProgramNamedParameter4fvNV_id, tvb, *offsetp, 4, byte_order);
3355 *offsetp += 4;
3356 len = tvb_get_uint32(tvb, *offsetp, byte_order);
3357 proto_tree_add_item(t, hf_x11_glx_render_ProgramNamedParameter4fvNV_len, tvb, *offsetp, 4, byte_order);
3358 *offsetp += 4;
3359 listOfByte(tvb, offsetp, t, hf_x11_glx_render_ProgramNamedParameter4fvNV_name, len, byte_order);
3360 listOfFloat(tvb, offsetp, t, hf_x11_glx_render_ProgramNamedParameter4fvNV_v, hf_x11_glx_render_ProgramNamedParameter4fvNV_v_item, 4, byte_order);
3361}
3362
3363static void mesa_ProgramNamedParameter4dvNV(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
3364{
3365 int len;
3366 proto_tree_add_item(t, hf_x11_glx_render_ProgramNamedParameter4dvNV_id, tvb, *offsetp, 4, byte_order);
3367 *offsetp += 4;
3368 len = tvb_get_uint32(tvb, *offsetp, byte_order);
3369 proto_tree_add_item(t, hf_x11_glx_render_ProgramNamedParameter4dvNV_len, tvb, *offsetp, 4, byte_order);
3370 *offsetp += 4;
3371 listOfByte(tvb, offsetp, t, hf_x11_glx_render_ProgramNamedParameter4dvNV_name, len, byte_order);
3372 listOfDouble(tvb, offsetp, t, hf_x11_glx_render_ProgramNamedParameter4dvNV_v, hf_x11_glx_render_ProgramNamedParameter4dvNV_v_item, 4, byte_order);
3373}
3374
3375static void mesa_DepthBoundsEXT(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
3376{
3377 proto_tree_add_item(t, hf_x11_glx_render_DepthBoundsEXT_zmin, tvb, *offsetp, 8, byte_order);
3378 *offsetp += 8;
3379 proto_tree_add_item(t, hf_x11_glx_render_DepthBoundsEXT_zmax, tvb, *offsetp, 8, byte_order);
3380 *offsetp += 8;
3381}
3382
3383static const value_string glx_render_op_name[] = {
3384 { 1, "glCallList" },
3385 { 2, "glCallLists" },
3386 { 3, "glListBase" },
3387 { 4, "glBegin" },
3388 { 5, "glBitmap" },
3389 { 6, "glColor3bv" },
3390 { 7, "glColor3dv" },
3391 { 8, "glColor3fv" },
3392 { 9, "glColor3iv" },
3393 { 10, "glColor3sv" },
3394 { 11, "glColor3ubv" },
3395 { 12, "glColor3uiv" },
3396 { 13, "glColor3usv" },
3397 { 14, "glColor4bv" },
3398 { 15, "glColor4dv" },
3399 { 16, "glColor4fv" },
3400 { 17, "glColor4iv" },
3401 { 18, "glColor4sv" },
3402 { 19, "glColor4ubv" },
3403 { 20, "glColor4uiv" },
3404 { 21, "glColor4usv" },
3405 { 22, "glEdgeFlagv" },
3406 { 23, "glEnd" },
3407 { 24, "glIndexdv" },
3408 { 25, "glIndexfv" },
3409 { 26, "glIndexiv" },
3410 { 27, "glIndexsv" },
3411 { 28, "glNormal3bv" },
3412 { 29, "glNormal3dv" },
3413 { 30, "glNormal3fv" },
3414 { 31, "glNormal3iv" },
3415 { 32, "glNormal3sv" },
3416 { 33, "glRasterPos2dv" },
3417 { 34, "glRasterPos2fv" },
3418 { 35, "glRasterPos2iv" },
3419 { 36, "glRasterPos2sv" },
3420 { 37, "glRasterPos3dv" },
3421 { 38, "glRasterPos3fv" },
3422 { 39, "glRasterPos3iv" },
3423 { 40, "glRasterPos3sv" },
3424 { 41, "glRasterPos4dv" },
3425 { 42, "glRasterPos4fv" },
3426 { 43, "glRasterPos4iv" },
3427 { 44, "glRasterPos4sv" },
3428 { 45, "glRectdv" },
3429 { 46, "glRectfv" },
3430 { 47, "glRectiv" },
3431 { 48, "glRectsv" },
3432 { 49, "glTexCoord1dv" },
3433 { 50, "glTexCoord1fv" },
3434 { 51, "glTexCoord1iv" },
3435 { 52, "glTexCoord1sv" },
3436 { 53, "glTexCoord2dv" },
3437 { 54, "glTexCoord2fv" },
3438 { 55, "glTexCoord2iv" },
3439 { 56, "glTexCoord2sv" },
3440 { 57, "glTexCoord3dv" },
3441 { 58, "glTexCoord3fv" },
3442 { 59, "glTexCoord3iv" },
3443 { 60, "glTexCoord3sv" },
3444 { 61, "glTexCoord4dv" },
3445 { 62, "glTexCoord4fv" },
3446 { 63, "glTexCoord4iv" },
3447 { 64, "glTexCoord4sv" },
3448 { 65, "glVertex2dv" },
3449 { 66, "glVertex2fv" },
3450 { 67, "glVertex2iv" },
3451 { 68, "glVertex2sv" },
3452 { 69, "glVertex3dv" },
3453 { 70, "glVertex3fv" },
3454 { 71, "glVertex3iv" },
3455 { 72, "glVertex3sv" },
3456 { 73, "glVertex4dv" },
3457 { 74, "glVertex4fv" },
3458 { 75, "glVertex4iv" },
3459 { 76, "glVertex4sv" },
3460 { 77, "glClipPlane" },
3461 { 78, "glColorMaterial" },
3462 { 79, "glCullFace" },
3463 { 80, "glFogf" },
3464 { 81, "glFogfv" },
3465 { 82, "glFogi" },
3466 { 83, "glFogiv" },
3467 { 84, "glFrontFace" },
3468 { 85, "glHint" },
3469 { 86, "glLightf" },
3470 { 87, "glLightfv" },
3471 { 88, "glLighti" },
3472 { 89, "glLightiv" },
3473 { 90, "glLightModelf" },
3474 { 91, "glLightModelfv" },
3475 { 92, "glLightModeli" },
3476 { 93, "glLightModeliv" },
3477 { 94, "glLineStipple" },
3478 { 95, "glLineWidth" },
3479 { 96, "glMaterialf" },
3480 { 97, "glMaterialfv" },
3481 { 98, "glMateriali" },
3482 { 99, "glMaterialiv" },
3483 { 100, "glPointSize" },
3484 { 101, "glPolygonMode" },
3485 { 102, "glPolygonStipple" },
3486 { 103, "glScissor" },
3487 { 104, "glShadeModel" },
3488 { 105, "glTexParameterf" },
3489 { 106, "glTexParameterfv" },
3490 { 107, "glTexParameteri" },
3491 { 108, "glTexParameteriv" },
3492 { 109, "glTexImage1D" },
3493 { 110, "glTexImage2D" },
3494 { 111, "glTexEnvf" },
3495 { 112, "glTexEnvfv" },
3496 { 113, "glTexEnvi" },
3497 { 114, "glTexEnviv" },
3498 { 115, "glTexGend" },
3499 { 116, "glTexGendv" },
3500 { 117, "glTexGenf" },
3501 { 118, "glTexGenfv" },
3502 { 119, "glTexGeni" },
3503 { 120, "glTexGeniv" },
3504 { 121, "glInitNames" },
3505 { 122, "glLoadName" },
3506 { 123, "glPassThrough" },
3507 { 124, "glPopName" },
3508 { 125, "glPushName" },
3509 { 126, "glDrawBuffer" },
3510 { 127, "glClear" },
3511 { 128, "glClearAccum" },
3512 { 129, "glClearIndex" },
3513 { 130, "glClearColor" },
3514 { 131, "glClearStencil" },
3515 { 132, "glClearDepth" },
3516 { 133, "glStencilMask" },
3517 { 134, "glColorMask" },
3518 { 135, "glDepthMask" },
3519 { 136, "glIndexMask" },
3520 { 137, "glAccum" },
3521 { 138, "glDisable" },
3522 { 139, "glEnable" },
3523 { 141, "glPopAttrib" },
3524 { 142, "glPushAttrib" },
3525 { 143, "glMap1d" },
3526 { 144, "glMap1f" },
3527 { 145, "glMap2d" },
3528 { 146, "glMap2f" },
3529 { 147, "glMapGrid1d" },
3530 { 148, "glMapGrid1f" },
3531 { 149, "glMapGrid2d" },
3532 { 150, "glMapGrid2f" },
3533 { 151, "glEvalCoord1dv" },
3534 { 152, "glEvalCoord1fv" },
3535 { 153, "glEvalCoord2dv" },
3536 { 154, "glEvalCoord2fv" },
3537 { 155, "glEvalMesh1" },
3538 { 156, "glEvalPoint1" },
3539 { 157, "glEvalMesh2" },
3540 { 158, "glEvalPoint2" },
3541 { 159, "glAlphaFunc" },
3542 { 160, "glBlendFunc" },
3543 { 161, "glLogicOp" },
3544 { 162, "glStencilFunc" },
3545 { 163, "glStencilOp" },
3546 { 164, "glDepthFunc" },
3547 { 165, "glPixelZoom" },
3548 { 166, "glPixelTransferf" },
3549 { 167, "glPixelTransferi" },
3550 { 168, "glPixelMapfv" },
3551 { 169, "glPixelMapuiv" },
3552 { 170, "glPixelMapusv" },
3553 { 171, "glReadBuffer" },
3554 { 172, "glCopyPixels" },
3555 { 173, "glDrawPixels" },
3556 { 174, "glDepthRange" },
3557 { 175, "glFrustum" },
3558 { 176, "glLoadIdentity" },
3559 { 177, "glLoadMatrixf" },
3560 { 178, "glLoadMatrixd" },
3561 { 179, "glMatrixMode" },
3562 { 180, "glMultMatrixf" },
3563 { 181, "glMultMatrixd" },
3564 { 182, "glOrtho" },
3565 { 183, "glPopMatrix" },
3566 { 184, "glPushMatrix" },
3567 { 185, "glRotated" },
3568 { 186, "glRotatef" },
3569 { 187, "glScaled" },
3570 { 188, "glScalef" },
3571 { 189, "glTranslated" },
3572 { 190, "glTranslatef" },
3573 { 191, "glViewport" },
3574 { 192, "glPolygonOffset" },
3575 { 193, "glDrawArrays" },
3576 { 194, "glIndexubv" },
3577 { 195, "glColorSubTable" },
3578 { 196, "glCopyColorSubTable" },
3579 { 197, "glActiveTexture" },
3580 { 198, "glMultiTexCoord1dv" },
3581 { 199, "glMultiTexCoord1fvARB" },
3582 { 200, "glMultiTexCoord1iv" },
3583 { 201, "glMultiTexCoord1sv" },
3584 { 202, "glMultiTexCoord2dv" },
3585 { 203, "glMultiTexCoord2fvARB" },
3586 { 204, "glMultiTexCoord2iv" },
3587 { 205, "glMultiTexCoord2sv" },
3588 { 206, "glMultiTexCoord3dv" },
3589 { 207, "glMultiTexCoord3fvARB" },
3590 { 208, "glMultiTexCoord3iv" },
3591 { 209, "glMultiTexCoord3sv" },
3592 { 210, "glMultiTexCoord4dv" },
3593 { 211, "glMultiTexCoord4fvARB" },
3594 { 212, "glMultiTexCoord4iv" },
3595 { 213, "glMultiTexCoord4sv" },
3596 { 214, "glCompressedTexImage1D" },
3597 { 215, "glCompressedTexImage2D" },
3598 { 216, "glCompressedTexImage3D" },
3599 { 217, "glCompressedTexSubImage1D" },
3600 { 218, "glCompressedTexSubImage2D" },
3601 { 219, "glCompressedTexSubImage3D" },
3602 { 229, "glSampleCoverage" },
3603 { 230, "glWindowPos3fv" },
3604 { 231, "glBeginQuery" },
3605 { 232, "glEndQuery" },
3606 { 233, "glDrawBuffers" },
3607 { 2048, "glSampleMaskSGIS" },
3608 { 2049, "glSamplePatternSGIS" },
3609 { 2050, "glTagSampleBufferSGIX" },
3610 { 2051, "glDetailTexFuncSGIS" },
3611 { 2052, "glSharpenTexFuncSGIS" },
3612 { 2053, "glColorTable" },
3613 { 2054, "glColorTableParameterfv" },
3614 { 2055, "glColorTableParameteriv" },
3615 { 2056, "glCopyColorTable" },
3616 { 2057, "glTexImage4DSGIS" },
3617 { 2058, "glTexSubImage4DSGIS" },
3618 { 2059, "glPixelTexGenSGIX" },
3619 { 2064, "glTexFilterFuncSGIS" },
3620 { 2065, "glPointParameterf" },
3621 { 2066, "glPointParameterfv" },
3622 { 2067, "glFogFuncSGIS" },
3623 { 2071, "glReferencePlaneSGIX" },
3624 { 2072, "glFrameZoomSGIX" },
3625 { 2082, "glTextureColorMaskSGIS" },
3626 { 4096, "glBlendColor" },
3627 { 4097, "glBlendEquation" },
3628 { 4099, "glTexSubImage1D" },
3629 { 4100, "glTexSubImage2D" },
3630 { 4101, "glConvolutionFilter1D" },
3631 { 4102, "glConvolutionFilter2D" },
3632 { 4103, "glConvolutionParameterf" },
3633 { 4104, "glConvolutionParameterfv" },
3634 { 4105, "glConvolutionParameteri" },
3635 { 4106, "glConvolutionParameteriv" },
3636 { 4107, "glCopyConvolutionFilter1D" },
3637 { 4108, "glCopyConvolutionFilter2D" },
3638 { 4109, "glSeparableFilter2D" },
3639 { 4110, "glHistogram" },
3640 { 4111, "glMinmax" },
3641 { 4112, "glResetHistogram" },
3642 { 4113, "glResetMinmax" },
3643 { 4114, "glTexImage3D" },
3644 { 4115, "glTexSubImage3D" },
3645 { 4117, "glBindTexture" },
3646 { 4118, "glPrioritizeTextures" },
3647 { 4119, "glCopyTexImage1D" },
3648 { 4120, "glCopyTexImage2D" },
3649 { 4121, "glCopyTexSubImage1D" },
3650 { 4122, "glCopyTexSubImage2D" },
3651 { 4123, "glCopyTexSubImage3D" },
3652 { 4124, "glFogCoordfvEXT" },
3653 { 4125, "glFogCoorddv" },
3654 { 4126, "glSecondaryColor3bv" },
3655 { 4127, "glSecondaryColor3sv" },
3656 { 4128, "glSecondaryColor3iv" },
3657 { 4129, "glSecondaryColor3fvEXT" },
3658 { 4130, "glSecondaryColor3dv" },
3659 { 4131, "glSecondaryColor3ubv" },
3660 { 4132, "glSecondaryColor3usv" },
3661 { 4133, "glSecondaryColor3uiv" },
3662 { 4134, "glBlendFuncSeparate" },
3663 { 4135, "glVertexWeightfvEXT" },
3664 { 4136, "glCombinerParameterfNV" },
3665 { 4137, "glCombinerParameterfvNV" },
3666 { 4138, "glCombinerParameteriNV" },
3667 { 4139, "glCombinerParameterivNV" },
3668 { 4140, "glCombinerInputNV" },
3669 { 4141, "glCombinerOutputNV" },
3670 { 4142, "glFinalCombinerInputNV" },
3671 { 4180, "glBindProgramARB" },
3672 { 4181, "glExecuteProgramNV" },
3673 { 4182, "glRequestResidentProgramsNV" },
3674 { 4183, "glLoadProgramNV" },
3675 { 4184, "glProgramEnvParameter4fvARB" },
3676 { 4185, "glProgramEnvParameter4dvARB" },
3677 { 4186, "glProgramParameters4fvNV" },
3678 { 4187, "glProgramParameters4dvNV" },
3679 { 4188, "glTrackMatrixNV" },
3680 { 4189, "glVertexAttrib1sv" },
3681 { 4190, "glVertexAttrib2sv" },
3682 { 4191, "glVertexAttrib3sv" },
3683 { 4192, "glVertexAttrib4sv" },
3684 { 4193, "glVertexAttrib1fvARB" },
3685 { 4194, "glVertexAttrib2fvARB" },
3686 { 4195, "glVertexAttrib3fvARB" },
3687 { 4196, "glVertexAttrib4fvARB" },
3688 { 4197, "glVertexAttrib1dv" },
3689 { 4198, "glVertexAttrib2dv" },
3690 { 4199, "glVertexAttrib3dv" },
3691 { 4200, "glVertexAttrib4dv" },
3692 { 4201, "glVertexAttrib4Nubv" },
3693 { 4202, "glVertexAttribs1svNV" },
3694 { 4203, "glVertexAttribs2svNV" },
3695 { 4204, "glVertexAttribs3svNV" },
3696 { 4205, "glVertexAttribs4svNV" },
3697 { 4206, "glVertexAttribs1fvNV" },
3698 { 4207, "glVertexAttribs2fvNV" },
3699 { 4208, "glVertexAttribs3fvNV" },
3700 { 4209, "glVertexAttribs4fvNV" },
3701 { 4210, "glVertexAttribs1dvNV" },
3702 { 4211, "glVertexAttribs2dvNV" },
3703 { 4212, "glVertexAttribs3dvNV" },
3704 { 4213, "glVertexAttribs4dvNV" },
3705 { 4214, "glVertexAttribs4ubvNV" },
3706 { 4215, "glProgramLocalParameter4fvARB" },
3707 { 4216, "glProgramLocalParameter4dvARB" },
3708 { 4217, "glProgramStringARB" },
3709 { 4218, "glProgramNamedParameter4fvNV" },
3710 { 4219, "glProgramNamedParameter4dvNV" },
3711 { 4220, "glActiveStencilFaceEXT" },
3712 { 4221, "glPointParameteri" },
3713 { 4222, "glPointParameteriv" },
3714 { 4228, "glBlendEquationSeparate" },
3715 { 4229, "glDepthBoundsEXT" },
3716 { 4230, "glVertexAttrib4bv" },
3717 { 4231, "glVertexAttrib4iv" },
3718 { 4232, "glVertexAttrib4ubv" },
3719 { 4233, "glVertexAttrib4usv" },
3720 { 4234, "glVertexAttrib4uiv" },
3721 { 4235, "glVertexAttrib4Nbv" },
3722 { 4236, "glVertexAttrib4Nsv" },
3723 { 4237, "glVertexAttrib4Niv" },
3724 { 4238, "glVertexAttrib4Nusv" },
3725 { 4239, "glVertexAttrib4Nuiv" },
3726 { 4265, "glVertexAttrib1svNV" },
3727 { 4266, "glVertexAttrib2svNV" },
3728 { 4267, "glVertexAttrib3svNV" },
3729 { 4268, "glVertexAttrib4svNV" },
3730 { 4269, "glVertexAttrib1fvNV" },
3731 { 4270, "glVertexAttrib2fvNV" },
3732 { 4271, "glVertexAttrib3fvNV" },
3733 { 4272, "glVertexAttrib4fvNV" },
3734 { 4273, "glVertexAttrib1dvNV" },
3735 { 4274, "glVertexAttrib2dvNV" },
3736 { 4275, "glVertexAttrib3dvNV" },
3737 { 4276, "glVertexAttrib4dvNV" },
3738 { 4277, "glVertexAttrib4ubvNV" },
3739 { 4326, "glMatrixIndexubvARB" },
3740 { 4327, "glMatrixIndexusvARB" },
3741 { 4328, "glMatrixIndexuivARB" },
3742 { 4329, "glCurrentPaletteMatrixARB" },
3743 { 0, NULL }
3744};
3745static value_string_ext mesa_enum_ext = VALUE_STRING_EXT_INIT(mesa_enum);
3746
3747static void dispatch_glx_render(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order, int length)
3748{
3749 while (length >= 4) {
3750 uint32_t op, len;
3751 int next;
3752 proto_item *ti;
3753 proto_tree *tt;
3754
3755 len = tvb_get_uint16(tvb, *offsetp, byte_order);
3756
3757 op = tvb_get_uint16(tvb, *offsetp + 2, byte_order);
3758 ti = proto_tree_add_uint(t, hf_x11_glx_render_op_name, tvb, *offsetp, len, op);
3759
3760 tt = proto_item_add_subtree(ti, ett_x11_list_of_rectangle);
3761
3762 ti = proto_tree_add_item(tt, hf_x11_request_length, tvb, *offsetp, 2, byte_order);
3763 *offsetp += 2;
3764 proto_tree_add_item(tt, hf_x11_glx_render_op_name, tvb, *offsetp, 2, byte_order);
3765 *offsetp += 2;
3766
3767 if (len < 4) {
3768 expert_add_info(pinfo, ti, &ei_x11_request_length);
3769 /* Eat the rest of the packet, mark it undecoded */
3770 len = length;
3771 op = -1;
3772 }
3773 len -= 4;
3774
3775 next = *offsetp + len;
3776
3777 switch (op) {
3778 case 1:
3779 mesa_CallList(tvb, offsetp, tt, byte_order, len);
3780 break;
3781 case 2:
3782 mesa_CallLists(tvb, offsetp, tt, byte_order, len);
3783 break;
3784 case 3:
3785 mesa_ListBase(tvb, offsetp, tt, byte_order, len);
3786 break;
3787 case 4:
3788 mesa_Begin(tvb, offsetp, tt, byte_order, len);
3789 break;
3790 case 5:
3791 mesa_Bitmap(tvb, offsetp, tt, byte_order, len);
3792 break;
3793 case 6:
3794 mesa_Color3bv(tvb, offsetp, tt, byte_order, len);
3795 break;
3796 case 7:
3797 mesa_Color3dv(tvb, offsetp, tt, byte_order, len);
3798 break;
3799 case 8:
3800 mesa_Color3fv(tvb, offsetp, tt, byte_order, len);
3801 break;
3802 case 9:
3803 mesa_Color3iv(tvb, offsetp, tt, byte_order, len);
3804 break;
3805 case 10:
3806 mesa_Color3sv(tvb, offsetp, tt, byte_order, len);
3807 break;
3808 case 11:
3809 mesa_Color3ubv(tvb, offsetp, tt, byte_order, len);
3810 break;
3811 case 12:
3812 mesa_Color3uiv(tvb, offsetp, tt, byte_order, len);
3813 break;
3814 case 13:
3815 mesa_Color3usv(tvb, offsetp, tt, byte_order, len);
3816 break;
3817 case 14:
3818 mesa_Color4bv(tvb, offsetp, tt, byte_order, len);
3819 break;
3820 case 15:
3821 mesa_Color4dv(tvb, offsetp, tt, byte_order, len);
3822 break;
3823 case 16:
3824 mesa_Color4fv(tvb, offsetp, tt, byte_order, len);
3825 break;
3826 case 17:
3827 mesa_Color4iv(tvb, offsetp, tt, byte_order, len);
3828 break;
3829 case 18:
3830 mesa_Color4sv(tvb, offsetp, tt, byte_order, len);
3831 break;
3832 case 19:
3833 mesa_Color4ubv(tvb, offsetp, tt, byte_order, len);
3834 break;
3835 case 20:
3836 mesa_Color4uiv(tvb, offsetp, tt, byte_order, len);
3837 break;
3838 case 21:
3839 mesa_Color4usv(tvb, offsetp, tt, byte_order, len);
3840 break;
3841 case 22:
3842 mesa_EdgeFlagv(tvb, offsetp, tt, byte_order, len);
3843 break;
3844 case 23:
3845 mesa_End(tvb, offsetp, tt, byte_order, len);
3846 break;
3847 case 24:
3848 mesa_Indexdv(tvb, offsetp, tt, byte_order, len);
3849 break;
3850 case 25:
3851 mesa_Indexfv(tvb, offsetp, tt, byte_order, len);
3852 break;
3853 case 26:
3854 mesa_Indexiv(tvb, offsetp, tt, byte_order, len);
3855 break;
3856 case 27:
3857 mesa_Indexsv(tvb, offsetp, tt, byte_order, len);
3858 break;
3859 case 28:
3860 mesa_Normal3bv(tvb, offsetp, tt, byte_order, len);
3861 break;
3862 case 29:
3863 mesa_Normal3dv(tvb, offsetp, tt, byte_order, len);
3864 break;
3865 case 30:
3866 mesa_Normal3fv(tvb, offsetp, tt, byte_order, len);
3867 break;
3868 case 31:
3869 mesa_Normal3iv(tvb, offsetp, tt, byte_order, len);
3870 break;
3871 case 32:
3872 mesa_Normal3sv(tvb, offsetp, tt, byte_order, len);
3873 break;
3874 case 33:
3875 mesa_RasterPos2dv(tvb, offsetp, tt, byte_order, len);
3876 break;
3877 case 34:
3878 mesa_RasterPos2fv(tvb, offsetp, tt, byte_order, len);
3879 break;
3880 case 35:
3881 mesa_RasterPos2iv(tvb, offsetp, tt, byte_order, len);
3882 break;
3883 case 36:
3884 mesa_RasterPos2sv(tvb, offsetp, tt, byte_order, len);
3885 break;
3886 case 37:
3887 mesa_RasterPos3dv(tvb, offsetp, tt, byte_order, len);
3888 break;
3889 case 38:
3890 mesa_RasterPos3fv(tvb, offsetp, tt, byte_order, len);
3891 break;
3892 case 39:
3893 mesa_RasterPos3iv(tvb, offsetp, tt, byte_order, len);
3894 break;
3895 case 40:
3896 mesa_RasterPos3sv(tvb, offsetp, tt, byte_order, len);
3897 break;
3898 case 41:
3899 mesa_RasterPos4dv(tvb, offsetp, tt, byte_order, len);
3900 break;
3901 case 42:
3902 mesa_RasterPos4fv(tvb, offsetp, tt, byte_order, len);
3903 break;
3904 case 43:
3905 mesa_RasterPos4iv(tvb, offsetp, tt, byte_order, len);
3906 break;
3907 case 44:
3908 mesa_RasterPos4sv(tvb, offsetp, tt, byte_order, len);
3909 break;
3910 case 45:
3911 mesa_Rectdv(tvb, offsetp, tt, byte_order, len);
3912 break;
3913 case 46:
3914 mesa_Rectfv(tvb, offsetp, tt, byte_order, len);
3915 break;
3916 case 47:
3917 mesa_Rectiv(tvb, offsetp, tt, byte_order, len);
3918 break;
3919 case 48:
3920 mesa_Rectsv(tvb, offsetp, tt, byte_order, len);
3921 break;
3922 case 49:
3923 mesa_TexCoord1dv(tvb, offsetp, tt, byte_order, len);
3924 break;
3925 case 50:
3926 mesa_TexCoord1fv(tvb, offsetp, tt, byte_order, len);
3927 break;
3928 case 51:
3929 mesa_TexCoord1iv(tvb, offsetp, tt, byte_order, len);
3930 break;
3931 case 52:
3932 mesa_TexCoord1sv(tvb, offsetp, tt, byte_order, len);
3933 break;
3934 case 53:
3935 mesa_TexCoord2dv(tvb, offsetp, tt, byte_order, len);
3936 break;
3937 case 54:
3938 mesa_TexCoord2fv(tvb, offsetp, tt, byte_order, len);
3939 break;
3940 case 55:
3941 mesa_TexCoord2iv(tvb, offsetp, tt, byte_order, len);
3942 break;
3943 case 56:
3944 mesa_TexCoord2sv(tvb, offsetp, tt, byte_order, len);
3945 break;
3946 case 57:
3947 mesa_TexCoord3dv(tvb, offsetp, tt, byte_order, len);
3948 break;
3949 case 58:
3950 mesa_TexCoord3fv(tvb, offsetp, tt, byte_order, len);
3951 break;
3952 case 59:
3953 mesa_TexCoord3iv(tvb, offsetp, tt, byte_order, len);
3954 break;
3955 case 60:
3956 mesa_TexCoord3sv(tvb, offsetp, tt, byte_order, len);
3957 break;
3958 case 61:
3959 mesa_TexCoord4dv(tvb, offsetp, tt, byte_order, len);
3960 break;
3961 case 62:
3962 mesa_TexCoord4fv(tvb, offsetp, tt, byte_order, len);
3963 break;
3964 case 63:
3965 mesa_TexCoord4iv(tvb, offsetp, tt, byte_order, len);
3966 break;
3967 case 64:
3968 mesa_TexCoord4sv(tvb, offsetp, tt, byte_order, len);
3969 break;
3970 case 65:
3971 mesa_Vertex2dv(tvb, offsetp, tt, byte_order, len);
3972 break;
3973 case 66:
3974 mesa_Vertex2fv(tvb, offsetp, tt, byte_order, len);
3975 break;
3976 case 67:
3977 mesa_Vertex2iv(tvb, offsetp, tt, byte_order, len);
3978 break;
3979 case 68:
3980 mesa_Vertex2sv(tvb, offsetp, tt, byte_order, len);
3981 break;
3982 case 69:
3983 mesa_Vertex3dv(tvb, offsetp, tt, byte_order, len);
3984 break;
3985 case 70:
3986 mesa_Vertex3fv(tvb, offsetp, tt, byte_order, len);
3987 break;
3988 case 71:
3989 mesa_Vertex3iv(tvb, offsetp, tt, byte_order, len);
3990 break;
3991 case 72:
3992 mesa_Vertex3sv(tvb, offsetp, tt, byte_order, len);
3993 break;
3994 case 73:
3995 mesa_Vertex4dv(tvb, offsetp, tt, byte_order, len);
3996 break;
3997 case 74:
3998 mesa_Vertex4fv(tvb, offsetp, tt, byte_order, len);
3999 break;
4000 case 75:
4001 mesa_Vertex4iv(tvb, offsetp, tt, byte_order, len);
4002 break;
4003 case 76:
4004 mesa_Vertex4sv(tvb, offsetp, tt, byte_order, len);
4005 break;
4006 case 77:
4007 mesa_ClipPlane(tvb, offsetp, tt, byte_order, len);
4008 break;
4009 case 78:
4010 mesa_ColorMaterial(tvb, offsetp, tt, byte_order, len);
4011 break;
4012 case 79:
4013 mesa_CullFace(tvb, offsetp, tt, byte_order, len);
4014 break;
4015 case 80:
4016 mesa_Fogf(tvb, offsetp, tt, byte_order, len);
4017 break;
4018 case 81:
4019 mesa_Fogfv(tvb, offsetp, tt, byte_order, len);
4020 break;
4021 case 82:
4022 mesa_Fogi(tvb, offsetp, tt, byte_order, len);
4023 break;
4024 case 83:
4025 mesa_Fogiv(tvb, offsetp, tt, byte_order, len);
4026 break;
4027 case 84:
4028 mesa_FrontFace(tvb, offsetp, tt, byte_order, len);
4029 break;
4030 case 85:
4031 mesa_Hint(tvb, offsetp, tt, byte_order, len);
4032 break;
4033 case 86:
4034 mesa_Lightf(tvb, offsetp, tt, byte_order, len);
4035 break;
4036 case 87:
4037 mesa_Lightfv(tvb, offsetp, tt, byte_order, len);
4038 break;
4039 case 88:
4040 mesa_Lighti(tvb, offsetp, tt, byte_order, len);
4041 break;
4042 case 89:
4043 mesa_Lightiv(tvb, offsetp, tt, byte_order, len);
4044 break;
4045 case 90:
4046 mesa_LightModelf(tvb, offsetp, tt, byte_order, len);
4047 break;
4048 case 91:
4049 mesa_LightModelfv(tvb, offsetp, tt, byte_order, len);
4050 break;
4051 case 92:
4052 mesa_LightModeli(tvb, offsetp, tt, byte_order, len);
4053 break;
4054 case 93:
4055 mesa_LightModeliv(tvb, offsetp, tt, byte_order, len);
4056 break;
4057 case 94:
4058 mesa_LineStipple(tvb, offsetp, tt, byte_order, len);
4059 break;
4060 case 95:
4061 mesa_LineWidth(tvb, offsetp, tt, byte_order, len);
4062 break;
4063 case 96:
4064 mesa_Materialf(tvb, offsetp, tt, byte_order, len);
4065 break;
4066 case 97:
4067 mesa_Materialfv(tvb, offsetp, tt, byte_order, len);
4068 break;
4069 case 98:
4070 mesa_Materiali(tvb, offsetp, tt, byte_order, len);
4071 break;
4072 case 99:
4073 mesa_Materialiv(tvb, offsetp, tt, byte_order, len);
4074 break;
4075 case 100:
4076 mesa_PointSize(tvb, offsetp, tt, byte_order, len);
4077 break;
4078 case 101:
4079 mesa_PolygonMode(tvb, offsetp, tt, byte_order, len);
4080 break;
4081 case 102:
4082 mesa_PolygonStipple(tvb, offsetp, tt, byte_order, len);
4083 break;
4084 case 103:
4085 mesa_Scissor(tvb, offsetp, tt, byte_order, len);
4086 break;
4087 case 104:
4088 mesa_ShadeModel(tvb, offsetp, tt, byte_order, len);
4089 break;
4090 case 105:
4091 mesa_TexParameterf(tvb, offsetp, tt, byte_order, len);
4092 break;
4093 case 106:
4094 mesa_TexParameterfv(tvb, offsetp, tt, byte_order, len);
4095 break;
4096 case 107:
4097 mesa_TexParameteri(tvb, offsetp, tt, byte_order, len);
4098 break;
4099 case 108:
4100 mesa_TexParameteriv(tvb, offsetp, tt, byte_order, len);
4101 break;
4102 case 109:
4103 mesa_TexImage1D(tvb, offsetp, tt, byte_order, len);
4104 break;
4105 case 110:
4106 mesa_TexImage2D(tvb, offsetp, tt, byte_order, len);
4107 break;
4108 case 111:
4109 mesa_TexEnvf(tvb, offsetp, tt, byte_order, len);
4110 break;
4111 case 112:
4112 mesa_TexEnvfv(tvb, offsetp, tt, byte_order, len);
4113 break;
4114 case 113:
4115 mesa_TexEnvi(tvb, offsetp, tt, byte_order, len);
4116 break;
4117 case 114:
4118 mesa_TexEnviv(tvb, offsetp, tt, byte_order, len);
4119 break;
4120 case 115:
4121 mesa_TexGend(tvb, offsetp, tt, byte_order, len);
4122 break;
4123 case 116:
4124 mesa_TexGendv(tvb, offsetp, tt, byte_order, len);
4125 break;
4126 case 117:
4127 mesa_TexGenf(tvb, offsetp, tt, byte_order, len);
4128 break;
4129 case 118:
4130 mesa_TexGenfv(tvb, offsetp, tt, byte_order, len);
4131 break;
4132 case 119:
4133 mesa_TexGeni(tvb, offsetp, tt, byte_order, len);
4134 break;
4135 case 120:
4136 mesa_TexGeniv(tvb, offsetp, tt, byte_order, len);
4137 break;
4138 case 121:
4139 mesa_InitNames(tvb, offsetp, tt, byte_order, len);
4140 break;
4141 case 122:
4142 mesa_LoadName(tvb, offsetp, tt, byte_order, len);
4143 break;
4144 case 123:
4145 mesa_PassThrough(tvb, offsetp, tt, byte_order, len);
4146 break;
4147 case 124:
4148 mesa_PopName(tvb, offsetp, tt, byte_order, len);
4149 break;
4150 case 125:
4151 mesa_PushName(tvb, offsetp, tt, byte_order, len);
4152 break;
4153 case 126:
4154 mesa_DrawBuffer(tvb, offsetp, tt, byte_order, len);
4155 break;
4156 case 127:
4157 mesa_Clear(tvb, offsetp, tt, byte_order, len);
4158 break;
4159 case 128:
4160 mesa_ClearAccum(tvb, offsetp, tt, byte_order, len);
4161 break;
4162 case 129:
4163 mesa_ClearIndex(tvb, offsetp, tt, byte_order, len);
4164 break;
4165 case 130:
4166 mesa_ClearColor(tvb, offsetp, tt, byte_order, len);
4167 break;
4168 case 131:
4169 mesa_ClearStencil(tvb, offsetp, tt, byte_order, len);
4170 break;
4171 case 132:
4172 mesa_ClearDepth(tvb, offsetp, tt, byte_order, len);
4173 break;
4174 case 133:
4175 mesa_StencilMask(tvb, offsetp, tt, byte_order, len);
4176 break;
4177 case 134:
4178 mesa_ColorMask(tvb, offsetp, tt, byte_order, len);
4179 break;
4180 case 135:
4181 mesa_DepthMask(tvb, offsetp, tt, byte_order, len);
4182 break;
4183 case 136:
4184 mesa_IndexMask(tvb, offsetp, tt, byte_order, len);
4185 break;
4186 case 137:
4187 mesa_Accum(tvb, offsetp, tt, byte_order, len);
4188 break;
4189 case 138:
4190 mesa_Disable(tvb, offsetp, tt, byte_order, len);
4191 break;
4192 case 139:
4193 mesa_Enable(tvb, offsetp, tt, byte_order, len);
4194 break;
4195 case 141:
4196 mesa_PopAttrib(tvb, offsetp, tt, byte_order, len);
4197 break;
4198 case 142:
4199 mesa_PushAttrib(tvb, offsetp, tt, byte_order, len);
4200 break;
4201 case 143:
4202 mesa_Map1d(tvb, offsetp, tt, byte_order, len);
4203 break;
4204 case 144:
4205 mesa_Map1f(tvb, offsetp, tt, byte_order, len);
4206 break;
4207 case 145:
4208 mesa_Map2d(tvb, offsetp, tt, byte_order, len);
4209 break;
4210 case 146:
4211 mesa_Map2f(tvb, offsetp, tt, byte_order, len);
4212 break;
4213 case 147:
4214 mesa_MapGrid1d(tvb, offsetp, tt, byte_order, len);
4215 break;
4216 case 148:
4217 mesa_MapGrid1f(tvb, offsetp, tt, byte_order, len);
4218 break;
4219 case 149:
4220 mesa_MapGrid2d(tvb, offsetp, tt, byte_order, len);
4221 break;
4222 case 150:
4223 mesa_MapGrid2f(tvb, offsetp, tt, byte_order, len);
4224 break;
4225 case 151:
4226 mesa_EvalCoord1dv(tvb, offsetp, tt, byte_order, len);
4227 break;
4228 case 152:
4229 mesa_EvalCoord1fv(tvb, offsetp, tt, byte_order, len);
4230 break;
4231 case 153:
4232 mesa_EvalCoord2dv(tvb, offsetp, tt, byte_order, len);
4233 break;
4234 case 154:
4235 mesa_EvalCoord2fv(tvb, offsetp, tt, byte_order, len);
4236 break;
4237 case 155:
4238 mesa_EvalMesh1(tvb, offsetp, tt, byte_order, len);
4239 break;
4240 case 156:
4241 mesa_EvalPoint1(tvb, offsetp, tt, byte_order, len);
4242 break;
4243 case 157:
4244 mesa_EvalMesh2(tvb, offsetp, tt, byte_order, len);
4245 break;
4246 case 158:
4247 mesa_EvalPoint2(tvb, offsetp, tt, byte_order, len);
4248 break;
4249 case 159:
4250 mesa_AlphaFunc(tvb, offsetp, tt, byte_order, len);
4251 break;
4252 case 160:
4253 mesa_BlendFunc(tvb, offsetp, tt, byte_order, len);
4254 break;
4255 case 161:
4256 mesa_LogicOp(tvb, offsetp, tt, byte_order, len);
4257 break;
4258 case 162:
4259 mesa_StencilFunc(tvb, offsetp, tt, byte_order, len);
4260 break;
4261 case 163:
4262 mesa_StencilOp(tvb, offsetp, tt, byte_order, len);
4263 break;
4264 case 164:
4265 mesa_DepthFunc(tvb, offsetp, tt, byte_order, len);
4266 break;
4267 case 165:
4268 mesa_PixelZoom(tvb, offsetp, tt, byte_order, len);
4269 break;
4270 case 166:
4271 mesa_PixelTransferf(tvb, offsetp, tt, byte_order, len);
4272 break;
4273 case 167:
4274 mesa_PixelTransferi(tvb, offsetp, tt, byte_order, len);
4275 break;
4276 case 168:
4277 mesa_PixelMapfv(tvb, offsetp, tt, byte_order, len);
4278 break;
4279 case 169:
4280 mesa_PixelMapuiv(tvb, offsetp, tt, byte_order, len);
4281 break;
4282 case 170:
4283 mesa_PixelMapusv(tvb, offsetp, tt, byte_order, len);
4284 break;
4285 case 171:
4286 mesa_ReadBuffer(tvb, offsetp, tt, byte_order, len);
4287 break;
4288 case 172:
4289 mesa_CopyPixels(tvb, offsetp, tt, byte_order, len);
4290 break;
4291 case 173:
4292 mesa_DrawPixels(tvb, offsetp, tt, byte_order, len);
4293 break;
4294 case 174:
4295 mesa_DepthRange(tvb, offsetp, tt, byte_order, len);
4296 break;
4297 case 175:
4298 mesa_Frustum(tvb, offsetp, tt, byte_order, len);
4299 break;
4300 case 176:
4301 mesa_LoadIdentity(tvb, offsetp, tt, byte_order, len);
4302 break;
4303 case 177:
4304 mesa_LoadMatrixf(tvb, offsetp, tt, byte_order, len);
4305 break;
4306 case 178:
4307 mesa_LoadMatrixd(tvb, offsetp, tt, byte_order, len);
4308 break;
4309 case 179:
4310 mesa_MatrixMode(tvb, offsetp, tt, byte_order, len);
4311 break;
4312 case 180:
4313 mesa_MultMatrixf(tvb, offsetp, tt, byte_order, len);
4314 break;
4315 case 181:
4316 mesa_MultMatrixd(tvb, offsetp, tt, byte_order, len);
4317 break;
4318 case 182:
4319 mesa_Ortho(tvb, offsetp, tt, byte_order, len);
4320 break;
4321 case 183:
4322 mesa_PopMatrix(tvb, offsetp, tt, byte_order, len);
4323 break;
4324 case 184:
4325 mesa_PushMatrix(tvb, offsetp, tt, byte_order, len);
4326 break;
4327 case 185:
4328 mesa_Rotated(tvb, offsetp, tt, byte_order, len);
4329 break;
4330 case 186:
4331 mesa_Rotatef(tvb, offsetp, tt, byte_order, len);
4332 break;
4333 case 187:
4334 mesa_Scaled(tvb, offsetp, tt, byte_order, len);
4335 break;
4336 case 188:
4337 mesa_Scalef(tvb, offsetp, tt, byte_order, len);
4338 break;
4339 case 189:
4340 mesa_Translated(tvb, offsetp, tt, byte_order, len);
4341 break;
4342 case 190:
4343 mesa_Translatef(tvb, offsetp, tt, byte_order, len);
4344 break;
4345 case 191:
4346 mesa_Viewport(tvb, offsetp, tt, byte_order, len);
4347 break;
4348 case 192:
4349 mesa_PolygonOffset(tvb, offsetp, tt, byte_order, len);
4350 break;
4351 case 193:
4352 mesa_DrawArrays(tvb, offsetp, tt, byte_order, len);
4353 break;
4354 case 194:
4355 mesa_Indexubv(tvb, offsetp, tt, byte_order, len);
4356 break;
4357 case 195:
4358 mesa_ColorSubTable(tvb, offsetp, tt, byte_order, len);
4359 break;
4360 case 196:
4361 mesa_CopyColorSubTable(tvb, offsetp, tt, byte_order, len);
4362 break;
4363 case 197:
4364 mesa_ActiveTexture(tvb, offsetp, tt, byte_order, len);
4365 break;
4366 case 198:
4367 mesa_MultiTexCoord1dv(tvb, offsetp, tt, byte_order, len);
4368 break;
4369 case 199:
4370 mesa_MultiTexCoord1fvARB(tvb, offsetp, tt, byte_order, len);
4371 break;
4372 case 200:
4373 mesa_MultiTexCoord1iv(tvb, offsetp, tt, byte_order, len);
4374 break;
4375 case 201:
4376 mesa_MultiTexCoord1sv(tvb, offsetp, tt, byte_order, len);
4377 break;
4378 case 202:
4379 mesa_MultiTexCoord2dv(tvb, offsetp, tt, byte_order, len);
4380 break;
4381 case 203:
4382 mesa_MultiTexCoord2fvARB(tvb, offsetp, tt, byte_order, len);
4383 break;
4384 case 204:
4385 mesa_MultiTexCoord2iv(tvb, offsetp, tt, byte_order, len);
4386 break;
4387 case 205:
4388 mesa_MultiTexCoord2sv(tvb, offsetp, tt, byte_order, len);
4389 break;
4390 case 206:
4391 mesa_MultiTexCoord3dv(tvb, offsetp, tt, byte_order, len);
4392 break;
4393 case 207:
4394 mesa_MultiTexCoord3fvARB(tvb, offsetp, tt, byte_order, len);
4395 break;
4396 case 208:
4397 mesa_MultiTexCoord3iv(tvb, offsetp, tt, byte_order, len);
4398 break;
4399 case 209:
4400 mesa_MultiTexCoord3sv(tvb, offsetp, tt, byte_order, len);
4401 break;
4402 case 210:
4403 mesa_MultiTexCoord4dv(tvb, offsetp, tt, byte_order, len);
4404 break;
4405 case 211:
4406 mesa_MultiTexCoord4fvARB(tvb, offsetp, tt, byte_order, len);
4407 break;
4408 case 212:
4409 mesa_MultiTexCoord4iv(tvb, offsetp, tt, byte_order, len);
4410 break;
4411 case 213:
4412 mesa_MultiTexCoord4sv(tvb, offsetp, tt, byte_order, len);
4413 break;
4414 case 214:
4415 mesa_CompressedTexImage1D(tvb, offsetp, tt, byte_order, len);
4416 break;
4417 case 215:
4418 mesa_CompressedTexImage2D(tvb, offsetp, tt, byte_order, len);
4419 break;
4420 case 216:
4421 mesa_CompressedTexImage3D(tvb, offsetp, tt, byte_order, len);
4422 break;
4423 case 217:
4424 mesa_CompressedTexSubImage1D(tvb, offsetp, tt, byte_order, len);
4425 break;
4426 case 218:
4427 mesa_CompressedTexSubImage2D(tvb, offsetp, tt, byte_order, len);
4428 break;
4429 case 219:
4430 mesa_CompressedTexSubImage3D(tvb, offsetp, tt, byte_order, len);
4431 break;
4432 case 229:
4433 mesa_SampleCoverage(tvb, offsetp, tt, byte_order, len);
4434 break;
4435 case 230:
4436 mesa_WindowPos3fv(tvb, offsetp, tt, byte_order, len);
4437 break;
4438 case 231:
4439 mesa_BeginQuery(tvb, offsetp, tt, byte_order, len);
4440 break;
4441 case 232:
4442 mesa_EndQuery(tvb, offsetp, tt, byte_order, len);
4443 break;
4444 case 233:
4445 mesa_DrawBuffers(tvb, offsetp, tt, byte_order, len);
4446 break;
4447 case 2048:
4448 mesa_SampleMaskSGIS(tvb, offsetp, tt, byte_order, len);
4449 break;
4450 case 2049:
4451 mesa_SamplePatternSGIS(tvb, offsetp, tt, byte_order, len);
4452 break;
4453 case 2050:
4454 mesa_TagSampleBufferSGIX(tvb, offsetp, tt, byte_order, len);
4455 break;
4456 case 2051:
4457 mesa_DetailTexFuncSGIS(tvb, offsetp, tt, byte_order, len);
4458 break;
4459 case 2052:
4460 mesa_SharpenTexFuncSGIS(tvb, offsetp, tt, byte_order, len);
4461 break;
4462 case 2053:
4463 mesa_ColorTable(tvb, offsetp, tt, byte_order, len);
4464 break;
4465 case 2054:
4466 mesa_ColorTableParameterfv(tvb, offsetp, tt, byte_order, len);
4467 break;
4468 case 2055:
4469 mesa_ColorTableParameteriv(tvb, offsetp, tt, byte_order, len);
4470 break;
4471 case 2056:
4472 mesa_CopyColorTable(tvb, offsetp, tt, byte_order, len);
4473 break;
4474 case 2057:
4475 mesa_TexImage4DSGIS(tvb, offsetp, tt, byte_order, len);
4476 break;
4477 case 2058:
4478 mesa_TexSubImage4DSGIS(tvb, offsetp, tt, byte_order, len);
4479 break;
4480 case 2059:
4481 mesa_PixelTexGenSGIX(tvb, offsetp, tt, byte_order, len);
4482 break;
4483 case 2064:
4484 mesa_TexFilterFuncSGIS(tvb, offsetp, tt, byte_order, len);
4485 break;
4486 case 2065:
4487 mesa_PointParameterf(tvb, offsetp, tt, byte_order, len);
4488 break;
4489 case 2066:
4490 mesa_PointParameterfv(tvb, offsetp, tt, byte_order, len);
4491 break;
4492 case 2067:
4493 mesa_FogFuncSGIS(tvb, offsetp, tt, byte_order, len);
4494 break;
4495 case 2071:
4496 mesa_ReferencePlaneSGIX(tvb, offsetp, tt, byte_order, len);
4497 break;
4498 case 2072:
4499 mesa_FrameZoomSGIX(tvb, offsetp, tt, byte_order, len);
4500 break;
4501 case 2082:
4502 mesa_TextureColorMaskSGIS(tvb, offsetp, tt, byte_order, len);
4503 break;
4504 case 4096:
4505 mesa_BlendColor(tvb, offsetp, tt, byte_order, len);
4506 break;
4507 case 4097:
4508 mesa_BlendEquation(tvb, offsetp, tt, byte_order, len);
4509 break;
4510 case 4099:
4511 mesa_TexSubImage1D(tvb, offsetp, tt, byte_order, len);
4512 break;
4513 case 4100:
4514 mesa_TexSubImage2D(tvb, offsetp, tt, byte_order, len);
4515 break;
4516 case 4101:
4517 mesa_ConvolutionFilter1D(tvb, offsetp, tt, byte_order, len);
4518 break;
4519 case 4102:
4520 mesa_ConvolutionFilter2D(tvb, offsetp, tt, byte_order, len);
4521 break;
4522 case 4103:
4523 mesa_ConvolutionParameterf(tvb, offsetp, tt, byte_order, len);
4524 break;
4525 case 4104:
4526 mesa_ConvolutionParameterfv(tvb, offsetp, tt, byte_order, len);
4527 break;
4528 case 4105:
4529 mesa_ConvolutionParameteri(tvb, offsetp, tt, byte_order, len);
4530 break;
4531 case 4106:
4532 mesa_ConvolutionParameteriv(tvb, offsetp, tt, byte_order, len);
4533 break;
4534 case 4107:
4535 mesa_CopyConvolutionFilter1D(tvb, offsetp, tt, byte_order, len);
4536 break;
4537 case 4108:
4538 mesa_CopyConvolutionFilter2D(tvb, offsetp, tt, byte_order, len);
4539 break;
4540 case 4109:
4541 mesa_SeparableFilter2D(tvb, offsetp, tt, byte_order, len);
4542 break;
4543 case 4110:
4544 mesa_Histogram(tvb, offsetp, tt, byte_order, len);
4545 break;
4546 case 4111:
4547 mesa_Minmax(tvb, offsetp, tt, byte_order, len);
4548 break;
4549 case 4112:
4550 mesa_ResetHistogram(tvb, offsetp, tt, byte_order, len);
4551 break;
4552 case 4113:
4553 mesa_ResetMinmax(tvb, offsetp, tt, byte_order, len);
4554 break;
4555 case 4114:
4556 mesa_TexImage3D(tvb, offsetp, tt, byte_order, len);
4557 break;
4558 case 4115:
4559 mesa_TexSubImage3D(tvb, offsetp, tt, byte_order, len);
4560 break;
4561 case 4117:
4562 mesa_BindTexture(tvb, offsetp, tt, byte_order, len);
4563 break;
4564 case 4118:
4565 mesa_PrioritizeTextures(tvb, offsetp, tt, byte_order, len);
4566 break;
4567 case 4119:
4568 mesa_CopyTexImage1D(tvb, offsetp, tt, byte_order, len);
4569 break;
4570 case 4120:
4571 mesa_CopyTexImage2D(tvb, offsetp, tt, byte_order, len);
4572 break;
4573 case 4121:
4574 mesa_CopyTexSubImage1D(tvb, offsetp, tt, byte_order, len);
4575 break;
4576 case 4122:
4577 mesa_CopyTexSubImage2D(tvb, offsetp, tt, byte_order, len);
4578 break;
4579 case 4123:
4580 mesa_CopyTexSubImage3D(tvb, offsetp, tt, byte_order, len);
4581 break;
4582 case 4124:
4583 mesa_FogCoordfvEXT(tvb, offsetp, tt, byte_order, len);
4584 break;
4585 case 4125:
4586 mesa_FogCoorddv(tvb, offsetp, tt, byte_order, len);
4587 break;
4588 case 4126:
4589 mesa_SecondaryColor3bv(tvb, offsetp, tt, byte_order, len);
4590 break;
4591 case 4127:
4592 mesa_SecondaryColor3sv(tvb, offsetp, tt, byte_order, len);
4593 break;
4594 case 4128:
4595 mesa_SecondaryColor3iv(tvb, offsetp, tt, byte_order, len);
4596 break;
4597 case 4129:
4598 mesa_SecondaryColor3fvEXT(tvb, offsetp, tt, byte_order, len);
4599 break;
4600 case 4130:
4601 mesa_SecondaryColor3dv(tvb, offsetp, tt, byte_order, len);
4602 break;
4603 case 4131:
4604 mesa_SecondaryColor3ubv(tvb, offsetp, tt, byte_order, len);
4605 break;
4606 case 4132:
4607 mesa_SecondaryColor3usv(tvb, offsetp, tt, byte_order, len);
4608 break;
4609 case 4133:
4610 mesa_SecondaryColor3uiv(tvb, offsetp, tt, byte_order, len);
4611 break;
4612 case 4134:
4613 mesa_BlendFuncSeparate(tvb, offsetp, tt, byte_order, len);
4614 break;
4615 case 4135:
4616 mesa_VertexWeightfvEXT(tvb, offsetp, tt, byte_order, len);
4617 break;
4618 case 4136:
4619 mesa_CombinerParameterfNV(tvb, offsetp, tt, byte_order, len);
4620 break;
4621 case 4137:
4622 mesa_CombinerParameterfvNV(tvb, offsetp, tt, byte_order, len);
4623 break;
4624 case 4138:
4625 mesa_CombinerParameteriNV(tvb, offsetp, tt, byte_order, len);
4626 break;
4627 case 4139:
4628 mesa_CombinerParameterivNV(tvb, offsetp, tt, byte_order, len);
4629 break;
4630 case 4140:
4631 mesa_CombinerInputNV(tvb, offsetp, tt, byte_order, len);
4632 break;
4633 case 4141:
4634 mesa_CombinerOutputNV(tvb, offsetp, tt, byte_order, len);
4635 break;
4636 case 4142:
4637 mesa_FinalCombinerInputNV(tvb, offsetp, tt, byte_order, len);
4638 break;
4639 case 4180:
4640 mesa_BindProgramARB(tvb, offsetp, tt, byte_order, len);
4641 break;
4642 case 4181:
4643 mesa_ExecuteProgramNV(tvb, offsetp, tt, byte_order, len);
4644 break;
4645 case 4182:
4646 mesa_RequestResidentProgramsNV(tvb, offsetp, tt, byte_order, len);
4647 break;
4648 case 4183:
4649 mesa_LoadProgramNV(tvb, offsetp, tt, byte_order, len);
4650 break;
4651 case 4184:
4652 mesa_ProgramEnvParameter4fvARB(tvb, offsetp, tt, byte_order, len);
4653 break;
4654 case 4185:
4655 mesa_ProgramEnvParameter4dvARB(tvb, offsetp, tt, byte_order, len);
4656 break;
4657 case 4186:
4658 mesa_ProgramParameters4fvNV(tvb, offsetp, tt, byte_order, len);
4659 break;
4660 case 4187:
4661 mesa_ProgramParameters4dvNV(tvb, offsetp, tt, byte_order, len);
4662 break;
4663 case 4188:
4664 mesa_TrackMatrixNV(tvb, offsetp, tt, byte_order, len);
4665 break;
4666 case 4189:
4667 mesa_VertexAttrib1sv(tvb, offsetp, tt, byte_order, len);
4668 break;
4669 case 4190:
4670 mesa_VertexAttrib2sv(tvb, offsetp, tt, byte_order, len);
4671 break;
4672 case 4191:
4673 mesa_VertexAttrib3sv(tvb, offsetp, tt, byte_order, len);
4674 break;
4675 case 4192:
4676 mesa_VertexAttrib4sv(tvb, offsetp, tt, byte_order, len);
4677 break;
4678 case 4193:
4679 mesa_VertexAttrib1fvARB(tvb, offsetp, tt, byte_order, len);
4680 break;
4681 case 4194:
4682 mesa_VertexAttrib2fvARB(tvb, offsetp, tt, byte_order, len);
4683 break;
4684 case 4195:
4685 mesa_VertexAttrib3fvARB(tvb, offsetp, tt, byte_order, len);
4686 break;
4687 case 4196:
4688 mesa_VertexAttrib4fvARB(tvb, offsetp, tt, byte_order, len);
4689 break;
4690 case 4197:
4691 mesa_VertexAttrib1dv(tvb, offsetp, tt, byte_order, len);
4692 break;
4693 case 4198:
4694 mesa_VertexAttrib2dv(tvb, offsetp, tt, byte_order, len);
4695 break;
4696 case 4199:
4697 mesa_VertexAttrib3dv(tvb, offsetp, tt, byte_order, len);
4698 break;
4699 case 4200:
4700 mesa_VertexAttrib4dv(tvb, offsetp, tt, byte_order, len);
4701 break;
4702 case 4201:
4703 mesa_VertexAttrib4Nubv(tvb, offsetp, tt, byte_order, len);
4704 break;
4705 case 4202:
4706 mesa_VertexAttribs1svNV(tvb, offsetp, tt, byte_order, len);
4707 break;
4708 case 4203:
4709 mesa_VertexAttribs2svNV(tvb, offsetp, tt, byte_order, len);
4710 break;
4711 case 4204:
4712 mesa_VertexAttribs3svNV(tvb, offsetp, tt, byte_order, len);
4713 break;
4714 case 4205:
4715 mesa_VertexAttribs4svNV(tvb, offsetp, tt, byte_order, len);
4716 break;
4717 case 4206:
4718 mesa_VertexAttribs1fvNV(tvb, offsetp, tt, byte_order, len);
4719 break;
4720 case 4207:
4721 mesa_VertexAttribs2fvNV(tvb, offsetp, tt, byte_order, len);
4722 break;
4723 case 4208:
4724 mesa_VertexAttribs3fvNV(tvb, offsetp, tt, byte_order, len);
4725 break;
4726 case 4209:
4727 mesa_VertexAttribs4fvNV(tvb, offsetp, tt, byte_order, len);
4728 break;
4729 case 4210:
4730 mesa_VertexAttribs1dvNV(tvb, offsetp, tt, byte_order, len);
4731 break;
4732 case 4211:
4733 mesa_VertexAttribs2dvNV(tvb, offsetp, tt, byte_order, len);
4734 break;
4735 case 4212:
4736 mesa_VertexAttribs3dvNV(tvb, offsetp, tt, byte_order, len);
4737 break;
4738 case 4213:
4739 mesa_VertexAttribs4dvNV(tvb, offsetp, tt, byte_order, len);
4740 break;
4741 case 4214:
4742 mesa_VertexAttribs4ubvNV(tvb, offsetp, tt, byte_order, len);
4743 break;
4744 case 4215:
4745 mesa_ProgramLocalParameter4fvARB(tvb, offsetp, tt, byte_order, len);
4746 break;
4747 case 4216:
4748 mesa_ProgramLocalParameter4dvARB(tvb, offsetp, tt, byte_order, len);
4749 break;
4750 case 4217:
4751 mesa_ProgramStringARB(tvb, offsetp, tt, byte_order, len);
4752 break;
4753 case 4218:
4754 mesa_ProgramNamedParameter4fvNV(tvb, offsetp, tt, byte_order, len);
4755 break;
4756 case 4219:
4757 mesa_ProgramNamedParameter4dvNV(tvb, offsetp, tt, byte_order, len);
4758 break;
4759 case 4220:
4760 mesa_ActiveStencilFaceEXT(tvb, offsetp, tt, byte_order, len);
4761 break;
4762 case 4221:
4763 mesa_PointParameteri(tvb, offsetp, tt, byte_order, len);
4764 break;
4765 case 4222:
4766 mesa_PointParameteriv(tvb, offsetp, tt, byte_order, len);
4767 break;
4768 case 4228:
4769 mesa_BlendEquationSeparate(tvb, offsetp, tt, byte_order, len);
4770 break;
4771 case 4229:
4772 mesa_DepthBoundsEXT(tvb, offsetp, tt, byte_order, len);
4773 break;
4774 case 4230:
4775 mesa_VertexAttrib4bv(tvb, offsetp, tt, byte_order, len);
4776 break;
4777 case 4231:
4778 mesa_VertexAttrib4iv(tvb, offsetp, tt, byte_order, len);
4779 break;
4780 case 4232:
4781 mesa_VertexAttrib4ubv(tvb, offsetp, tt, byte_order, len);
4782 break;
4783 case 4233:
4784 mesa_VertexAttrib4usv(tvb, offsetp, tt, byte_order, len);
4785 break;
4786 case 4234:
4787 mesa_VertexAttrib4uiv(tvb, offsetp, tt, byte_order, len);
4788 break;
4789 case 4235:
4790 mesa_VertexAttrib4Nbv(tvb, offsetp, tt, byte_order, len);
4791 break;
4792 case 4236:
4793 mesa_VertexAttrib4Nsv(tvb, offsetp, tt, byte_order, len);
4794 break;
4795 case 4237:
4796 mesa_VertexAttrib4Niv(tvb, offsetp, tt, byte_order, len);
4797 break;
4798 case 4238:
4799 mesa_VertexAttrib4Nusv(tvb, offsetp, tt, byte_order, len);
4800 break;
4801 case 4239:
4802 mesa_VertexAttrib4Nuiv(tvb, offsetp, tt, byte_order, len);
4803 break;
4804 case 4265:
4805 mesa_VertexAttrib1svNV(tvb, offsetp, tt, byte_order, len);
4806 break;
4807 case 4266:
4808 mesa_VertexAttrib2svNV(tvb, offsetp, tt, byte_order, len);
4809 break;
4810 case 4267:
4811 mesa_VertexAttrib3svNV(tvb, offsetp, tt, byte_order, len);
4812 break;
4813 case 4268:
4814 mesa_VertexAttrib4svNV(tvb, offsetp, tt, byte_order, len);
4815 break;
4816 case 4269:
4817 mesa_VertexAttrib1fvNV(tvb, offsetp, tt, byte_order, len);
4818 break;
4819 case 4270:
4820 mesa_VertexAttrib2fvNV(tvb, offsetp, tt, byte_order, len);
4821 break;
4822 case 4271:
4823 mesa_VertexAttrib3fvNV(tvb, offsetp, tt, byte_order, len);
4824 break;
4825 case 4272:
4826 mesa_VertexAttrib4fvNV(tvb, offsetp, tt, byte_order, len);
4827 break;
4828 case 4273:
4829 mesa_VertexAttrib1dvNV(tvb, offsetp, tt, byte_order, len);
4830 break;
4831 case 4274:
4832 mesa_VertexAttrib2dvNV(tvb, offsetp, tt, byte_order, len);
4833 break;
4834 case 4275:
4835 mesa_VertexAttrib3dvNV(tvb, offsetp, tt, byte_order, len);
4836 break;
4837 case 4276:
4838 mesa_VertexAttrib4dvNV(tvb, offsetp, tt, byte_order, len);
4839 break;
4840 case 4277:
4841 mesa_VertexAttrib4ubvNV(tvb, offsetp, tt, byte_order, len);
4842 break;
4843 case 4326:
4844 mesa_MatrixIndexubvARB(tvb, offsetp, tt, byte_order, len);
4845 break;
4846 case 4327:
4847 mesa_MatrixIndexusvARB(tvb, offsetp, tt, byte_order, len);
4848 break;
4849 case 4328:
4850 mesa_MatrixIndexuivARB(tvb, offsetp, tt, byte_order, len);
4851 break;
4852 case 4329:
4853 mesa_CurrentPaletteMatrixARB(tvb, offsetp, tt, byte_order, len);
4854 break;
4855 default:
4856 proto_tree_add_item(tt, hf_x11_undecoded, tvb, *offsetp, len, ENC_NA);
4857 *offsetp += len;
4858 }
4859 if (*offsetp < next) {
4860 proto_tree_add_item(tt, hf_x11_unused, tvb, *offsetp, next - *offsetp, ENC_NA);
4861 *offsetp = next;
4862 }
4863 length -= (len + 4);
4864 }
4865}
4866#include "x11-enum.h"
4867
4868
4869static void bigreqEnable(tvbuff_t *tvb _U_, packet_info *pinfo _U_, int *offsetp _U_, proto_tree *t _U_, unsigned byte_order _U_, int length _U_)
4870{
4871}
4872static void bigreqEnable_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
4873{
4874 int sequence_number;
4875
4876 col_append_fstr(pinfo->cinfo, COL_INFO, "-Enable");
4877
4878 REPLY(reply);
4879 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
4880 *offsetp += 1;
4881 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
4882 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
4883 "%d (bigreq-Enable)", sequence_number);
4884 *offsetp += 2;
4885 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
4886 *offsetp += 4;
4887 proto_tree_add_item(t, hf_x11_bigreq_Enable_reply_maximum_request_length, tvb, *offsetp, 4, byte_order);
4888 *offsetp += 4;
4889}
4890static const value_string bigreq_extension_minor[] = {
4891 { 0, "Enable" },
4892 { 0, NULL }
4893};
4894static const x11_event_info bigreq_events[] = {
4895 { NULL, NULL }
4896};
4897static const x11_reply_info bigreq_replies[] = {
4898 { 0, bigreqEnable_Reply },
4899 { 0, NULL }
4900};
4901
4902static void dispatch_bigreq(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
4903{
4904 int minor, length;
4905 minor = CARD8(bigreq_extension_minor);
4906 length = REQUEST_LENGTH();
4907
4908 col_append_fstr(pinfo->cinfo, COL_INFO, "-%s",
4909 val_to_str(minor, bigreq_extension_minor,
4910 "<Unknown opcode %d>"));
4911 switch (minor) {
4912 case 0:
4913 bigreqEnable(tvb, pinfo, offsetp, t, byte_order, length);
4914 break;
4915 /* No need for a default case here, since Unknown is printed above,
4916 and UNDECODED() is taken care of by dissect_x11_request */
4917 }
4918}
4919
4920static void register_bigreq(void)
4921{
4922 set_handler("BIG-REQUESTS", dispatch_bigreq, bigreq_errors, bigreq_events, NULL, bigreq_replies);
4923}
4924
4925static void struct_xproto_RECTANGLE(tvbuff_t *tvb, int *offsetp, proto_tree *root, unsigned byte_order _U_, int count)
4926{
4927 int i;
4928 for (i = 0; i < count; i++) {
4929 proto_item *item;
4930 proto_tree *t;
4931
4932 item = proto_tree_add_item(root, hf_x11_struct_xproto_RECTANGLE, tvb, *offsetp, 8, ENC_NA);
4933 t = proto_item_add_subtree(item, ett_x11_rectangle);
4934 proto_tree_add_item(t, hf_x11_struct_xproto_RECTANGLE_x, tvb, *offsetp, 2, byte_order);
4935 *offsetp += 2;
4936 proto_tree_add_item(t, hf_x11_struct_xproto_RECTANGLE_y, tvb, *offsetp, 2, byte_order);
4937 *offsetp += 2;
4938 proto_tree_add_item(t, hf_x11_struct_xproto_RECTANGLE_width, tvb, *offsetp, 2, byte_order);
4939 *offsetp += 2;
4940 proto_tree_add_item(t, hf_x11_struct_xproto_RECTANGLE_height, tvb, *offsetp, 2, byte_order);
4941 *offsetp += 2;
4942 }
4943}
4944
4945static int struct_size_xproto_STR(tvbuff_t *tvb _U_, int *offsetp _U_, unsigned byte_order _U_)
4946{
4947 int size = 0;
4948 int f_name_len;
4949 f_name_len = tvb_get_uint8(tvb, *offsetp + size + 0);
4950 size += f_name_len * 1;
4951 return size + 1;
4952}
4953
4954static void struct_xproto_STR(tvbuff_t *tvb, int *offsetp, proto_tree *root, unsigned byte_order _U_, int count)
4955{
4956 int i;
4957 for (i = 0; i < count; i++) {
4958 proto_item *item;
4959 proto_tree *t;
4960 int f_name_len;
4961
4962 item = proto_tree_add_item(root, hf_x11_struct_xproto_STR, tvb, *offsetp, struct_size_xproto_STR(tvb, offsetp, byte_order), ENC_NA);
4963 t = proto_item_add_subtree(item, ett_x11_rectangle);
4964 f_name_len = tvb_get_uint8(tvb, *offsetp);
4965 proto_tree_add_item(t, hf_x11_struct_xproto_STR_name_len, tvb, *offsetp, 1, byte_order);
4966 *offsetp += 1;
4967 listOfByte(tvb, offsetp, t, hf_x11_struct_xproto_STR_name, f_name_len, byte_order);
4968 }
4969}
4970
4971static void struct_render_DIRECTFORMAT(tvbuff_t *tvb, int *offsetp, proto_tree *root, unsigned byte_order _U_, int count)
4972{
4973 int i;
4974 for (i = 0; i < count; i++) {
4975 proto_item *item;
4976 proto_tree *t;
4977
4978 item = proto_tree_add_item(root, hf_x11_struct_render_DIRECTFORMAT, tvb, *offsetp, 16, ENC_NA);
4979 t = proto_item_add_subtree(item, ett_x11_rectangle);
4980 proto_tree_add_item(t, hf_x11_struct_render_DIRECTFORMAT_red_shift, tvb, *offsetp, 2, byte_order);
4981 *offsetp += 2;
4982 proto_tree_add_item(t, hf_x11_struct_render_DIRECTFORMAT_red_mask, tvb, *offsetp, 2, byte_order);
4983 *offsetp += 2;
4984 proto_tree_add_item(t, hf_x11_struct_render_DIRECTFORMAT_green_shift, tvb, *offsetp, 2, byte_order);
4985 *offsetp += 2;
4986 proto_tree_add_item(t, hf_x11_struct_render_DIRECTFORMAT_green_mask, tvb, *offsetp, 2, byte_order);
4987 *offsetp += 2;
4988 proto_tree_add_item(t, hf_x11_struct_render_DIRECTFORMAT_blue_shift, tvb, *offsetp, 2, byte_order);
4989 *offsetp += 2;
4990 proto_tree_add_item(t, hf_x11_struct_render_DIRECTFORMAT_blue_mask, tvb, *offsetp, 2, byte_order);
4991 *offsetp += 2;
4992 proto_tree_add_item(t, hf_x11_struct_render_DIRECTFORMAT_alpha_shift, tvb, *offsetp, 2, byte_order);
4993 *offsetp += 2;
4994 proto_tree_add_item(t, hf_x11_struct_render_DIRECTFORMAT_alpha_mask, tvb, *offsetp, 2, byte_order);
4995 *offsetp += 2;
4996 }
4997}
4998
4999static void struct_render_PICTFORMINFO(tvbuff_t *tvb, int *offsetp, proto_tree *root, unsigned byte_order _U_, int count)
5000{
5001 int i;
5002 for (i = 0; i < count; i++) {
5003 proto_item *item;
5004 proto_tree *t;
5005
5006 item = proto_tree_add_item(root, hf_x11_struct_render_PICTFORMINFO, tvb, *offsetp, 28, ENC_NA);
5007 t = proto_item_add_subtree(item, ett_x11_rectangle);
5008 proto_tree_add_item(t, hf_x11_struct_render_PICTFORMINFO_id, tvb, *offsetp, 4, byte_order);
5009 *offsetp += 4;
5010 field8(tvb, offsetp, t, hf_x11_struct_render_PICTFORMINFO_type, byte_order);
5011 proto_tree_add_item(t, hf_x11_struct_render_PICTFORMINFO_depth, tvb, *offsetp, 1, byte_order);
5012 *offsetp += 1;
5013 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 2, ENC_NA);
5014 *offsetp += 2;
5015 struct_render_DIRECTFORMAT(tvb, offsetp, t, byte_order, 1);
5016 proto_tree_add_item(t, hf_x11_struct_render_PICTFORMINFO_colormap, tvb, *offsetp, 4, byte_order);
5017 *offsetp += 4;
5018 }
5019}
5020
5021static void struct_render_PICTVISUAL(tvbuff_t *tvb, int *offsetp, proto_tree *root, unsigned byte_order _U_, int count)
5022{
5023 int i;
5024 for (i = 0; i < count; i++) {
5025 proto_item *item;
5026 proto_tree *t;
5027
5028 item = proto_tree_add_item(root, hf_x11_struct_render_PICTVISUAL, tvb, *offsetp, 8, ENC_NA);
5029 t = proto_item_add_subtree(item, ett_x11_rectangle);
5030 proto_tree_add_item(t, hf_x11_struct_render_PICTVISUAL_visual, tvb, *offsetp, 4, byte_order);
5031 *offsetp += 4;
5032 proto_tree_add_item(t, hf_x11_struct_render_PICTVISUAL_format, tvb, *offsetp, 4, byte_order);
5033 *offsetp += 4;
5034 }
5035}
5036
5037static int struct_size_render_PICTDEPTH(tvbuff_t *tvb _U_, int *offsetp _U_, unsigned byte_order _U_)
5038{
5039 int size = 0;
5040 int f_num_visuals;
5041 f_num_visuals = tvb_get_uint16(tvb, *offsetp + size + 2, byte_order);
5042 size += f_num_visuals * 8;
5043 return size + 8;
5044}
5045
5046static void struct_render_PICTDEPTH(tvbuff_t *tvb, int *offsetp, proto_tree *root, unsigned byte_order _U_, int count)
5047{
5048 int i;
5049 for (i = 0; i < count; i++) {
5050 proto_item *item;
5051 proto_tree *t;
5052 int f_num_visuals;
5053
5054 item = proto_tree_add_item(root, hf_x11_struct_render_PICTDEPTH, tvb, *offsetp, struct_size_render_PICTDEPTH(tvb, offsetp, byte_order), ENC_NA);
5055 t = proto_item_add_subtree(item, ett_x11_rectangle);
5056 proto_tree_add_item(t, hf_x11_struct_render_PICTDEPTH_depth, tvb, *offsetp, 1, byte_order);
5057 *offsetp += 1;
5058 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
5059 *offsetp += 1;
5060 f_num_visuals = tvb_get_uint16(tvb, *offsetp, byte_order);
5061 proto_tree_add_item(t, hf_x11_struct_render_PICTDEPTH_num_visuals, tvb, *offsetp, 2, byte_order);
5062 *offsetp += 2;
5063 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 4, ENC_NA);
5064 *offsetp += 4;
5065 struct_render_PICTVISUAL(tvb, offsetp, t, byte_order, f_num_visuals);
5066 }
5067}
5068
5069static int struct_size_render_PICTSCREEN(tvbuff_t *tvb _U_, int *offsetp _U_, unsigned byte_order _U_)
5070{
5071 int size = 0;
5072 int i, off;
5073 int f_num_depths;
5074 f_num_depths = tvb_get_uint32(tvb, *offsetp + size + 0, byte_order);
5075 for (i = 0; i < f_num_depths; i++) {
5076 off = (*offsetp) + size + 8;
5077 size += struct_size_render_PICTDEPTH(tvb, &off, byte_order);
5078 }
5079 return size + 8;
5080}
5081
5082static void struct_render_PICTSCREEN(tvbuff_t *tvb, int *offsetp, proto_tree *root, unsigned byte_order _U_, int count)
5083{
5084 int i;
5085 for (i = 0; i < count; i++) {
5086 proto_item *item;
5087 proto_tree *t;
5088 int f_num_depths;
5089
5090 item = proto_tree_add_item(root, hf_x11_struct_render_PICTSCREEN, tvb, *offsetp, struct_size_render_PICTSCREEN(tvb, offsetp, byte_order), ENC_NA);
5091 t = proto_item_add_subtree(item, ett_x11_rectangle);
5092 f_num_depths = tvb_get_uint32(tvb, *offsetp, byte_order);
5093 proto_tree_add_item(t, hf_x11_struct_render_PICTSCREEN_num_depths, tvb, *offsetp, 4, byte_order);
5094 *offsetp += 4;
5095 proto_tree_add_item(t, hf_x11_struct_render_PICTSCREEN_fallback, tvb, *offsetp, 4, byte_order);
5096 *offsetp += 4;
5097 struct_render_PICTDEPTH(tvb, offsetp, t, byte_order, f_num_depths);
5098 }
5099}
5100
5101static void struct_render_INDEXVALUE(tvbuff_t *tvb, int *offsetp, proto_tree *root, unsigned byte_order _U_, int count)
5102{
5103 int i;
5104 for (i = 0; i < count; i++) {
5105 proto_item *item;
5106 proto_tree *t;
5107
5108 item = proto_tree_add_item(root, hf_x11_struct_render_INDEXVALUE, tvb, *offsetp, 12, ENC_NA);
5109 t = proto_item_add_subtree(item, ett_x11_rectangle);
5110 proto_tree_add_item(t, hf_x11_struct_render_INDEXVALUE_pixel, tvb, *offsetp, 4, byte_order);
5111 *offsetp += 4;
5112 proto_tree_add_item(t, hf_x11_struct_render_INDEXVALUE_red, tvb, *offsetp, 2, byte_order);
5113 *offsetp += 2;
5114 proto_tree_add_item(t, hf_x11_struct_render_INDEXVALUE_green, tvb, *offsetp, 2, byte_order);
5115 *offsetp += 2;
5116 proto_tree_add_item(t, hf_x11_struct_render_INDEXVALUE_blue, tvb, *offsetp, 2, byte_order);
5117 *offsetp += 2;
5118 proto_tree_add_item(t, hf_x11_struct_render_INDEXVALUE_alpha, tvb, *offsetp, 2, byte_order);
5119 *offsetp += 2;
5120 }
5121}
5122
5123static void struct_render_COLOR(tvbuff_t *tvb, int *offsetp, proto_tree *root, unsigned byte_order _U_, int count)
5124{
5125 int i;
5126 for (i = 0; i < count; i++) {
5127 proto_item *item;
5128 proto_tree *t;
5129
5130 item = proto_tree_add_item(root, hf_x11_struct_render_COLOR, tvb, *offsetp, 8, ENC_NA);
5131 t = proto_item_add_subtree(item, ett_x11_rectangle);
5132 proto_tree_add_item(t, hf_x11_struct_render_COLOR_red, tvb, *offsetp, 2, byte_order);
5133 *offsetp += 2;
5134 proto_tree_add_item(t, hf_x11_struct_render_COLOR_green, tvb, *offsetp, 2, byte_order);
5135 *offsetp += 2;
5136 proto_tree_add_item(t, hf_x11_struct_render_COLOR_blue, tvb, *offsetp, 2, byte_order);
5137 *offsetp += 2;
5138 proto_tree_add_item(t, hf_x11_struct_render_COLOR_alpha, tvb, *offsetp, 2, byte_order);
5139 *offsetp += 2;
5140 }
5141}
5142
5143static void struct_render_POINTFIX(tvbuff_t *tvb, int *offsetp, proto_tree *root, unsigned byte_order _U_, int count)
5144{
5145 int i;
5146 for (i = 0; i < count; i++) {
5147 proto_item *item;
5148 proto_tree *t;
5149
5150 item = proto_tree_add_item(root, hf_x11_struct_render_POINTFIX, tvb, *offsetp, 8, ENC_NA);
5151 t = proto_item_add_subtree(item, ett_x11_rectangle);
5152 proto_tree_add_item(t, hf_x11_struct_render_POINTFIX_x, tvb, *offsetp, 4, byte_order);
5153 *offsetp += 4;
5154 proto_tree_add_item(t, hf_x11_struct_render_POINTFIX_y, tvb, *offsetp, 4, byte_order);
5155 *offsetp += 4;
5156 }
5157}
5158
5159static void struct_render_LINEFIX(tvbuff_t *tvb, int *offsetp, proto_tree *root, unsigned byte_order _U_, int count)
5160{
5161 int i;
5162 for (i = 0; i < count; i++) {
5163 proto_item *item;
5164 proto_tree *t;
5165
5166 item = proto_tree_add_item(root, hf_x11_struct_render_LINEFIX, tvb, *offsetp, 16, ENC_NA);
5167 t = proto_item_add_subtree(item, ett_x11_rectangle);
5168 struct_render_POINTFIX(tvb, offsetp, t, byte_order, 1);
5169 struct_render_POINTFIX(tvb, offsetp, t, byte_order, 1);
5170 }
5171}
5172
5173static void struct_render_TRIANGLE(tvbuff_t *tvb, int *offsetp, proto_tree *root, unsigned byte_order _U_, int count)
5174{
5175 int i;
5176 for (i = 0; i < count; i++) {
5177 proto_item *item;
5178 proto_tree *t;
5179
5180 item = proto_tree_add_item(root, hf_x11_struct_render_TRIANGLE, tvb, *offsetp, 24, ENC_NA);
5181 t = proto_item_add_subtree(item, ett_x11_rectangle);
5182 struct_render_POINTFIX(tvb, offsetp, t, byte_order, 1);
5183 struct_render_POINTFIX(tvb, offsetp, t, byte_order, 1);
5184 struct_render_POINTFIX(tvb, offsetp, t, byte_order, 1);
5185 }
5186}
5187
5188static void struct_render_TRAPEZOID(tvbuff_t *tvb, int *offsetp, proto_tree *root, unsigned byte_order _U_, int count)
5189{
5190 int i;
5191 for (i = 0; i < count; i++) {
5192 proto_item *item;
5193 proto_tree *t;
5194
5195 item = proto_tree_add_item(root, hf_x11_struct_render_TRAPEZOID, tvb, *offsetp, 40, ENC_NA);
5196 t = proto_item_add_subtree(item, ett_x11_rectangle);
5197 proto_tree_add_item(t, hf_x11_struct_render_TRAPEZOID_top, tvb, *offsetp, 4, byte_order);
5198 *offsetp += 4;
5199 proto_tree_add_item(t, hf_x11_struct_render_TRAPEZOID_bottom, tvb, *offsetp, 4, byte_order);
5200 *offsetp += 4;
5201 struct_render_LINEFIX(tvb, offsetp, t, byte_order, 1);
5202 struct_render_LINEFIX(tvb, offsetp, t, byte_order, 1);
5203 }
5204}
5205
5206static void struct_render_GLYPHINFO(tvbuff_t *tvb, int *offsetp, proto_tree *root, unsigned byte_order _U_, int count)
5207{
5208 int i;
5209 for (i = 0; i < count; i++) {
5210 proto_item *item;
5211 proto_tree *t;
5212
5213 item = proto_tree_add_item(root, hf_x11_struct_render_GLYPHINFO, tvb, *offsetp, 12, ENC_NA);
5214 t = proto_item_add_subtree(item, ett_x11_rectangle);
5215 proto_tree_add_item(t, hf_x11_struct_render_GLYPHINFO_width, tvb, *offsetp, 2, byte_order);
5216 *offsetp += 2;
5217 proto_tree_add_item(t, hf_x11_struct_render_GLYPHINFO_height, tvb, *offsetp, 2, byte_order);
5218 *offsetp += 2;
5219 proto_tree_add_item(t, hf_x11_struct_render_GLYPHINFO_x, tvb, *offsetp, 2, byte_order);
5220 *offsetp += 2;
5221 proto_tree_add_item(t, hf_x11_struct_render_GLYPHINFO_y, tvb, *offsetp, 2, byte_order);
5222 *offsetp += 2;
5223 proto_tree_add_item(t, hf_x11_struct_render_GLYPHINFO_x_off, tvb, *offsetp, 2, byte_order);
5224 *offsetp += 2;
5225 proto_tree_add_item(t, hf_x11_struct_render_GLYPHINFO_y_off, tvb, *offsetp, 2, byte_order);
5226 *offsetp += 2;
5227 }
5228}
5229
5230static void struct_render_TRANSFORM(tvbuff_t *tvb, int *offsetp, proto_tree *root, unsigned byte_order _U_, int count)
5231{
5232 int i;
5233 for (i = 0; i < count; i++) {
5234 proto_item *item;
5235 proto_tree *t;
5236
5237 item = proto_tree_add_item(root, hf_x11_struct_render_TRANSFORM, tvb, *offsetp, 36, ENC_NA);
5238 t = proto_item_add_subtree(item, ett_x11_rectangle);
5239 proto_tree_add_item(t, hf_x11_struct_render_TRANSFORM_matrix11, tvb, *offsetp, 4, byte_order);
5240 *offsetp += 4;
5241 proto_tree_add_item(t, hf_x11_struct_render_TRANSFORM_matrix12, tvb, *offsetp, 4, byte_order);
5242 *offsetp += 4;
5243 proto_tree_add_item(t, hf_x11_struct_render_TRANSFORM_matrix13, tvb, *offsetp, 4, byte_order);
5244 *offsetp += 4;
5245 proto_tree_add_item(t, hf_x11_struct_render_TRANSFORM_matrix21, tvb, *offsetp, 4, byte_order);
5246 *offsetp += 4;
5247 proto_tree_add_item(t, hf_x11_struct_render_TRANSFORM_matrix22, tvb, *offsetp, 4, byte_order);
5248 *offsetp += 4;
5249 proto_tree_add_item(t, hf_x11_struct_render_TRANSFORM_matrix23, tvb, *offsetp, 4, byte_order);
5250 *offsetp += 4;
5251 proto_tree_add_item(t, hf_x11_struct_render_TRANSFORM_matrix31, tvb, *offsetp, 4, byte_order);
5252 *offsetp += 4;
5253 proto_tree_add_item(t, hf_x11_struct_render_TRANSFORM_matrix32, tvb, *offsetp, 4, byte_order);
5254 *offsetp += 4;
5255 proto_tree_add_item(t, hf_x11_struct_render_TRANSFORM_matrix33, tvb, *offsetp, 4, byte_order);
5256 *offsetp += 4;
5257 }
5258}
5259
5260static void struct_render_ANIMCURSORELT(tvbuff_t *tvb, int *offsetp, proto_tree *root, unsigned byte_order _U_, int count)
5261{
5262 int i;
5263 for (i = 0; i < count; i++) {
5264 proto_item *item;
5265 proto_tree *t;
5266
5267 item = proto_tree_add_item(root, hf_x11_struct_render_ANIMCURSORELT, tvb, *offsetp, 8, ENC_NA);
5268 t = proto_item_add_subtree(item, ett_x11_rectangle);
5269 proto_tree_add_item(t, hf_x11_struct_render_ANIMCURSORELT_cursor, tvb, *offsetp, 4, byte_order);
5270 *offsetp += 4;
5271 proto_tree_add_item(t, hf_x11_struct_render_ANIMCURSORELT_delay, tvb, *offsetp, 4, byte_order);
5272 *offsetp += 4;
5273 }
5274}
5275
5276static void struct_render_SPANFIX(tvbuff_t *tvb, int *offsetp, proto_tree *root, unsigned byte_order _U_, int count)
5277{
5278 int i;
5279 for (i = 0; i < count; i++) {
5280 proto_item *item;
5281 proto_tree *t;
5282
5283 item = proto_tree_add_item(root, hf_x11_struct_render_SPANFIX, tvb, *offsetp, 12, ENC_NA);
5284 t = proto_item_add_subtree(item, ett_x11_rectangle);
5285 proto_tree_add_item(t, hf_x11_struct_render_SPANFIX_l, tvb, *offsetp, 4, byte_order);
5286 *offsetp += 4;
5287 proto_tree_add_item(t, hf_x11_struct_render_SPANFIX_r, tvb, *offsetp, 4, byte_order);
5288 *offsetp += 4;
5289 proto_tree_add_item(t, hf_x11_struct_render_SPANFIX_y, tvb, *offsetp, 4, byte_order);
5290 *offsetp += 4;
5291 }
5292}
5293
5294static void struct_render_TRAP(tvbuff_t *tvb, int *offsetp, proto_tree *root, unsigned byte_order _U_, int count)
5295{
5296 int i;
5297 for (i = 0; i < count; i++) {
5298 proto_item *item;
5299 proto_tree *t;
5300
5301 item = proto_tree_add_item(root, hf_x11_struct_render_TRAP, tvb, *offsetp, 24, ENC_NA);
5302 t = proto_item_add_subtree(item, ett_x11_rectangle);
5303 struct_render_SPANFIX(tvb, offsetp, t, byte_order, 1);
5304 struct_render_SPANFIX(tvb, offsetp, t, byte_order, 1);
5305 }
5306}
5307
5308static void compositeQueryVersion(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
5309{
5310 proto_tree_add_item(t, hf_x11_composite_QueryVersion_client_major_version, tvb, *offsetp, 4, byte_order);
5311 *offsetp += 4;
5312 proto_tree_add_item(t, hf_x11_composite_QueryVersion_client_minor_version, tvb, *offsetp, 4, byte_order);
5313 *offsetp += 4;
5314}
5315static void compositeQueryVersion_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
5316{
5317 int sequence_number;
5318
5319 col_append_fstr(pinfo->cinfo, COL_INFO, "-QueryVersion");
5320
5321 REPLY(reply);
5322 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
5323 *offsetp += 1;
5324 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
5325 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
5326 "%d (composite-QueryVersion)", sequence_number);
5327 *offsetp += 2;
5328 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
5329 *offsetp += 4;
5330 proto_tree_add_item(t, hf_x11_composite_QueryVersion_reply_major_version, tvb, *offsetp, 4, byte_order);
5331 *offsetp += 4;
5332 proto_tree_add_item(t, hf_x11_composite_QueryVersion_reply_minor_version, tvb, *offsetp, 4, byte_order);
5333 *offsetp += 4;
5334 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 16, ENC_NA);
5335 *offsetp += 16;
5336}
5337
5338static void compositeRedirectWindow(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
5339{
5340 proto_tree_add_item(t, hf_x11_composite_RedirectWindow_window, tvb, *offsetp, 4, byte_order);
5341 *offsetp += 4;
5342 field8(tvb, offsetp, t, hf_x11_composite_RedirectWindow_update, byte_order);
5343 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 3, ENC_NA);
5344 *offsetp += 3;
5345}
5346
5347static void compositeRedirectSubwindows(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
5348{
5349 proto_tree_add_item(t, hf_x11_composite_RedirectSubwindows_window, tvb, *offsetp, 4, byte_order);
5350 *offsetp += 4;
5351 field8(tvb, offsetp, t, hf_x11_composite_RedirectSubwindows_update, byte_order);
5352 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 3, ENC_NA);
5353 *offsetp += 3;
5354}
5355
5356static void compositeUnredirectWindow(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
5357{
5358 proto_tree_add_item(t, hf_x11_composite_UnredirectWindow_window, tvb, *offsetp, 4, byte_order);
5359 *offsetp += 4;
5360 field8(tvb, offsetp, t, hf_x11_composite_UnredirectWindow_update, byte_order);
5361 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 3, ENC_NA);
5362 *offsetp += 3;
5363}
5364
5365static void compositeUnredirectSubwindows(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
5366{
5367 proto_tree_add_item(t, hf_x11_composite_UnredirectSubwindows_window, tvb, *offsetp, 4, byte_order);
5368 *offsetp += 4;
5369 field8(tvb, offsetp, t, hf_x11_composite_UnredirectSubwindows_update, byte_order);
5370 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 3, ENC_NA);
5371 *offsetp += 3;
5372}
5373
5374static void compositeCreateRegionFromBorderClip(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
5375{
5376 proto_tree_add_item(t, hf_x11_composite_CreateRegionFromBorderClip_region, tvb, *offsetp, 4, byte_order);
5377 *offsetp += 4;
5378 proto_tree_add_item(t, hf_x11_composite_CreateRegionFromBorderClip_window, tvb, *offsetp, 4, byte_order);
5379 *offsetp += 4;
5380}
5381
5382static void compositeNameWindowPixmap(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
5383{
5384 proto_tree_add_item(t, hf_x11_composite_NameWindowPixmap_window, tvb, *offsetp, 4, byte_order);
5385 *offsetp += 4;
5386 proto_tree_add_item(t, hf_x11_composite_NameWindowPixmap_pixmap, tvb, *offsetp, 4, byte_order);
5387 *offsetp += 4;
5388}
5389
5390static void compositeGetOverlayWindow(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
5391{
5392 proto_tree_add_item(t, hf_x11_composite_GetOverlayWindow_window, tvb, *offsetp, 4, byte_order);
5393 *offsetp += 4;
5394}
5395static void compositeGetOverlayWindow_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
5396{
5397 int sequence_number;
5398
5399 col_append_fstr(pinfo->cinfo, COL_INFO, "-GetOverlayWindow");
5400
5401 REPLY(reply);
5402 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
5403 *offsetp += 1;
5404 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
5405 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
5406 "%d (composite-GetOverlayWindow)", sequence_number);
5407 *offsetp += 2;
5408 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
5409 *offsetp += 4;
5410 proto_tree_add_item(t, hf_x11_composite_GetOverlayWindow_reply_overlay_win, tvb, *offsetp, 4, byte_order);
5411 *offsetp += 4;
5412 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 20, ENC_NA);
5413 *offsetp += 20;
5414}
5415
5416static void compositeReleaseOverlayWindow(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
5417{
5418 proto_tree_add_item(t, hf_x11_composite_ReleaseOverlayWindow_window, tvb, *offsetp, 4, byte_order);
5419 *offsetp += 4;
5420}
5421static const value_string composite_extension_minor[] = {
5422 { 0, "QueryVersion" },
5423 { 1, "RedirectWindow" },
5424 { 2, "RedirectSubwindows" },
5425 { 3, "UnredirectWindow" },
5426 { 4, "UnredirectSubwindows" },
5427 { 5, "CreateRegionFromBorderClip" },
5428 { 6, "NameWindowPixmap" },
5429 { 7, "GetOverlayWindow" },
5430 { 8, "ReleaseOverlayWindow" },
5431 { 0, NULL }
5432};
5433static const x11_event_info composite_events[] = {
5434 { NULL, NULL }
5435};
5436static const x11_reply_info composite_replies[] = {
5437 { 0, compositeQueryVersion_Reply },
5438 { 7, compositeGetOverlayWindow_Reply },
5439 { 0, NULL }
5440};
5441
5442static void dispatch_composite(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
5443{
5444 int minor, length;
5445 minor = CARD8(composite_extension_minor);
5446 length = REQUEST_LENGTH();
5447
5448 col_append_fstr(pinfo->cinfo, COL_INFO, "-%s",
5449 val_to_str(minor, composite_extension_minor,
5450 "<Unknown opcode %d>"));
5451 switch (minor) {
5452 case 0:
5453 compositeQueryVersion(tvb, pinfo, offsetp, t, byte_order, length);
5454 break;
5455 case 1:
5456 compositeRedirectWindow(tvb, pinfo, offsetp, t, byte_order, length);
5457 break;
5458 case 2:
5459 compositeRedirectSubwindows(tvb, pinfo, offsetp, t, byte_order, length);
5460 break;
5461 case 3:
5462 compositeUnredirectWindow(tvb, pinfo, offsetp, t, byte_order, length);
5463 break;
5464 case 4:
5465 compositeUnredirectSubwindows(tvb, pinfo, offsetp, t, byte_order, length);
5466 break;
5467 case 5:
5468 compositeCreateRegionFromBorderClip(tvb, pinfo, offsetp, t, byte_order, length);
5469 break;
5470 case 6:
5471 compositeNameWindowPixmap(tvb, pinfo, offsetp, t, byte_order, length);
5472 break;
5473 case 7:
5474 compositeGetOverlayWindow(tvb, pinfo, offsetp, t, byte_order, length);
5475 break;
5476 case 8:
5477 compositeReleaseOverlayWindow(tvb, pinfo, offsetp, t, byte_order, length);
5478 break;
5479 /* No need for a default case here, since Unknown is printed above,
5480 and UNDECODED() is taken care of by dissect_x11_request */
5481 }
5482}
5483
5484static void register_composite(void)
5485{
5486 set_handler("Composite", dispatch_composite, composite_errors, composite_events, NULL, composite_replies);
5487}
5488
5489static void damageQueryVersion(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
5490{
5491 proto_tree_add_item(t, hf_x11_damage_QueryVersion_client_major_version, tvb, *offsetp, 4, byte_order);
5492 *offsetp += 4;
5493 proto_tree_add_item(t, hf_x11_damage_QueryVersion_client_minor_version, tvb, *offsetp, 4, byte_order);
5494 *offsetp += 4;
5495}
5496static void damageQueryVersion_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
5497{
5498 int sequence_number;
5499
5500 col_append_fstr(pinfo->cinfo, COL_INFO, "-QueryVersion");
5501
5502 REPLY(reply);
5503 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
5504 *offsetp += 1;
5505 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
5506 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
5507 "%d (damage-QueryVersion)", sequence_number);
5508 *offsetp += 2;
5509 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
5510 *offsetp += 4;
5511 proto_tree_add_item(t, hf_x11_damage_QueryVersion_reply_major_version, tvb, *offsetp, 4, byte_order);
5512 *offsetp += 4;
5513 proto_tree_add_item(t, hf_x11_damage_QueryVersion_reply_minor_version, tvb, *offsetp, 4, byte_order);
5514 *offsetp += 4;
5515 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 16, ENC_NA);
5516 *offsetp += 16;
5517}
5518
5519static void damageCreate(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
5520{
5521 proto_tree_add_item(t, hf_x11_damage_Create_damage, tvb, *offsetp, 4, byte_order);
5522 *offsetp += 4;
5523 proto_tree_add_item(t, hf_x11_damage_Create_drawable, tvb, *offsetp, 4, byte_order);
5524 *offsetp += 4;
5525 field8(tvb, offsetp, t, hf_x11_damage_Create_level, byte_order);
5526 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 3, ENC_NA);
5527 *offsetp += 3;
5528}
5529
5530static void damageDestroy(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
5531{
5532 proto_tree_add_item(t, hf_x11_damage_Destroy_damage, tvb, *offsetp, 4, byte_order);
5533 *offsetp += 4;
5534}
5535
5536static void damageSubtract(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
5537{
5538 proto_tree_add_item(t, hf_x11_damage_Subtract_damage, tvb, *offsetp, 4, byte_order);
5539 *offsetp += 4;
5540 field32(tvb, offsetp, t, hf_x11_damage_Subtract_repair, byte_order);
5541 field32(tvb, offsetp, t, hf_x11_damage_Subtract_parts, byte_order);
5542}
5543
5544static void damageAdd(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
5545{
5546 proto_tree_add_item(t, hf_x11_damage_Add_drawable, tvb, *offsetp, 4, byte_order);
5547 *offsetp += 4;
5548 proto_tree_add_item(t, hf_x11_damage_Add_region, tvb, *offsetp, 4, byte_order);
5549 *offsetp += 4;
5550}
5551static const value_string damage_extension_minor[] = {
5552 { 0, "QueryVersion" },
5553 { 1, "Create" },
5554 { 2, "Destroy" },
5555 { 3, "Subtract" },
5556 { 4, "Add" },
5557 { 0, NULL }
5558};
5559static const x11_event_info damage_events[] = {
5560 { NULL, NULL }
5561};
5562static const x11_reply_info damage_replies[] = {
5563 { 0, damageQueryVersion_Reply },
5564 { 0, NULL }
5565};
5566
5567static void dispatch_damage(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
5568{
5569 int minor, length;
5570 minor = CARD8(damage_extension_minor);
5571 length = REQUEST_LENGTH();
5572
5573 col_append_fstr(pinfo->cinfo, COL_INFO, "-%s",
5574 val_to_str(minor, damage_extension_minor,
5575 "<Unknown opcode %d>"));
5576 switch (minor) {
5577 case 0:
5578 damageQueryVersion(tvb, pinfo, offsetp, t, byte_order, length);
5579 break;
5580 case 1:
5581 damageCreate(tvb, pinfo, offsetp, t, byte_order, length);
5582 break;
5583 case 2:
5584 damageDestroy(tvb, pinfo, offsetp, t, byte_order, length);
5585 break;
5586 case 3:
5587 damageSubtract(tvb, pinfo, offsetp, t, byte_order, length);
5588 break;
5589 case 4:
5590 damageAdd(tvb, pinfo, offsetp, t, byte_order, length);
5591 break;
5592 /* No need for a default case here, since Unknown is printed above,
5593 and UNDECODED() is taken care of by dissect_x11_request */
5594 }
5595}
5596
5597static void register_damage(void)
5598{
5599 set_handler("DAMAGE", dispatch_damage, damage_errors, damage_events, NULL, damage_replies);
5600}
5601
5602static void struct_dbe_SwapInfo(tvbuff_t *tvb, int *offsetp, proto_tree *root, unsigned byte_order _U_, int count)
5603{
5604 int i;
5605 for (i = 0; i < count; i++) {
5606 proto_item *item;
5607 proto_tree *t;
5608
5609 item = proto_tree_add_item(root, hf_x11_struct_dbe_SwapInfo, tvb, *offsetp, 8, ENC_NA);
5610 t = proto_item_add_subtree(item, ett_x11_rectangle);
5611 proto_tree_add_item(t, hf_x11_struct_dbe_SwapInfo_window, tvb, *offsetp, 4, byte_order);
5612 *offsetp += 4;
5613 field8(tvb, offsetp, t, hf_x11_struct_dbe_SwapInfo_swap_action, byte_order);
5614 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 3, ENC_NA);
5615 *offsetp += 3;
5616 }
5617}
5618
5619static void struct_dbe_BufferAttributes(tvbuff_t *tvb, int *offsetp, proto_tree *root, unsigned byte_order _U_, int count)
5620{
5621 int i;
5622 for (i = 0; i < count; i++) {
5623 proto_item *item;
5624 proto_tree *t;
5625
5626 item = proto_tree_add_item(root, hf_x11_struct_dbe_BufferAttributes, tvb, *offsetp, 4, ENC_NA);
5627 t = proto_item_add_subtree(item, ett_x11_rectangle);
5628 proto_tree_add_item(t, hf_x11_struct_dbe_BufferAttributes_window, tvb, *offsetp, 4, byte_order);
5629 *offsetp += 4;
5630 }
5631}
5632
5633static void struct_dbe_VisualInfo(tvbuff_t *tvb, int *offsetp, proto_tree *root, unsigned byte_order _U_, int count)
5634{
5635 int i;
5636 for (i = 0; i < count; i++) {
5637 proto_item *item;
5638 proto_tree *t;
5639
5640 item = proto_tree_add_item(root, hf_x11_struct_dbe_VisualInfo, tvb, *offsetp, 8, ENC_NA);
5641 t = proto_item_add_subtree(item, ett_x11_rectangle);
5642 proto_tree_add_item(t, hf_x11_struct_dbe_VisualInfo_visual_id, tvb, *offsetp, 4, byte_order);
5643 *offsetp += 4;
5644 proto_tree_add_item(t, hf_x11_struct_dbe_VisualInfo_depth, tvb, *offsetp, 1, byte_order);
5645 *offsetp += 1;
5646 proto_tree_add_item(t, hf_x11_struct_dbe_VisualInfo_perf_level, tvb, *offsetp, 1, byte_order);
5647 *offsetp += 1;
5648 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 2, ENC_NA);
5649 *offsetp += 2;
5650 }
5651}
5652
5653static int struct_size_dbe_VisualInfos(tvbuff_t *tvb _U_, int *offsetp _U_, unsigned byte_order _U_)
5654{
5655 int size = 0;
5656 int f_n_infos;
5657 f_n_infos = tvb_get_uint32(tvb, *offsetp + size + 0, byte_order);
5658 size += f_n_infos * 8;
5659 return size + 4;
5660}
5661
5662static void struct_dbe_VisualInfos(tvbuff_t *tvb, int *offsetp, proto_tree *root, unsigned byte_order _U_, int count)
5663{
5664 int i;
5665 for (i = 0; i < count; i++) {
5666 proto_item *item;
5667 proto_tree *t;
5668 int f_n_infos;
5669
5670 item = proto_tree_add_item(root, hf_x11_struct_dbe_VisualInfos, tvb, *offsetp, struct_size_dbe_VisualInfos(tvb, offsetp, byte_order), ENC_NA);
5671 t = proto_item_add_subtree(item, ett_x11_rectangle);
5672 f_n_infos = tvb_get_uint32(tvb, *offsetp, byte_order);
5673 proto_tree_add_item(t, hf_x11_struct_dbe_VisualInfos_n_infos, tvb, *offsetp, 4, byte_order);
5674 *offsetp += 4;
5675 struct_dbe_VisualInfo(tvb, offsetp, t, byte_order, f_n_infos);
5676 }
5677}
5678
5679static void dbeQueryVersion(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
5680{
5681 proto_tree_add_item(t, hf_x11_dbe_QueryVersion_major_version, tvb, *offsetp, 1, byte_order);
5682 *offsetp += 1;
5683 proto_tree_add_item(t, hf_x11_dbe_QueryVersion_minor_version, tvb, *offsetp, 1, byte_order);
5684 *offsetp += 1;
5685 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 2, ENC_NA);
5686 *offsetp += 2;
5687}
5688static void dbeQueryVersion_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
5689{
5690 int sequence_number;
5691
5692 col_append_fstr(pinfo->cinfo, COL_INFO, "-QueryVersion");
5693
5694 REPLY(reply);
5695 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
5696 *offsetp += 1;
5697 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
5698 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
5699 "%d (dbe-QueryVersion)", sequence_number);
5700 *offsetp += 2;
5701 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
5702 *offsetp += 4;
5703 proto_tree_add_item(t, hf_x11_dbe_QueryVersion_reply_major_version, tvb, *offsetp, 1, byte_order);
5704 *offsetp += 1;
5705 proto_tree_add_item(t, hf_x11_dbe_QueryVersion_reply_minor_version, tvb, *offsetp, 1, byte_order);
5706 *offsetp += 1;
5707 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 22, ENC_NA);
5708 *offsetp += 22;
5709}
5710
5711static void dbeAllocateBackBuffer(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
5712{
5713 proto_tree_add_item(t, hf_x11_dbe_AllocateBackBuffer_window, tvb, *offsetp, 4, byte_order);
5714 *offsetp += 4;
5715 proto_tree_add_item(t, hf_x11_dbe_AllocateBackBuffer_buffer, tvb, *offsetp, 4, byte_order);
5716 *offsetp += 4;
5717 proto_tree_add_item(t, hf_x11_dbe_AllocateBackBuffer_swap_action, tvb, *offsetp, 1, byte_order);
5718 *offsetp += 1;
5719 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 3, ENC_NA);
5720 *offsetp += 3;
5721}
5722
5723static void dbeDeallocateBackBuffer(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
5724{
5725 proto_tree_add_item(t, hf_x11_dbe_DeallocateBackBuffer_buffer, tvb, *offsetp, 4, byte_order);
5726 *offsetp += 4;
5727}
5728
5729static void dbeSwapBuffers(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
5730{
5731 int f_n_actions;
5732 f_n_actions = tvb_get_uint32(tvb, *offsetp, byte_order);
5733 proto_tree_add_item(t, hf_x11_dbe_SwapBuffers_n_actions, tvb, *offsetp, 4, byte_order);
5734 *offsetp += 4;
5735 struct_dbe_SwapInfo(tvb, offsetp, t, byte_order, f_n_actions);
5736 length -= f_n_actions * 8;
5737}
5738
5739static void dbeBeginIdiom(tvbuff_t *tvb _U_, packet_info *pinfo _U_, int *offsetp _U_, proto_tree *t _U_, unsigned byte_order _U_, int length _U_)
5740{
5741}
5742
5743static void dbeEndIdiom(tvbuff_t *tvb _U_, packet_info *pinfo _U_, int *offsetp _U_, proto_tree *t _U_, unsigned byte_order _U_, int length _U_)
5744{
5745}
5746
5747static void dbeGetVisualInfo(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
5748{
5749 int f_n_drawables;
5750 f_n_drawables = tvb_get_uint32(tvb, *offsetp, byte_order);
5751 proto_tree_add_item(t, hf_x11_dbe_GetVisualInfo_n_drawables, tvb, *offsetp, 4, byte_order);
5752 *offsetp += 4;
5753 listOfCard32(tvb, offsetp, t, hf_x11_dbe_GetVisualInfo_drawables, hf_x11_dbe_GetVisualInfo_drawables_item, f_n_drawables, byte_order);
5754 length -= f_n_drawables * 4;
5755}
5756static void dbeGetVisualInfo_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
5757{
5758 int sequence_number;
5759 int f_n_supported_visuals;
5760
5761 col_append_fstr(pinfo->cinfo, COL_INFO, "-GetVisualInfo");
5762
5763 REPLY(reply);
5764 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
5765 *offsetp += 1;
5766 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
5767 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
5768 "%d (dbe-GetVisualInfo)", sequence_number);
5769 *offsetp += 2;
5770 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
5771 *offsetp += 4;
5772 f_n_supported_visuals = tvb_get_uint32(tvb, *offsetp, byte_order);
5773 proto_tree_add_item(t, hf_x11_dbe_GetVisualInfo_reply_n_supported_visuals, tvb, *offsetp, 4, byte_order);
5774 *offsetp += 4;
5775 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 20, ENC_NA);
5776 *offsetp += 20;
5777 struct_dbe_VisualInfos(tvb, offsetp, t, byte_order, f_n_supported_visuals);
5778}
5779
5780static void dbeGetBackBufferAttributes(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
5781{
5782 proto_tree_add_item(t, hf_x11_dbe_GetBackBufferAttributes_buffer, tvb, *offsetp, 4, byte_order);
5783 *offsetp += 4;
5784}
5785static void dbeGetBackBufferAttributes_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
5786{
5787 int sequence_number;
5788
5789 col_append_fstr(pinfo->cinfo, COL_INFO, "-GetBackBufferAttributes");
5790
5791 REPLY(reply);
5792 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
5793 *offsetp += 1;
5794 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
5795 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
5796 "%d (dbe-GetBackBufferAttributes)", sequence_number);
5797 *offsetp += 2;
5798 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
5799 *offsetp += 4;
5800 struct_dbe_BufferAttributes(tvb, offsetp, t, byte_order, 1);
5801 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 20, ENC_NA);
5802 *offsetp += 20;
5803}
5804static const value_string dbe_extension_minor[] = {
5805 { 0, "QueryVersion" },
5806 { 1, "AllocateBackBuffer" },
5807 { 2, "DeallocateBackBuffer" },
5808 { 3, "SwapBuffers" },
5809 { 4, "BeginIdiom" },
5810 { 5, "EndIdiom" },
5811 { 6, "GetVisualInfo" },
5812 { 7, "GetBackBufferAttributes" },
5813 { 0, NULL }
5814};
5815static const x11_event_info dbe_events[] = {
5816 { NULL, NULL }
5817};
5818static const x11_reply_info dbe_replies[] = {
5819 { 0, dbeQueryVersion_Reply },
5820 { 6, dbeGetVisualInfo_Reply },
5821 { 7, dbeGetBackBufferAttributes_Reply },
5822 { 0, NULL }
5823};
5824
5825static void dispatch_dbe(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
5826{
5827 int minor, length;
5828 minor = CARD8(dbe_extension_minor);
5829 length = REQUEST_LENGTH();
5830
5831 col_append_fstr(pinfo->cinfo, COL_INFO, "-%s",
5832 val_to_str(minor, dbe_extension_minor,
5833 "<Unknown opcode %d>"));
5834 switch (minor) {
5835 case 0:
5836 dbeQueryVersion(tvb, pinfo, offsetp, t, byte_order, length);
5837 break;
5838 case 1:
5839 dbeAllocateBackBuffer(tvb, pinfo, offsetp, t, byte_order, length);
5840 break;
5841 case 2:
5842 dbeDeallocateBackBuffer(tvb, pinfo, offsetp, t, byte_order, length);
5843 break;
5844 case 3:
5845 dbeSwapBuffers(tvb, pinfo, offsetp, t, byte_order, length);
5846 break;
5847 case 4:
5848 dbeBeginIdiom(tvb, pinfo, offsetp, t, byte_order, length);
5849 break;
5850 case 5:
5851 dbeEndIdiom(tvb, pinfo, offsetp, t, byte_order, length);
5852 break;
5853 case 6:
5854 dbeGetVisualInfo(tvb, pinfo, offsetp, t, byte_order, length);
5855 break;
5856 case 7:
5857 dbeGetBackBufferAttributes(tvb, pinfo, offsetp, t, byte_order, length);
5858 break;
5859 /* No need for a default case here, since Unknown is printed above,
5860 and UNDECODED() is taken care of by dissect_x11_request */
5861 }
5862}
5863
5864static void register_dbe(void)
5865{
5866 set_handler("DOUBLE-BUFFER", dispatch_dbe, dbe_errors, dbe_events, NULL, dbe_replies);
5867}
5868
5869static void dpmsGetVersion(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
5870{
5871 proto_tree_add_item(t, hf_x11_dpms_GetVersion_client_major_version, tvb, *offsetp, 2, byte_order);
5872 *offsetp += 2;
5873 proto_tree_add_item(t, hf_x11_dpms_GetVersion_client_minor_version, tvb, *offsetp, 2, byte_order);
5874 *offsetp += 2;
5875}
5876static void dpmsGetVersion_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
5877{
5878 int sequence_number;
5879
5880 col_append_fstr(pinfo->cinfo, COL_INFO, "-GetVersion");
5881
5882 REPLY(reply);
5883 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
5884 *offsetp += 1;
5885 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
5886 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
5887 "%d (dpms-GetVersion)", sequence_number);
5888 *offsetp += 2;
5889 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
5890 *offsetp += 4;
5891 proto_tree_add_item(t, hf_x11_dpms_GetVersion_reply_server_major_version, tvb, *offsetp, 2, byte_order);
5892 *offsetp += 2;
5893 proto_tree_add_item(t, hf_x11_dpms_GetVersion_reply_server_minor_version, tvb, *offsetp, 2, byte_order);
5894 *offsetp += 2;
5895}
5896
5897static void dpmsCapable(tvbuff_t *tvb _U_, packet_info *pinfo _U_, int *offsetp _U_, proto_tree *t _U_, unsigned byte_order _U_, int length _U_)
5898{
5899}
5900static void dpmsCapable_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
5901{
5902 int sequence_number;
5903
5904 col_append_fstr(pinfo->cinfo, COL_INFO, "-Capable");
5905
5906 REPLY(reply);
5907 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
5908 *offsetp += 1;
5909 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
5910 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
5911 "%d (dpms-Capable)", sequence_number);
5912 *offsetp += 2;
5913 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
5914 *offsetp += 4;
5915 proto_tree_add_item(t, hf_x11_dpms_Capable_reply_capable, tvb, *offsetp, 1, byte_order);
5916 *offsetp += 1;
5917 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 23, ENC_NA);
5918 *offsetp += 23;
5919}
5920
5921static void dpmsGetTimeouts(tvbuff_t *tvb _U_, packet_info *pinfo _U_, int *offsetp _U_, proto_tree *t _U_, unsigned byte_order _U_, int length _U_)
5922{
5923}
5924static void dpmsGetTimeouts_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
5925{
5926 int sequence_number;
5927
5928 col_append_fstr(pinfo->cinfo, COL_INFO, "-GetTimeouts");
5929
5930 REPLY(reply);
5931 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
5932 *offsetp += 1;
5933 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
5934 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
5935 "%d (dpms-GetTimeouts)", sequence_number);
5936 *offsetp += 2;
5937 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
5938 *offsetp += 4;
5939 proto_tree_add_item(t, hf_x11_dpms_GetTimeouts_reply_standby_timeout, tvb, *offsetp, 2, byte_order);
5940 *offsetp += 2;
5941 proto_tree_add_item(t, hf_x11_dpms_GetTimeouts_reply_suspend_timeout, tvb, *offsetp, 2, byte_order);
5942 *offsetp += 2;
5943 proto_tree_add_item(t, hf_x11_dpms_GetTimeouts_reply_off_timeout, tvb, *offsetp, 2, byte_order);
5944 *offsetp += 2;
5945 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 18, ENC_NA);
5946 *offsetp += 18;
5947}
5948
5949static void dpmsSetTimeouts(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
5950{
5951 proto_tree_add_item(t, hf_x11_dpms_SetTimeouts_standby_timeout, tvb, *offsetp, 2, byte_order);
5952 *offsetp += 2;
5953 proto_tree_add_item(t, hf_x11_dpms_SetTimeouts_suspend_timeout, tvb, *offsetp, 2, byte_order);
5954 *offsetp += 2;
5955 proto_tree_add_item(t, hf_x11_dpms_SetTimeouts_off_timeout, tvb, *offsetp, 2, byte_order);
5956 *offsetp += 2;
5957}
5958
5959static void dpmsEnable(tvbuff_t *tvb _U_, packet_info *pinfo _U_, int *offsetp _U_, proto_tree *t _U_, unsigned byte_order _U_, int length _U_)
5960{
5961}
5962
5963static void dpmsDisable(tvbuff_t *tvb _U_, packet_info *pinfo _U_, int *offsetp _U_, proto_tree *t _U_, unsigned byte_order _U_, int length _U_)
5964{
5965}
5966
5967static void dpmsForceLevel(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
5968{
5969 field16(tvb, offsetp, t, hf_x11_dpms_ForceLevel_power_level, byte_order);
5970}
5971
5972static void dpmsInfo(tvbuff_t *tvb _U_, packet_info *pinfo _U_, int *offsetp _U_, proto_tree *t _U_, unsigned byte_order _U_, int length _U_)
5973{
5974}
5975static void dpmsInfo_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
5976{
5977 int sequence_number;
5978
5979 col_append_fstr(pinfo->cinfo, COL_INFO, "-Info");
5980
5981 REPLY(reply);
5982 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
5983 *offsetp += 1;
5984 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
5985 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
5986 "%d (dpms-Info)", sequence_number);
5987 *offsetp += 2;
5988 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
5989 *offsetp += 4;
5990 field16(tvb, offsetp, t, hf_x11_dpms_Info_reply_power_level, byte_order);
5991 proto_tree_add_item(t, hf_x11_dpms_Info_reply_state, tvb, *offsetp, 1, byte_order);
5992 *offsetp += 1;
5993 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 21, ENC_NA);
5994 *offsetp += 21;
5995}
5996
5997static void dpmsSelectInput(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
5998{
5999 {
6000 static int* const event_mask_bits [] = {
6001 &hf_x11_dpms_SelectInput_event_mask_mask_InfoNotify,
6002 NULL
6003 };
6004 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_dpms_SelectInput_event_mask, ett_x11_rectangle, event_mask_bits, byte_order);
6005 }
6006 *offsetp += 4;
6007}
6008static const value_string dpms_extension_minor[] = {
6009 { 0, "GetVersion" },
6010 { 1, "Capable" },
6011 { 2, "GetTimeouts" },
6012 { 3, "SetTimeouts" },
6013 { 4, "Enable" },
6014 { 5, "Disable" },
6015 { 6, "ForceLevel" },
6016 { 7, "Info" },
6017 { 8, "SelectInput" },
6018 { 0, NULL }
6019};
6020static const x11_event_info dpms_events[] = {
6021 { NULL, NULL }
6022};
6023static const x11_reply_info dpms_replies[] = {
6024 { 0, dpmsGetVersion_Reply },
6025 { 1, dpmsCapable_Reply },
6026 { 2, dpmsGetTimeouts_Reply },
6027 { 7, dpmsInfo_Reply },
6028 { 0, NULL }
6029};
6030
6031static void dispatch_dpms(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
6032{
6033 int minor, length;
6034 minor = CARD8(dpms_extension_minor);
6035 length = REQUEST_LENGTH();
6036
6037 col_append_fstr(pinfo->cinfo, COL_INFO, "-%s",
6038 val_to_str(minor, dpms_extension_minor,
6039 "<Unknown opcode %d>"));
6040 switch (minor) {
6041 case 0:
6042 dpmsGetVersion(tvb, pinfo, offsetp, t, byte_order, length);
6043 break;
6044 case 1:
6045 dpmsCapable(tvb, pinfo, offsetp, t, byte_order, length);
6046 break;
6047 case 2:
6048 dpmsGetTimeouts(tvb, pinfo, offsetp, t, byte_order, length);
6049 break;
6050 case 3:
6051 dpmsSetTimeouts(tvb, pinfo, offsetp, t, byte_order, length);
6052 break;
6053 case 4:
6054 dpmsEnable(tvb, pinfo, offsetp, t, byte_order, length);
6055 break;
6056 case 5:
6057 dpmsDisable(tvb, pinfo, offsetp, t, byte_order, length);
6058 break;
6059 case 6:
6060 dpmsForceLevel(tvb, pinfo, offsetp, t, byte_order, length);
6061 break;
6062 case 7:
6063 dpmsInfo(tvb, pinfo, offsetp, t, byte_order, length);
6064 break;
6065 case 8:
6066 dpmsSelectInput(tvb, pinfo, offsetp, t, byte_order, length);
6067 break;
6068 /* No need for a default case here, since Unknown is printed above,
6069 and UNDECODED() is taken care of by dissect_x11_request */
6070 }
6071}
6072
6073static void register_dpms(void)
6074{
6075 set_handler("DPMS", dispatch_dpms, dpms_errors, dpms_events, NULL, dpms_replies);
6076}
6077
6078static void struct_dri2_DRI2Buffer(tvbuff_t *tvb, int *offsetp, proto_tree *root, unsigned byte_order _U_, int count)
6079{
6080 int i;
6081 for (i = 0; i < count; i++) {
6082 proto_item *item;
6083 proto_tree *t;
6084
6085 item = proto_tree_add_item(root, hf_x11_struct_dri2_DRI2Buffer, tvb, *offsetp, 20, ENC_NA);
6086 t = proto_item_add_subtree(item, ett_x11_rectangle);
6087 field32(tvb, offsetp, t, hf_x11_struct_dri2_DRI2Buffer_attachment, byte_order);
6088 proto_tree_add_item(t, hf_x11_struct_dri2_DRI2Buffer_name, tvb, *offsetp, 4, byte_order);
6089 *offsetp += 4;
6090 proto_tree_add_item(t, hf_x11_struct_dri2_DRI2Buffer_pitch, tvb, *offsetp, 4, byte_order);
6091 *offsetp += 4;
6092 proto_tree_add_item(t, hf_x11_struct_dri2_DRI2Buffer_cpp, tvb, *offsetp, 4, byte_order);
6093 *offsetp += 4;
6094 proto_tree_add_item(t, hf_x11_struct_dri2_DRI2Buffer_flags, tvb, *offsetp, 4, byte_order);
6095 *offsetp += 4;
6096 }
6097}
6098
6099static void struct_dri2_AttachFormat(tvbuff_t *tvb, int *offsetp, proto_tree *root, unsigned byte_order _U_, int count)
6100{
6101 int i;
6102 for (i = 0; i < count; i++) {
6103 proto_item *item;
6104 proto_tree *t;
6105
6106 item = proto_tree_add_item(root, hf_x11_struct_dri2_AttachFormat, tvb, *offsetp, 8, ENC_NA);
6107 t = proto_item_add_subtree(item, ett_x11_rectangle);
6108 field32(tvb, offsetp, t, hf_x11_struct_dri2_AttachFormat_attachment, byte_order);
6109 proto_tree_add_item(t, hf_x11_struct_dri2_AttachFormat_format, tvb, *offsetp, 4, byte_order);
6110 *offsetp += 4;
6111 }
6112}
6113
6114static void dri2QueryVersion(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
6115{
6116 proto_tree_add_item(t, hf_x11_dri2_QueryVersion_major_version, tvb, *offsetp, 4, byte_order);
6117 *offsetp += 4;
6118 proto_tree_add_item(t, hf_x11_dri2_QueryVersion_minor_version, tvb, *offsetp, 4, byte_order);
6119 *offsetp += 4;
6120}
6121static void dri2QueryVersion_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
6122{
6123 int sequence_number;
6124
6125 col_append_fstr(pinfo->cinfo, COL_INFO, "-QueryVersion");
6126
6127 REPLY(reply);
6128 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
6129 *offsetp += 1;
6130 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
6131 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
6132 "%d (dri2-QueryVersion)", sequence_number);
6133 *offsetp += 2;
6134 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
6135 *offsetp += 4;
6136 proto_tree_add_item(t, hf_x11_dri2_QueryVersion_reply_major_version, tvb, *offsetp, 4, byte_order);
6137 *offsetp += 4;
6138 proto_tree_add_item(t, hf_x11_dri2_QueryVersion_reply_minor_version, tvb, *offsetp, 4, byte_order);
6139 *offsetp += 4;
6140}
6141
6142static void dri2Connect(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
6143{
6144 proto_tree_add_item(t, hf_x11_dri2_Connect_window, tvb, *offsetp, 4, byte_order);
6145 *offsetp += 4;
6146 field32(tvb, offsetp, t, hf_x11_dri2_Connect_driver_type, byte_order);
6147}
6148static void dri2Connect_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
6149{
6150 int sequence_number;
6151 int f_driver_name_length;
6152 int f_device_name_length;
6153
6154 col_append_fstr(pinfo->cinfo, COL_INFO, "-Connect");
6155
6156 REPLY(reply);
6157 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
6158 *offsetp += 1;
6159 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
6160 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
6161 "%d (dri2-Connect)", sequence_number);
6162 *offsetp += 2;
6163 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
6164 *offsetp += 4;
6165 f_driver_name_length = tvb_get_uint32(tvb, *offsetp, byte_order);
6166 proto_tree_add_item(t, hf_x11_dri2_Connect_reply_driver_name_length, tvb, *offsetp, 4, byte_order);
6167 *offsetp += 4;
6168 f_device_name_length = tvb_get_uint32(tvb, *offsetp, byte_order);
6169 proto_tree_add_item(t, hf_x11_dri2_Connect_reply_device_name_length, tvb, *offsetp, 4, byte_order);
6170 *offsetp += 4;
6171 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 16, ENC_NA);
6172 *offsetp += 16;
6173 listOfByte(tvb, offsetp, t, hf_x11_dri2_Connect_reply_driver_name, f_driver_name_length, byte_order);
6174 listOfByte(tvb, offsetp, t, hf_x11_dri2_Connect_reply_alignment_pad, (((f_driver_name_length + 3) & (~3)) - f_driver_name_length), byte_order);
6175 listOfByte(tvb, offsetp, t, hf_x11_dri2_Connect_reply_device_name, f_device_name_length, byte_order);
6176}
6177
6178static void dri2Authenticate(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
6179{
6180 proto_tree_add_item(t, hf_x11_dri2_Authenticate_window, tvb, *offsetp, 4, byte_order);
6181 *offsetp += 4;
6182 proto_tree_add_item(t, hf_x11_dri2_Authenticate_magic, tvb, *offsetp, 4, byte_order);
6183 *offsetp += 4;
6184}
6185static void dri2Authenticate_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
6186{
6187 int sequence_number;
6188
6189 col_append_fstr(pinfo->cinfo, COL_INFO, "-Authenticate");
6190
6191 REPLY(reply);
6192 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
6193 *offsetp += 1;
6194 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
6195 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
6196 "%d (dri2-Authenticate)", sequence_number);
6197 *offsetp += 2;
6198 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
6199 *offsetp += 4;
6200 proto_tree_add_item(t, hf_x11_dri2_Authenticate_reply_authenticated, tvb, *offsetp, 4, byte_order);
6201 *offsetp += 4;
6202}
6203
6204static void dri2CreateDrawable(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
6205{
6206 proto_tree_add_item(t, hf_x11_dri2_CreateDrawable_drawable, tvb, *offsetp, 4, byte_order);
6207 *offsetp += 4;
6208}
6209
6210static void dri2DestroyDrawable(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
6211{
6212 proto_tree_add_item(t, hf_x11_dri2_DestroyDrawable_drawable, tvb, *offsetp, 4, byte_order);
6213 *offsetp += 4;
6214}
6215
6216static void dri2GetBuffers(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
6217{
6218 proto_tree_add_item(t, hf_x11_dri2_GetBuffers_drawable, tvb, *offsetp, 4, byte_order);
6219 *offsetp += 4;
6220 proto_tree_add_item(t, hf_x11_dri2_GetBuffers_count, tvb, *offsetp, 4, byte_order);
6221 *offsetp += 4;
6222 listOfCard32(tvb, offsetp, t, hf_x11_dri2_GetBuffers_attachments, hf_x11_dri2_GetBuffers_attachments_item, (length - 12) / 4, byte_order);
6223}
6224static void dri2GetBuffers_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
6225{
6226 int sequence_number;
6227 int f_count;
6228
6229 col_append_fstr(pinfo->cinfo, COL_INFO, "-GetBuffers");
6230
6231 REPLY(reply);
6232 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
6233 *offsetp += 1;
6234 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
6235 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
6236 "%d (dri2-GetBuffers)", sequence_number);
6237 *offsetp += 2;
6238 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
6239 *offsetp += 4;
6240 proto_tree_add_item(t, hf_x11_dri2_GetBuffers_reply_width, tvb, *offsetp, 4, byte_order);
6241 *offsetp += 4;
6242 proto_tree_add_item(t, hf_x11_dri2_GetBuffers_reply_height, tvb, *offsetp, 4, byte_order);
6243 *offsetp += 4;
6244 f_count = tvb_get_uint32(tvb, *offsetp, byte_order);
6245 proto_tree_add_item(t, hf_x11_dri2_GetBuffers_reply_count, tvb, *offsetp, 4, byte_order);
6246 *offsetp += 4;
6247 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 12, ENC_NA);
6248 *offsetp += 12;
6249 struct_dri2_DRI2Buffer(tvb, offsetp, t, byte_order, f_count);
6250}
6251
6252static void dri2CopyRegion(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
6253{
6254 proto_tree_add_item(t, hf_x11_dri2_CopyRegion_drawable, tvb, *offsetp, 4, byte_order);
6255 *offsetp += 4;
6256 proto_tree_add_item(t, hf_x11_dri2_CopyRegion_region, tvb, *offsetp, 4, byte_order);
6257 *offsetp += 4;
6258 proto_tree_add_item(t, hf_x11_dri2_CopyRegion_dest, tvb, *offsetp, 4, byte_order);
6259 *offsetp += 4;
6260 proto_tree_add_item(t, hf_x11_dri2_CopyRegion_src, tvb, *offsetp, 4, byte_order);
6261 *offsetp += 4;
6262}
6263static void dri2CopyRegion_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
6264{
6265 int sequence_number;
6266
6267 col_append_fstr(pinfo->cinfo, COL_INFO, "-CopyRegion");
6268
6269 REPLY(reply);
6270 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
6271 *offsetp += 1;
6272 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
6273 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
6274 "%d (dri2-CopyRegion)", sequence_number);
6275 *offsetp += 2;
6276 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
6277 *offsetp += 4;
6278}
6279
6280static void dri2GetBuffersWithFormat(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
6281{
6282 proto_tree_add_item(t, hf_x11_dri2_GetBuffersWithFormat_drawable, tvb, *offsetp, 4, byte_order);
6283 *offsetp += 4;
6284 proto_tree_add_item(t, hf_x11_dri2_GetBuffersWithFormat_count, tvb, *offsetp, 4, byte_order);
6285 *offsetp += 4;
6286 struct_dri2_AttachFormat(tvb, offsetp, t, byte_order, (length - 12) / 8);
6287}
6288static void dri2GetBuffersWithFormat_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
6289{
6290 int sequence_number;
6291 int f_count;
6292
6293 col_append_fstr(pinfo->cinfo, COL_INFO, "-GetBuffersWithFormat");
6294
6295 REPLY(reply);
6296 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
6297 *offsetp += 1;
6298 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
6299 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
6300 "%d (dri2-GetBuffersWithFormat)", sequence_number);
6301 *offsetp += 2;
6302 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
6303 *offsetp += 4;
6304 proto_tree_add_item(t, hf_x11_dri2_GetBuffersWithFormat_reply_width, tvb, *offsetp, 4, byte_order);
6305 *offsetp += 4;
6306 proto_tree_add_item(t, hf_x11_dri2_GetBuffersWithFormat_reply_height, tvb, *offsetp, 4, byte_order);
6307 *offsetp += 4;
6308 f_count = tvb_get_uint32(tvb, *offsetp, byte_order);
6309 proto_tree_add_item(t, hf_x11_dri2_GetBuffersWithFormat_reply_count, tvb, *offsetp, 4, byte_order);
6310 *offsetp += 4;
6311 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 12, ENC_NA);
6312 *offsetp += 12;
6313 struct_dri2_DRI2Buffer(tvb, offsetp, t, byte_order, f_count);
6314}
6315
6316static void dri2SwapBuffers(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
6317{
6318 proto_tree_add_item(t, hf_x11_dri2_SwapBuffers_drawable, tvb, *offsetp, 4, byte_order);
6319 *offsetp += 4;
6320 proto_tree_add_item(t, hf_x11_dri2_SwapBuffers_target_msc_hi, tvb, *offsetp, 4, byte_order);
6321 *offsetp += 4;
6322 proto_tree_add_item(t, hf_x11_dri2_SwapBuffers_target_msc_lo, tvb, *offsetp, 4, byte_order);
6323 *offsetp += 4;
6324 proto_tree_add_item(t, hf_x11_dri2_SwapBuffers_divisor_hi, tvb, *offsetp, 4, byte_order);
6325 *offsetp += 4;
6326 proto_tree_add_item(t, hf_x11_dri2_SwapBuffers_divisor_lo, tvb, *offsetp, 4, byte_order);
6327 *offsetp += 4;
6328 proto_tree_add_item(t, hf_x11_dri2_SwapBuffers_remainder_hi, tvb, *offsetp, 4, byte_order);
6329 *offsetp += 4;
6330 proto_tree_add_item(t, hf_x11_dri2_SwapBuffers_remainder_lo, tvb, *offsetp, 4, byte_order);
6331 *offsetp += 4;
6332}
6333static void dri2SwapBuffers_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
6334{
6335 int sequence_number;
6336
6337 col_append_fstr(pinfo->cinfo, COL_INFO, "-SwapBuffers");
6338
6339 REPLY(reply);
6340 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
6341 *offsetp += 1;
6342 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
6343 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
6344 "%d (dri2-SwapBuffers)", sequence_number);
6345 *offsetp += 2;
6346 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
6347 *offsetp += 4;
6348 proto_tree_add_item(t, hf_x11_dri2_SwapBuffers_reply_swap_hi, tvb, *offsetp, 4, byte_order);
6349 *offsetp += 4;
6350 proto_tree_add_item(t, hf_x11_dri2_SwapBuffers_reply_swap_lo, tvb, *offsetp, 4, byte_order);
6351 *offsetp += 4;
6352}
6353
6354static void dri2GetMSC(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
6355{
6356 proto_tree_add_item(t, hf_x11_dri2_GetMSC_drawable, tvb, *offsetp, 4, byte_order);
6357 *offsetp += 4;
6358}
6359static void dri2GetMSC_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
6360{
6361 int sequence_number;
6362
6363 col_append_fstr(pinfo->cinfo, COL_INFO, "-GetMSC");
6364
6365 REPLY(reply);
6366 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
6367 *offsetp += 1;
6368 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
6369 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
6370 "%d (dri2-GetMSC)", sequence_number);
6371 *offsetp += 2;
6372 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
6373 *offsetp += 4;
6374 proto_tree_add_item(t, hf_x11_dri2_GetMSC_reply_ust_hi, tvb, *offsetp, 4, byte_order);
6375 *offsetp += 4;
6376 proto_tree_add_item(t, hf_x11_dri2_GetMSC_reply_ust_lo, tvb, *offsetp, 4, byte_order);
6377 *offsetp += 4;
6378 proto_tree_add_item(t, hf_x11_dri2_GetMSC_reply_msc_hi, tvb, *offsetp, 4, byte_order);
6379 *offsetp += 4;
6380 proto_tree_add_item(t, hf_x11_dri2_GetMSC_reply_msc_lo, tvb, *offsetp, 4, byte_order);
6381 *offsetp += 4;
6382 proto_tree_add_item(t, hf_x11_dri2_GetMSC_reply_sbc_hi, tvb, *offsetp, 4, byte_order);
6383 *offsetp += 4;
6384 proto_tree_add_item(t, hf_x11_dri2_GetMSC_reply_sbc_lo, tvb, *offsetp, 4, byte_order);
6385 *offsetp += 4;
6386}
6387
6388static void dri2WaitMSC(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
6389{
6390 proto_tree_add_item(t, hf_x11_dri2_WaitMSC_drawable, tvb, *offsetp, 4, byte_order);
6391 *offsetp += 4;
6392 proto_tree_add_item(t, hf_x11_dri2_WaitMSC_target_msc_hi, tvb, *offsetp, 4, byte_order);
6393 *offsetp += 4;
6394 proto_tree_add_item(t, hf_x11_dri2_WaitMSC_target_msc_lo, tvb, *offsetp, 4, byte_order);
6395 *offsetp += 4;
6396 proto_tree_add_item(t, hf_x11_dri2_WaitMSC_divisor_hi, tvb, *offsetp, 4, byte_order);
6397 *offsetp += 4;
6398 proto_tree_add_item(t, hf_x11_dri2_WaitMSC_divisor_lo, tvb, *offsetp, 4, byte_order);
6399 *offsetp += 4;
6400 proto_tree_add_item(t, hf_x11_dri2_WaitMSC_remainder_hi, tvb, *offsetp, 4, byte_order);
6401 *offsetp += 4;
6402 proto_tree_add_item(t, hf_x11_dri2_WaitMSC_remainder_lo, tvb, *offsetp, 4, byte_order);
6403 *offsetp += 4;
6404}
6405static void dri2WaitMSC_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
6406{
6407 int sequence_number;
6408
6409 col_append_fstr(pinfo->cinfo, COL_INFO, "-WaitMSC");
6410
6411 REPLY(reply);
6412 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
6413 *offsetp += 1;
6414 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
6415 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
6416 "%d (dri2-WaitMSC)", sequence_number);
6417 *offsetp += 2;
6418 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
6419 *offsetp += 4;
6420 proto_tree_add_item(t, hf_x11_dri2_WaitMSC_reply_ust_hi, tvb, *offsetp, 4, byte_order);
6421 *offsetp += 4;
6422 proto_tree_add_item(t, hf_x11_dri2_WaitMSC_reply_ust_lo, tvb, *offsetp, 4, byte_order);
6423 *offsetp += 4;
6424 proto_tree_add_item(t, hf_x11_dri2_WaitMSC_reply_msc_hi, tvb, *offsetp, 4, byte_order);
6425 *offsetp += 4;
6426 proto_tree_add_item(t, hf_x11_dri2_WaitMSC_reply_msc_lo, tvb, *offsetp, 4, byte_order);
6427 *offsetp += 4;
6428 proto_tree_add_item(t, hf_x11_dri2_WaitMSC_reply_sbc_hi, tvb, *offsetp, 4, byte_order);
6429 *offsetp += 4;
6430 proto_tree_add_item(t, hf_x11_dri2_WaitMSC_reply_sbc_lo, tvb, *offsetp, 4, byte_order);
6431 *offsetp += 4;
6432}
6433
6434static void dri2WaitSBC(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
6435{
6436 proto_tree_add_item(t, hf_x11_dri2_WaitSBC_drawable, tvb, *offsetp, 4, byte_order);
6437 *offsetp += 4;
6438 proto_tree_add_item(t, hf_x11_dri2_WaitSBC_target_sbc_hi, tvb, *offsetp, 4, byte_order);
6439 *offsetp += 4;
6440 proto_tree_add_item(t, hf_x11_dri2_WaitSBC_target_sbc_lo, tvb, *offsetp, 4, byte_order);
6441 *offsetp += 4;
6442}
6443static void dri2WaitSBC_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
6444{
6445 int sequence_number;
6446
6447 col_append_fstr(pinfo->cinfo, COL_INFO, "-WaitSBC");
6448
6449 REPLY(reply);
6450 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
6451 *offsetp += 1;
6452 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
6453 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
6454 "%d (dri2-WaitSBC)", sequence_number);
6455 *offsetp += 2;
6456 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
6457 *offsetp += 4;
6458 proto_tree_add_item(t, hf_x11_dri2_WaitSBC_reply_ust_hi, tvb, *offsetp, 4, byte_order);
6459 *offsetp += 4;
6460 proto_tree_add_item(t, hf_x11_dri2_WaitSBC_reply_ust_lo, tvb, *offsetp, 4, byte_order);
6461 *offsetp += 4;
6462 proto_tree_add_item(t, hf_x11_dri2_WaitSBC_reply_msc_hi, tvb, *offsetp, 4, byte_order);
6463 *offsetp += 4;
6464 proto_tree_add_item(t, hf_x11_dri2_WaitSBC_reply_msc_lo, tvb, *offsetp, 4, byte_order);
6465 *offsetp += 4;
6466 proto_tree_add_item(t, hf_x11_dri2_WaitSBC_reply_sbc_hi, tvb, *offsetp, 4, byte_order);
6467 *offsetp += 4;
6468 proto_tree_add_item(t, hf_x11_dri2_WaitSBC_reply_sbc_lo, tvb, *offsetp, 4, byte_order);
6469 *offsetp += 4;
6470}
6471
6472static void dri2SwapInterval(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
6473{
6474 proto_tree_add_item(t, hf_x11_dri2_SwapInterval_drawable, tvb, *offsetp, 4, byte_order);
6475 *offsetp += 4;
6476 proto_tree_add_item(t, hf_x11_dri2_SwapInterval_interval, tvb, *offsetp, 4, byte_order);
6477 *offsetp += 4;
6478}
6479
6480static void dri2GetParam(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
6481{
6482 proto_tree_add_item(t, hf_x11_dri2_GetParam_drawable, tvb, *offsetp, 4, byte_order);
6483 *offsetp += 4;
6484 proto_tree_add_item(t, hf_x11_dri2_GetParam_param, tvb, *offsetp, 4, byte_order);
6485 *offsetp += 4;
6486}
6487static void dri2GetParam_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
6488{
6489 int sequence_number;
6490
6491 col_append_fstr(pinfo->cinfo, COL_INFO, "-GetParam");
6492
6493 REPLY(reply);
6494 proto_tree_add_item(t, hf_x11_dri2_GetParam_reply_is_param_recognized, tvb, *offsetp, 1, byte_order);
6495 *offsetp += 1;
6496 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
6497 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
6498 "%d (dri2-GetParam)", sequence_number);
6499 *offsetp += 2;
6500 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
6501 *offsetp += 4;
6502 proto_tree_add_item(t, hf_x11_dri2_GetParam_reply_value_hi, tvb, *offsetp, 4, byte_order);
6503 *offsetp += 4;
6504 proto_tree_add_item(t, hf_x11_dri2_GetParam_reply_value_lo, tvb, *offsetp, 4, byte_order);
6505 *offsetp += 4;
6506}
6507
6508static void dri2InvalidateBuffers(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order)
6509{
6510 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
6511 *offsetp += 1;
6512 CARD16(event_sequencenumber);
6513 proto_tree_add_item(t, hf_x11_dri2_InvalidateBuffers_drawable, tvb, *offsetp, 4, byte_order);
6514 *offsetp += 4;
6515}
6516
6517static const value_string dri2_extension_minor[] = {
6518 { 0, "QueryVersion" },
6519 { 1, "Connect" },
6520 { 2, "Authenticate" },
6521 { 3, "CreateDrawable" },
6522 { 4, "DestroyDrawable" },
6523 { 5, "GetBuffers" },
6524 { 6, "CopyRegion" },
6525 { 7, "GetBuffersWithFormat" },
6526 { 8, "SwapBuffers" },
6527 { 9, "GetMSC" },
6528 { 10, "WaitMSC" },
6529 { 11, "WaitSBC" },
6530 { 12, "SwapInterval" },
6531 { 13, "GetParam" },
6532 { 0, NULL }
6533};
6534static const x11_event_info dri2_events[] = {
6535 { "dri2-InvalidateBuffers", dri2InvalidateBuffers },
6536 { NULL, NULL }
6537};
6538static const x11_reply_info dri2_replies[] = {
6539 { 0, dri2QueryVersion_Reply },
6540 { 1, dri2Connect_Reply },
6541 { 2, dri2Authenticate_Reply },
6542 { 5, dri2GetBuffers_Reply },
6543 { 6, dri2CopyRegion_Reply },
6544 { 7, dri2GetBuffersWithFormat_Reply },
6545 { 8, dri2SwapBuffers_Reply },
6546 { 9, dri2GetMSC_Reply },
6547 { 10, dri2WaitMSC_Reply },
6548 { 11, dri2WaitSBC_Reply },
6549 { 13, dri2GetParam_Reply },
6550 { 0, NULL }
6551};
6552
6553static void dispatch_dri2(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
6554{
6555 int minor, length;
6556 minor = CARD8(dri2_extension_minor);
6557 length = REQUEST_LENGTH();
6558
6559 col_append_fstr(pinfo->cinfo, COL_INFO, "-%s",
6560 val_to_str(minor, dri2_extension_minor,
6561 "<Unknown opcode %d>"));
6562 switch (minor) {
6563 case 0:
6564 dri2QueryVersion(tvb, pinfo, offsetp, t, byte_order, length);
6565 break;
6566 case 1:
6567 dri2Connect(tvb, pinfo, offsetp, t, byte_order, length);
6568 break;
6569 case 2:
6570 dri2Authenticate(tvb, pinfo, offsetp, t, byte_order, length);
6571 break;
6572 case 3:
6573 dri2CreateDrawable(tvb, pinfo, offsetp, t, byte_order, length);
6574 break;
6575 case 4:
6576 dri2DestroyDrawable(tvb, pinfo, offsetp, t, byte_order, length);
6577 break;
6578 case 5:
6579 dri2GetBuffers(tvb, pinfo, offsetp, t, byte_order, length);
6580 break;
6581 case 6:
6582 dri2CopyRegion(tvb, pinfo, offsetp, t, byte_order, length);
6583 break;
6584 case 7:
6585 dri2GetBuffersWithFormat(tvb, pinfo, offsetp, t, byte_order, length);
6586 break;
6587 case 8:
6588 dri2SwapBuffers(tvb, pinfo, offsetp, t, byte_order, length);
6589 break;
6590 case 9:
6591 dri2GetMSC(tvb, pinfo, offsetp, t, byte_order, length);
6592 break;
6593 case 10:
6594 dri2WaitMSC(tvb, pinfo, offsetp, t, byte_order, length);
6595 break;
6596 case 11:
6597 dri2WaitSBC(tvb, pinfo, offsetp, t, byte_order, length);
6598 break;
6599 case 12:
6600 dri2SwapInterval(tvb, pinfo, offsetp, t, byte_order, length);
6601 break;
6602 case 13:
6603 dri2GetParam(tvb, pinfo, offsetp, t, byte_order, length);
6604 break;
6605 /* No need for a default case here, since Unknown is printed above,
6606 and UNDECODED() is taken care of by dissect_x11_request */
6607 }
6608}
6609
6610static void register_dri2(void)
6611{
6612 set_handler("DRI2", dispatch_dri2, dri2_errors, dri2_events, NULL, dri2_replies);
6613}
6614
6615static void dri3QueryVersion(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
6616{
6617 proto_tree_add_item(t, hf_x11_dri3_QueryVersion_major_version, tvb, *offsetp, 4, byte_order);
6618 *offsetp += 4;
6619 proto_tree_add_item(t, hf_x11_dri3_QueryVersion_minor_version, tvb, *offsetp, 4, byte_order);
6620 *offsetp += 4;
6621}
6622static void dri3QueryVersion_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
6623{
6624 int sequence_number;
6625
6626 col_append_fstr(pinfo->cinfo, COL_INFO, "-QueryVersion");
6627
6628 REPLY(reply);
6629 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
6630 *offsetp += 1;
6631 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
6632 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
6633 "%d (dri3-QueryVersion)", sequence_number);
6634 *offsetp += 2;
6635 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
6636 *offsetp += 4;
6637 proto_tree_add_item(t, hf_x11_dri3_QueryVersion_reply_major_version, tvb, *offsetp, 4, byte_order);
6638 *offsetp += 4;
6639 proto_tree_add_item(t, hf_x11_dri3_QueryVersion_reply_minor_version, tvb, *offsetp, 4, byte_order);
6640 *offsetp += 4;
6641}
6642
6643static void dri3Open(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
6644{
6645 proto_tree_add_item(t, hf_x11_dri3_Open_drawable, tvb, *offsetp, 4, byte_order);
6646 *offsetp += 4;
6647 proto_tree_add_item(t, hf_x11_dri3_Open_provider, tvb, *offsetp, 4, byte_order);
6648 *offsetp += 4;
6649}
6650static void dri3Open_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
6651{
6652 int sequence_number;
6653
6654 col_append_fstr(pinfo->cinfo, COL_INFO, "-Open");
6655
6656 REPLY(reply);
6657 proto_tree_add_item(t, hf_x11_dri3_Open_reply_nfd, tvb, *offsetp, 1, byte_order);
6658 *offsetp += 1;
6659 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
6660 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
6661 "%d (dri3-Open)", sequence_number);
6662 *offsetp += 2;
6663 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
6664 *offsetp += 4;
6665 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 24, ENC_NA);
6666 *offsetp += 24;
6667}
6668
6669static void dri3PixmapFromBuffer(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
6670{
6671 proto_tree_add_item(t, hf_x11_dri3_PixmapFromBuffer_pixmap, tvb, *offsetp, 4, byte_order);
6672 *offsetp += 4;
6673 proto_tree_add_item(t, hf_x11_dri3_PixmapFromBuffer_drawable, tvb, *offsetp, 4, byte_order);
6674 *offsetp += 4;
6675 proto_tree_add_item(t, hf_x11_dri3_PixmapFromBuffer_size, tvb, *offsetp, 4, byte_order);
6676 *offsetp += 4;
6677 proto_tree_add_item(t, hf_x11_dri3_PixmapFromBuffer_width, tvb, *offsetp, 2, byte_order);
6678 *offsetp += 2;
6679 proto_tree_add_item(t, hf_x11_dri3_PixmapFromBuffer_height, tvb, *offsetp, 2, byte_order);
6680 *offsetp += 2;
6681 proto_tree_add_item(t, hf_x11_dri3_PixmapFromBuffer_stride, tvb, *offsetp, 2, byte_order);
6682 *offsetp += 2;
6683 proto_tree_add_item(t, hf_x11_dri3_PixmapFromBuffer_depth, tvb, *offsetp, 1, byte_order);
6684 *offsetp += 1;
6685 proto_tree_add_item(t, hf_x11_dri3_PixmapFromBuffer_bpp, tvb, *offsetp, 1, byte_order);
6686 *offsetp += 1;
6687}
6688
6689static void dri3BufferFromPixmap(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
6690{
6691 proto_tree_add_item(t, hf_x11_dri3_BufferFromPixmap_pixmap, tvb, *offsetp, 4, byte_order);
6692 *offsetp += 4;
6693}
6694static void dri3BufferFromPixmap_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
6695{
6696 int sequence_number;
6697
6698 col_append_fstr(pinfo->cinfo, COL_INFO, "-BufferFromPixmap");
6699
6700 REPLY(reply);
6701 proto_tree_add_item(t, hf_x11_dri3_BufferFromPixmap_reply_nfd, tvb, *offsetp, 1, byte_order);
6702 *offsetp += 1;
6703 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
6704 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
6705 "%d (dri3-BufferFromPixmap)", sequence_number);
6706 *offsetp += 2;
6707 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
6708 *offsetp += 4;
6709 proto_tree_add_item(t, hf_x11_dri3_BufferFromPixmap_reply_size, tvb, *offsetp, 4, byte_order);
6710 *offsetp += 4;
6711 proto_tree_add_item(t, hf_x11_dri3_BufferFromPixmap_reply_width, tvb, *offsetp, 2, byte_order);
6712 *offsetp += 2;
6713 proto_tree_add_item(t, hf_x11_dri3_BufferFromPixmap_reply_height, tvb, *offsetp, 2, byte_order);
6714 *offsetp += 2;
6715 proto_tree_add_item(t, hf_x11_dri3_BufferFromPixmap_reply_stride, tvb, *offsetp, 2, byte_order);
6716 *offsetp += 2;
6717 proto_tree_add_item(t, hf_x11_dri3_BufferFromPixmap_reply_depth, tvb, *offsetp, 1, byte_order);
6718 *offsetp += 1;
6719 proto_tree_add_item(t, hf_x11_dri3_BufferFromPixmap_reply_bpp, tvb, *offsetp, 1, byte_order);
6720 *offsetp += 1;
6721 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 12, ENC_NA);
6722 *offsetp += 12;
6723}
6724
6725static void dri3FenceFromFD(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
6726{
6727 proto_tree_add_item(t, hf_x11_dri3_FenceFromFD_drawable, tvb, *offsetp, 4, byte_order);
6728 *offsetp += 4;
6729 proto_tree_add_item(t, hf_x11_dri3_FenceFromFD_fence, tvb, *offsetp, 4, byte_order);
6730 *offsetp += 4;
6731 proto_tree_add_item(t, hf_x11_dri3_FenceFromFD_initially_triggered, tvb, *offsetp, 1, byte_order);
6732 *offsetp += 1;
6733 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 3, ENC_NA);
6734 *offsetp += 3;
6735}
6736
6737static void dri3FDFromFence(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
6738{
6739 proto_tree_add_item(t, hf_x11_dri3_FDFromFence_drawable, tvb, *offsetp, 4, byte_order);
6740 *offsetp += 4;
6741 proto_tree_add_item(t, hf_x11_dri3_FDFromFence_fence, tvb, *offsetp, 4, byte_order);
6742 *offsetp += 4;
6743}
6744static void dri3FDFromFence_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
6745{
6746 int sequence_number;
6747
6748 col_append_fstr(pinfo->cinfo, COL_INFO, "-FDFromFence");
6749
6750 REPLY(reply);
6751 proto_tree_add_item(t, hf_x11_dri3_FDFromFence_reply_nfd, tvb, *offsetp, 1, byte_order);
6752 *offsetp += 1;
6753 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
6754 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
6755 "%d (dri3-FDFromFence)", sequence_number);
6756 *offsetp += 2;
6757 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
6758 *offsetp += 4;
6759 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 24, ENC_NA);
6760 *offsetp += 24;
6761}
6762
6763static void dri3GetSupportedModifiers(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
6764{
6765 proto_tree_add_item(t, hf_x11_dri3_GetSupportedModifiers_window, tvb, *offsetp, 4, byte_order);
6766 *offsetp += 4;
6767 proto_tree_add_item(t, hf_x11_dri3_GetSupportedModifiers_depth, tvb, *offsetp, 1, byte_order);
6768 *offsetp += 1;
6769 proto_tree_add_item(t, hf_x11_dri3_GetSupportedModifiers_bpp, tvb, *offsetp, 1, byte_order);
6770 *offsetp += 1;
6771 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 2, ENC_NA);
6772 *offsetp += 2;
6773}
6774static void dri3GetSupportedModifiers_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
6775{
6776 int sequence_number;
6777 int f_num_window_modifiers;
6778 int f_num_screen_modifiers;
6779
6780 col_append_fstr(pinfo->cinfo, COL_INFO, "-GetSupportedModifiers");
6781
6782 REPLY(reply);
6783 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
6784 *offsetp += 1;
6785 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
6786 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
6787 "%d (dri3-GetSupportedModifiers)", sequence_number);
6788 *offsetp += 2;
6789 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
6790 *offsetp += 4;
6791 f_num_window_modifiers = tvb_get_uint32(tvb, *offsetp, byte_order);
6792 proto_tree_add_item(t, hf_x11_dri3_GetSupportedModifiers_reply_num_window_modifiers, tvb, *offsetp, 4, byte_order);
6793 *offsetp += 4;
6794 f_num_screen_modifiers = tvb_get_uint32(tvb, *offsetp, byte_order);
6795 proto_tree_add_item(t, hf_x11_dri3_GetSupportedModifiers_reply_num_screen_modifiers, tvb, *offsetp, 4, byte_order);
6796 *offsetp += 4;
6797 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 16, ENC_NA);
6798 *offsetp += 16;
6799 listOfCard64(tvb, offsetp, t, hf_x11_dri3_GetSupportedModifiers_reply_window_modifiers, hf_x11_dri3_GetSupportedModifiers_reply_window_modifiers_item, f_num_window_modifiers, byte_order);
6800 listOfCard64(tvb, offsetp, t, hf_x11_dri3_GetSupportedModifiers_reply_screen_modifiers, hf_x11_dri3_GetSupportedModifiers_reply_screen_modifiers_item, f_num_screen_modifiers, byte_order);
6801}
6802
6803static void dri3PixmapFromBuffers(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
6804{
6805 int f_num_buffers;
6806 proto_tree_add_item(t, hf_x11_dri3_PixmapFromBuffers_pixmap, tvb, *offsetp, 4, byte_order);
6807 *offsetp += 4;
6808 proto_tree_add_item(t, hf_x11_dri3_PixmapFromBuffers_window, tvb, *offsetp, 4, byte_order);
6809 *offsetp += 4;
6810 f_num_buffers = tvb_get_uint8(tvb, *offsetp);
6811 proto_tree_add_item(t, hf_x11_dri3_PixmapFromBuffers_num_buffers, tvb, *offsetp, 1, byte_order);
6812 *offsetp += 1;
6813 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 3, ENC_NA);
6814 *offsetp += 3;
6815 proto_tree_add_item(t, hf_x11_dri3_PixmapFromBuffers_width, tvb, *offsetp, 2, byte_order);
6816 *offsetp += 2;
6817 proto_tree_add_item(t, hf_x11_dri3_PixmapFromBuffers_height, tvb, *offsetp, 2, byte_order);
6818 *offsetp += 2;
6819 proto_tree_add_item(t, hf_x11_dri3_PixmapFromBuffers_stride0, tvb, *offsetp, 4, byte_order);
6820 *offsetp += 4;
6821 proto_tree_add_item(t, hf_x11_dri3_PixmapFromBuffers_offset0, tvb, *offsetp, 4, byte_order);
6822 *offsetp += 4;
6823 proto_tree_add_item(t, hf_x11_dri3_PixmapFromBuffers_stride1, tvb, *offsetp, 4, byte_order);
6824 *offsetp += 4;
6825 proto_tree_add_item(t, hf_x11_dri3_PixmapFromBuffers_offset1, tvb, *offsetp, 4, byte_order);
6826 *offsetp += 4;
6827 proto_tree_add_item(t, hf_x11_dri3_PixmapFromBuffers_stride2, tvb, *offsetp, 4, byte_order);
6828 *offsetp += 4;
6829 proto_tree_add_item(t, hf_x11_dri3_PixmapFromBuffers_offset2, tvb, *offsetp, 4, byte_order);
6830 *offsetp += 4;
6831 proto_tree_add_item(t, hf_x11_dri3_PixmapFromBuffers_stride3, tvb, *offsetp, 4, byte_order);
6832 *offsetp += 4;
6833 proto_tree_add_item(t, hf_x11_dri3_PixmapFromBuffers_offset3, tvb, *offsetp, 4, byte_order);
6834 *offsetp += 4;
6835 proto_tree_add_item(t, hf_x11_dri3_PixmapFromBuffers_depth, tvb, *offsetp, 1, byte_order);
6836 *offsetp += 1;
6837 proto_tree_add_item(t, hf_x11_dri3_PixmapFromBuffers_bpp, tvb, *offsetp, 1, byte_order);
6838 *offsetp += 1;
6839 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 2, ENC_NA);
6840 *offsetp += 2;
6841 proto_tree_add_item(t, hf_x11_dri3_PixmapFromBuffers_modifier, tvb, *offsetp, 8, byte_order);
6842 *offsetp += 8;
6843 length -= f_num_buffers * 1;
6844}
6845
6846static void dri3BuffersFromPixmap(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
6847{
6848 proto_tree_add_item(t, hf_x11_dri3_BuffersFromPixmap_pixmap, tvb, *offsetp, 4, byte_order);
6849 *offsetp += 4;
6850}
6851static void dri3BuffersFromPixmap_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
6852{
6853 int sequence_number;
6854 int f_nfd;
6855
6856 col_append_fstr(pinfo->cinfo, COL_INFO, "-BuffersFromPixmap");
6857
6858 REPLY(reply);
6859 f_nfd = tvb_get_uint8(tvb, *offsetp);
6860 proto_tree_add_item(t, hf_x11_dri3_BuffersFromPixmap_reply_nfd, tvb, *offsetp, 1, byte_order);
6861 *offsetp += 1;
6862 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
6863 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
6864 "%d (dri3-BuffersFromPixmap)", sequence_number);
6865 *offsetp += 2;
6866 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
6867 *offsetp += 4;
6868 proto_tree_add_item(t, hf_x11_dri3_BuffersFromPixmap_reply_width, tvb, *offsetp, 2, byte_order);
6869 *offsetp += 2;
6870 proto_tree_add_item(t, hf_x11_dri3_BuffersFromPixmap_reply_height, tvb, *offsetp, 2, byte_order);
6871 *offsetp += 2;
6872 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 4, ENC_NA);
6873 *offsetp += 4;
6874 proto_tree_add_item(t, hf_x11_dri3_BuffersFromPixmap_reply_modifier, tvb, *offsetp, 8, byte_order);
6875 *offsetp += 8;
6876 proto_tree_add_item(t, hf_x11_dri3_BuffersFromPixmap_reply_depth, tvb, *offsetp, 1, byte_order);
6877 *offsetp += 1;
6878 proto_tree_add_item(t, hf_x11_dri3_BuffersFromPixmap_reply_bpp, tvb, *offsetp, 1, byte_order);
6879 *offsetp += 1;
6880 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 6, ENC_NA);
6881 *offsetp += 6;
6882 listOfCard32(tvb, offsetp, t, hf_x11_dri3_BuffersFromPixmap_reply_strides, hf_x11_dri3_BuffersFromPixmap_reply_strides_item, f_nfd, byte_order);
6883 listOfCard32(tvb, offsetp, t, hf_x11_dri3_BuffersFromPixmap_reply_offsets, hf_x11_dri3_BuffersFromPixmap_reply_offsets_item, f_nfd, byte_order);
6884}
6885
6886static void dri3SetDRMDeviceInUse(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
6887{
6888 proto_tree_add_item(t, hf_x11_dri3_SetDRMDeviceInUse_window, tvb, *offsetp, 4, byte_order);
6889 *offsetp += 4;
6890 proto_tree_add_item(t, hf_x11_dri3_SetDRMDeviceInUse_drmMajor, tvb, *offsetp, 4, byte_order);
6891 *offsetp += 4;
6892 proto_tree_add_item(t, hf_x11_dri3_SetDRMDeviceInUse_drmMinor, tvb, *offsetp, 4, byte_order);
6893 *offsetp += 4;
6894}
6895
6896static void dri3ImportSyncobj(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
6897{
6898 proto_tree_add_item(t, hf_x11_dri3_ImportSyncobj_syncobj, tvb, *offsetp, 4, byte_order);
6899 *offsetp += 4;
6900 proto_tree_add_item(t, hf_x11_dri3_ImportSyncobj_drawable, tvb, *offsetp, 4, byte_order);
6901 *offsetp += 4;
6902}
6903
6904static void dri3FreeSyncobj(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
6905{
6906 proto_tree_add_item(t, hf_x11_dri3_FreeSyncobj_syncobj, tvb, *offsetp, 4, byte_order);
6907 *offsetp += 4;
6908}
6909static const value_string dri3_extension_minor[] = {
6910 { 0, "QueryVersion" },
6911 { 1, "Open" },
6912 { 2, "PixmapFromBuffer" },
6913 { 3, "BufferFromPixmap" },
6914 { 4, "FenceFromFD" },
6915 { 5, "FDFromFence" },
6916 { 6, "GetSupportedModifiers" },
6917 { 7, "PixmapFromBuffers" },
6918 { 8, "BuffersFromPixmap" },
6919 { 9, "SetDRMDeviceInUse" },
6920 { 10, "ImportSyncobj" },
6921 { 11, "FreeSyncobj" },
6922 { 0, NULL }
6923};
6924static const x11_event_info dri3_events[] = {
6925 { NULL, NULL }
6926};
6927static const x11_reply_info dri3_replies[] = {
6928 { 0, dri3QueryVersion_Reply },
6929 { 1, dri3Open_Reply },
6930 { 3, dri3BufferFromPixmap_Reply },
6931 { 5, dri3FDFromFence_Reply },
6932 { 6, dri3GetSupportedModifiers_Reply },
6933 { 8, dri3BuffersFromPixmap_Reply },
6934 { 0, NULL }
6935};
6936
6937static void dispatch_dri3(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
6938{
6939 int minor, length;
6940 minor = CARD8(dri3_extension_minor);
6941 length = REQUEST_LENGTH();
6942
6943 col_append_fstr(pinfo->cinfo, COL_INFO, "-%s",
6944 val_to_str(minor, dri3_extension_minor,
6945 "<Unknown opcode %d>"));
6946 switch (minor) {
6947 case 0:
6948 dri3QueryVersion(tvb, pinfo, offsetp, t, byte_order, length);
6949 break;
6950 case 1:
6951 dri3Open(tvb, pinfo, offsetp, t, byte_order, length);
6952 break;
6953 case 2:
6954 dri3PixmapFromBuffer(tvb, pinfo, offsetp, t, byte_order, length);
6955 break;
6956 case 3:
6957 dri3BufferFromPixmap(tvb, pinfo, offsetp, t, byte_order, length);
6958 break;
6959 case 4:
6960 dri3FenceFromFD(tvb, pinfo, offsetp, t, byte_order, length);
6961 break;
6962 case 5:
6963 dri3FDFromFence(tvb, pinfo, offsetp, t, byte_order, length);
6964 break;
6965 case 6:
6966 dri3GetSupportedModifiers(tvb, pinfo, offsetp, t, byte_order, length);
6967 break;
6968 case 7:
6969 dri3PixmapFromBuffers(tvb, pinfo, offsetp, t, byte_order, length);
6970 break;
6971 case 8:
6972 dri3BuffersFromPixmap(tvb, pinfo, offsetp, t, byte_order, length);
6973 break;
6974 case 9:
6975 dri3SetDRMDeviceInUse(tvb, pinfo, offsetp, t, byte_order, length);
6976 break;
6977 case 10:
6978 dri3ImportSyncobj(tvb, pinfo, offsetp, t, byte_order, length);
6979 break;
6980 case 11:
6981 dri3FreeSyncobj(tvb, pinfo, offsetp, t, byte_order, length);
6982 break;
6983 /* No need for a default case here, since Unknown is printed above,
6984 and UNDECODED() is taken care of by dissect_x11_request */
6985 }
6986}
6987
6988static void register_dri3(void)
6989{
6990 set_handler("DRI3", dispatch_dri3, dri3_errors, dri3_events, NULL, dri3_replies);
6991}
6992
6993static void geQueryVersion(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
6994{
6995 proto_tree_add_item(t, hf_x11_ge_QueryVersion_client_major_version, tvb, *offsetp, 2, byte_order);
6996 *offsetp += 2;
6997 proto_tree_add_item(t, hf_x11_ge_QueryVersion_client_minor_version, tvb, *offsetp, 2, byte_order);
6998 *offsetp += 2;
6999}
7000static void geQueryVersion_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
7001{
7002 int sequence_number;
7003
7004 col_append_fstr(pinfo->cinfo, COL_INFO, "-QueryVersion");
7005
7006 REPLY(reply);
7007 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
7008 *offsetp += 1;
7009 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
7010 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
7011 "%d (ge-QueryVersion)", sequence_number);
7012 *offsetp += 2;
7013 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
7014 *offsetp += 4;
7015 proto_tree_add_item(t, hf_x11_ge_QueryVersion_reply_major_version, tvb, *offsetp, 2, byte_order);
7016 *offsetp += 2;
7017 proto_tree_add_item(t, hf_x11_ge_QueryVersion_reply_minor_version, tvb, *offsetp, 2, byte_order);
7018 *offsetp += 2;
7019 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 20, ENC_NA);
7020 *offsetp += 20;
7021}
7022static const value_string ge_extension_minor[] = {
7023 { 0, "QueryVersion" },
7024 { 0, NULL }
7025};
7026static const x11_event_info ge_events[] = {
7027 { NULL, NULL }
7028};
7029static const x11_reply_info ge_replies[] = {
7030 { 0, geQueryVersion_Reply },
7031 { 0, NULL }
7032};
7033
7034static void dispatch_ge(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
7035{
7036 int minor, length;
7037 minor = CARD8(ge_extension_minor);
7038 length = REQUEST_LENGTH();
7039
7040 col_append_fstr(pinfo->cinfo, COL_INFO, "-%s",
7041 val_to_str(minor, ge_extension_minor,
7042 "<Unknown opcode %d>"));
7043 switch (minor) {
7044 case 0:
7045 geQueryVersion(tvb, pinfo, offsetp, t, byte_order, length);
7046 break;
7047 /* No need for a default case here, since Unknown is printed above,
7048 and UNDECODED() is taken care of by dissect_x11_request */
7049 }
7050}
7051
7052static void register_ge(void)
7053{
7054 set_handler("Generic Event Extension", dispatch_ge, ge_errors, ge_events, NULL, ge_replies);
7055}
7056
7057static void glxBufferSwapComplete(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order)
7058{
7059 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
7060 *offsetp += 1;
7061 CARD16(event_sequencenumber);
7062 proto_tree_add_item(t, hf_x11_glx_BufferSwapComplete_event_type, tvb, *offsetp, 2, byte_order);
7063 *offsetp += 2;
7064 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 2, ENC_NA);
7065 *offsetp += 2;
7066 proto_tree_add_item(t, hf_x11_glx_BufferSwapComplete_drawable, tvb, *offsetp, 4, byte_order);
7067 *offsetp += 4;
7068 proto_tree_add_item(t, hf_x11_glx_BufferSwapComplete_ust_hi, tvb, *offsetp, 4, byte_order);
7069 *offsetp += 4;
7070 proto_tree_add_item(t, hf_x11_glx_BufferSwapComplete_ust_lo, tvb, *offsetp, 4, byte_order);
7071 *offsetp += 4;
7072 proto_tree_add_item(t, hf_x11_glx_BufferSwapComplete_msc_hi, tvb, *offsetp, 4, byte_order);
7073 *offsetp += 4;
7074 proto_tree_add_item(t, hf_x11_glx_BufferSwapComplete_msc_lo, tvb, *offsetp, 4, byte_order);
7075 *offsetp += 4;
7076 proto_tree_add_item(t, hf_x11_glx_BufferSwapComplete_sbc, tvb, *offsetp, 4, byte_order);
7077 *offsetp += 4;
7078}
7079
7080
7081static void glxRender(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
7082{
7083 proto_tree_add_item(t, hf_x11_glx_Render_context_tag, tvb, *offsetp, 4, byte_order);
7084 *offsetp += 4;
7085 dispatch_glx_render(tvb, pinfo, offsetp, t, byte_order, (length - 8));
7086}
7087
7088static void glxRenderLarge(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
7089{
7090 int f_data_len;
7091 proto_tree_add_item(t, hf_x11_glx_RenderLarge_context_tag, tvb, *offsetp, 4, byte_order);
7092 *offsetp += 4;
7093 proto_tree_add_item(t, hf_x11_glx_RenderLarge_request_num, tvb, *offsetp, 2, byte_order);
7094 *offsetp += 2;
7095 proto_tree_add_item(t, hf_x11_glx_RenderLarge_request_total, tvb, *offsetp, 2, byte_order);
7096 *offsetp += 2;
7097 f_data_len = tvb_get_uint32(tvb, *offsetp, byte_order);
7098 proto_tree_add_item(t, hf_x11_glx_RenderLarge_data_len, tvb, *offsetp, 4, byte_order);
7099 *offsetp += 4;
7100 listOfByte(tvb, offsetp, t, hf_x11_glx_RenderLarge_data, f_data_len, byte_order);
7101 length -= f_data_len * 1;
7102}
7103
7104static void glxCreateContext(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
7105{
7106 proto_tree_add_item(t, hf_x11_glx_CreateContext_context, tvb, *offsetp, 4, byte_order);
7107 *offsetp += 4;
7108 proto_tree_add_item(t, hf_x11_glx_CreateContext_visual, tvb, *offsetp, 4, byte_order);
7109 *offsetp += 4;
7110 proto_tree_add_item(t, hf_x11_glx_CreateContext_screen, tvb, *offsetp, 4, byte_order);
7111 *offsetp += 4;
7112 proto_tree_add_item(t, hf_x11_glx_CreateContext_share_list, tvb, *offsetp, 4, byte_order);
7113 *offsetp += 4;
7114 proto_tree_add_item(t, hf_x11_glx_CreateContext_is_direct, tvb, *offsetp, 1, byte_order);
7115 *offsetp += 1;
7116 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 3, ENC_NA);
7117 *offsetp += 3;
7118}
7119
7120static void glxDestroyContext(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
7121{
7122 proto_tree_add_item(t, hf_x11_glx_DestroyContext_context, tvb, *offsetp, 4, byte_order);
7123 *offsetp += 4;
7124}
7125
7126static void glxMakeCurrent(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
7127{
7128 proto_tree_add_item(t, hf_x11_glx_MakeCurrent_drawable, tvb, *offsetp, 4, byte_order);
7129 *offsetp += 4;
7130 proto_tree_add_item(t, hf_x11_glx_MakeCurrent_context, tvb, *offsetp, 4, byte_order);
7131 *offsetp += 4;
7132 proto_tree_add_item(t, hf_x11_glx_MakeCurrent_old_context_tag, tvb, *offsetp, 4, byte_order);
7133 *offsetp += 4;
7134}
7135static void glxMakeCurrent_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
7136{
7137 int sequence_number;
7138
7139 col_append_fstr(pinfo->cinfo, COL_INFO, "-MakeCurrent");
7140
7141 REPLY(reply);
7142 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
7143 *offsetp += 1;
7144 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
7145 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
7146 "%d (glx-MakeCurrent)", sequence_number);
7147 *offsetp += 2;
7148 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
7149 *offsetp += 4;
7150 proto_tree_add_item(t, hf_x11_glx_MakeCurrent_reply_context_tag, tvb, *offsetp, 4, byte_order);
7151 *offsetp += 4;
7152 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 20, ENC_NA);
7153 *offsetp += 20;
7154}
7155
7156static void glxIsDirect(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
7157{
7158 proto_tree_add_item(t, hf_x11_glx_IsDirect_context, tvb, *offsetp, 4, byte_order);
7159 *offsetp += 4;
7160}
7161static void glxIsDirect_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
7162{
7163 int sequence_number;
7164
7165 col_append_fstr(pinfo->cinfo, COL_INFO, "-IsDirect");
7166
7167 REPLY(reply);
7168 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
7169 *offsetp += 1;
7170 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
7171 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
7172 "%d (glx-IsDirect)", sequence_number);
7173 *offsetp += 2;
7174 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
7175 *offsetp += 4;
7176 proto_tree_add_item(t, hf_x11_glx_IsDirect_reply_is_direct, tvb, *offsetp, 1, byte_order);
7177 *offsetp += 1;
7178 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 23, ENC_NA);
7179 *offsetp += 23;
7180}
7181
7182static void glxQueryVersion(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
7183{
7184 proto_tree_add_item(t, hf_x11_glx_QueryVersion_major_version, tvb, *offsetp, 4, byte_order);
7185 *offsetp += 4;
7186 proto_tree_add_item(t, hf_x11_glx_QueryVersion_minor_version, tvb, *offsetp, 4, byte_order);
7187 *offsetp += 4;
7188}
7189static void glxQueryVersion_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
7190{
7191 int sequence_number;
7192
7193 col_append_fstr(pinfo->cinfo, COL_INFO, "-QueryVersion");
7194
7195 REPLY(reply);
7196 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
7197 *offsetp += 1;
7198 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
7199 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
7200 "%d (glx-QueryVersion)", sequence_number);
7201 *offsetp += 2;
7202 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
7203 *offsetp += 4;
7204 proto_tree_add_item(t, hf_x11_glx_QueryVersion_reply_major_version, tvb, *offsetp, 4, byte_order);
7205 *offsetp += 4;
7206 proto_tree_add_item(t, hf_x11_glx_QueryVersion_reply_minor_version, tvb, *offsetp, 4, byte_order);
7207 *offsetp += 4;
7208 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 16, ENC_NA);
7209 *offsetp += 16;
7210}
7211
7212static void glxWaitGL(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
7213{
7214 proto_tree_add_item(t, hf_x11_glx_WaitGL_context_tag, tvb, *offsetp, 4, byte_order);
7215 *offsetp += 4;
7216}
7217
7218static void glxWaitX(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
7219{
7220 proto_tree_add_item(t, hf_x11_glx_WaitX_context_tag, tvb, *offsetp, 4, byte_order);
7221 *offsetp += 4;
7222}
7223
7224static void glxCopyContext(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
7225{
7226 proto_tree_add_item(t, hf_x11_glx_CopyContext_src, tvb, *offsetp, 4, byte_order);
7227 *offsetp += 4;
7228 proto_tree_add_item(t, hf_x11_glx_CopyContext_dest, tvb, *offsetp, 4, byte_order);
7229 *offsetp += 4;
7230 proto_tree_add_item(t, hf_x11_glx_CopyContext_mask, tvb, *offsetp, 4, byte_order);
7231 *offsetp += 4;
7232 proto_tree_add_item(t, hf_x11_glx_CopyContext_src_context_tag, tvb, *offsetp, 4, byte_order);
7233 *offsetp += 4;
7234}
7235
7236static void glxSwapBuffers(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
7237{
7238 proto_tree_add_item(t, hf_x11_glx_SwapBuffers_context_tag, tvb, *offsetp, 4, byte_order);
7239 *offsetp += 4;
7240 proto_tree_add_item(t, hf_x11_glx_SwapBuffers_drawable, tvb, *offsetp, 4, byte_order);
7241 *offsetp += 4;
7242}
7243
7244static void glxUseXFont(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
7245{
7246 proto_tree_add_item(t, hf_x11_glx_UseXFont_context_tag, tvb, *offsetp, 4, byte_order);
7247 *offsetp += 4;
7248 proto_tree_add_item(t, hf_x11_glx_UseXFont_font, tvb, *offsetp, 4, byte_order);
7249 *offsetp += 4;
7250 proto_tree_add_item(t, hf_x11_glx_UseXFont_first, tvb, *offsetp, 4, byte_order);
7251 *offsetp += 4;
7252 proto_tree_add_item(t, hf_x11_glx_UseXFont_count, tvb, *offsetp, 4, byte_order);
7253 *offsetp += 4;
7254 proto_tree_add_item(t, hf_x11_glx_UseXFont_list_base, tvb, *offsetp, 4, byte_order);
7255 *offsetp += 4;
7256}
7257
7258static void glxCreateGLXPixmap(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
7259{
7260 proto_tree_add_item(t, hf_x11_glx_CreateGLXPixmap_screen, tvb, *offsetp, 4, byte_order);
7261 *offsetp += 4;
7262 proto_tree_add_item(t, hf_x11_glx_CreateGLXPixmap_visual, tvb, *offsetp, 4, byte_order);
7263 *offsetp += 4;
7264 proto_tree_add_item(t, hf_x11_glx_CreateGLXPixmap_pixmap, tvb, *offsetp, 4, byte_order);
7265 *offsetp += 4;
7266 proto_tree_add_item(t, hf_x11_glx_CreateGLXPixmap_glx_pixmap, tvb, *offsetp, 4, byte_order);
7267 *offsetp += 4;
7268}
7269
7270static void glxGetVisualConfigs(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
7271{
7272 proto_tree_add_item(t, hf_x11_glx_GetVisualConfigs_screen, tvb, *offsetp, 4, byte_order);
7273 *offsetp += 4;
7274}
7275static void glxGetVisualConfigs_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
7276{
7277 int sequence_number;
7278 int f_length;
7279
7280 col_append_fstr(pinfo->cinfo, COL_INFO, "-GetVisualConfigs");
7281
7282 REPLY(reply);
7283 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
7284 *offsetp += 1;
7285 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
7286 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
7287 "%d (glx-GetVisualConfigs)", sequence_number);
7288 *offsetp += 2;
7289 f_length = tvb_get_uint32(tvb, *offsetp, byte_order);
7290 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
7291 *offsetp += 4;
7292 proto_tree_add_item(t, hf_x11_glx_GetVisualConfigs_reply_num_visuals, tvb, *offsetp, 4, byte_order);
7293 *offsetp += 4;
7294 proto_tree_add_item(t, hf_x11_glx_GetVisualConfigs_reply_num_properties, tvb, *offsetp, 4, byte_order);
7295 *offsetp += 4;
7296 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 16, ENC_NA);
7297 *offsetp += 16;
7298 listOfCard32(tvb, offsetp, t, hf_x11_glx_GetVisualConfigs_reply_property_list, hf_x11_glx_GetVisualConfigs_reply_property_list_item, f_length, byte_order);
7299}
7300
7301static void glxDestroyGLXPixmap(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
7302{
7303 proto_tree_add_item(t, hf_x11_glx_DestroyGLXPixmap_glx_pixmap, tvb, *offsetp, 4, byte_order);
7304 *offsetp += 4;
7305}
7306
7307static void glxVendorPrivate(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
7308{
7309 proto_tree_add_item(t, hf_x11_glx_VendorPrivate_vendor_code, tvb, *offsetp, 4, byte_order);
7310 *offsetp += 4;
7311 proto_tree_add_item(t, hf_x11_glx_VendorPrivate_context_tag, tvb, *offsetp, 4, byte_order);
7312 *offsetp += 4;
7313 listOfByte(tvb, offsetp, t, hf_x11_glx_VendorPrivate_data, (length - 12) / 1, byte_order);
7314}
7315
7316static void glxVendorPrivateWithReply(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
7317{
7318 proto_tree_add_item(t, hf_x11_glx_VendorPrivateWithReply_vendor_code, tvb, *offsetp, 4, byte_order);
7319 *offsetp += 4;
7320 proto_tree_add_item(t, hf_x11_glx_VendorPrivateWithReply_context_tag, tvb, *offsetp, 4, byte_order);
7321 *offsetp += 4;
7322 listOfByte(tvb, offsetp, t, hf_x11_glx_VendorPrivateWithReply_data, (length - 12) / 1, byte_order);
7323}
7324static void glxVendorPrivateWithReply_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
7325{
7326 int sequence_number;
7327 int f_length;
7328
7329 col_append_fstr(pinfo->cinfo, COL_INFO, "-VendorPrivateWithReply");
7330
7331 REPLY(reply);
7332 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
7333 *offsetp += 1;
7334 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
7335 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
7336 "%d (glx-VendorPrivateWithReply)", sequence_number);
7337 *offsetp += 2;
7338 f_length = tvb_get_uint32(tvb, *offsetp, byte_order);
7339 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
7340 *offsetp += 4;
7341 proto_tree_add_item(t, hf_x11_glx_VendorPrivateWithReply_reply_retval, tvb, *offsetp, 4, byte_order);
7342 *offsetp += 4;
7343 listOfByte(tvb, offsetp, t, hf_x11_glx_VendorPrivateWithReply_reply_data1, 24, byte_order);
7344 listOfByte(tvb, offsetp, t, hf_x11_glx_VendorPrivateWithReply_reply_data2, (f_length * 4), byte_order);
7345}
7346
7347static void glxQueryExtensionsString(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
7348{
7349 proto_tree_add_item(t, hf_x11_glx_QueryExtensionsString_screen, tvb, *offsetp, 4, byte_order);
7350 *offsetp += 4;
7351}
7352static void glxQueryExtensionsString_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
7353{
7354 int sequence_number;
7355
7356 col_append_fstr(pinfo->cinfo, COL_INFO, "-QueryExtensionsString");
7357
7358 REPLY(reply);
7359 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
7360 *offsetp += 1;
7361 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
7362 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
7363 "%d (glx-QueryExtensionsString)", sequence_number);
7364 *offsetp += 2;
7365 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
7366 *offsetp += 4;
7367 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 4, ENC_NA);
7368 *offsetp += 4;
7369 proto_tree_add_item(t, hf_x11_glx_QueryExtensionsString_reply_n, tvb, *offsetp, 4, byte_order);
7370 *offsetp += 4;
7371 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 16, ENC_NA);
7372 *offsetp += 16;
7373}
7374
7375static void glxQueryServerString(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
7376{
7377 proto_tree_add_item(t, hf_x11_glx_QueryServerString_screen, tvb, *offsetp, 4, byte_order);
7378 *offsetp += 4;
7379 proto_tree_add_item(t, hf_x11_glx_QueryServerString_name, tvb, *offsetp, 4, byte_order);
7380 *offsetp += 4;
7381}
7382static void glxQueryServerString_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
7383{
7384 int sequence_number;
7385 int f_str_len;
7386
7387 col_append_fstr(pinfo->cinfo, COL_INFO, "-QueryServerString");
7388
7389 REPLY(reply);
7390 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
7391 *offsetp += 1;
7392 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
7393 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
7394 "%d (glx-QueryServerString)", sequence_number);
7395 *offsetp += 2;
7396 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
7397 *offsetp += 4;
7398 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 4, ENC_NA);
7399 *offsetp += 4;
7400 f_str_len = tvb_get_uint32(tvb, *offsetp, byte_order);
7401 proto_tree_add_item(t, hf_x11_glx_QueryServerString_reply_str_len, tvb, *offsetp, 4, byte_order);
7402 *offsetp += 4;
7403 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 16, ENC_NA);
7404 *offsetp += 16;
7405 listOfByte(tvb, offsetp, t, hf_x11_glx_QueryServerString_reply_string, f_str_len, byte_order);
7406}
7407
7408static void glxClientInfo(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
7409{
7410 int f_str_len;
7411 proto_tree_add_item(t, hf_x11_glx_ClientInfo_major_version, tvb, *offsetp, 4, byte_order);
7412 *offsetp += 4;
7413 proto_tree_add_item(t, hf_x11_glx_ClientInfo_minor_version, tvb, *offsetp, 4, byte_order);
7414 *offsetp += 4;
7415 f_str_len = tvb_get_uint32(tvb, *offsetp, byte_order);
7416 proto_tree_add_item(t, hf_x11_glx_ClientInfo_str_len, tvb, *offsetp, 4, byte_order);
7417 *offsetp += 4;
7418 listOfByte(tvb, offsetp, t, hf_x11_glx_ClientInfo_string, f_str_len, byte_order);
7419 length -= f_str_len * 1;
7420}
7421
7422static void glxGetFBConfigs(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
7423{
7424 proto_tree_add_item(t, hf_x11_glx_GetFBConfigs_screen, tvb, *offsetp, 4, byte_order);
7425 *offsetp += 4;
7426}
7427static void glxGetFBConfigs_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
7428{
7429 int sequence_number;
7430 int f_length;
7431
7432 col_append_fstr(pinfo->cinfo, COL_INFO, "-GetFBConfigs");
7433
7434 REPLY(reply);
7435 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
7436 *offsetp += 1;
7437 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
7438 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
7439 "%d (glx-GetFBConfigs)", sequence_number);
7440 *offsetp += 2;
7441 f_length = tvb_get_uint32(tvb, *offsetp, byte_order);
7442 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
7443 *offsetp += 4;
7444 proto_tree_add_item(t, hf_x11_glx_GetFBConfigs_reply_num_FB_configs, tvb, *offsetp, 4, byte_order);
7445 *offsetp += 4;
7446 proto_tree_add_item(t, hf_x11_glx_GetFBConfigs_reply_num_properties, tvb, *offsetp, 4, byte_order);
7447 *offsetp += 4;
7448 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 16, ENC_NA);
7449 *offsetp += 16;
7450 listOfCard32(tvb, offsetp, t, hf_x11_glx_GetFBConfigs_reply_property_list, hf_x11_glx_GetFBConfigs_reply_property_list_item, f_length, byte_order);
7451}
7452
7453static void glxCreatePixmap(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
7454{
7455 int f_num_attribs;
7456 proto_tree_add_item(t, hf_x11_glx_CreatePixmap_screen, tvb, *offsetp, 4, byte_order);
7457 *offsetp += 4;
7458 proto_tree_add_item(t, hf_x11_glx_CreatePixmap_fbconfig, tvb, *offsetp, 4, byte_order);
7459 *offsetp += 4;
7460 proto_tree_add_item(t, hf_x11_glx_CreatePixmap_pixmap, tvb, *offsetp, 4, byte_order);
7461 *offsetp += 4;
7462 proto_tree_add_item(t, hf_x11_glx_CreatePixmap_glx_pixmap, tvb, *offsetp, 4, byte_order);
7463 *offsetp += 4;
7464 f_num_attribs = tvb_get_uint32(tvb, *offsetp, byte_order);
7465 proto_tree_add_item(t, hf_x11_glx_CreatePixmap_num_attribs, tvb, *offsetp, 4, byte_order);
7466 *offsetp += 4;
7467 listOfCard32(tvb, offsetp, t, hf_x11_glx_CreatePixmap_attribs, hf_x11_glx_CreatePixmap_attribs_item, (f_num_attribs * 2), byte_order);
7468 length -= (f_num_attribs * 2) * 4;
7469}
7470
7471static void glxDestroyPixmap(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
7472{
7473 proto_tree_add_item(t, hf_x11_glx_DestroyPixmap_glx_pixmap, tvb, *offsetp, 4, byte_order);
7474 *offsetp += 4;
7475}
7476
7477static void glxCreateNewContext(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
7478{
7479 proto_tree_add_item(t, hf_x11_glx_CreateNewContext_context, tvb, *offsetp, 4, byte_order);
7480 *offsetp += 4;
7481 proto_tree_add_item(t, hf_x11_glx_CreateNewContext_fbconfig, tvb, *offsetp, 4, byte_order);
7482 *offsetp += 4;
7483 proto_tree_add_item(t, hf_x11_glx_CreateNewContext_screen, tvb, *offsetp, 4, byte_order);
7484 *offsetp += 4;
7485 proto_tree_add_item(t, hf_x11_glx_CreateNewContext_render_type, tvb, *offsetp, 4, byte_order);
7486 *offsetp += 4;
7487 proto_tree_add_item(t, hf_x11_glx_CreateNewContext_share_list, tvb, *offsetp, 4, byte_order);
7488 *offsetp += 4;
7489 proto_tree_add_item(t, hf_x11_glx_CreateNewContext_is_direct, tvb, *offsetp, 1, byte_order);
7490 *offsetp += 1;
7491 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 3, ENC_NA);
7492 *offsetp += 3;
7493}
7494
7495static void glxQueryContext(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
7496{
7497 proto_tree_add_item(t, hf_x11_glx_QueryContext_context, tvb, *offsetp, 4, byte_order);
7498 *offsetp += 4;
7499}
7500static void glxQueryContext_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
7501{
7502 int sequence_number;
7503 int f_num_attribs;
7504
7505 col_append_fstr(pinfo->cinfo, COL_INFO, "-QueryContext");
7506
7507 REPLY(reply);
7508 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
7509 *offsetp += 1;
7510 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
7511 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
7512 "%d (glx-QueryContext)", sequence_number);
7513 *offsetp += 2;
7514 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
7515 *offsetp += 4;
7516 f_num_attribs = tvb_get_uint32(tvb, *offsetp, byte_order);
7517 proto_tree_add_item(t, hf_x11_glx_QueryContext_reply_num_attribs, tvb, *offsetp, 4, byte_order);
7518 *offsetp += 4;
7519 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 20, ENC_NA);
7520 *offsetp += 20;
7521 listOfCard32(tvb, offsetp, t, hf_x11_glx_QueryContext_reply_attribs, hf_x11_glx_QueryContext_reply_attribs_item, (f_num_attribs * 2), byte_order);
7522}
7523
7524static void glxMakeContextCurrent(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
7525{
7526 proto_tree_add_item(t, hf_x11_glx_MakeContextCurrent_old_context_tag, tvb, *offsetp, 4, byte_order);
7527 *offsetp += 4;
7528 proto_tree_add_item(t, hf_x11_glx_MakeContextCurrent_drawable, tvb, *offsetp, 4, byte_order);
7529 *offsetp += 4;
7530 proto_tree_add_item(t, hf_x11_glx_MakeContextCurrent_read_drawable, tvb, *offsetp, 4, byte_order);
7531 *offsetp += 4;
7532 proto_tree_add_item(t, hf_x11_glx_MakeContextCurrent_context, tvb, *offsetp, 4, byte_order);
7533 *offsetp += 4;
7534}
7535static void glxMakeContextCurrent_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
7536{
7537 int sequence_number;
7538
7539 col_append_fstr(pinfo->cinfo, COL_INFO, "-MakeContextCurrent");
7540
7541 REPLY(reply);
7542 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
7543 *offsetp += 1;
7544 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
7545 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
7546 "%d (glx-MakeContextCurrent)", sequence_number);
7547 *offsetp += 2;
7548 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
7549 *offsetp += 4;
7550 proto_tree_add_item(t, hf_x11_glx_MakeContextCurrent_reply_context_tag, tvb, *offsetp, 4, byte_order);
7551 *offsetp += 4;
7552 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 20, ENC_NA);
7553 *offsetp += 20;
7554}
7555
7556static void glxCreatePbuffer(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
7557{
7558 int f_num_attribs;
7559 proto_tree_add_item(t, hf_x11_glx_CreatePbuffer_screen, tvb, *offsetp, 4, byte_order);
7560 *offsetp += 4;
7561 proto_tree_add_item(t, hf_x11_glx_CreatePbuffer_fbconfig, tvb, *offsetp, 4, byte_order);
7562 *offsetp += 4;
7563 proto_tree_add_item(t, hf_x11_glx_CreatePbuffer_pbuffer, tvb, *offsetp, 4, byte_order);
7564 *offsetp += 4;
7565 f_num_attribs = tvb_get_uint32(tvb, *offsetp, byte_order);
7566 proto_tree_add_item(t, hf_x11_glx_CreatePbuffer_num_attribs, tvb, *offsetp, 4, byte_order);
7567 *offsetp += 4;
7568 listOfCard32(tvb, offsetp, t, hf_x11_glx_CreatePbuffer_attribs, hf_x11_glx_CreatePbuffer_attribs_item, (f_num_attribs * 2), byte_order);
7569 length -= (f_num_attribs * 2) * 4;
7570}
7571
7572static void glxDestroyPbuffer(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
7573{
7574 proto_tree_add_item(t, hf_x11_glx_DestroyPbuffer_pbuffer, tvb, *offsetp, 4, byte_order);
7575 *offsetp += 4;
7576}
7577
7578static void glxGetDrawableAttributes(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
7579{
7580 proto_tree_add_item(t, hf_x11_glx_GetDrawableAttributes_drawable, tvb, *offsetp, 4, byte_order);
7581 *offsetp += 4;
7582}
7583static void glxGetDrawableAttributes_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
7584{
7585 int sequence_number;
7586 int f_num_attribs;
7587
7588 col_append_fstr(pinfo->cinfo, COL_INFO, "-GetDrawableAttributes");
7589
7590 REPLY(reply);
7591 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
7592 *offsetp += 1;
7593 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
7594 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
7595 "%d (glx-GetDrawableAttributes)", sequence_number);
7596 *offsetp += 2;
7597 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
7598 *offsetp += 4;
7599 f_num_attribs = tvb_get_uint32(tvb, *offsetp, byte_order);
7600 proto_tree_add_item(t, hf_x11_glx_GetDrawableAttributes_reply_num_attribs, tvb, *offsetp, 4, byte_order);
7601 *offsetp += 4;
7602 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 20, ENC_NA);
7603 *offsetp += 20;
7604 listOfCard32(tvb, offsetp, t, hf_x11_glx_GetDrawableAttributes_reply_attribs, hf_x11_glx_GetDrawableAttributes_reply_attribs_item, (f_num_attribs * 2), byte_order);
7605}
7606
7607static void glxChangeDrawableAttributes(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
7608{
7609 int f_num_attribs;
7610 proto_tree_add_item(t, hf_x11_glx_ChangeDrawableAttributes_drawable, tvb, *offsetp, 4, byte_order);
7611 *offsetp += 4;
7612 f_num_attribs = tvb_get_uint32(tvb, *offsetp, byte_order);
7613 proto_tree_add_item(t, hf_x11_glx_ChangeDrawableAttributes_num_attribs, tvb, *offsetp, 4, byte_order);
7614 *offsetp += 4;
7615 listOfCard32(tvb, offsetp, t, hf_x11_glx_ChangeDrawableAttributes_attribs, hf_x11_glx_ChangeDrawableAttributes_attribs_item, (f_num_attribs * 2), byte_order);
7616 length -= (f_num_attribs * 2) * 4;
7617}
7618
7619static void glxCreateWindow(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
7620{
7621 int f_num_attribs;
7622 proto_tree_add_item(t, hf_x11_glx_CreateWindow_screen, tvb, *offsetp, 4, byte_order);
7623 *offsetp += 4;
7624 proto_tree_add_item(t, hf_x11_glx_CreateWindow_fbconfig, tvb, *offsetp, 4, byte_order);
7625 *offsetp += 4;
7626 proto_tree_add_item(t, hf_x11_glx_CreateWindow_window, tvb, *offsetp, 4, byte_order);
7627 *offsetp += 4;
7628 proto_tree_add_item(t, hf_x11_glx_CreateWindow_glx_window, tvb, *offsetp, 4, byte_order);
7629 *offsetp += 4;
7630 f_num_attribs = tvb_get_uint32(tvb, *offsetp, byte_order);
7631 proto_tree_add_item(t, hf_x11_glx_CreateWindow_num_attribs, tvb, *offsetp, 4, byte_order);
7632 *offsetp += 4;
7633 listOfCard32(tvb, offsetp, t, hf_x11_glx_CreateWindow_attribs, hf_x11_glx_CreateWindow_attribs_item, (f_num_attribs * 2), byte_order);
7634 length -= (f_num_attribs * 2) * 4;
7635}
7636
7637static void glxDeleteWindow(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
7638{
7639 proto_tree_add_item(t, hf_x11_glx_DeleteWindow_glxwindow, tvb, *offsetp, 4, byte_order);
7640 *offsetp += 4;
7641}
7642
7643static void glxSetClientInfoARB(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
7644{
7645 int f_num_versions;
7646 int f_gl_str_len;
7647 int f_glx_str_len;
7648 proto_tree_add_item(t, hf_x11_glx_SetClientInfoARB_major_version, tvb, *offsetp, 4, byte_order);
7649 *offsetp += 4;
7650 proto_tree_add_item(t, hf_x11_glx_SetClientInfoARB_minor_version, tvb, *offsetp, 4, byte_order);
7651 *offsetp += 4;
7652 f_num_versions = tvb_get_uint32(tvb, *offsetp, byte_order);
7653 proto_tree_add_item(t, hf_x11_glx_SetClientInfoARB_num_versions, tvb, *offsetp, 4, byte_order);
7654 *offsetp += 4;
7655 f_gl_str_len = tvb_get_uint32(tvb, *offsetp, byte_order);
7656 proto_tree_add_item(t, hf_x11_glx_SetClientInfoARB_gl_str_len, tvb, *offsetp, 4, byte_order);
7657 *offsetp += 4;
7658 f_glx_str_len = tvb_get_uint32(tvb, *offsetp, byte_order);
7659 proto_tree_add_item(t, hf_x11_glx_SetClientInfoARB_glx_str_len, tvb, *offsetp, 4, byte_order);
7660 *offsetp += 4;
7661 listOfCard32(tvb, offsetp, t, hf_x11_glx_SetClientInfoARB_gl_versions, hf_x11_glx_SetClientInfoARB_gl_versions_item, (f_num_versions * 2), byte_order);
7662 length -= (f_num_versions * 2) * 4;
7663 listOfByte(tvb, offsetp, t, hf_x11_glx_SetClientInfoARB_gl_extension_string, f_gl_str_len, byte_order);
7664 length -= f_gl_str_len * 1;
7665 if (*offsetp % 4) {
7666 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, (4 - *offsetp % 4), ENC_NA);
7667 *offsetp += (4 - *offsetp % 4);
7668 }
7669 length = ((length + 3) & ~3);
7670 listOfByte(tvb, offsetp, t, hf_x11_glx_SetClientInfoARB_glx_extension_string, f_glx_str_len, byte_order);
7671 length -= f_glx_str_len * 1;
7672}
7673
7674static void glxCreateContextAttribsARB(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
7675{
7676 int f_num_attribs;
7677 proto_tree_add_item(t, hf_x11_glx_CreateContextAttribsARB_context, tvb, *offsetp, 4, byte_order);
7678 *offsetp += 4;
7679 proto_tree_add_item(t, hf_x11_glx_CreateContextAttribsARB_fbconfig, tvb, *offsetp, 4, byte_order);
7680 *offsetp += 4;
7681 proto_tree_add_item(t, hf_x11_glx_CreateContextAttribsARB_screen, tvb, *offsetp, 4, byte_order);
7682 *offsetp += 4;
7683 proto_tree_add_item(t, hf_x11_glx_CreateContextAttribsARB_share_list, tvb, *offsetp, 4, byte_order);
7684 *offsetp += 4;
7685 proto_tree_add_item(t, hf_x11_glx_CreateContextAttribsARB_is_direct, tvb, *offsetp, 1, byte_order);
7686 *offsetp += 1;
7687 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 3, ENC_NA);
7688 *offsetp += 3;
7689 f_num_attribs = tvb_get_uint32(tvb, *offsetp, byte_order);
7690 proto_tree_add_item(t, hf_x11_glx_CreateContextAttribsARB_num_attribs, tvb, *offsetp, 4, byte_order);
7691 *offsetp += 4;
7692 listOfCard32(tvb, offsetp, t, hf_x11_glx_CreateContextAttribsARB_attribs, hf_x11_glx_CreateContextAttribsARB_attribs_item, (f_num_attribs * 2), byte_order);
7693 length -= (f_num_attribs * 2) * 4;
7694}
7695
7696static void glxSetClientInfo2ARB(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
7697{
7698 int f_num_versions;
7699 int f_gl_str_len;
7700 int f_glx_str_len;
7701 proto_tree_add_item(t, hf_x11_glx_SetClientInfo2ARB_major_version, tvb, *offsetp, 4, byte_order);
7702 *offsetp += 4;
7703 proto_tree_add_item(t, hf_x11_glx_SetClientInfo2ARB_minor_version, tvb, *offsetp, 4, byte_order);
7704 *offsetp += 4;
7705 f_num_versions = tvb_get_uint32(tvb, *offsetp, byte_order);
7706 proto_tree_add_item(t, hf_x11_glx_SetClientInfo2ARB_num_versions, tvb, *offsetp, 4, byte_order);
7707 *offsetp += 4;
7708 f_gl_str_len = tvb_get_uint32(tvb, *offsetp, byte_order);
7709 proto_tree_add_item(t, hf_x11_glx_SetClientInfo2ARB_gl_str_len, tvb, *offsetp, 4, byte_order);
7710 *offsetp += 4;
7711 f_glx_str_len = tvb_get_uint32(tvb, *offsetp, byte_order);
7712 proto_tree_add_item(t, hf_x11_glx_SetClientInfo2ARB_glx_str_len, tvb, *offsetp, 4, byte_order);
7713 *offsetp += 4;
7714 listOfCard32(tvb, offsetp, t, hf_x11_glx_SetClientInfo2ARB_gl_versions, hf_x11_glx_SetClientInfo2ARB_gl_versions_item, (f_num_versions * 3), byte_order);
7715 length -= (f_num_versions * 3) * 4;
7716 listOfByte(tvb, offsetp, t, hf_x11_glx_SetClientInfo2ARB_gl_extension_string, f_gl_str_len, byte_order);
7717 length -= f_gl_str_len * 1;
7718 if (*offsetp % 4) {
7719 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, (4 - *offsetp % 4), ENC_NA);
7720 *offsetp += (4 - *offsetp % 4);
7721 }
7722 length = ((length + 3) & ~3);
7723 listOfByte(tvb, offsetp, t, hf_x11_glx_SetClientInfo2ARB_glx_extension_string, f_glx_str_len, byte_order);
7724 length -= f_glx_str_len * 1;
7725}
7726
7727static void glxNewList(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
7728{
7729 proto_tree_add_item(t, hf_x11_glx_NewList_context_tag, tvb, *offsetp, 4, byte_order);
7730 *offsetp += 4;
7731 proto_tree_add_item(t, hf_x11_glx_NewList_list, tvb, *offsetp, 4, byte_order);
7732 *offsetp += 4;
7733 proto_tree_add_item(t, hf_x11_glx_NewList_mode, tvb, *offsetp, 4, byte_order);
7734 *offsetp += 4;
7735}
7736
7737static void glxEndList(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
7738{
7739 proto_tree_add_item(t, hf_x11_glx_EndList_context_tag, tvb, *offsetp, 4, byte_order);
7740 *offsetp += 4;
7741}
7742
7743static void glxDeleteLists(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
7744{
7745 proto_tree_add_item(t, hf_x11_glx_DeleteLists_context_tag, tvb, *offsetp, 4, byte_order);
7746 *offsetp += 4;
7747 proto_tree_add_item(t, hf_x11_glx_DeleteLists_list, tvb, *offsetp, 4, byte_order);
7748 *offsetp += 4;
7749 proto_tree_add_item(t, hf_x11_glx_DeleteLists_range, tvb, *offsetp, 4, byte_order);
7750 *offsetp += 4;
7751}
7752
7753static void glxGenLists(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
7754{
7755 proto_tree_add_item(t, hf_x11_glx_GenLists_context_tag, tvb, *offsetp, 4, byte_order);
7756 *offsetp += 4;
7757 proto_tree_add_item(t, hf_x11_glx_GenLists_range, tvb, *offsetp, 4, byte_order);
7758 *offsetp += 4;
7759}
7760static void glxGenLists_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
7761{
7762 int sequence_number;
7763
7764 col_append_fstr(pinfo->cinfo, COL_INFO, "-GenLists");
7765
7766 REPLY(reply);
7767 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
7768 *offsetp += 1;
7769 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
7770 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
7771 "%d (glx-GenLists)", sequence_number);
7772 *offsetp += 2;
7773 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
7774 *offsetp += 4;
7775 proto_tree_add_item(t, hf_x11_glx_GenLists_reply_ret_val, tvb, *offsetp, 4, byte_order);
7776 *offsetp += 4;
7777}
7778
7779static void glxFeedbackBuffer(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
7780{
7781 proto_tree_add_item(t, hf_x11_glx_FeedbackBuffer_context_tag, tvb, *offsetp, 4, byte_order);
7782 *offsetp += 4;
7783 proto_tree_add_item(t, hf_x11_glx_FeedbackBuffer_size, tvb, *offsetp, 4, byte_order);
7784 *offsetp += 4;
7785 proto_tree_add_item(t, hf_x11_glx_FeedbackBuffer_type, tvb, *offsetp, 4, byte_order);
7786 *offsetp += 4;
7787}
7788
7789static void glxSelectBuffer(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
7790{
7791 proto_tree_add_item(t, hf_x11_glx_SelectBuffer_context_tag, tvb, *offsetp, 4, byte_order);
7792 *offsetp += 4;
7793 proto_tree_add_item(t, hf_x11_glx_SelectBuffer_size, tvb, *offsetp, 4, byte_order);
7794 *offsetp += 4;
7795}
7796
7797static void glxRenderMode(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
7798{
7799 proto_tree_add_item(t, hf_x11_glx_RenderMode_context_tag, tvb, *offsetp, 4, byte_order);
7800 *offsetp += 4;
7801 proto_tree_add_item(t, hf_x11_glx_RenderMode_mode, tvb, *offsetp, 4, byte_order);
7802 *offsetp += 4;
7803}
7804static void glxRenderMode_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
7805{
7806 int sequence_number;
7807 int f_n;
7808
7809 col_append_fstr(pinfo->cinfo, COL_INFO, "-RenderMode");
7810
7811 REPLY(reply);
7812 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
7813 *offsetp += 1;
7814 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
7815 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
7816 "%d (glx-RenderMode)", sequence_number);
7817 *offsetp += 2;
7818 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
7819 *offsetp += 4;
7820 proto_tree_add_item(t, hf_x11_glx_RenderMode_reply_ret_val, tvb, *offsetp, 4, byte_order);
7821 *offsetp += 4;
7822 f_n = tvb_get_uint32(tvb, *offsetp, byte_order);
7823 proto_tree_add_item(t, hf_x11_glx_RenderMode_reply_n, tvb, *offsetp, 4, byte_order);
7824 *offsetp += 4;
7825 proto_tree_add_item(t, hf_x11_glx_RenderMode_reply_new_mode, tvb, *offsetp, 4, byte_order);
7826 *offsetp += 4;
7827 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 12, ENC_NA);
7828 *offsetp += 12;
7829 listOfCard32(tvb, offsetp, t, hf_x11_glx_RenderMode_reply_data, hf_x11_glx_RenderMode_reply_data_item, f_n, byte_order);
7830}
7831
7832static void glxFinish(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
7833{
7834 proto_tree_add_item(t, hf_x11_glx_Finish_context_tag, tvb, *offsetp, 4, byte_order);
7835 *offsetp += 4;
7836}
7837static void glxFinish_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
7838{
7839 int sequence_number;
7840
7841 col_append_fstr(pinfo->cinfo, COL_INFO, "-Finish");
7842
7843 REPLY(reply);
7844 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
7845 *offsetp += 1;
7846 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
7847 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
7848 "%d (glx-Finish)", sequence_number);
7849 *offsetp += 2;
7850 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
7851 *offsetp += 4;
7852}
7853
7854static void glxPixelStoref(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
7855{
7856 proto_tree_add_item(t, hf_x11_glx_PixelStoref_context_tag, tvb, *offsetp, 4, byte_order);
7857 *offsetp += 4;
7858 proto_tree_add_item(t, hf_x11_glx_PixelStoref_pname, tvb, *offsetp, 4, byte_order);
7859 *offsetp += 4;
7860 proto_tree_add_item(t, hf_x11_glx_PixelStoref_datum, tvb, *offsetp, 4, byte_order);
7861 *offsetp += 4;
7862}
7863
7864static void glxPixelStorei(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
7865{
7866 proto_tree_add_item(t, hf_x11_glx_PixelStorei_context_tag, tvb, *offsetp, 4, byte_order);
7867 *offsetp += 4;
7868 proto_tree_add_item(t, hf_x11_glx_PixelStorei_pname, tvb, *offsetp, 4, byte_order);
7869 *offsetp += 4;
7870 proto_tree_add_item(t, hf_x11_glx_PixelStorei_datum, tvb, *offsetp, 4, byte_order);
7871 *offsetp += 4;
7872}
7873
7874static void glxReadPixels(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
7875{
7876 proto_tree_add_item(t, hf_x11_glx_ReadPixels_context_tag, tvb, *offsetp, 4, byte_order);
7877 *offsetp += 4;
7878 proto_tree_add_item(t, hf_x11_glx_ReadPixels_x, tvb, *offsetp, 4, byte_order);
7879 *offsetp += 4;
7880 proto_tree_add_item(t, hf_x11_glx_ReadPixels_y, tvb, *offsetp, 4, byte_order);
7881 *offsetp += 4;
7882 proto_tree_add_item(t, hf_x11_glx_ReadPixels_width, tvb, *offsetp, 4, byte_order);
7883 *offsetp += 4;
7884 proto_tree_add_item(t, hf_x11_glx_ReadPixels_height, tvb, *offsetp, 4, byte_order);
7885 *offsetp += 4;
7886 proto_tree_add_item(t, hf_x11_glx_ReadPixels_format, tvb, *offsetp, 4, byte_order);
7887 *offsetp += 4;
7888 proto_tree_add_item(t, hf_x11_glx_ReadPixels_type, tvb, *offsetp, 4, byte_order);
7889 *offsetp += 4;
7890 proto_tree_add_item(t, hf_x11_glx_ReadPixels_swap_bytes, tvb, *offsetp, 1, byte_order);
7891 *offsetp += 1;
7892 proto_tree_add_item(t, hf_x11_glx_ReadPixels_lsb_first, tvb, *offsetp, 1, byte_order);
7893 *offsetp += 1;
7894}
7895static void glxReadPixels_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
7896{
7897 int sequence_number;
7898 int f_length;
7899
7900 col_append_fstr(pinfo->cinfo, COL_INFO, "-ReadPixels");
7901
7902 REPLY(reply);
7903 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
7904 *offsetp += 1;
7905 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
7906 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
7907 "%d (glx-ReadPixels)", sequence_number);
7908 *offsetp += 2;
7909 f_length = tvb_get_uint32(tvb, *offsetp, byte_order);
7910 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
7911 *offsetp += 4;
7912 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 24, ENC_NA);
7913 *offsetp += 24;
7914 listOfByte(tvb, offsetp, t, hf_x11_glx_ReadPixels_reply_data, (f_length * 4), byte_order);
7915}
7916
7917static void glxGetBooleanv(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
7918{
7919 proto_tree_add_item(t, hf_x11_glx_GetBooleanv_context_tag, tvb, *offsetp, 4, byte_order);
7920 *offsetp += 4;
7921 proto_tree_add_item(t, hf_x11_glx_GetBooleanv_pname, tvb, *offsetp, 4, byte_order);
7922 *offsetp += 4;
7923}
7924static void glxGetBooleanv_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
7925{
7926 int sequence_number;
7927 int f_n;
7928
7929 col_append_fstr(pinfo->cinfo, COL_INFO, "-GetBooleanv");
7930
7931 REPLY(reply);
7932 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
7933 *offsetp += 1;
7934 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
7935 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
7936 "%d (glx-GetBooleanv)", sequence_number);
7937 *offsetp += 2;
7938 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
7939 *offsetp += 4;
7940 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 4, ENC_NA);
7941 *offsetp += 4;
7942 f_n = tvb_get_uint32(tvb, *offsetp, byte_order);
7943 proto_tree_add_item(t, hf_x11_glx_GetBooleanv_reply_n, tvb, *offsetp, 4, byte_order);
7944 *offsetp += 4;
7945 proto_tree_add_item(t, hf_x11_glx_GetBooleanv_reply_datum, tvb, *offsetp, 1, byte_order);
7946 *offsetp += 1;
7947 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 15, ENC_NA);
7948 *offsetp += 15;
7949 listOfByte(tvb, offsetp, t, hf_x11_glx_GetBooleanv_reply_data, f_n, byte_order);
7950}
7951
7952static void glxGetClipPlane(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
7953{
7954 proto_tree_add_item(t, hf_x11_glx_GetClipPlane_context_tag, tvb, *offsetp, 4, byte_order);
7955 *offsetp += 4;
7956 proto_tree_add_item(t, hf_x11_glx_GetClipPlane_plane, tvb, *offsetp, 4, byte_order);
7957 *offsetp += 4;
7958}
7959static void glxGetClipPlane_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
7960{
7961 int sequence_number;
7962 int f_length;
7963
7964 col_append_fstr(pinfo->cinfo, COL_INFO, "-GetClipPlane");
7965
7966 REPLY(reply);
7967 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
7968 *offsetp += 1;
7969 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
7970 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
7971 "%d (glx-GetClipPlane)", sequence_number);
7972 *offsetp += 2;
7973 f_length = tvb_get_uint32(tvb, *offsetp, byte_order);
7974 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
7975 *offsetp += 4;
7976 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 24, ENC_NA);
7977 *offsetp += 24;
7978 listOfDouble(tvb, offsetp, t, hf_x11_glx_GetClipPlane_reply_data, hf_x11_glx_GetClipPlane_reply_data_item, (f_length / 2), byte_order);
7979}
7980
7981static void glxGetDoublev(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
7982{
7983 proto_tree_add_item(t, hf_x11_glx_GetDoublev_context_tag, tvb, *offsetp, 4, byte_order);
7984 *offsetp += 4;
7985 proto_tree_add_item(t, hf_x11_glx_GetDoublev_pname, tvb, *offsetp, 4, byte_order);
7986 *offsetp += 4;
7987}
7988static void glxGetDoublev_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
7989{
7990 int sequence_number;
7991 int f_n;
7992
7993 col_append_fstr(pinfo->cinfo, COL_INFO, "-GetDoublev");
7994
7995 REPLY(reply);
7996 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
7997 *offsetp += 1;
7998 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
7999 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
8000 "%d (glx-GetDoublev)", sequence_number);
8001 *offsetp += 2;
8002 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
8003 *offsetp += 4;
8004 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 4, ENC_NA);
8005 *offsetp += 4;
8006 f_n = tvb_get_uint32(tvb, *offsetp, byte_order);
8007 proto_tree_add_item(t, hf_x11_glx_GetDoublev_reply_n, tvb, *offsetp, 4, byte_order);
8008 *offsetp += 4;
8009 proto_tree_add_item(t, hf_x11_glx_GetDoublev_reply_datum, tvb, *offsetp, 8, byte_order);
8010 *offsetp += 8;
8011 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 8, ENC_NA);
8012 *offsetp += 8;
8013 listOfDouble(tvb, offsetp, t, hf_x11_glx_GetDoublev_reply_data, hf_x11_glx_GetDoublev_reply_data_item, f_n, byte_order);
8014}
8015
8016static void glxGetError(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
8017{
8018 proto_tree_add_item(t, hf_x11_glx_GetError_context_tag, tvb, *offsetp, 4, byte_order);
8019 *offsetp += 4;
8020}
8021static void glxGetError_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
8022{
8023 int sequence_number;
8024
8025 col_append_fstr(pinfo->cinfo, COL_INFO, "-GetError");
8026
8027 REPLY(reply);
8028 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
8029 *offsetp += 1;
8030 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
8031 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
8032 "%d (glx-GetError)", sequence_number);
8033 *offsetp += 2;
8034 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
8035 *offsetp += 4;
8036 proto_tree_add_item(t, hf_x11_glx_GetError_reply_error, tvb, *offsetp, 4, byte_order);
8037 *offsetp += 4;
8038}
8039
8040static void glxGetFloatv(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
8041{
8042 proto_tree_add_item(t, hf_x11_glx_GetFloatv_context_tag, tvb, *offsetp, 4, byte_order);
8043 *offsetp += 4;
8044 proto_tree_add_item(t, hf_x11_glx_GetFloatv_pname, tvb, *offsetp, 4, byte_order);
8045 *offsetp += 4;
8046}
8047static void glxGetFloatv_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
8048{
8049 int sequence_number;
8050 int f_n;
8051
8052 col_append_fstr(pinfo->cinfo, COL_INFO, "-GetFloatv");
8053
8054 REPLY(reply);
8055 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
8056 *offsetp += 1;
8057 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
8058 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
8059 "%d (glx-GetFloatv)", sequence_number);
8060 *offsetp += 2;
8061 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
8062 *offsetp += 4;
8063 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 4, ENC_NA);
8064 *offsetp += 4;
8065 f_n = tvb_get_uint32(tvb, *offsetp, byte_order);
8066 proto_tree_add_item(t, hf_x11_glx_GetFloatv_reply_n, tvb, *offsetp, 4, byte_order);
8067 *offsetp += 4;
8068 proto_tree_add_item(t, hf_x11_glx_GetFloatv_reply_datum, tvb, *offsetp, 4, byte_order);
8069 *offsetp += 4;
8070 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 12, ENC_NA);
8071 *offsetp += 12;
8072 listOfFloat(tvb, offsetp, t, hf_x11_glx_GetFloatv_reply_data, hf_x11_glx_GetFloatv_reply_data_item, f_n, byte_order);
8073}
8074
8075static void glxGetIntegerv(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
8076{
8077 proto_tree_add_item(t, hf_x11_glx_GetIntegerv_context_tag, tvb, *offsetp, 4, byte_order);
8078 *offsetp += 4;
8079 proto_tree_add_item(t, hf_x11_glx_GetIntegerv_pname, tvb, *offsetp, 4, byte_order);
8080 *offsetp += 4;
8081}
8082static void glxGetIntegerv_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
8083{
8084 int sequence_number;
8085 int f_n;
8086
8087 col_append_fstr(pinfo->cinfo, COL_INFO, "-GetIntegerv");
8088
8089 REPLY(reply);
8090 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
8091 *offsetp += 1;
8092 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
8093 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
8094 "%d (glx-GetIntegerv)", sequence_number);
8095 *offsetp += 2;
8096 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
8097 *offsetp += 4;
8098 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 4, ENC_NA);
8099 *offsetp += 4;
8100 f_n = tvb_get_uint32(tvb, *offsetp, byte_order);
8101 proto_tree_add_item(t, hf_x11_glx_GetIntegerv_reply_n, tvb, *offsetp, 4, byte_order);
8102 *offsetp += 4;
8103 proto_tree_add_item(t, hf_x11_glx_GetIntegerv_reply_datum, tvb, *offsetp, 4, byte_order);
8104 *offsetp += 4;
8105 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 12, ENC_NA);
8106 *offsetp += 12;
8107 listOfInt32(tvb, offsetp, t, hf_x11_glx_GetIntegerv_reply_data, hf_x11_glx_GetIntegerv_reply_data_item, f_n, byte_order);
8108}
8109
8110static void glxGetLightfv(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
8111{
8112 proto_tree_add_item(t, hf_x11_glx_GetLightfv_context_tag, tvb, *offsetp, 4, byte_order);
8113 *offsetp += 4;
8114 proto_tree_add_item(t, hf_x11_glx_GetLightfv_light, tvb, *offsetp, 4, byte_order);
8115 *offsetp += 4;
8116 proto_tree_add_item(t, hf_x11_glx_GetLightfv_pname, tvb, *offsetp, 4, byte_order);
8117 *offsetp += 4;
8118}
8119static void glxGetLightfv_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
8120{
8121 int sequence_number;
8122 int f_n;
8123
8124 col_append_fstr(pinfo->cinfo, COL_INFO, "-GetLightfv");
8125
8126 REPLY(reply);
8127 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
8128 *offsetp += 1;
8129 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
8130 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
8131 "%d (glx-GetLightfv)", sequence_number);
8132 *offsetp += 2;
8133 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
8134 *offsetp += 4;
8135 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 4, ENC_NA);
8136 *offsetp += 4;
8137 f_n = tvb_get_uint32(tvb, *offsetp, byte_order);
8138 proto_tree_add_item(t, hf_x11_glx_GetLightfv_reply_n, tvb, *offsetp, 4, byte_order);
8139 *offsetp += 4;
8140 proto_tree_add_item(t, hf_x11_glx_GetLightfv_reply_datum, tvb, *offsetp, 4, byte_order);
8141 *offsetp += 4;
8142 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 12, ENC_NA);
8143 *offsetp += 12;
8144 listOfFloat(tvb, offsetp, t, hf_x11_glx_GetLightfv_reply_data, hf_x11_glx_GetLightfv_reply_data_item, f_n, byte_order);
8145}
8146
8147static void glxGetLightiv(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
8148{
8149 proto_tree_add_item(t, hf_x11_glx_GetLightiv_context_tag, tvb, *offsetp, 4, byte_order);
8150 *offsetp += 4;
8151 proto_tree_add_item(t, hf_x11_glx_GetLightiv_light, tvb, *offsetp, 4, byte_order);
8152 *offsetp += 4;
8153 proto_tree_add_item(t, hf_x11_glx_GetLightiv_pname, tvb, *offsetp, 4, byte_order);
8154 *offsetp += 4;
8155}
8156static void glxGetLightiv_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
8157{
8158 int sequence_number;
8159 int f_n;
8160
8161 col_append_fstr(pinfo->cinfo, COL_INFO, "-GetLightiv");
8162
8163 REPLY(reply);
8164 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
8165 *offsetp += 1;
8166 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
8167 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
8168 "%d (glx-GetLightiv)", sequence_number);
8169 *offsetp += 2;
8170 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
8171 *offsetp += 4;
8172 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 4, ENC_NA);
8173 *offsetp += 4;
8174 f_n = tvb_get_uint32(tvb, *offsetp, byte_order);
8175 proto_tree_add_item(t, hf_x11_glx_GetLightiv_reply_n, tvb, *offsetp, 4, byte_order);
8176 *offsetp += 4;
8177 proto_tree_add_item(t, hf_x11_glx_GetLightiv_reply_datum, tvb, *offsetp, 4, byte_order);
8178 *offsetp += 4;
8179 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 12, ENC_NA);
8180 *offsetp += 12;
8181 listOfInt32(tvb, offsetp, t, hf_x11_glx_GetLightiv_reply_data, hf_x11_glx_GetLightiv_reply_data_item, f_n, byte_order);
8182}
8183
8184static void glxGetMapdv(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
8185{
8186 proto_tree_add_item(t, hf_x11_glx_GetMapdv_context_tag, tvb, *offsetp, 4, byte_order);
8187 *offsetp += 4;
8188 proto_tree_add_item(t, hf_x11_glx_GetMapdv_target, tvb, *offsetp, 4, byte_order);
8189 *offsetp += 4;
8190 proto_tree_add_item(t, hf_x11_glx_GetMapdv_query, tvb, *offsetp, 4, byte_order);
8191 *offsetp += 4;
8192}
8193static void glxGetMapdv_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
8194{
8195 int sequence_number;
8196 int f_n;
8197
8198 col_append_fstr(pinfo->cinfo, COL_INFO, "-GetMapdv");
8199
8200 REPLY(reply);
8201 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
8202 *offsetp += 1;
8203 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
8204 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
8205 "%d (glx-GetMapdv)", sequence_number);
8206 *offsetp += 2;
8207 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
8208 *offsetp += 4;
8209 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 4, ENC_NA);
8210 *offsetp += 4;
8211 f_n = tvb_get_uint32(tvb, *offsetp, byte_order);
8212 proto_tree_add_item(t, hf_x11_glx_GetMapdv_reply_n, tvb, *offsetp, 4, byte_order);
8213 *offsetp += 4;
8214 proto_tree_add_item(t, hf_x11_glx_GetMapdv_reply_datum, tvb, *offsetp, 8, byte_order);
8215 *offsetp += 8;
8216 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 8, ENC_NA);
8217 *offsetp += 8;
8218 listOfDouble(tvb, offsetp, t, hf_x11_glx_GetMapdv_reply_data, hf_x11_glx_GetMapdv_reply_data_item, f_n, byte_order);
8219}
8220
8221static void glxGetMapfv(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
8222{
8223 proto_tree_add_item(t, hf_x11_glx_GetMapfv_context_tag, tvb, *offsetp, 4, byte_order);
8224 *offsetp += 4;
8225 proto_tree_add_item(t, hf_x11_glx_GetMapfv_target, tvb, *offsetp, 4, byte_order);
8226 *offsetp += 4;
8227 proto_tree_add_item(t, hf_x11_glx_GetMapfv_query, tvb, *offsetp, 4, byte_order);
8228 *offsetp += 4;
8229}
8230static void glxGetMapfv_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
8231{
8232 int sequence_number;
8233 int f_n;
8234
8235 col_append_fstr(pinfo->cinfo, COL_INFO, "-GetMapfv");
8236
8237 REPLY(reply);
8238 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
8239 *offsetp += 1;
8240 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
8241 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
8242 "%d (glx-GetMapfv)", sequence_number);
8243 *offsetp += 2;
8244 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
8245 *offsetp += 4;
8246 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 4, ENC_NA);
8247 *offsetp += 4;
8248 f_n = tvb_get_uint32(tvb, *offsetp, byte_order);
8249 proto_tree_add_item(t, hf_x11_glx_GetMapfv_reply_n, tvb, *offsetp, 4, byte_order);
8250 *offsetp += 4;
8251 proto_tree_add_item(t, hf_x11_glx_GetMapfv_reply_datum, tvb, *offsetp, 4, byte_order);
8252 *offsetp += 4;
8253 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 12, ENC_NA);
8254 *offsetp += 12;
8255 listOfFloat(tvb, offsetp, t, hf_x11_glx_GetMapfv_reply_data, hf_x11_glx_GetMapfv_reply_data_item, f_n, byte_order);
8256}
8257
8258static void glxGetMapiv(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
8259{
8260 proto_tree_add_item(t, hf_x11_glx_GetMapiv_context_tag, tvb, *offsetp, 4, byte_order);
8261 *offsetp += 4;
8262 proto_tree_add_item(t, hf_x11_glx_GetMapiv_target, tvb, *offsetp, 4, byte_order);
8263 *offsetp += 4;
8264 proto_tree_add_item(t, hf_x11_glx_GetMapiv_query, tvb, *offsetp, 4, byte_order);
8265 *offsetp += 4;
8266}
8267static void glxGetMapiv_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
8268{
8269 int sequence_number;
8270 int f_n;
8271
8272 col_append_fstr(pinfo->cinfo, COL_INFO, "-GetMapiv");
8273
8274 REPLY(reply);
8275 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
8276 *offsetp += 1;
8277 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
8278 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
8279 "%d (glx-GetMapiv)", sequence_number);
8280 *offsetp += 2;
8281 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
8282 *offsetp += 4;
8283 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 4, ENC_NA);
8284 *offsetp += 4;
8285 f_n = tvb_get_uint32(tvb, *offsetp, byte_order);
8286 proto_tree_add_item(t, hf_x11_glx_GetMapiv_reply_n, tvb, *offsetp, 4, byte_order);
8287 *offsetp += 4;
8288 proto_tree_add_item(t, hf_x11_glx_GetMapiv_reply_datum, tvb, *offsetp, 4, byte_order);
8289 *offsetp += 4;
8290 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 12, ENC_NA);
8291 *offsetp += 12;
8292 listOfInt32(tvb, offsetp, t, hf_x11_glx_GetMapiv_reply_data, hf_x11_glx_GetMapiv_reply_data_item, f_n, byte_order);
8293}
8294
8295static void glxGetMaterialfv(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
8296{
8297 proto_tree_add_item(t, hf_x11_glx_GetMaterialfv_context_tag, tvb, *offsetp, 4, byte_order);
8298 *offsetp += 4;
8299 proto_tree_add_item(t, hf_x11_glx_GetMaterialfv_face, tvb, *offsetp, 4, byte_order);
8300 *offsetp += 4;
8301 proto_tree_add_item(t, hf_x11_glx_GetMaterialfv_pname, tvb, *offsetp, 4, byte_order);
8302 *offsetp += 4;
8303}
8304static void glxGetMaterialfv_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
8305{
8306 int sequence_number;
8307 int f_n;
8308
8309 col_append_fstr(pinfo->cinfo, COL_INFO, "-GetMaterialfv");
8310
8311 REPLY(reply);
8312 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
8313 *offsetp += 1;
8314 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
8315 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
8316 "%d (glx-GetMaterialfv)", sequence_number);
8317 *offsetp += 2;
8318 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
8319 *offsetp += 4;
8320 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 4, ENC_NA);
8321 *offsetp += 4;
8322 f_n = tvb_get_uint32(tvb, *offsetp, byte_order);
8323 proto_tree_add_item(t, hf_x11_glx_GetMaterialfv_reply_n, tvb, *offsetp, 4, byte_order);
8324 *offsetp += 4;
8325 proto_tree_add_item(t, hf_x11_glx_GetMaterialfv_reply_datum, tvb, *offsetp, 4, byte_order);
8326 *offsetp += 4;
8327 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 12, ENC_NA);
8328 *offsetp += 12;
8329 listOfFloat(tvb, offsetp, t, hf_x11_glx_GetMaterialfv_reply_data, hf_x11_glx_GetMaterialfv_reply_data_item, f_n, byte_order);
8330}
8331
8332static void glxGetMaterialiv(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
8333{
8334 proto_tree_add_item(t, hf_x11_glx_GetMaterialiv_context_tag, tvb, *offsetp, 4, byte_order);
8335 *offsetp += 4;
8336 proto_tree_add_item(t, hf_x11_glx_GetMaterialiv_face, tvb, *offsetp, 4, byte_order);
8337 *offsetp += 4;
8338 proto_tree_add_item(t, hf_x11_glx_GetMaterialiv_pname, tvb, *offsetp, 4, byte_order);
8339 *offsetp += 4;
8340}
8341static void glxGetMaterialiv_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
8342{
8343 int sequence_number;
8344 int f_n;
8345
8346 col_append_fstr(pinfo->cinfo, COL_INFO, "-GetMaterialiv");
8347
8348 REPLY(reply);
8349 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
8350 *offsetp += 1;
8351 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
8352 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
8353 "%d (glx-GetMaterialiv)", sequence_number);
8354 *offsetp += 2;
8355 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
8356 *offsetp += 4;
8357 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 4, ENC_NA);
8358 *offsetp += 4;
8359 f_n = tvb_get_uint32(tvb, *offsetp, byte_order);
8360 proto_tree_add_item(t, hf_x11_glx_GetMaterialiv_reply_n, tvb, *offsetp, 4, byte_order);
8361 *offsetp += 4;
8362 proto_tree_add_item(t, hf_x11_glx_GetMaterialiv_reply_datum, tvb, *offsetp, 4, byte_order);
8363 *offsetp += 4;
8364 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 12, ENC_NA);
8365 *offsetp += 12;
8366 listOfInt32(tvb, offsetp, t, hf_x11_glx_GetMaterialiv_reply_data, hf_x11_glx_GetMaterialiv_reply_data_item, f_n, byte_order);
8367}
8368
8369static void glxGetPixelMapfv(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
8370{
8371 proto_tree_add_item(t, hf_x11_glx_GetPixelMapfv_context_tag, tvb, *offsetp, 4, byte_order);
8372 *offsetp += 4;
8373 proto_tree_add_item(t, hf_x11_glx_GetPixelMapfv_map, tvb, *offsetp, 4, byte_order);
8374 *offsetp += 4;
8375}
8376static void glxGetPixelMapfv_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
8377{
8378 int sequence_number;
8379 int f_n;
8380
8381 col_append_fstr(pinfo->cinfo, COL_INFO, "-GetPixelMapfv");
8382
8383 REPLY(reply);
8384 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
8385 *offsetp += 1;
8386 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
8387 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
8388 "%d (glx-GetPixelMapfv)", sequence_number);
8389 *offsetp += 2;
8390 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
8391 *offsetp += 4;
8392 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 4, ENC_NA);
8393 *offsetp += 4;
8394 f_n = tvb_get_uint32(tvb, *offsetp, byte_order);
8395 proto_tree_add_item(t, hf_x11_glx_GetPixelMapfv_reply_n, tvb, *offsetp, 4, byte_order);
8396 *offsetp += 4;
8397 proto_tree_add_item(t, hf_x11_glx_GetPixelMapfv_reply_datum, tvb, *offsetp, 4, byte_order);
8398 *offsetp += 4;
8399 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 12, ENC_NA);
8400 *offsetp += 12;
8401 listOfFloat(tvb, offsetp, t, hf_x11_glx_GetPixelMapfv_reply_data, hf_x11_glx_GetPixelMapfv_reply_data_item, f_n, byte_order);
8402}
8403
8404static void glxGetPixelMapuiv(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
8405{
8406 proto_tree_add_item(t, hf_x11_glx_GetPixelMapuiv_context_tag, tvb, *offsetp, 4, byte_order);
8407 *offsetp += 4;
8408 proto_tree_add_item(t, hf_x11_glx_GetPixelMapuiv_map, tvb, *offsetp, 4, byte_order);
8409 *offsetp += 4;
8410}
8411static void glxGetPixelMapuiv_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
8412{
8413 int sequence_number;
8414 int f_n;
8415
8416 col_append_fstr(pinfo->cinfo, COL_INFO, "-GetPixelMapuiv");
8417
8418 REPLY(reply);
8419 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
8420 *offsetp += 1;
8421 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
8422 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
8423 "%d (glx-GetPixelMapuiv)", sequence_number);
8424 *offsetp += 2;
8425 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
8426 *offsetp += 4;
8427 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 4, ENC_NA);
8428 *offsetp += 4;
8429 f_n = tvb_get_uint32(tvb, *offsetp, byte_order);
8430 proto_tree_add_item(t, hf_x11_glx_GetPixelMapuiv_reply_n, tvb, *offsetp, 4, byte_order);
8431 *offsetp += 4;
8432 proto_tree_add_item(t, hf_x11_glx_GetPixelMapuiv_reply_datum, tvb, *offsetp, 4, byte_order);
8433 *offsetp += 4;
8434 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 12, ENC_NA);
8435 *offsetp += 12;
8436 listOfCard32(tvb, offsetp, t, hf_x11_glx_GetPixelMapuiv_reply_data, hf_x11_glx_GetPixelMapuiv_reply_data_item, f_n, byte_order);
8437}
8438
8439static void glxGetPixelMapusv(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
8440{
8441 proto_tree_add_item(t, hf_x11_glx_GetPixelMapusv_context_tag, tvb, *offsetp, 4, byte_order);
8442 *offsetp += 4;
8443 proto_tree_add_item(t, hf_x11_glx_GetPixelMapusv_map, tvb, *offsetp, 4, byte_order);
8444 *offsetp += 4;
8445}
8446static void glxGetPixelMapusv_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
8447{
8448 int sequence_number;
8449 int f_n;
8450
8451 col_append_fstr(pinfo->cinfo, COL_INFO, "-GetPixelMapusv");
8452
8453 REPLY(reply);
8454 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
8455 *offsetp += 1;
8456 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
8457 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
8458 "%d (glx-GetPixelMapusv)", sequence_number);
8459 *offsetp += 2;
8460 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
8461 *offsetp += 4;
8462 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 4, ENC_NA);
8463 *offsetp += 4;
8464 f_n = tvb_get_uint32(tvb, *offsetp, byte_order);
8465 proto_tree_add_item(t, hf_x11_glx_GetPixelMapusv_reply_n, tvb, *offsetp, 4, byte_order);
8466 *offsetp += 4;
8467 proto_tree_add_item(t, hf_x11_glx_GetPixelMapusv_reply_datum, tvb, *offsetp, 2, byte_order);
8468 *offsetp += 2;
8469 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 16, ENC_NA);
8470 *offsetp += 16;
8471 listOfCard16(tvb, offsetp, t, hf_x11_glx_GetPixelMapusv_reply_data, hf_x11_glx_GetPixelMapusv_reply_data_item, f_n, byte_order);
8472}
8473
8474static void glxGetPolygonStipple(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
8475{
8476 proto_tree_add_item(t, hf_x11_glx_GetPolygonStipple_context_tag, tvb, *offsetp, 4, byte_order);
8477 *offsetp += 4;
8478 proto_tree_add_item(t, hf_x11_glx_GetPolygonStipple_lsb_first, tvb, *offsetp, 1, byte_order);
8479 *offsetp += 1;
8480}
8481static void glxGetPolygonStipple_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
8482{
8483 int sequence_number;
8484 int f_length;
8485
8486 col_append_fstr(pinfo->cinfo, COL_INFO, "-GetPolygonStipple");
8487
8488 REPLY(reply);
8489 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
8490 *offsetp += 1;
8491 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
8492 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
8493 "%d (glx-GetPolygonStipple)", sequence_number);
8494 *offsetp += 2;
8495 f_length = tvb_get_uint32(tvb, *offsetp, byte_order);
8496 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
8497 *offsetp += 4;
8498 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 24, ENC_NA);
8499 *offsetp += 24;
8500 listOfByte(tvb, offsetp, t, hf_x11_glx_GetPolygonStipple_reply_data, (f_length * 4), byte_order);
8501}
8502
8503static void glxGetString(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
8504{
8505 proto_tree_add_item(t, hf_x11_glx_GetString_context_tag, tvb, *offsetp, 4, byte_order);
8506 *offsetp += 4;
8507 proto_tree_add_item(t, hf_x11_glx_GetString_name, tvb, *offsetp, 4, byte_order);
8508 *offsetp += 4;
8509}
8510static void glxGetString_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
8511{
8512 int sequence_number;
8513 int f_n;
8514
8515 col_append_fstr(pinfo->cinfo, COL_INFO, "-GetString");
8516
8517 REPLY(reply);
8518 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
8519 *offsetp += 1;
8520 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
8521 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
8522 "%d (glx-GetString)", sequence_number);
8523 *offsetp += 2;
8524 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
8525 *offsetp += 4;
8526 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 4, ENC_NA);
8527 *offsetp += 4;
8528 f_n = tvb_get_uint32(tvb, *offsetp, byte_order);
8529 proto_tree_add_item(t, hf_x11_glx_GetString_reply_n, tvb, *offsetp, 4, byte_order);
8530 *offsetp += 4;
8531 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 16, ENC_NA);
8532 *offsetp += 16;
8533 listOfByte(tvb, offsetp, t, hf_x11_glx_GetString_reply_string, f_n, byte_order);
8534}
8535
8536static void glxGetTexEnvfv(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
8537{
8538 proto_tree_add_item(t, hf_x11_glx_GetTexEnvfv_context_tag, tvb, *offsetp, 4, byte_order);
8539 *offsetp += 4;
8540 proto_tree_add_item(t, hf_x11_glx_GetTexEnvfv_target, tvb, *offsetp, 4, byte_order);
8541 *offsetp += 4;
8542 proto_tree_add_item(t, hf_x11_glx_GetTexEnvfv_pname, tvb, *offsetp, 4, byte_order);
8543 *offsetp += 4;
8544}
8545static void glxGetTexEnvfv_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
8546{
8547 int sequence_number;
8548 int f_n;
8549
8550 col_append_fstr(pinfo->cinfo, COL_INFO, "-GetTexEnvfv");
8551
8552 REPLY(reply);
8553 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
8554 *offsetp += 1;
8555 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
8556 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
8557 "%d (glx-GetTexEnvfv)", sequence_number);
8558 *offsetp += 2;
8559 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
8560 *offsetp += 4;
8561 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 4, ENC_NA);
8562 *offsetp += 4;
8563 f_n = tvb_get_uint32(tvb, *offsetp, byte_order);
8564 proto_tree_add_item(t, hf_x11_glx_GetTexEnvfv_reply_n, tvb, *offsetp, 4, byte_order);
8565 *offsetp += 4;
8566 proto_tree_add_item(t, hf_x11_glx_GetTexEnvfv_reply_datum, tvb, *offsetp, 4, byte_order);
8567 *offsetp += 4;
8568 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 12, ENC_NA);
8569 *offsetp += 12;
8570 listOfFloat(tvb, offsetp, t, hf_x11_glx_GetTexEnvfv_reply_data, hf_x11_glx_GetTexEnvfv_reply_data_item, f_n, byte_order);
8571}
8572
8573static void glxGetTexEnviv(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
8574{
8575 proto_tree_add_item(t, hf_x11_glx_GetTexEnviv_context_tag, tvb, *offsetp, 4, byte_order);
8576 *offsetp += 4;
8577 proto_tree_add_item(t, hf_x11_glx_GetTexEnviv_target, tvb, *offsetp, 4, byte_order);
8578 *offsetp += 4;
8579 proto_tree_add_item(t, hf_x11_glx_GetTexEnviv_pname, tvb, *offsetp, 4, byte_order);
8580 *offsetp += 4;
8581}
8582static void glxGetTexEnviv_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
8583{
8584 int sequence_number;
8585 int f_n;
8586
8587 col_append_fstr(pinfo->cinfo, COL_INFO, "-GetTexEnviv");
8588
8589 REPLY(reply);
8590 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
8591 *offsetp += 1;
8592 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
8593 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
8594 "%d (glx-GetTexEnviv)", sequence_number);
8595 *offsetp += 2;
8596 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
8597 *offsetp += 4;
8598 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 4, ENC_NA);
8599 *offsetp += 4;
8600 f_n = tvb_get_uint32(tvb, *offsetp, byte_order);
8601 proto_tree_add_item(t, hf_x11_glx_GetTexEnviv_reply_n, tvb, *offsetp, 4, byte_order);
8602 *offsetp += 4;
8603 proto_tree_add_item(t, hf_x11_glx_GetTexEnviv_reply_datum, tvb, *offsetp, 4, byte_order);
8604 *offsetp += 4;
8605 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 12, ENC_NA);
8606 *offsetp += 12;
8607 listOfInt32(tvb, offsetp, t, hf_x11_glx_GetTexEnviv_reply_data, hf_x11_glx_GetTexEnviv_reply_data_item, f_n, byte_order);
8608}
8609
8610static void glxGetTexGendv(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
8611{
8612 proto_tree_add_item(t, hf_x11_glx_GetTexGendv_context_tag, tvb, *offsetp, 4, byte_order);
8613 *offsetp += 4;
8614 proto_tree_add_item(t, hf_x11_glx_GetTexGendv_coord, tvb, *offsetp, 4, byte_order);
8615 *offsetp += 4;
8616 proto_tree_add_item(t, hf_x11_glx_GetTexGendv_pname, tvb, *offsetp, 4, byte_order);
8617 *offsetp += 4;
8618}
8619static void glxGetTexGendv_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
8620{
8621 int sequence_number;
8622 int f_n;
8623
8624 col_append_fstr(pinfo->cinfo, COL_INFO, "-GetTexGendv");
8625
8626 REPLY(reply);
8627 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
8628 *offsetp += 1;
8629 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
8630 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
8631 "%d (glx-GetTexGendv)", sequence_number);
8632 *offsetp += 2;
8633 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
8634 *offsetp += 4;
8635 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 4, ENC_NA);
8636 *offsetp += 4;
8637 f_n = tvb_get_uint32(tvb, *offsetp, byte_order);
8638 proto_tree_add_item(t, hf_x11_glx_GetTexGendv_reply_n, tvb, *offsetp, 4, byte_order);
8639 *offsetp += 4;
8640 proto_tree_add_item(t, hf_x11_glx_GetTexGendv_reply_datum, tvb, *offsetp, 8, byte_order);
8641 *offsetp += 8;
8642 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 8, ENC_NA);
8643 *offsetp += 8;
8644 listOfDouble(tvb, offsetp, t, hf_x11_glx_GetTexGendv_reply_data, hf_x11_glx_GetTexGendv_reply_data_item, f_n, byte_order);
8645}
8646
8647static void glxGetTexGenfv(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
8648{
8649 proto_tree_add_item(t, hf_x11_glx_GetTexGenfv_context_tag, tvb, *offsetp, 4, byte_order);
8650 *offsetp += 4;
8651 proto_tree_add_item(t, hf_x11_glx_GetTexGenfv_coord, tvb, *offsetp, 4, byte_order);
8652 *offsetp += 4;
8653 proto_tree_add_item(t, hf_x11_glx_GetTexGenfv_pname, tvb, *offsetp, 4, byte_order);
8654 *offsetp += 4;
8655}
8656static void glxGetTexGenfv_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
8657{
8658 int sequence_number;
8659 int f_n;
8660
8661 col_append_fstr(pinfo->cinfo, COL_INFO, "-GetTexGenfv");
8662
8663 REPLY(reply);
8664 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
8665 *offsetp += 1;
8666 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
8667 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
8668 "%d (glx-GetTexGenfv)", sequence_number);
8669 *offsetp += 2;
8670 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
8671 *offsetp += 4;
8672 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 4, ENC_NA);
8673 *offsetp += 4;
8674 f_n = tvb_get_uint32(tvb, *offsetp, byte_order);
8675 proto_tree_add_item(t, hf_x11_glx_GetTexGenfv_reply_n, tvb, *offsetp, 4, byte_order);
8676 *offsetp += 4;
8677 proto_tree_add_item(t, hf_x11_glx_GetTexGenfv_reply_datum, tvb, *offsetp, 4, byte_order);
8678 *offsetp += 4;
8679 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 12, ENC_NA);
8680 *offsetp += 12;
8681 listOfFloat(tvb, offsetp, t, hf_x11_glx_GetTexGenfv_reply_data, hf_x11_glx_GetTexGenfv_reply_data_item, f_n, byte_order);
8682}
8683
8684static void glxGetTexGeniv(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
8685{
8686 proto_tree_add_item(t, hf_x11_glx_GetTexGeniv_context_tag, tvb, *offsetp, 4, byte_order);
8687 *offsetp += 4;
8688 proto_tree_add_item(t, hf_x11_glx_GetTexGeniv_coord, tvb, *offsetp, 4, byte_order);
8689 *offsetp += 4;
8690 proto_tree_add_item(t, hf_x11_glx_GetTexGeniv_pname, tvb, *offsetp, 4, byte_order);
8691 *offsetp += 4;
8692}
8693static void glxGetTexGeniv_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
8694{
8695 int sequence_number;
8696 int f_n;
8697
8698 col_append_fstr(pinfo->cinfo, COL_INFO, "-GetTexGeniv");
8699
8700 REPLY(reply);
8701 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
8702 *offsetp += 1;
8703 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
8704 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
8705 "%d (glx-GetTexGeniv)", sequence_number);
8706 *offsetp += 2;
8707 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
8708 *offsetp += 4;
8709 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 4, ENC_NA);
8710 *offsetp += 4;
8711 f_n = tvb_get_uint32(tvb, *offsetp, byte_order);
8712 proto_tree_add_item(t, hf_x11_glx_GetTexGeniv_reply_n, tvb, *offsetp, 4, byte_order);
8713 *offsetp += 4;
8714 proto_tree_add_item(t, hf_x11_glx_GetTexGeniv_reply_datum, tvb, *offsetp, 4, byte_order);
8715 *offsetp += 4;
8716 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 12, ENC_NA);
8717 *offsetp += 12;
8718 listOfInt32(tvb, offsetp, t, hf_x11_glx_GetTexGeniv_reply_data, hf_x11_glx_GetTexGeniv_reply_data_item, f_n, byte_order);
8719}
8720
8721static void glxGetTexImage(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
8722{
8723 proto_tree_add_item(t, hf_x11_glx_GetTexImage_context_tag, tvb, *offsetp, 4, byte_order);
8724 *offsetp += 4;
8725 proto_tree_add_item(t, hf_x11_glx_GetTexImage_target, tvb, *offsetp, 4, byte_order);
8726 *offsetp += 4;
8727 proto_tree_add_item(t, hf_x11_glx_GetTexImage_level, tvb, *offsetp, 4, byte_order);
8728 *offsetp += 4;
8729 proto_tree_add_item(t, hf_x11_glx_GetTexImage_format, tvb, *offsetp, 4, byte_order);
8730 *offsetp += 4;
8731 proto_tree_add_item(t, hf_x11_glx_GetTexImage_type, tvb, *offsetp, 4, byte_order);
8732 *offsetp += 4;
8733 proto_tree_add_item(t, hf_x11_glx_GetTexImage_swap_bytes, tvb, *offsetp, 1, byte_order);
8734 *offsetp += 1;
8735}
8736static void glxGetTexImage_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
8737{
8738 int sequence_number;
8739 int f_length;
8740
8741 col_append_fstr(pinfo->cinfo, COL_INFO, "-GetTexImage");
8742
8743 REPLY(reply);
8744 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
8745 *offsetp += 1;
8746 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
8747 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
8748 "%d (glx-GetTexImage)", sequence_number);
8749 *offsetp += 2;
8750 f_length = tvb_get_uint32(tvb, *offsetp, byte_order);
8751 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
8752 *offsetp += 4;
8753 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 8, ENC_NA);
8754 *offsetp += 8;
8755 proto_tree_add_item(t, hf_x11_glx_GetTexImage_reply_width, tvb, *offsetp, 4, byte_order);
8756 *offsetp += 4;
8757 proto_tree_add_item(t, hf_x11_glx_GetTexImage_reply_height, tvb, *offsetp, 4, byte_order);
8758 *offsetp += 4;
8759 proto_tree_add_item(t, hf_x11_glx_GetTexImage_reply_depth, tvb, *offsetp, 4, byte_order);
8760 *offsetp += 4;
8761 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 4, ENC_NA);
8762 *offsetp += 4;
8763 listOfByte(tvb, offsetp, t, hf_x11_glx_GetTexImage_reply_data, (f_length * 4), byte_order);
8764}
8765
8766static void glxGetTexParameterfv(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
8767{
8768 proto_tree_add_item(t, hf_x11_glx_GetTexParameterfv_context_tag, tvb, *offsetp, 4, byte_order);
8769 *offsetp += 4;
8770 proto_tree_add_item(t, hf_x11_glx_GetTexParameterfv_target, tvb, *offsetp, 4, byte_order);
8771 *offsetp += 4;
8772 proto_tree_add_item(t, hf_x11_glx_GetTexParameterfv_pname, tvb, *offsetp, 4, byte_order);
8773 *offsetp += 4;
8774}
8775static void glxGetTexParameterfv_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
8776{
8777 int sequence_number;
8778 int f_n;
8779
8780 col_append_fstr(pinfo->cinfo, COL_INFO, "-GetTexParameterfv");
8781
8782 REPLY(reply);
8783 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
8784 *offsetp += 1;
8785 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
8786 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
8787 "%d (glx-GetTexParameterfv)", sequence_number);
8788 *offsetp += 2;
8789 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
8790 *offsetp += 4;
8791 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 4, ENC_NA);
8792 *offsetp += 4;
8793 f_n = tvb_get_uint32(tvb, *offsetp, byte_order);
8794 proto_tree_add_item(t, hf_x11_glx_GetTexParameterfv_reply_n, tvb, *offsetp, 4, byte_order);
8795 *offsetp += 4;
8796 proto_tree_add_item(t, hf_x11_glx_GetTexParameterfv_reply_datum, tvb, *offsetp, 4, byte_order);
8797 *offsetp += 4;
8798 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 12, ENC_NA);
8799 *offsetp += 12;
8800 listOfFloat(tvb, offsetp, t, hf_x11_glx_GetTexParameterfv_reply_data, hf_x11_glx_GetTexParameterfv_reply_data_item, f_n, byte_order);
8801}
8802
8803static void glxGetTexParameteriv(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
8804{
8805 proto_tree_add_item(t, hf_x11_glx_GetTexParameteriv_context_tag, tvb, *offsetp, 4, byte_order);
8806 *offsetp += 4;
8807 proto_tree_add_item(t, hf_x11_glx_GetTexParameteriv_target, tvb, *offsetp, 4, byte_order);
8808 *offsetp += 4;
8809 proto_tree_add_item(t, hf_x11_glx_GetTexParameteriv_pname, tvb, *offsetp, 4, byte_order);
8810 *offsetp += 4;
8811}
8812static void glxGetTexParameteriv_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
8813{
8814 int sequence_number;
8815 int f_n;
8816
8817 col_append_fstr(pinfo->cinfo, COL_INFO, "-GetTexParameteriv");
8818
8819 REPLY(reply);
8820 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
8821 *offsetp += 1;
8822 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
8823 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
8824 "%d (glx-GetTexParameteriv)", sequence_number);
8825 *offsetp += 2;
8826 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
8827 *offsetp += 4;
8828 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 4, ENC_NA);
8829 *offsetp += 4;
8830 f_n = tvb_get_uint32(tvb, *offsetp, byte_order);
8831 proto_tree_add_item(t, hf_x11_glx_GetTexParameteriv_reply_n, tvb, *offsetp, 4, byte_order);
8832 *offsetp += 4;
8833 proto_tree_add_item(t, hf_x11_glx_GetTexParameteriv_reply_datum, tvb, *offsetp, 4, byte_order);
8834 *offsetp += 4;
8835 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 12, ENC_NA);
8836 *offsetp += 12;
8837 listOfInt32(tvb, offsetp, t, hf_x11_glx_GetTexParameteriv_reply_data, hf_x11_glx_GetTexParameteriv_reply_data_item, f_n, byte_order);
8838}
8839
8840static void glxGetTexLevelParameterfv(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
8841{
8842 proto_tree_add_item(t, hf_x11_glx_GetTexLevelParameterfv_context_tag, tvb, *offsetp, 4, byte_order);
8843 *offsetp += 4;
8844 proto_tree_add_item(t, hf_x11_glx_GetTexLevelParameterfv_target, tvb, *offsetp, 4, byte_order);
8845 *offsetp += 4;
8846 proto_tree_add_item(t, hf_x11_glx_GetTexLevelParameterfv_level, tvb, *offsetp, 4, byte_order);
8847 *offsetp += 4;
8848 proto_tree_add_item(t, hf_x11_glx_GetTexLevelParameterfv_pname, tvb, *offsetp, 4, byte_order);
8849 *offsetp += 4;
8850}
8851static void glxGetTexLevelParameterfv_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
8852{
8853 int sequence_number;
8854 int f_n;
8855
8856 col_append_fstr(pinfo->cinfo, COL_INFO, "-GetTexLevelParameterfv");
8857
8858 REPLY(reply);
8859 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
8860 *offsetp += 1;
8861 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
8862 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
8863 "%d (glx-GetTexLevelParameterfv)", sequence_number);
8864 *offsetp += 2;
8865 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
8866 *offsetp += 4;
8867 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 4, ENC_NA);
8868 *offsetp += 4;
8869 f_n = tvb_get_uint32(tvb, *offsetp, byte_order);
8870 proto_tree_add_item(t, hf_x11_glx_GetTexLevelParameterfv_reply_n, tvb, *offsetp, 4, byte_order);
8871 *offsetp += 4;
8872 proto_tree_add_item(t, hf_x11_glx_GetTexLevelParameterfv_reply_datum, tvb, *offsetp, 4, byte_order);
8873 *offsetp += 4;
8874 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 12, ENC_NA);
8875 *offsetp += 12;
8876 listOfFloat(tvb, offsetp, t, hf_x11_glx_GetTexLevelParameterfv_reply_data, hf_x11_glx_GetTexLevelParameterfv_reply_data_item, f_n, byte_order);
8877}
8878
8879static void glxGetTexLevelParameteriv(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
8880{
8881 proto_tree_add_item(t, hf_x11_glx_GetTexLevelParameteriv_context_tag, tvb, *offsetp, 4, byte_order);
8882 *offsetp += 4;
8883 proto_tree_add_item(t, hf_x11_glx_GetTexLevelParameteriv_target, tvb, *offsetp, 4, byte_order);
8884 *offsetp += 4;
8885 proto_tree_add_item(t, hf_x11_glx_GetTexLevelParameteriv_level, tvb, *offsetp, 4, byte_order);
8886 *offsetp += 4;
8887 proto_tree_add_item(t, hf_x11_glx_GetTexLevelParameteriv_pname, tvb, *offsetp, 4, byte_order);
8888 *offsetp += 4;
8889}
8890static void glxGetTexLevelParameteriv_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
8891{
8892 int sequence_number;
8893 int f_n;
8894
8895 col_append_fstr(pinfo->cinfo, COL_INFO, "-GetTexLevelParameteriv");
8896
8897 REPLY(reply);
8898 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
8899 *offsetp += 1;
8900 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
8901 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
8902 "%d (glx-GetTexLevelParameteriv)", sequence_number);
8903 *offsetp += 2;
8904 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
8905 *offsetp += 4;
8906 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 4, ENC_NA);
8907 *offsetp += 4;
8908 f_n = tvb_get_uint32(tvb, *offsetp, byte_order);
8909 proto_tree_add_item(t, hf_x11_glx_GetTexLevelParameteriv_reply_n, tvb, *offsetp, 4, byte_order);
8910 *offsetp += 4;
8911 proto_tree_add_item(t, hf_x11_glx_GetTexLevelParameteriv_reply_datum, tvb, *offsetp, 4, byte_order);
8912 *offsetp += 4;
8913 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 12, ENC_NA);
8914 *offsetp += 12;
8915 listOfInt32(tvb, offsetp, t, hf_x11_glx_GetTexLevelParameteriv_reply_data, hf_x11_glx_GetTexLevelParameteriv_reply_data_item, f_n, byte_order);
8916}
8917
8918static void glxIsEnabled(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
8919{
8920 proto_tree_add_item(t, hf_x11_glx_IsEnabled_context_tag, tvb, *offsetp, 4, byte_order);
8921 *offsetp += 4;
8922 proto_tree_add_item(t, hf_x11_glx_IsEnabled_capability, tvb, *offsetp, 4, byte_order);
8923 *offsetp += 4;
8924}
8925static void glxIsEnabled_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
8926{
8927 int sequence_number;
8928
8929 col_append_fstr(pinfo->cinfo, COL_INFO, "-IsEnabled");
8930
8931 REPLY(reply);
8932 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
8933 *offsetp += 1;
8934 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
8935 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
8936 "%d (glx-IsEnabled)", sequence_number);
8937 *offsetp += 2;
8938 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
8939 *offsetp += 4;
8940 proto_tree_add_item(t, hf_x11_glx_IsEnabled_reply_ret_val, tvb, *offsetp, 4, byte_order);
8941 *offsetp += 4;
8942}
8943
8944static void glxIsList(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
8945{
8946 proto_tree_add_item(t, hf_x11_glx_IsList_context_tag, tvb, *offsetp, 4, byte_order);
8947 *offsetp += 4;
8948 proto_tree_add_item(t, hf_x11_glx_IsList_list, tvb, *offsetp, 4, byte_order);
8949 *offsetp += 4;
8950}
8951static void glxIsList_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
8952{
8953 int sequence_number;
8954
8955 col_append_fstr(pinfo->cinfo, COL_INFO, "-IsList");
8956
8957 REPLY(reply);
8958 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
8959 *offsetp += 1;
8960 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
8961 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
8962 "%d (glx-IsList)", sequence_number);
8963 *offsetp += 2;
8964 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
8965 *offsetp += 4;
8966 proto_tree_add_item(t, hf_x11_glx_IsList_reply_ret_val, tvb, *offsetp, 4, byte_order);
8967 *offsetp += 4;
8968}
8969
8970static void glxFlush(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
8971{
8972 proto_tree_add_item(t, hf_x11_glx_Flush_context_tag, tvb, *offsetp, 4, byte_order);
8973 *offsetp += 4;
8974}
8975
8976static void glxAreTexturesResident(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
8977{
8978 int f_n;
8979 proto_tree_add_item(t, hf_x11_glx_AreTexturesResident_context_tag, tvb, *offsetp, 4, byte_order);
8980 *offsetp += 4;
8981 f_n = tvb_get_uint32(tvb, *offsetp, byte_order);
8982 proto_tree_add_item(t, hf_x11_glx_AreTexturesResident_n, tvb, *offsetp, 4, byte_order);
8983 *offsetp += 4;
8984 listOfCard32(tvb, offsetp, t, hf_x11_glx_AreTexturesResident_textures, hf_x11_glx_AreTexturesResident_textures_item, f_n, byte_order);
8985 length -= f_n * 4;
8986}
8987static void glxAreTexturesResident_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
8988{
8989 int sequence_number;
8990 int f_length;
8991
8992 col_append_fstr(pinfo->cinfo, COL_INFO, "-AreTexturesResident");
8993
8994 REPLY(reply);
8995 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
8996 *offsetp += 1;
8997 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
8998 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
8999 "%d (glx-AreTexturesResident)", sequence_number);
9000 *offsetp += 2;
9001 f_length = tvb_get_uint32(tvb, *offsetp, byte_order);
9002 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
9003 *offsetp += 4;
9004 proto_tree_add_item(t, hf_x11_glx_AreTexturesResident_reply_ret_val, tvb, *offsetp, 4, byte_order);
9005 *offsetp += 4;
9006 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 20, ENC_NA);
9007 *offsetp += 20;
9008 listOfByte(tvb, offsetp, t, hf_x11_glx_AreTexturesResident_reply_data, (f_length * 4), byte_order);
9009}
9010
9011static void glxDeleteTextures(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
9012{
9013 int f_n;
9014 proto_tree_add_item(t, hf_x11_glx_DeleteTextures_context_tag, tvb, *offsetp, 4, byte_order);
9015 *offsetp += 4;
9016 f_n = tvb_get_uint32(tvb, *offsetp, byte_order);
9017 proto_tree_add_item(t, hf_x11_glx_DeleteTextures_n, tvb, *offsetp, 4, byte_order);
9018 *offsetp += 4;
9019 listOfCard32(tvb, offsetp, t, hf_x11_glx_DeleteTextures_textures, hf_x11_glx_DeleteTextures_textures_item, f_n, byte_order);
9020 length -= f_n * 4;
9021}
9022
9023static void glxGenTextures(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
9024{
9025 proto_tree_add_item(t, hf_x11_glx_GenTextures_context_tag, tvb, *offsetp, 4, byte_order);
9026 *offsetp += 4;
9027 proto_tree_add_item(t, hf_x11_glx_GenTextures_n, tvb, *offsetp, 4, byte_order);
9028 *offsetp += 4;
9029}
9030static void glxGenTextures_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
9031{
9032 int sequence_number;
9033 int f_length;
9034
9035 col_append_fstr(pinfo->cinfo, COL_INFO, "-GenTextures");
9036
9037 REPLY(reply);
9038 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
9039 *offsetp += 1;
9040 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
9041 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
9042 "%d (glx-GenTextures)", sequence_number);
9043 *offsetp += 2;
9044 f_length = tvb_get_uint32(tvb, *offsetp, byte_order);
9045 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
9046 *offsetp += 4;
9047 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 24, ENC_NA);
9048 *offsetp += 24;
9049 listOfCard32(tvb, offsetp, t, hf_x11_glx_GenTextures_reply_data, hf_x11_glx_GenTextures_reply_data_item, f_length, byte_order);
9050}
9051
9052static void glxIsTexture(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
9053{
9054 proto_tree_add_item(t, hf_x11_glx_IsTexture_context_tag, tvb, *offsetp, 4, byte_order);
9055 *offsetp += 4;
9056 proto_tree_add_item(t, hf_x11_glx_IsTexture_texture, tvb, *offsetp, 4, byte_order);
9057 *offsetp += 4;
9058}
9059static void glxIsTexture_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
9060{
9061 int sequence_number;
9062
9063 col_append_fstr(pinfo->cinfo, COL_INFO, "-IsTexture");
9064
9065 REPLY(reply);
9066 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
9067 *offsetp += 1;
9068 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
9069 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
9070 "%d (glx-IsTexture)", sequence_number);
9071 *offsetp += 2;
9072 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
9073 *offsetp += 4;
9074 proto_tree_add_item(t, hf_x11_glx_IsTexture_reply_ret_val, tvb, *offsetp, 4, byte_order);
9075 *offsetp += 4;
9076}
9077
9078static void glxGetColorTable(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
9079{
9080 proto_tree_add_item(t, hf_x11_glx_GetColorTable_context_tag, tvb, *offsetp, 4, byte_order);
9081 *offsetp += 4;
9082 proto_tree_add_item(t, hf_x11_glx_GetColorTable_target, tvb, *offsetp, 4, byte_order);
9083 *offsetp += 4;
9084 proto_tree_add_item(t, hf_x11_glx_GetColorTable_format, tvb, *offsetp, 4, byte_order);
9085 *offsetp += 4;
9086 proto_tree_add_item(t, hf_x11_glx_GetColorTable_type, tvb, *offsetp, 4, byte_order);
9087 *offsetp += 4;
9088 proto_tree_add_item(t, hf_x11_glx_GetColorTable_swap_bytes, tvb, *offsetp, 1, byte_order);
9089 *offsetp += 1;
9090}
9091static void glxGetColorTable_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
9092{
9093 int sequence_number;
9094 int f_length;
9095
9096 col_append_fstr(pinfo->cinfo, COL_INFO, "-GetColorTable");
9097
9098 REPLY(reply);
9099 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
9100 *offsetp += 1;
9101 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
9102 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
9103 "%d (glx-GetColorTable)", sequence_number);
9104 *offsetp += 2;
9105 f_length = tvb_get_uint32(tvb, *offsetp, byte_order);
9106 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
9107 *offsetp += 4;
9108 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 8, ENC_NA);
9109 *offsetp += 8;
9110 proto_tree_add_item(t, hf_x11_glx_GetColorTable_reply_width, tvb, *offsetp, 4, byte_order);
9111 *offsetp += 4;
9112 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 12, ENC_NA);
9113 *offsetp += 12;
9114 listOfByte(tvb, offsetp, t, hf_x11_glx_GetColorTable_reply_data, (f_length * 4), byte_order);
9115}
9116
9117static void glxGetColorTableParameterfv(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
9118{
9119 proto_tree_add_item(t, hf_x11_glx_GetColorTableParameterfv_context_tag, tvb, *offsetp, 4, byte_order);
9120 *offsetp += 4;
9121 proto_tree_add_item(t, hf_x11_glx_GetColorTableParameterfv_target, tvb, *offsetp, 4, byte_order);
9122 *offsetp += 4;
9123 proto_tree_add_item(t, hf_x11_glx_GetColorTableParameterfv_pname, tvb, *offsetp, 4, byte_order);
9124 *offsetp += 4;
9125}
9126static void glxGetColorTableParameterfv_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
9127{
9128 int sequence_number;
9129 int f_n;
9130
9131 col_append_fstr(pinfo->cinfo, COL_INFO, "-GetColorTableParameterfv");
9132
9133 REPLY(reply);
9134 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
9135 *offsetp += 1;
9136 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
9137 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
9138 "%d (glx-GetColorTableParameterfv)", sequence_number);
9139 *offsetp += 2;
9140 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
9141 *offsetp += 4;
9142 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 4, ENC_NA);
9143 *offsetp += 4;
9144 f_n = tvb_get_uint32(tvb, *offsetp, byte_order);
9145 proto_tree_add_item(t, hf_x11_glx_GetColorTableParameterfv_reply_n, tvb, *offsetp, 4, byte_order);
9146 *offsetp += 4;
9147 proto_tree_add_item(t, hf_x11_glx_GetColorTableParameterfv_reply_datum, tvb, *offsetp, 4, byte_order);
9148 *offsetp += 4;
9149 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 12, ENC_NA);
9150 *offsetp += 12;
9151 listOfFloat(tvb, offsetp, t, hf_x11_glx_GetColorTableParameterfv_reply_data, hf_x11_glx_GetColorTableParameterfv_reply_data_item, f_n, byte_order);
9152}
9153
9154static void glxGetColorTableParameteriv(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
9155{
9156 proto_tree_add_item(t, hf_x11_glx_GetColorTableParameteriv_context_tag, tvb, *offsetp, 4, byte_order);
9157 *offsetp += 4;
9158 proto_tree_add_item(t, hf_x11_glx_GetColorTableParameteriv_target, tvb, *offsetp, 4, byte_order);
9159 *offsetp += 4;
9160 proto_tree_add_item(t, hf_x11_glx_GetColorTableParameteriv_pname, tvb, *offsetp, 4, byte_order);
9161 *offsetp += 4;
9162}
9163static void glxGetColorTableParameteriv_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
9164{
9165 int sequence_number;
9166 int f_n;
9167
9168 col_append_fstr(pinfo->cinfo, COL_INFO, "-GetColorTableParameteriv");
9169
9170 REPLY(reply);
9171 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
9172 *offsetp += 1;
9173 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
9174 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
9175 "%d (glx-GetColorTableParameteriv)", sequence_number);
9176 *offsetp += 2;
9177 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
9178 *offsetp += 4;
9179 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 4, ENC_NA);
9180 *offsetp += 4;
9181 f_n = tvb_get_uint32(tvb, *offsetp, byte_order);
9182 proto_tree_add_item(t, hf_x11_glx_GetColorTableParameteriv_reply_n, tvb, *offsetp, 4, byte_order);
9183 *offsetp += 4;
9184 proto_tree_add_item(t, hf_x11_glx_GetColorTableParameteriv_reply_datum, tvb, *offsetp, 4, byte_order);
9185 *offsetp += 4;
9186 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 12, ENC_NA);
9187 *offsetp += 12;
9188 listOfInt32(tvb, offsetp, t, hf_x11_glx_GetColorTableParameteriv_reply_data, hf_x11_glx_GetColorTableParameteriv_reply_data_item, f_n, byte_order);
9189}
9190
9191static void glxGetConvolutionFilter(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
9192{
9193 proto_tree_add_item(t, hf_x11_glx_GetConvolutionFilter_context_tag, tvb, *offsetp, 4, byte_order);
9194 *offsetp += 4;
9195 proto_tree_add_item(t, hf_x11_glx_GetConvolutionFilter_target, tvb, *offsetp, 4, byte_order);
9196 *offsetp += 4;
9197 proto_tree_add_item(t, hf_x11_glx_GetConvolutionFilter_format, tvb, *offsetp, 4, byte_order);
9198 *offsetp += 4;
9199 proto_tree_add_item(t, hf_x11_glx_GetConvolutionFilter_type, tvb, *offsetp, 4, byte_order);
9200 *offsetp += 4;
9201 proto_tree_add_item(t, hf_x11_glx_GetConvolutionFilter_swap_bytes, tvb, *offsetp, 1, byte_order);
9202 *offsetp += 1;
9203}
9204static void glxGetConvolutionFilter_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
9205{
9206 int sequence_number;
9207 int f_length;
9208
9209 col_append_fstr(pinfo->cinfo, COL_INFO, "-GetConvolutionFilter");
9210
9211 REPLY(reply);
9212 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
9213 *offsetp += 1;
9214 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
9215 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
9216 "%d (glx-GetConvolutionFilter)", sequence_number);
9217 *offsetp += 2;
9218 f_length = tvb_get_uint32(tvb, *offsetp, byte_order);
9219 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
9220 *offsetp += 4;
9221 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 8, ENC_NA);
9222 *offsetp += 8;
9223 proto_tree_add_item(t, hf_x11_glx_GetConvolutionFilter_reply_width, tvb, *offsetp, 4, byte_order);
9224 *offsetp += 4;
9225 proto_tree_add_item(t, hf_x11_glx_GetConvolutionFilter_reply_height, tvb, *offsetp, 4, byte_order);
9226 *offsetp += 4;
9227 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 8, ENC_NA);
9228 *offsetp += 8;
9229 listOfByte(tvb, offsetp, t, hf_x11_glx_GetConvolutionFilter_reply_data, (f_length * 4), byte_order);
9230}
9231
9232static void glxGetConvolutionParameterfv(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
9233{
9234 proto_tree_add_item(t, hf_x11_glx_GetConvolutionParameterfv_context_tag, tvb, *offsetp, 4, byte_order);
9235 *offsetp += 4;
9236 proto_tree_add_item(t, hf_x11_glx_GetConvolutionParameterfv_target, tvb, *offsetp, 4, byte_order);
9237 *offsetp += 4;
9238 proto_tree_add_item(t, hf_x11_glx_GetConvolutionParameterfv_pname, tvb, *offsetp, 4, byte_order);
9239 *offsetp += 4;
9240}
9241static void glxGetConvolutionParameterfv_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
9242{
9243 int sequence_number;
9244 int f_n;
9245
9246 col_append_fstr(pinfo->cinfo, COL_INFO, "-GetConvolutionParameterfv");
9247
9248 REPLY(reply);
9249 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
9250 *offsetp += 1;
9251 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
9252 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
9253 "%d (glx-GetConvolutionParameterfv)", sequence_number);
9254 *offsetp += 2;
9255 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
9256 *offsetp += 4;
9257 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 4, ENC_NA);
9258 *offsetp += 4;
9259 f_n = tvb_get_uint32(tvb, *offsetp, byte_order);
9260 proto_tree_add_item(t, hf_x11_glx_GetConvolutionParameterfv_reply_n, tvb, *offsetp, 4, byte_order);
9261 *offsetp += 4;
9262 proto_tree_add_item(t, hf_x11_glx_GetConvolutionParameterfv_reply_datum, tvb, *offsetp, 4, byte_order);
9263 *offsetp += 4;
9264 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 12, ENC_NA);
9265 *offsetp += 12;
9266 listOfFloat(tvb, offsetp, t, hf_x11_glx_GetConvolutionParameterfv_reply_data, hf_x11_glx_GetConvolutionParameterfv_reply_data_item, f_n, byte_order);
9267}
9268
9269static void glxGetConvolutionParameteriv(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
9270{
9271 proto_tree_add_item(t, hf_x11_glx_GetConvolutionParameteriv_context_tag, tvb, *offsetp, 4, byte_order);
9272 *offsetp += 4;
9273 proto_tree_add_item(t, hf_x11_glx_GetConvolutionParameteriv_target, tvb, *offsetp, 4, byte_order);
9274 *offsetp += 4;
9275 proto_tree_add_item(t, hf_x11_glx_GetConvolutionParameteriv_pname, tvb, *offsetp, 4, byte_order);
9276 *offsetp += 4;
9277}
9278static void glxGetConvolutionParameteriv_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
9279{
9280 int sequence_number;
9281 int f_n;
9282
9283 col_append_fstr(pinfo->cinfo, COL_INFO, "-GetConvolutionParameteriv");
9284
9285 REPLY(reply);
9286 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
9287 *offsetp += 1;
9288 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
9289 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
9290 "%d (glx-GetConvolutionParameteriv)", sequence_number);
9291 *offsetp += 2;
9292 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
9293 *offsetp += 4;
9294 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 4, ENC_NA);
9295 *offsetp += 4;
9296 f_n = tvb_get_uint32(tvb, *offsetp, byte_order);
9297 proto_tree_add_item(t, hf_x11_glx_GetConvolutionParameteriv_reply_n, tvb, *offsetp, 4, byte_order);
9298 *offsetp += 4;
9299 proto_tree_add_item(t, hf_x11_glx_GetConvolutionParameteriv_reply_datum, tvb, *offsetp, 4, byte_order);
9300 *offsetp += 4;
9301 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 12, ENC_NA);
9302 *offsetp += 12;
9303 listOfInt32(tvb, offsetp, t, hf_x11_glx_GetConvolutionParameteriv_reply_data, hf_x11_glx_GetConvolutionParameteriv_reply_data_item, f_n, byte_order);
9304}
9305
9306static void glxGetSeparableFilter(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
9307{
9308 proto_tree_add_item(t, hf_x11_glx_GetSeparableFilter_context_tag, tvb, *offsetp, 4, byte_order);
9309 *offsetp += 4;
9310 proto_tree_add_item(t, hf_x11_glx_GetSeparableFilter_target, tvb, *offsetp, 4, byte_order);
9311 *offsetp += 4;
9312 proto_tree_add_item(t, hf_x11_glx_GetSeparableFilter_format, tvb, *offsetp, 4, byte_order);
9313 *offsetp += 4;
9314 proto_tree_add_item(t, hf_x11_glx_GetSeparableFilter_type, tvb, *offsetp, 4, byte_order);
9315 *offsetp += 4;
9316 proto_tree_add_item(t, hf_x11_glx_GetSeparableFilter_swap_bytes, tvb, *offsetp, 1, byte_order);
9317 *offsetp += 1;
9318}
9319static void glxGetSeparableFilter_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
9320{
9321 int sequence_number;
9322 int f_length;
9323
9324 col_append_fstr(pinfo->cinfo, COL_INFO, "-GetSeparableFilter");
9325
9326 REPLY(reply);
9327 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
9328 *offsetp += 1;
9329 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
9330 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
9331 "%d (glx-GetSeparableFilter)", sequence_number);
9332 *offsetp += 2;
9333 f_length = tvb_get_uint32(tvb, *offsetp, byte_order);
9334 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
9335 *offsetp += 4;
9336 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 8, ENC_NA);
9337 *offsetp += 8;
9338 proto_tree_add_item(t, hf_x11_glx_GetSeparableFilter_reply_row_w, tvb, *offsetp, 4, byte_order);
9339 *offsetp += 4;
9340 proto_tree_add_item(t, hf_x11_glx_GetSeparableFilter_reply_col_h, tvb, *offsetp, 4, byte_order);
9341 *offsetp += 4;
9342 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 8, ENC_NA);
9343 *offsetp += 8;
9344 listOfByte(tvb, offsetp, t, hf_x11_glx_GetSeparableFilter_reply_rows_and_cols, (f_length * 4), byte_order);
9345}
9346
9347static void glxGetHistogram(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
9348{
9349 proto_tree_add_item(t, hf_x11_glx_GetHistogram_context_tag, tvb, *offsetp, 4, byte_order);
9350 *offsetp += 4;
9351 proto_tree_add_item(t, hf_x11_glx_GetHistogram_target, tvb, *offsetp, 4, byte_order);
9352 *offsetp += 4;
9353 proto_tree_add_item(t, hf_x11_glx_GetHistogram_format, tvb, *offsetp, 4, byte_order);
9354 *offsetp += 4;
9355 proto_tree_add_item(t, hf_x11_glx_GetHistogram_type, tvb, *offsetp, 4, byte_order);
9356 *offsetp += 4;
9357 proto_tree_add_item(t, hf_x11_glx_GetHistogram_swap_bytes, tvb, *offsetp, 1, byte_order);
9358 *offsetp += 1;
9359 proto_tree_add_item(t, hf_x11_glx_GetHistogram_reset, tvb, *offsetp, 1, byte_order);
9360 *offsetp += 1;
9361}
9362static void glxGetHistogram_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
9363{
9364 int sequence_number;
9365 int f_length;
9366
9367 col_append_fstr(pinfo->cinfo, COL_INFO, "-GetHistogram");
9368
9369 REPLY(reply);
9370 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
9371 *offsetp += 1;
9372 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
9373 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
9374 "%d (glx-GetHistogram)", sequence_number);
9375 *offsetp += 2;
9376 f_length = tvb_get_uint32(tvb, *offsetp, byte_order);
9377 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
9378 *offsetp += 4;
9379 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 8, ENC_NA);
9380 *offsetp += 8;
9381 proto_tree_add_item(t, hf_x11_glx_GetHistogram_reply_width, tvb, *offsetp, 4, byte_order);
9382 *offsetp += 4;
9383 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 12, ENC_NA);
9384 *offsetp += 12;
9385 listOfByte(tvb, offsetp, t, hf_x11_glx_GetHistogram_reply_data, (f_length * 4), byte_order);
9386}
9387
9388static void glxGetHistogramParameterfv(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
9389{
9390 proto_tree_add_item(t, hf_x11_glx_GetHistogramParameterfv_context_tag, tvb, *offsetp, 4, byte_order);
9391 *offsetp += 4;
9392 proto_tree_add_item(t, hf_x11_glx_GetHistogramParameterfv_target, tvb, *offsetp, 4, byte_order);
9393 *offsetp += 4;
9394 proto_tree_add_item(t, hf_x11_glx_GetHistogramParameterfv_pname, tvb, *offsetp, 4, byte_order);
9395 *offsetp += 4;
9396}
9397static void glxGetHistogramParameterfv_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
9398{
9399 int sequence_number;
9400 int f_n;
9401
9402 col_append_fstr(pinfo->cinfo, COL_INFO, "-GetHistogramParameterfv");
9403
9404 REPLY(reply);
9405 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
9406 *offsetp += 1;
9407 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
9408 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
9409 "%d (glx-GetHistogramParameterfv)", sequence_number);
9410 *offsetp += 2;
9411 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
9412 *offsetp += 4;
9413 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 4, ENC_NA);
9414 *offsetp += 4;
9415 f_n = tvb_get_uint32(tvb, *offsetp, byte_order);
9416 proto_tree_add_item(t, hf_x11_glx_GetHistogramParameterfv_reply_n, tvb, *offsetp, 4, byte_order);
9417 *offsetp += 4;
9418 proto_tree_add_item(t, hf_x11_glx_GetHistogramParameterfv_reply_datum, tvb, *offsetp, 4, byte_order);
9419 *offsetp += 4;
9420 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 12, ENC_NA);
9421 *offsetp += 12;
9422 listOfFloat(tvb, offsetp, t, hf_x11_glx_GetHistogramParameterfv_reply_data, hf_x11_glx_GetHistogramParameterfv_reply_data_item, f_n, byte_order);
9423}
9424
9425static void glxGetHistogramParameteriv(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
9426{
9427 proto_tree_add_item(t, hf_x11_glx_GetHistogramParameteriv_context_tag, tvb, *offsetp, 4, byte_order);
9428 *offsetp += 4;
9429 proto_tree_add_item(t, hf_x11_glx_GetHistogramParameteriv_target, tvb, *offsetp, 4, byte_order);
9430 *offsetp += 4;
9431 proto_tree_add_item(t, hf_x11_glx_GetHistogramParameteriv_pname, tvb, *offsetp, 4, byte_order);
9432 *offsetp += 4;
9433}
9434static void glxGetHistogramParameteriv_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
9435{
9436 int sequence_number;
9437 int f_n;
9438
9439 col_append_fstr(pinfo->cinfo, COL_INFO, "-GetHistogramParameteriv");
9440
9441 REPLY(reply);
9442 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
9443 *offsetp += 1;
9444 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
9445 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
9446 "%d (glx-GetHistogramParameteriv)", sequence_number);
9447 *offsetp += 2;
9448 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
9449 *offsetp += 4;
9450 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 4, ENC_NA);
9451 *offsetp += 4;
9452 f_n = tvb_get_uint32(tvb, *offsetp, byte_order);
9453 proto_tree_add_item(t, hf_x11_glx_GetHistogramParameteriv_reply_n, tvb, *offsetp, 4, byte_order);
9454 *offsetp += 4;
9455 proto_tree_add_item(t, hf_x11_glx_GetHistogramParameteriv_reply_datum, tvb, *offsetp, 4, byte_order);
9456 *offsetp += 4;
9457 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 12, ENC_NA);
9458 *offsetp += 12;
9459 listOfInt32(tvb, offsetp, t, hf_x11_glx_GetHistogramParameteriv_reply_data, hf_x11_glx_GetHistogramParameteriv_reply_data_item, f_n, byte_order);
9460}
9461
9462static void glxGetMinmax(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
9463{
9464 proto_tree_add_item(t, hf_x11_glx_GetMinmax_context_tag, tvb, *offsetp, 4, byte_order);
9465 *offsetp += 4;
9466 proto_tree_add_item(t, hf_x11_glx_GetMinmax_target, tvb, *offsetp, 4, byte_order);
9467 *offsetp += 4;
9468 proto_tree_add_item(t, hf_x11_glx_GetMinmax_format, tvb, *offsetp, 4, byte_order);
9469 *offsetp += 4;
9470 proto_tree_add_item(t, hf_x11_glx_GetMinmax_type, tvb, *offsetp, 4, byte_order);
9471 *offsetp += 4;
9472 proto_tree_add_item(t, hf_x11_glx_GetMinmax_swap_bytes, tvb, *offsetp, 1, byte_order);
9473 *offsetp += 1;
9474 proto_tree_add_item(t, hf_x11_glx_GetMinmax_reset, tvb, *offsetp, 1, byte_order);
9475 *offsetp += 1;
9476}
9477static void glxGetMinmax_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
9478{
9479 int sequence_number;
9480 int f_length;
9481
9482 col_append_fstr(pinfo->cinfo, COL_INFO, "-GetMinmax");
9483
9484 REPLY(reply);
9485 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
9486 *offsetp += 1;
9487 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
9488 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
9489 "%d (glx-GetMinmax)", sequence_number);
9490 *offsetp += 2;
9491 f_length = tvb_get_uint32(tvb, *offsetp, byte_order);
9492 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
9493 *offsetp += 4;
9494 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 24, ENC_NA);
9495 *offsetp += 24;
9496 listOfByte(tvb, offsetp, t, hf_x11_glx_GetMinmax_reply_data, (f_length * 4), byte_order);
9497}
9498
9499static void glxGetMinmaxParameterfv(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
9500{
9501 proto_tree_add_item(t, hf_x11_glx_GetMinmaxParameterfv_context_tag, tvb, *offsetp, 4, byte_order);
9502 *offsetp += 4;
9503 proto_tree_add_item(t, hf_x11_glx_GetMinmaxParameterfv_target, tvb, *offsetp, 4, byte_order);
9504 *offsetp += 4;
9505 proto_tree_add_item(t, hf_x11_glx_GetMinmaxParameterfv_pname, tvb, *offsetp, 4, byte_order);
9506 *offsetp += 4;
9507}
9508static void glxGetMinmaxParameterfv_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
9509{
9510 int sequence_number;
9511 int f_n;
9512
9513 col_append_fstr(pinfo->cinfo, COL_INFO, "-GetMinmaxParameterfv");
9514
9515 REPLY(reply);
9516 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
9517 *offsetp += 1;
9518 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
9519 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
9520 "%d (glx-GetMinmaxParameterfv)", sequence_number);
9521 *offsetp += 2;
9522 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
9523 *offsetp += 4;
9524 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 4, ENC_NA);
9525 *offsetp += 4;
9526 f_n = tvb_get_uint32(tvb, *offsetp, byte_order);
9527 proto_tree_add_item(t, hf_x11_glx_GetMinmaxParameterfv_reply_n, tvb, *offsetp, 4, byte_order);
9528 *offsetp += 4;
9529 proto_tree_add_item(t, hf_x11_glx_GetMinmaxParameterfv_reply_datum, tvb, *offsetp, 4, byte_order);
9530 *offsetp += 4;
9531 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 12, ENC_NA);
9532 *offsetp += 12;
9533 listOfFloat(tvb, offsetp, t, hf_x11_glx_GetMinmaxParameterfv_reply_data, hf_x11_glx_GetMinmaxParameterfv_reply_data_item, f_n, byte_order);
9534}
9535
9536static void glxGetMinmaxParameteriv(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
9537{
9538 proto_tree_add_item(t, hf_x11_glx_GetMinmaxParameteriv_context_tag, tvb, *offsetp, 4, byte_order);
9539 *offsetp += 4;
9540 proto_tree_add_item(t, hf_x11_glx_GetMinmaxParameteriv_target, tvb, *offsetp, 4, byte_order);
9541 *offsetp += 4;
9542 proto_tree_add_item(t, hf_x11_glx_GetMinmaxParameteriv_pname, tvb, *offsetp, 4, byte_order);
9543 *offsetp += 4;
9544}
9545static void glxGetMinmaxParameteriv_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
9546{
9547 int sequence_number;
9548 int f_n;
9549
9550 col_append_fstr(pinfo->cinfo, COL_INFO, "-GetMinmaxParameteriv");
9551
9552 REPLY(reply);
9553 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
9554 *offsetp += 1;
9555 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
9556 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
9557 "%d (glx-GetMinmaxParameteriv)", sequence_number);
9558 *offsetp += 2;
9559 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
9560 *offsetp += 4;
9561 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 4, ENC_NA);
9562 *offsetp += 4;
9563 f_n = tvb_get_uint32(tvb, *offsetp, byte_order);
9564 proto_tree_add_item(t, hf_x11_glx_GetMinmaxParameteriv_reply_n, tvb, *offsetp, 4, byte_order);
9565 *offsetp += 4;
9566 proto_tree_add_item(t, hf_x11_glx_GetMinmaxParameteriv_reply_datum, tvb, *offsetp, 4, byte_order);
9567 *offsetp += 4;
9568 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 12, ENC_NA);
9569 *offsetp += 12;
9570 listOfInt32(tvb, offsetp, t, hf_x11_glx_GetMinmaxParameteriv_reply_data, hf_x11_glx_GetMinmaxParameteriv_reply_data_item, f_n, byte_order);
9571}
9572
9573static void glxGetCompressedTexImageARB(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
9574{
9575 proto_tree_add_item(t, hf_x11_glx_GetCompressedTexImageARB_context_tag, tvb, *offsetp, 4, byte_order);
9576 *offsetp += 4;
9577 proto_tree_add_item(t, hf_x11_glx_GetCompressedTexImageARB_target, tvb, *offsetp, 4, byte_order);
9578 *offsetp += 4;
9579 proto_tree_add_item(t, hf_x11_glx_GetCompressedTexImageARB_level, tvb, *offsetp, 4, byte_order);
9580 *offsetp += 4;
9581}
9582static void glxGetCompressedTexImageARB_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
9583{
9584 int sequence_number;
9585 int f_length;
9586
9587 col_append_fstr(pinfo->cinfo, COL_INFO, "-GetCompressedTexImageARB");
9588
9589 REPLY(reply);
9590 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
9591 *offsetp += 1;
9592 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
9593 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
9594 "%d (glx-GetCompressedTexImageARB)", sequence_number);
9595 *offsetp += 2;
9596 f_length = tvb_get_uint32(tvb, *offsetp, byte_order);
9597 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
9598 *offsetp += 4;
9599 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 8, ENC_NA);
9600 *offsetp += 8;
9601 proto_tree_add_item(t, hf_x11_glx_GetCompressedTexImageARB_reply_size, tvb, *offsetp, 4, byte_order);
9602 *offsetp += 4;
9603 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 12, ENC_NA);
9604 *offsetp += 12;
9605 listOfByte(tvb, offsetp, t, hf_x11_glx_GetCompressedTexImageARB_reply_data, (f_length * 4), byte_order);
9606}
9607
9608static void glxDeleteQueriesARB(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
9609{
9610 int f_n;
9611 proto_tree_add_item(t, hf_x11_glx_DeleteQueriesARB_context_tag, tvb, *offsetp, 4, byte_order);
9612 *offsetp += 4;
9613 f_n = tvb_get_uint32(tvb, *offsetp, byte_order);
9614 proto_tree_add_item(t, hf_x11_glx_DeleteQueriesARB_n, tvb, *offsetp, 4, byte_order);
9615 *offsetp += 4;
9616 listOfCard32(tvb, offsetp, t, hf_x11_glx_DeleteQueriesARB_ids, hf_x11_glx_DeleteQueriesARB_ids_item, f_n, byte_order);
9617 length -= f_n * 4;
9618}
9619
9620static void glxGenQueriesARB(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
9621{
9622 proto_tree_add_item(t, hf_x11_glx_GenQueriesARB_context_tag, tvb, *offsetp, 4, byte_order);
9623 *offsetp += 4;
9624 proto_tree_add_item(t, hf_x11_glx_GenQueriesARB_n, tvb, *offsetp, 4, byte_order);
9625 *offsetp += 4;
9626}
9627static void glxGenQueriesARB_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
9628{
9629 int sequence_number;
9630 int f_length;
9631
9632 col_append_fstr(pinfo->cinfo, COL_INFO, "-GenQueriesARB");
9633
9634 REPLY(reply);
9635 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
9636 *offsetp += 1;
9637 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
9638 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
9639 "%d (glx-GenQueriesARB)", sequence_number);
9640 *offsetp += 2;
9641 f_length = tvb_get_uint32(tvb, *offsetp, byte_order);
9642 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
9643 *offsetp += 4;
9644 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 24, ENC_NA);
9645 *offsetp += 24;
9646 listOfCard32(tvb, offsetp, t, hf_x11_glx_GenQueriesARB_reply_data, hf_x11_glx_GenQueriesARB_reply_data_item, f_length, byte_order);
9647}
9648
9649static void glxIsQueryARB(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
9650{
9651 proto_tree_add_item(t, hf_x11_glx_IsQueryARB_context_tag, tvb, *offsetp, 4, byte_order);
9652 *offsetp += 4;
9653 proto_tree_add_item(t, hf_x11_glx_IsQueryARB_id, tvb, *offsetp, 4, byte_order);
9654 *offsetp += 4;
9655}
9656static void glxIsQueryARB_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
9657{
9658 int sequence_number;
9659
9660 col_append_fstr(pinfo->cinfo, COL_INFO, "-IsQueryARB");
9661
9662 REPLY(reply);
9663 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
9664 *offsetp += 1;
9665 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
9666 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
9667 "%d (glx-IsQueryARB)", sequence_number);
9668 *offsetp += 2;
9669 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
9670 *offsetp += 4;
9671 proto_tree_add_item(t, hf_x11_glx_IsQueryARB_reply_ret_val, tvb, *offsetp, 4, byte_order);
9672 *offsetp += 4;
9673}
9674
9675static void glxGetQueryivARB(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
9676{
9677 proto_tree_add_item(t, hf_x11_glx_GetQueryivARB_context_tag, tvb, *offsetp, 4, byte_order);
9678 *offsetp += 4;
9679 proto_tree_add_item(t, hf_x11_glx_GetQueryivARB_target, tvb, *offsetp, 4, byte_order);
9680 *offsetp += 4;
9681 proto_tree_add_item(t, hf_x11_glx_GetQueryivARB_pname, tvb, *offsetp, 4, byte_order);
9682 *offsetp += 4;
9683}
9684static void glxGetQueryivARB_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
9685{
9686 int sequence_number;
9687 int f_n;
9688
9689 col_append_fstr(pinfo->cinfo, COL_INFO, "-GetQueryivARB");
9690
9691 REPLY(reply);
9692 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
9693 *offsetp += 1;
9694 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
9695 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
9696 "%d (glx-GetQueryivARB)", sequence_number);
9697 *offsetp += 2;
9698 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
9699 *offsetp += 4;
9700 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 4, ENC_NA);
9701 *offsetp += 4;
9702 f_n = tvb_get_uint32(tvb, *offsetp, byte_order);
9703 proto_tree_add_item(t, hf_x11_glx_GetQueryivARB_reply_n, tvb, *offsetp, 4, byte_order);
9704 *offsetp += 4;
9705 proto_tree_add_item(t, hf_x11_glx_GetQueryivARB_reply_datum, tvb, *offsetp, 4, byte_order);
9706 *offsetp += 4;
9707 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 12, ENC_NA);
9708 *offsetp += 12;
9709 listOfInt32(tvb, offsetp, t, hf_x11_glx_GetQueryivARB_reply_data, hf_x11_glx_GetQueryivARB_reply_data_item, f_n, byte_order);
9710}
9711
9712static void glxGetQueryObjectivARB(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
9713{
9714 proto_tree_add_item(t, hf_x11_glx_GetQueryObjectivARB_context_tag, tvb, *offsetp, 4, byte_order);
9715 *offsetp += 4;
9716 proto_tree_add_item(t, hf_x11_glx_GetQueryObjectivARB_id, tvb, *offsetp, 4, byte_order);
9717 *offsetp += 4;
9718 proto_tree_add_item(t, hf_x11_glx_GetQueryObjectivARB_pname, tvb, *offsetp, 4, byte_order);
9719 *offsetp += 4;
9720}
9721static void glxGetQueryObjectivARB_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
9722{
9723 int sequence_number;
9724 int f_n;
9725
9726 col_append_fstr(pinfo->cinfo, COL_INFO, "-GetQueryObjectivARB");
9727
9728 REPLY(reply);
9729 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
9730 *offsetp += 1;
9731 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
9732 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
9733 "%d (glx-GetQueryObjectivARB)", sequence_number);
9734 *offsetp += 2;
9735 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
9736 *offsetp += 4;
9737 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 4, ENC_NA);
9738 *offsetp += 4;
9739 f_n = tvb_get_uint32(tvb, *offsetp, byte_order);
9740 proto_tree_add_item(t, hf_x11_glx_GetQueryObjectivARB_reply_n, tvb, *offsetp, 4, byte_order);
9741 *offsetp += 4;
9742 proto_tree_add_item(t, hf_x11_glx_GetQueryObjectivARB_reply_datum, tvb, *offsetp, 4, byte_order);
9743 *offsetp += 4;
9744 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 12, ENC_NA);
9745 *offsetp += 12;
9746 listOfInt32(tvb, offsetp, t, hf_x11_glx_GetQueryObjectivARB_reply_data, hf_x11_glx_GetQueryObjectivARB_reply_data_item, f_n, byte_order);
9747}
9748
9749static void glxGetQueryObjectuivARB(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
9750{
9751 proto_tree_add_item(t, hf_x11_glx_GetQueryObjectuivARB_context_tag, tvb, *offsetp, 4, byte_order);
9752 *offsetp += 4;
9753 proto_tree_add_item(t, hf_x11_glx_GetQueryObjectuivARB_id, tvb, *offsetp, 4, byte_order);
9754 *offsetp += 4;
9755 proto_tree_add_item(t, hf_x11_glx_GetQueryObjectuivARB_pname, tvb, *offsetp, 4, byte_order);
9756 *offsetp += 4;
9757}
9758static void glxGetQueryObjectuivARB_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
9759{
9760 int sequence_number;
9761 int f_n;
9762
9763 col_append_fstr(pinfo->cinfo, COL_INFO, "-GetQueryObjectuivARB");
9764
9765 REPLY(reply);
9766 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
9767 *offsetp += 1;
9768 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
9769 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
9770 "%d (glx-GetQueryObjectuivARB)", sequence_number);
9771 *offsetp += 2;
9772 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
9773 *offsetp += 4;
9774 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 4, ENC_NA);
9775 *offsetp += 4;
9776 f_n = tvb_get_uint32(tvb, *offsetp, byte_order);
9777 proto_tree_add_item(t, hf_x11_glx_GetQueryObjectuivARB_reply_n, tvb, *offsetp, 4, byte_order);
9778 *offsetp += 4;
9779 proto_tree_add_item(t, hf_x11_glx_GetQueryObjectuivARB_reply_datum, tvb, *offsetp, 4, byte_order);
9780 *offsetp += 4;
9781 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 12, ENC_NA);
9782 *offsetp += 12;
9783 listOfCard32(tvb, offsetp, t, hf_x11_glx_GetQueryObjectuivARB_reply_data, hf_x11_glx_GetQueryObjectuivARB_reply_data_item, f_n, byte_order);
9784}
9785static const value_string glx_extension_minor[] = {
9786 { 1, "Render" },
9787 { 2, "RenderLarge" },
9788 { 3, "CreateContext" },
9789 { 4, "DestroyContext" },
9790 { 5, "MakeCurrent" },
9791 { 6, "IsDirect" },
9792 { 7, "QueryVersion" },
9793 { 8, "WaitGL" },
9794 { 9, "WaitX" },
9795 { 10, "CopyContext" },
9796 { 11, "SwapBuffers" },
9797 { 12, "UseXFont" },
9798 { 13, "CreateGLXPixmap" },
9799 { 14, "GetVisualConfigs" },
9800 { 15, "DestroyGLXPixmap" },
9801 { 16, "VendorPrivate" },
9802 { 17, "VendorPrivateWithReply" },
9803 { 18, "QueryExtensionsString" },
9804 { 19, "QueryServerString" },
9805 { 20, "ClientInfo" },
9806 { 21, "GetFBConfigs" },
9807 { 22, "CreatePixmap" },
9808 { 23, "DestroyPixmap" },
9809 { 24, "CreateNewContext" },
9810 { 25, "QueryContext" },
9811 { 26, "MakeContextCurrent" },
9812 { 27, "CreatePbuffer" },
9813 { 28, "DestroyPbuffer" },
9814 { 29, "GetDrawableAttributes" },
9815 { 30, "ChangeDrawableAttributes" },
9816 { 31, "CreateWindow" },
9817 { 32, "DeleteWindow" },
9818 { 33, "SetClientInfoARB" },
9819 { 34, "CreateContextAttribsARB" },
9820 { 35, "SetClientInfo2ARB" },
9821 { 101, "NewList" },
9822 { 102, "EndList" },
9823 { 103, "DeleteLists" },
9824 { 104, "GenLists" },
9825 { 105, "FeedbackBuffer" },
9826 { 106, "SelectBuffer" },
9827 { 107, "RenderMode" },
9828 { 108, "Finish" },
9829 { 109, "PixelStoref" },
9830 { 110, "PixelStorei" },
9831 { 111, "ReadPixels" },
9832 { 112, "GetBooleanv" },
9833 { 113, "GetClipPlane" },
9834 { 114, "GetDoublev" },
9835 { 115, "GetError" },
9836 { 116, "GetFloatv" },
9837 { 117, "GetIntegerv" },
9838 { 118, "GetLightfv" },
9839 { 119, "GetLightiv" },
9840 { 120, "GetMapdv" },
9841 { 121, "GetMapfv" },
9842 { 122, "GetMapiv" },
9843 { 123, "GetMaterialfv" },
9844 { 124, "GetMaterialiv" },
9845 { 125, "GetPixelMapfv" },
9846 { 126, "GetPixelMapuiv" },
9847 { 127, "GetPixelMapusv" },
9848 { 128, "GetPolygonStipple" },
9849 { 129, "GetString" },
9850 { 130, "GetTexEnvfv" },
9851 { 131, "GetTexEnviv" },
9852 { 132, "GetTexGendv" },
9853 { 133, "GetTexGenfv" },
9854 { 134, "GetTexGeniv" },
9855 { 135, "GetTexImage" },
9856 { 136, "GetTexParameterfv" },
9857 { 137, "GetTexParameteriv" },
9858 { 138, "GetTexLevelParameterfv" },
9859 { 139, "GetTexLevelParameteriv" },
9860 { 140, "IsEnabled" },
9861 { 141, "IsList" },
9862 { 142, "Flush" },
9863 { 143, "AreTexturesResident" },
9864 { 144, "DeleteTextures" },
9865 { 145, "GenTextures" },
9866 { 146, "IsTexture" },
9867 { 147, "GetColorTable" },
9868 { 148, "GetColorTableParameterfv" },
9869 { 149, "GetColorTableParameteriv" },
9870 { 150, "GetConvolutionFilter" },
9871 { 151, "GetConvolutionParameterfv" },
9872 { 152, "GetConvolutionParameteriv" },
9873 { 153, "GetSeparableFilter" },
9874 { 154, "GetHistogram" },
9875 { 155, "GetHistogramParameterfv" },
9876 { 156, "GetHistogramParameteriv" },
9877 { 157, "GetMinmax" },
9878 { 158, "GetMinmaxParameterfv" },
9879 { 159, "GetMinmaxParameteriv" },
9880 { 160, "GetCompressedTexImageARB" },
9881 { 161, "DeleteQueriesARB" },
9882 { 162, "GenQueriesARB" },
9883 { 163, "IsQueryARB" },
9884 { 164, "GetQueryivARB" },
9885 { 165, "GetQueryObjectivARB" },
9886 { 166, "GetQueryObjectuivARB" },
9887 { 0, NULL }
9888};
9889static const x11_event_info glx_events[] = {
9890 { "glx-BufferSwapComplete", glxBufferSwapComplete },
9891 { NULL, NULL }
9892};
9893static const x11_reply_info glx_replies[] = {
9894 { 5, glxMakeCurrent_Reply },
9895 { 6, glxIsDirect_Reply },
9896 { 7, glxQueryVersion_Reply },
9897 { 14, glxGetVisualConfigs_Reply },
9898 { 17, glxVendorPrivateWithReply_Reply },
9899 { 18, glxQueryExtensionsString_Reply },
9900 { 19, glxQueryServerString_Reply },
9901 { 21, glxGetFBConfigs_Reply },
9902 { 25, glxQueryContext_Reply },
9903 { 26, glxMakeContextCurrent_Reply },
9904 { 29, glxGetDrawableAttributes_Reply },
9905 { 104, glxGenLists_Reply },
9906 { 107, glxRenderMode_Reply },
9907 { 108, glxFinish_Reply },
9908 { 111, glxReadPixels_Reply },
9909 { 112, glxGetBooleanv_Reply },
9910 { 113, glxGetClipPlane_Reply },
9911 { 114, glxGetDoublev_Reply },
9912 { 115, glxGetError_Reply },
9913 { 116, glxGetFloatv_Reply },
9914 { 117, glxGetIntegerv_Reply },
9915 { 118, glxGetLightfv_Reply },
9916 { 119, glxGetLightiv_Reply },
9917 { 120, glxGetMapdv_Reply },
9918 { 121, glxGetMapfv_Reply },
9919 { 122, glxGetMapiv_Reply },
9920 { 123, glxGetMaterialfv_Reply },
9921 { 124, glxGetMaterialiv_Reply },
9922 { 125, glxGetPixelMapfv_Reply },
9923 { 126, glxGetPixelMapuiv_Reply },
9924 { 127, glxGetPixelMapusv_Reply },
9925 { 128, glxGetPolygonStipple_Reply },
9926 { 129, glxGetString_Reply },
9927 { 130, glxGetTexEnvfv_Reply },
9928 { 131, glxGetTexEnviv_Reply },
9929 { 132, glxGetTexGendv_Reply },
9930 { 133, glxGetTexGenfv_Reply },
9931 { 134, glxGetTexGeniv_Reply },
9932 { 135, glxGetTexImage_Reply },
9933 { 136, glxGetTexParameterfv_Reply },
9934 { 137, glxGetTexParameteriv_Reply },
9935 { 138, glxGetTexLevelParameterfv_Reply },
9936 { 139, glxGetTexLevelParameteriv_Reply },
9937 { 140, glxIsEnabled_Reply },
9938 { 141, glxIsList_Reply },
9939 { 143, glxAreTexturesResident_Reply },
9940 { 145, glxGenTextures_Reply },
9941 { 146, glxIsTexture_Reply },
9942 { 147, glxGetColorTable_Reply },
9943 { 148, glxGetColorTableParameterfv_Reply },
9944 { 149, glxGetColorTableParameteriv_Reply },
9945 { 150, glxGetConvolutionFilter_Reply },
9946 { 151, glxGetConvolutionParameterfv_Reply },
9947 { 152, glxGetConvolutionParameteriv_Reply },
9948 { 153, glxGetSeparableFilter_Reply },
9949 { 154, glxGetHistogram_Reply },
9950 { 155, glxGetHistogramParameterfv_Reply },
9951 { 156, glxGetHistogramParameteriv_Reply },
9952 { 157, glxGetMinmax_Reply },
9953 { 158, glxGetMinmaxParameterfv_Reply },
9954 { 159, glxGetMinmaxParameteriv_Reply },
9955 { 160, glxGetCompressedTexImageARB_Reply },
9956 { 162, glxGenQueriesARB_Reply },
9957 { 163, glxIsQueryARB_Reply },
9958 { 164, glxGetQueryivARB_Reply },
9959 { 165, glxGetQueryObjectivARB_Reply },
9960 { 166, glxGetQueryObjectuivARB_Reply },
9961 { 0, NULL }
9962};
9963
9964static void dispatch_glx(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
9965{
9966 int minor, length;
9967 minor = CARD8(glx_extension_minor);
9968 length = REQUEST_LENGTH();
9969
9970 col_append_fstr(pinfo->cinfo, COL_INFO, "-%s",
9971 val_to_str(minor, glx_extension_minor,
9972 "<Unknown opcode %d>"));
9973 switch (minor) {
9974 case 1:
9975 glxRender(tvb, pinfo, offsetp, t, byte_order, length);
9976 break;
9977 case 2:
9978 glxRenderLarge(tvb, pinfo, offsetp, t, byte_order, length);
9979 break;
9980 case 3:
9981 glxCreateContext(tvb, pinfo, offsetp, t, byte_order, length);
9982 break;
9983 case 4:
9984 glxDestroyContext(tvb, pinfo, offsetp, t, byte_order, length);
9985 break;
9986 case 5:
9987 glxMakeCurrent(tvb, pinfo, offsetp, t, byte_order, length);
9988 break;
9989 case 6:
9990 glxIsDirect(tvb, pinfo, offsetp, t, byte_order, length);
9991 break;
9992 case 7:
9993 glxQueryVersion(tvb, pinfo, offsetp, t, byte_order, length);
9994 break;
9995 case 8:
9996 glxWaitGL(tvb, pinfo, offsetp, t, byte_order, length);
9997 break;
9998 case 9:
9999 glxWaitX(tvb, pinfo, offsetp, t, byte_order, length);
10000 break;
10001 case 10:
10002 glxCopyContext(tvb, pinfo, offsetp, t, byte_order, length);
10003 break;
10004 case 11:
10005 glxSwapBuffers(tvb, pinfo, offsetp, t, byte_order, length);
10006 break;
10007 case 12:
10008 glxUseXFont(tvb, pinfo, offsetp, t, byte_order, length);
10009 break;
10010 case 13:
10011 glxCreateGLXPixmap(tvb, pinfo, offsetp, t, byte_order, length);
10012 break;
10013 case 14:
10014 glxGetVisualConfigs(tvb, pinfo, offsetp, t, byte_order, length);
10015 break;
10016 case 15:
10017 glxDestroyGLXPixmap(tvb, pinfo, offsetp, t, byte_order, length);
10018 break;
10019 case 16:
10020 glxVendorPrivate(tvb, pinfo, offsetp, t, byte_order, length);
10021 break;
10022 case 17:
10023 glxVendorPrivateWithReply(tvb, pinfo, offsetp, t, byte_order, length);
10024 break;
10025 case 18:
10026 glxQueryExtensionsString(tvb, pinfo, offsetp, t, byte_order, length);
10027 break;
10028 case 19:
10029 glxQueryServerString(tvb, pinfo, offsetp, t, byte_order, length);
10030 break;
10031 case 20:
10032 glxClientInfo(tvb, pinfo, offsetp, t, byte_order, length);
10033 break;
10034 case 21:
10035 glxGetFBConfigs(tvb, pinfo, offsetp, t, byte_order, length);
10036 break;
10037 case 22:
10038 glxCreatePixmap(tvb, pinfo, offsetp, t, byte_order, length);
10039 break;
10040 case 23:
10041 glxDestroyPixmap(tvb, pinfo, offsetp, t, byte_order, length);
10042 break;
10043 case 24:
10044 glxCreateNewContext(tvb, pinfo, offsetp, t, byte_order, length);
10045 break;
10046 case 25:
10047 glxQueryContext(tvb, pinfo, offsetp, t, byte_order, length);
10048 break;
10049 case 26:
10050 glxMakeContextCurrent(tvb, pinfo, offsetp, t, byte_order, length);
10051 break;
10052 case 27:
10053 glxCreatePbuffer(tvb, pinfo, offsetp, t, byte_order, length);
10054 break;
10055 case 28:
10056 glxDestroyPbuffer(tvb, pinfo, offsetp, t, byte_order, length);
10057 break;
10058 case 29:
10059 glxGetDrawableAttributes(tvb, pinfo, offsetp, t, byte_order, length);
10060 break;
10061 case 30:
10062 glxChangeDrawableAttributes(tvb, pinfo, offsetp, t, byte_order, length);
10063 break;
10064 case 31:
10065 glxCreateWindow(tvb, pinfo, offsetp, t, byte_order, length);
10066 break;
10067 case 32:
10068 glxDeleteWindow(tvb, pinfo, offsetp, t, byte_order, length);
10069 break;
10070 case 33:
10071 glxSetClientInfoARB(tvb, pinfo, offsetp, t, byte_order, length);
10072 break;
10073 case 34:
10074 glxCreateContextAttribsARB(tvb, pinfo, offsetp, t, byte_order, length);
10075 break;
10076 case 35:
10077 glxSetClientInfo2ARB(tvb, pinfo, offsetp, t, byte_order, length);
10078 break;
10079 case 101:
10080 glxNewList(tvb, pinfo, offsetp, t, byte_order, length);
10081 break;
10082 case 102:
10083 glxEndList(tvb, pinfo, offsetp, t, byte_order, length);
10084 break;
10085 case 103:
10086 glxDeleteLists(tvb, pinfo, offsetp, t, byte_order, length);
10087 break;
10088 case 104:
10089 glxGenLists(tvb, pinfo, offsetp, t, byte_order, length);
10090 break;
10091 case 105:
10092 glxFeedbackBuffer(tvb, pinfo, offsetp, t, byte_order, length);
10093 break;
10094 case 106:
10095 glxSelectBuffer(tvb, pinfo, offsetp, t, byte_order, length);
10096 break;
10097 case 107:
10098 glxRenderMode(tvb, pinfo, offsetp, t, byte_order, length);
10099 break;
10100 case 108:
10101 glxFinish(tvb, pinfo, offsetp, t, byte_order, length);
10102 break;
10103 case 109:
10104 glxPixelStoref(tvb, pinfo, offsetp, t, byte_order, length);
10105 break;
10106 case 110:
10107 glxPixelStorei(tvb, pinfo, offsetp, t, byte_order, length);
10108 break;
10109 case 111:
10110 glxReadPixels(tvb, pinfo, offsetp, t, byte_order, length);
10111 break;
10112 case 112:
10113 glxGetBooleanv(tvb, pinfo, offsetp, t, byte_order, length);
10114 break;
10115 case 113:
10116 glxGetClipPlane(tvb, pinfo, offsetp, t, byte_order, length);
10117 break;
10118 case 114:
10119 glxGetDoublev(tvb, pinfo, offsetp, t, byte_order, length);
10120 break;
10121 case 115:
10122 glxGetError(tvb, pinfo, offsetp, t, byte_order, length);
10123 break;
10124 case 116:
10125 glxGetFloatv(tvb, pinfo, offsetp, t, byte_order, length);
10126 break;
10127 case 117:
10128 glxGetIntegerv(tvb, pinfo, offsetp, t, byte_order, length);
10129 break;
10130 case 118:
10131 glxGetLightfv(tvb, pinfo, offsetp, t, byte_order, length);
10132 break;
10133 case 119:
10134 glxGetLightiv(tvb, pinfo, offsetp, t, byte_order, length);
10135 break;
10136 case 120:
10137 glxGetMapdv(tvb, pinfo, offsetp, t, byte_order, length);
10138 break;
10139 case 121:
10140 glxGetMapfv(tvb, pinfo, offsetp, t, byte_order, length);
10141 break;
10142 case 122:
10143 glxGetMapiv(tvb, pinfo, offsetp, t, byte_order, length);
10144 break;
10145 case 123:
10146 glxGetMaterialfv(tvb, pinfo, offsetp, t, byte_order, length);
10147 break;
10148 case 124:
10149 glxGetMaterialiv(tvb, pinfo, offsetp, t, byte_order, length);
10150 break;
10151 case 125:
10152 glxGetPixelMapfv(tvb, pinfo, offsetp, t, byte_order, length);
10153 break;
10154 case 126:
10155 glxGetPixelMapuiv(tvb, pinfo, offsetp, t, byte_order, length);
10156 break;
10157 case 127:
10158 glxGetPixelMapusv(tvb, pinfo, offsetp, t, byte_order, length);
10159 break;
10160 case 128:
10161 glxGetPolygonStipple(tvb, pinfo, offsetp, t, byte_order, length);
10162 break;
10163 case 129:
10164 glxGetString(tvb, pinfo, offsetp, t, byte_order, length);
10165 break;
10166 case 130:
10167 glxGetTexEnvfv(tvb, pinfo, offsetp, t, byte_order, length);
10168 break;
10169 case 131:
10170 glxGetTexEnviv(tvb, pinfo, offsetp, t, byte_order, length);
10171 break;
10172 case 132:
10173 glxGetTexGendv(tvb, pinfo, offsetp, t, byte_order, length);
10174 break;
10175 case 133:
10176 glxGetTexGenfv(tvb, pinfo, offsetp, t, byte_order, length);
10177 break;
10178 case 134:
10179 glxGetTexGeniv(tvb, pinfo, offsetp, t, byte_order, length);
10180 break;
10181 case 135:
10182 glxGetTexImage(tvb, pinfo, offsetp, t, byte_order, length);
10183 break;
10184 case 136:
10185 glxGetTexParameterfv(tvb, pinfo, offsetp, t, byte_order, length);
10186 break;
10187 case 137:
10188 glxGetTexParameteriv(tvb, pinfo, offsetp, t, byte_order, length);
10189 break;
10190 case 138:
10191 glxGetTexLevelParameterfv(tvb, pinfo, offsetp, t, byte_order, length);
10192 break;
10193 case 139:
10194 glxGetTexLevelParameteriv(tvb, pinfo, offsetp, t, byte_order, length);
10195 break;
10196 case 140:
10197 glxIsEnabled(tvb, pinfo, offsetp, t, byte_order, length);
10198 break;
10199 case 141:
10200 glxIsList(tvb, pinfo, offsetp, t, byte_order, length);
10201 break;
10202 case 142:
10203 glxFlush(tvb, pinfo, offsetp, t, byte_order, length);
10204 break;
10205 case 143:
10206 glxAreTexturesResident(tvb, pinfo, offsetp, t, byte_order, length);
10207 break;
10208 case 144:
10209 glxDeleteTextures(tvb, pinfo, offsetp, t, byte_order, length);
10210 break;
10211 case 145:
10212 glxGenTextures(tvb, pinfo, offsetp, t, byte_order, length);
10213 break;
10214 case 146:
10215 glxIsTexture(tvb, pinfo, offsetp, t, byte_order, length);
10216 break;
10217 case 147:
10218 glxGetColorTable(tvb, pinfo, offsetp, t, byte_order, length);
10219 break;
10220 case 148:
10221 glxGetColorTableParameterfv(tvb, pinfo, offsetp, t, byte_order, length);
10222 break;
10223 case 149:
10224 glxGetColorTableParameteriv(tvb, pinfo, offsetp, t, byte_order, length);
10225 break;
10226 case 150:
10227 glxGetConvolutionFilter(tvb, pinfo, offsetp, t, byte_order, length);
10228 break;
10229 case 151:
10230 glxGetConvolutionParameterfv(tvb, pinfo, offsetp, t, byte_order, length);
10231 break;
10232 case 152:
10233 glxGetConvolutionParameteriv(tvb, pinfo, offsetp, t, byte_order, length);
10234 break;
10235 case 153:
10236 glxGetSeparableFilter(tvb, pinfo, offsetp, t, byte_order, length);
10237 break;
10238 case 154:
10239 glxGetHistogram(tvb, pinfo, offsetp, t, byte_order, length);
10240 break;
10241 case 155:
10242 glxGetHistogramParameterfv(tvb, pinfo, offsetp, t, byte_order, length);
10243 break;
10244 case 156:
10245 glxGetHistogramParameteriv(tvb, pinfo, offsetp, t, byte_order, length);
10246 break;
10247 case 157:
10248 glxGetMinmax(tvb, pinfo, offsetp, t, byte_order, length);
10249 break;
10250 case 158:
10251 glxGetMinmaxParameterfv(tvb, pinfo, offsetp, t, byte_order, length);
10252 break;
10253 case 159:
10254 glxGetMinmaxParameteriv(tvb, pinfo, offsetp, t, byte_order, length);
10255 break;
10256 case 160:
10257 glxGetCompressedTexImageARB(tvb, pinfo, offsetp, t, byte_order, length);
10258 break;
10259 case 161:
10260 glxDeleteQueriesARB(tvb, pinfo, offsetp, t, byte_order, length);
10261 break;
10262 case 162:
10263 glxGenQueriesARB(tvb, pinfo, offsetp, t, byte_order, length);
10264 break;
10265 case 163:
10266 glxIsQueryARB(tvb, pinfo, offsetp, t, byte_order, length);
10267 break;
10268 case 164:
10269 glxGetQueryivARB(tvb, pinfo, offsetp, t, byte_order, length);
10270 break;
10271 case 165:
10272 glxGetQueryObjectivARB(tvb, pinfo, offsetp, t, byte_order, length);
10273 break;
10274 case 166:
10275 glxGetQueryObjectuivARB(tvb, pinfo, offsetp, t, byte_order, length);
10276 break;
10277 /* No need for a default case here, since Unknown is printed above,
10278 and UNDECODED() is taken care of by dissect_x11_request */
10279 }
10280}
10281
10282static void register_glx(void)
10283{
10284 set_handler("GLX", dispatch_glx, glx_errors, glx_events, NULL, glx_replies);
10285}
10286
10287static void struct_randr_ScreenSize(tvbuff_t *tvb, int *offsetp, proto_tree *root, unsigned byte_order _U_, int count)
10288{
10289 int i;
10290 for (i = 0; i < count; i++) {
10291 proto_item *item;
10292 proto_tree *t;
10293
10294 item = proto_tree_add_item(root, hf_x11_struct_randr_ScreenSize, tvb, *offsetp, 8, ENC_NA);
10295 t = proto_item_add_subtree(item, ett_x11_rectangle);
10296 proto_tree_add_item(t, hf_x11_struct_randr_ScreenSize_width, tvb, *offsetp, 2, byte_order);
10297 *offsetp += 2;
10298 proto_tree_add_item(t, hf_x11_struct_randr_ScreenSize_height, tvb, *offsetp, 2, byte_order);
10299 *offsetp += 2;
10300 proto_tree_add_item(t, hf_x11_struct_randr_ScreenSize_mwidth, tvb, *offsetp, 2, byte_order);
10301 *offsetp += 2;
10302 proto_tree_add_item(t, hf_x11_struct_randr_ScreenSize_mheight, tvb, *offsetp, 2, byte_order);
10303 *offsetp += 2;
10304 }
10305}
10306
10307static int struct_size_randr_RefreshRates(tvbuff_t *tvb _U_, int *offsetp _U_, unsigned byte_order _U_)
10308{
10309 int size = 0;
10310 int f_nRates;
10311 f_nRates = tvb_get_uint16(tvb, *offsetp + size + 0, byte_order);
10312 size += f_nRates * 2;
10313 return size + 2;
10314}
10315
10316static void struct_randr_RefreshRates(tvbuff_t *tvb, int *offsetp, proto_tree *root, unsigned byte_order _U_, int count)
10317{
10318 int i;
10319 for (i = 0; i < count; i++) {
10320 proto_item *item;
10321 proto_tree *t;
10322 int f_nRates;
10323
10324 item = proto_tree_add_item(root, hf_x11_struct_randr_RefreshRates, tvb, *offsetp, struct_size_randr_RefreshRates(tvb, offsetp, byte_order), ENC_NA);
10325 t = proto_item_add_subtree(item, ett_x11_rectangle);
10326 f_nRates = tvb_get_uint16(tvb, *offsetp, byte_order);
10327 proto_tree_add_item(t, hf_x11_struct_randr_RefreshRates_nRates, tvb, *offsetp, 2, byte_order);
10328 *offsetp += 2;
10329 listOfCard16(tvb, offsetp, t, hf_x11_struct_randr_RefreshRates_rates, hf_x11_struct_randr_RefreshRates_rates_item, f_nRates, byte_order);
10330 }
10331}
10332
10333static void struct_randr_ModeInfo(tvbuff_t *tvb, int *offsetp, proto_tree *root, unsigned byte_order _U_, int count)
10334{
10335 int i;
10336 for (i = 0; i < count; i++) {
10337 proto_item *item;
10338 proto_tree *t;
10339
10340 item = proto_tree_add_item(root, hf_x11_struct_randr_ModeInfo, tvb, *offsetp, 32, ENC_NA);
10341 t = proto_item_add_subtree(item, ett_x11_rectangle);
10342 proto_tree_add_item(t, hf_x11_struct_randr_ModeInfo_id, tvb, *offsetp, 4, byte_order);
10343 *offsetp += 4;
10344 proto_tree_add_item(t, hf_x11_struct_randr_ModeInfo_width, tvb, *offsetp, 2, byte_order);
10345 *offsetp += 2;
10346 proto_tree_add_item(t, hf_x11_struct_randr_ModeInfo_height, tvb, *offsetp, 2, byte_order);
10347 *offsetp += 2;
10348 proto_tree_add_item(t, hf_x11_struct_randr_ModeInfo_dot_clock, tvb, *offsetp, 4, byte_order);
10349 *offsetp += 4;
10350 proto_tree_add_item(t, hf_x11_struct_randr_ModeInfo_hsync_start, tvb, *offsetp, 2, byte_order);
10351 *offsetp += 2;
10352 proto_tree_add_item(t, hf_x11_struct_randr_ModeInfo_hsync_end, tvb, *offsetp, 2, byte_order);
10353 *offsetp += 2;
10354 proto_tree_add_item(t, hf_x11_struct_randr_ModeInfo_htotal, tvb, *offsetp, 2, byte_order);
10355 *offsetp += 2;
10356 proto_tree_add_item(t, hf_x11_struct_randr_ModeInfo_hskew, tvb, *offsetp, 2, byte_order);
10357 *offsetp += 2;
10358 proto_tree_add_item(t, hf_x11_struct_randr_ModeInfo_vsync_start, tvb, *offsetp, 2, byte_order);
10359 *offsetp += 2;
10360 proto_tree_add_item(t, hf_x11_struct_randr_ModeInfo_vsync_end, tvb, *offsetp, 2, byte_order);
10361 *offsetp += 2;
10362 proto_tree_add_item(t, hf_x11_struct_randr_ModeInfo_vtotal, tvb, *offsetp, 2, byte_order);
10363 *offsetp += 2;
10364 proto_tree_add_item(t, hf_x11_struct_randr_ModeInfo_name_len, tvb, *offsetp, 2, byte_order);
10365 *offsetp += 2;
10366 {
10367 static int* const mode_flags_bits [] = {
10368 &hf_x11_struct_randr_ModeInfo_mode_flags_mask_HsyncPositive,
10369 &hf_x11_struct_randr_ModeInfo_mode_flags_mask_HsyncNegative,
10370 &hf_x11_struct_randr_ModeInfo_mode_flags_mask_VsyncPositive,
10371 &hf_x11_struct_randr_ModeInfo_mode_flags_mask_VsyncNegative,
10372 &hf_x11_struct_randr_ModeInfo_mode_flags_mask_Interlace,
10373 &hf_x11_struct_randr_ModeInfo_mode_flags_mask_DoubleScan,
10374 &hf_x11_struct_randr_ModeInfo_mode_flags_mask_Csync,
10375 &hf_x11_struct_randr_ModeInfo_mode_flags_mask_CsyncPositive,
10376 &hf_x11_struct_randr_ModeInfo_mode_flags_mask_CsyncNegative,
10377 &hf_x11_struct_randr_ModeInfo_mode_flags_mask_HskewPresent,
10378 &hf_x11_struct_randr_ModeInfo_mode_flags_mask_Bcast,
10379 &hf_x11_struct_randr_ModeInfo_mode_flags_mask_PixelMultiplex,
10380 &hf_x11_struct_randr_ModeInfo_mode_flags_mask_DoubleClock,
10381 &hf_x11_struct_randr_ModeInfo_mode_flags_mask_HalveClock,
10382 NULL
10383 };
10384 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_struct_randr_ModeInfo_mode_flags, ett_x11_rectangle, mode_flags_bits, byte_order);
10385 }
10386 *offsetp += 4;
10387 }
10388}
10389
10390static void struct_randr_CrtcChange(tvbuff_t *tvb, int *offsetp, proto_tree *root, unsigned byte_order _U_, int count)
10391{
10392 int i;
10393 for (i = 0; i < count; i++) {
10394 proto_item *item;
10395 proto_tree *t;
10396
10397 item = proto_tree_add_item(root, hf_x11_struct_randr_CrtcChange, tvb, *offsetp, 28, ENC_NA);
10398 t = proto_item_add_subtree(item, ett_x11_rectangle);
10399 proto_tree_add_item(t, hf_x11_struct_randr_CrtcChange_timestamp, tvb, *offsetp, 4, byte_order);
10400 *offsetp += 4;
10401 proto_tree_add_item(t, hf_x11_struct_randr_CrtcChange_window, tvb, *offsetp, 4, byte_order);
10402 *offsetp += 4;
10403 proto_tree_add_item(t, hf_x11_struct_randr_CrtcChange_crtc, tvb, *offsetp, 4, byte_order);
10404 *offsetp += 4;
10405 proto_tree_add_item(t, hf_x11_struct_randr_CrtcChange_mode, tvb, *offsetp, 4, byte_order);
10406 *offsetp += 4;
10407 {
10408 static int* const rotation_bits [] = {
10409 &hf_x11_struct_randr_CrtcChange_rotation_mask_Rotate_0,
10410 &hf_x11_struct_randr_CrtcChange_rotation_mask_Rotate_90,
10411 &hf_x11_struct_randr_CrtcChange_rotation_mask_Rotate_180,
10412 &hf_x11_struct_randr_CrtcChange_rotation_mask_Rotate_270,
10413 &hf_x11_struct_randr_CrtcChange_rotation_mask_Reflect_X,
10414 &hf_x11_struct_randr_CrtcChange_rotation_mask_Reflect_Y,
10415 NULL
10416 };
10417 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_struct_randr_CrtcChange_rotation, ett_x11_rectangle, rotation_bits, byte_order);
10418 }
10419 *offsetp += 2;
10420 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 2, ENC_NA);
10421 *offsetp += 2;
10422 proto_tree_add_item(t, hf_x11_struct_randr_CrtcChange_x, tvb, *offsetp, 2, byte_order);
10423 *offsetp += 2;
10424 proto_tree_add_item(t, hf_x11_struct_randr_CrtcChange_y, tvb, *offsetp, 2, byte_order);
10425 *offsetp += 2;
10426 proto_tree_add_item(t, hf_x11_struct_randr_CrtcChange_width, tvb, *offsetp, 2, byte_order);
10427 *offsetp += 2;
10428 proto_tree_add_item(t, hf_x11_struct_randr_CrtcChange_height, tvb, *offsetp, 2, byte_order);
10429 *offsetp += 2;
10430 }
10431}
10432
10433static void struct_randr_OutputChange(tvbuff_t *tvb, int *offsetp, proto_tree *root, unsigned byte_order _U_, int count)
10434{
10435 int i;
10436 for (i = 0; i < count; i++) {
10437 proto_item *item;
10438 proto_tree *t;
10439
10440 item = proto_tree_add_item(root, hf_x11_struct_randr_OutputChange, tvb, *offsetp, 28, ENC_NA);
10441 t = proto_item_add_subtree(item, ett_x11_rectangle);
10442 proto_tree_add_item(t, hf_x11_struct_randr_OutputChange_timestamp, tvb, *offsetp, 4, byte_order);
10443 *offsetp += 4;
10444 proto_tree_add_item(t, hf_x11_struct_randr_OutputChange_config_timestamp, tvb, *offsetp, 4, byte_order);
10445 *offsetp += 4;
10446 proto_tree_add_item(t, hf_x11_struct_randr_OutputChange_window, tvb, *offsetp, 4, byte_order);
10447 *offsetp += 4;
10448 proto_tree_add_item(t, hf_x11_struct_randr_OutputChange_output, tvb, *offsetp, 4, byte_order);
10449 *offsetp += 4;
10450 proto_tree_add_item(t, hf_x11_struct_randr_OutputChange_crtc, tvb, *offsetp, 4, byte_order);
10451 *offsetp += 4;
10452 proto_tree_add_item(t, hf_x11_struct_randr_OutputChange_mode, tvb, *offsetp, 4, byte_order);
10453 *offsetp += 4;
10454 {
10455 static int* const rotation_bits [] = {
10456 &hf_x11_struct_randr_OutputChange_rotation_mask_Rotate_0,
10457 &hf_x11_struct_randr_OutputChange_rotation_mask_Rotate_90,
10458 &hf_x11_struct_randr_OutputChange_rotation_mask_Rotate_180,
10459 &hf_x11_struct_randr_OutputChange_rotation_mask_Rotate_270,
10460 &hf_x11_struct_randr_OutputChange_rotation_mask_Reflect_X,
10461 &hf_x11_struct_randr_OutputChange_rotation_mask_Reflect_Y,
10462 NULL
10463 };
10464 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_struct_randr_OutputChange_rotation, ett_x11_rectangle, rotation_bits, byte_order);
10465 }
10466 *offsetp += 2;
10467 field8(tvb, offsetp, t, hf_x11_struct_randr_OutputChange_connection, byte_order);
10468 field8(tvb, offsetp, t, hf_x11_struct_randr_OutputChange_subpixel_order, byte_order);
10469 }
10470}
10471
10472static void struct_randr_OutputProperty(tvbuff_t *tvb, int *offsetp, proto_tree *root, unsigned byte_order _U_, int count)
10473{
10474 int i;
10475 for (i = 0; i < count; i++) {
10476 proto_item *item;
10477 proto_tree *t;
10478
10479 item = proto_tree_add_item(root, hf_x11_struct_randr_OutputProperty, tvb, *offsetp, 28, ENC_NA);
10480 t = proto_item_add_subtree(item, ett_x11_rectangle);
10481 proto_tree_add_item(t, hf_x11_struct_randr_OutputProperty_window, tvb, *offsetp, 4, byte_order);
10482 *offsetp += 4;
10483 proto_tree_add_item(t, hf_x11_struct_randr_OutputProperty_output, tvb, *offsetp, 4, byte_order);
10484 *offsetp += 4;
10485 proto_tree_add_item(t, hf_x11_struct_randr_OutputProperty_atom, tvb, *offsetp, 4, byte_order);
10486 *offsetp += 4;
10487 proto_tree_add_item(t, hf_x11_struct_randr_OutputProperty_timestamp, tvb, *offsetp, 4, byte_order);
10488 *offsetp += 4;
10489 field8(tvb, offsetp, t, hf_x11_struct_randr_OutputProperty_status, byte_order);
10490 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 11, ENC_NA);
10491 *offsetp += 11;
10492 }
10493}
10494
10495static void struct_randr_ProviderChange(tvbuff_t *tvb, int *offsetp, proto_tree *root, unsigned byte_order _U_, int count)
10496{
10497 int i;
10498 for (i = 0; i < count; i++) {
10499 proto_item *item;
10500 proto_tree *t;
10501
10502 item = proto_tree_add_item(root, hf_x11_struct_randr_ProviderChange, tvb, *offsetp, 28, ENC_NA);
10503 t = proto_item_add_subtree(item, ett_x11_rectangle);
10504 proto_tree_add_item(t, hf_x11_struct_randr_ProviderChange_timestamp, tvb, *offsetp, 4, byte_order);
10505 *offsetp += 4;
10506 proto_tree_add_item(t, hf_x11_struct_randr_ProviderChange_window, tvb, *offsetp, 4, byte_order);
10507 *offsetp += 4;
10508 proto_tree_add_item(t, hf_x11_struct_randr_ProviderChange_provider, tvb, *offsetp, 4, byte_order);
10509 *offsetp += 4;
10510 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 16, ENC_NA);
10511 *offsetp += 16;
10512 }
10513}
10514
10515static void struct_randr_ProviderProperty(tvbuff_t *tvb, int *offsetp, proto_tree *root, unsigned byte_order _U_, int count)
10516{
10517 int i;
10518 for (i = 0; i < count; i++) {
10519 proto_item *item;
10520 proto_tree *t;
10521
10522 item = proto_tree_add_item(root, hf_x11_struct_randr_ProviderProperty, tvb, *offsetp, 28, ENC_NA);
10523 t = proto_item_add_subtree(item, ett_x11_rectangle);
10524 proto_tree_add_item(t, hf_x11_struct_randr_ProviderProperty_window, tvb, *offsetp, 4, byte_order);
10525 *offsetp += 4;
10526 proto_tree_add_item(t, hf_x11_struct_randr_ProviderProperty_provider, tvb, *offsetp, 4, byte_order);
10527 *offsetp += 4;
10528 proto_tree_add_item(t, hf_x11_struct_randr_ProviderProperty_atom, tvb, *offsetp, 4, byte_order);
10529 *offsetp += 4;
10530 proto_tree_add_item(t, hf_x11_struct_randr_ProviderProperty_timestamp, tvb, *offsetp, 4, byte_order);
10531 *offsetp += 4;
10532 proto_tree_add_item(t, hf_x11_struct_randr_ProviderProperty_state, tvb, *offsetp, 1, byte_order);
10533 *offsetp += 1;
10534 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 11, ENC_NA);
10535 *offsetp += 11;
10536 }
10537}
10538
10539static void struct_randr_ResourceChange(tvbuff_t *tvb, int *offsetp, proto_tree *root, unsigned byte_order _U_, int count)
10540{
10541 int i;
10542 for (i = 0; i < count; i++) {
10543 proto_item *item;
10544 proto_tree *t;
10545
10546 item = proto_tree_add_item(root, hf_x11_struct_randr_ResourceChange, tvb, *offsetp, 28, ENC_NA);
10547 t = proto_item_add_subtree(item, ett_x11_rectangle);
10548 proto_tree_add_item(t, hf_x11_struct_randr_ResourceChange_timestamp, tvb, *offsetp, 4, byte_order);
10549 *offsetp += 4;
10550 proto_tree_add_item(t, hf_x11_struct_randr_ResourceChange_window, tvb, *offsetp, 4, byte_order);
10551 *offsetp += 4;
10552 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 20, ENC_NA);
10553 *offsetp += 20;
10554 }
10555}
10556
10557static int struct_size_randr_MonitorInfo(tvbuff_t *tvb _U_, int *offsetp _U_, unsigned byte_order _U_)
10558{
10559 int size = 0;
10560 int f_nOutput;
10561 f_nOutput = tvb_get_uint16(tvb, *offsetp + size + 6, byte_order);
10562 size += f_nOutput * 4;
10563 return size + 24;
10564}
10565
10566static void struct_randr_MonitorInfo(tvbuff_t *tvb, int *offsetp, proto_tree *root, unsigned byte_order _U_, int count)
10567{
10568 int i;
10569 for (i = 0; i < count; i++) {
10570 proto_item *item;
10571 proto_tree *t;
10572 int f_nOutput;
10573
10574 item = proto_tree_add_item(root, hf_x11_struct_randr_MonitorInfo, tvb, *offsetp, struct_size_randr_MonitorInfo(tvb, offsetp, byte_order), ENC_NA);
10575 t = proto_item_add_subtree(item, ett_x11_rectangle);
10576 proto_tree_add_item(t, hf_x11_struct_randr_MonitorInfo_name, tvb, *offsetp, 4, byte_order);
10577 *offsetp += 4;
10578 proto_tree_add_item(t, hf_x11_struct_randr_MonitorInfo_primary, tvb, *offsetp, 1, byte_order);
10579 *offsetp += 1;
10580 proto_tree_add_item(t, hf_x11_struct_randr_MonitorInfo_automatic, tvb, *offsetp, 1, byte_order);
10581 *offsetp += 1;
10582 f_nOutput = tvb_get_uint16(tvb, *offsetp, byte_order);
10583 proto_tree_add_item(t, hf_x11_struct_randr_MonitorInfo_nOutput, tvb, *offsetp, 2, byte_order);
10584 *offsetp += 2;
10585 proto_tree_add_item(t, hf_x11_struct_randr_MonitorInfo_x, tvb, *offsetp, 2, byte_order);
10586 *offsetp += 2;
10587 proto_tree_add_item(t, hf_x11_struct_randr_MonitorInfo_y, tvb, *offsetp, 2, byte_order);
10588 *offsetp += 2;
10589 proto_tree_add_item(t, hf_x11_struct_randr_MonitorInfo_width, tvb, *offsetp, 2, byte_order);
10590 *offsetp += 2;
10591 proto_tree_add_item(t, hf_x11_struct_randr_MonitorInfo_height, tvb, *offsetp, 2, byte_order);
10592 *offsetp += 2;
10593 proto_tree_add_item(t, hf_x11_struct_randr_MonitorInfo_width_in_millimeters, tvb, *offsetp, 4, byte_order);
10594 *offsetp += 4;
10595 proto_tree_add_item(t, hf_x11_struct_randr_MonitorInfo_height_in_millimeters, tvb, *offsetp, 4, byte_order);
10596 *offsetp += 4;
10597 listOfCard32(tvb, offsetp, t, hf_x11_struct_randr_MonitorInfo_outputs, hf_x11_struct_randr_MonitorInfo_outputs_item, f_nOutput, byte_order);
10598 }
10599}
10600
10601static void struct_randr_LeaseNotify(tvbuff_t *tvb, int *offsetp, proto_tree *root, unsigned byte_order _U_, int count)
10602{
10603 int i;
10604 for (i = 0; i < count; i++) {
10605 proto_item *item;
10606 proto_tree *t;
10607
10608 item = proto_tree_add_item(root, hf_x11_struct_randr_LeaseNotify, tvb, *offsetp, 28, ENC_NA);
10609 t = proto_item_add_subtree(item, ett_x11_rectangle);
10610 proto_tree_add_item(t, hf_x11_struct_randr_LeaseNotify_timestamp, tvb, *offsetp, 4, byte_order);
10611 *offsetp += 4;
10612 proto_tree_add_item(t, hf_x11_struct_randr_LeaseNotify_window, tvb, *offsetp, 4, byte_order);
10613 *offsetp += 4;
10614 proto_tree_add_item(t, hf_x11_struct_randr_LeaseNotify_lease, tvb, *offsetp, 4, byte_order);
10615 *offsetp += 4;
10616 proto_tree_add_item(t, hf_x11_struct_randr_LeaseNotify_created, tvb, *offsetp, 1, byte_order);
10617 *offsetp += 1;
10618 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 15, ENC_NA);
10619 *offsetp += 15;
10620 }
10621}
10622
10623static void struct_sync_INT64(tvbuff_t *tvb, int *offsetp, proto_tree *root, unsigned byte_order _U_, int count)
10624{
10625 int i;
10626 for (i = 0; i < count; i++) {
10627 proto_item *item;
10628 proto_tree *t;
10629
10630 item = proto_tree_add_item(root, hf_x11_struct_sync_INT64, tvb, *offsetp, 8, ENC_NA);
10631 t = proto_item_add_subtree(item, ett_x11_rectangle);
10632 proto_tree_add_item(t, hf_x11_struct_sync_INT64_hi, tvb, *offsetp, 4, byte_order);
10633 *offsetp += 4;
10634 proto_tree_add_item(t, hf_x11_struct_sync_INT64_lo, tvb, *offsetp, 4, byte_order);
10635 *offsetp += 4;
10636 }
10637}
10638
10639static int struct_size_sync_SYSTEMCOUNTER(tvbuff_t *tvb _U_, int *offsetp _U_, unsigned byte_order _U_)
10640{
10641 int size = 0;
10642 int f_name_len;
10643 f_name_len = tvb_get_uint16(tvb, *offsetp + size + 12, byte_order);
10644 size += f_name_len * 1;
10645 size = (size + 3) & ~3;
10646 return size + 14;
10647}
10648
10649static void struct_sync_SYSTEMCOUNTER(tvbuff_t *tvb, int *offsetp, proto_tree *root, unsigned byte_order _U_, int count)
10650{
10651 int i;
10652 for (i = 0; i < count; i++) {
10653 proto_item *item;
10654 proto_tree *t;
10655 int f_name_len;
10656
10657 item = proto_tree_add_item(root, hf_x11_struct_sync_SYSTEMCOUNTER, tvb, *offsetp, struct_size_sync_SYSTEMCOUNTER(tvb, offsetp, byte_order), ENC_NA);
10658 t = proto_item_add_subtree(item, ett_x11_rectangle);
10659 proto_tree_add_item(t, hf_x11_struct_sync_SYSTEMCOUNTER_counter, tvb, *offsetp, 4, byte_order);
10660 *offsetp += 4;
10661 struct_sync_INT64(tvb, offsetp, t, byte_order, 1);
10662 f_name_len = tvb_get_uint16(tvb, *offsetp, byte_order);
10663 proto_tree_add_item(t, hf_x11_struct_sync_SYSTEMCOUNTER_name_len, tvb, *offsetp, 2, byte_order);
10664 *offsetp += 2;
10665 listOfByte(tvb, offsetp, t, hf_x11_struct_sync_SYSTEMCOUNTER_name, f_name_len, byte_order);
10666 if (*offsetp % 4) {
10667 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, (4 - *offsetp % 4), ENC_NA);
10668 *offsetp += (4 - *offsetp % 4);
10669 }
10670 }
10671}
10672
10673static void struct_sync_TRIGGER(tvbuff_t *tvb, int *offsetp, proto_tree *root, unsigned byte_order _U_, int count)
10674{
10675 int i;
10676 for (i = 0; i < count; i++) {
10677 proto_item *item;
10678 proto_tree *t;
10679
10680 item = proto_tree_add_item(root, hf_x11_struct_sync_TRIGGER, tvb, *offsetp, 20, ENC_NA);
10681 t = proto_item_add_subtree(item, ett_x11_rectangle);
10682 proto_tree_add_item(t, hf_x11_struct_sync_TRIGGER_counter, tvb, *offsetp, 4, byte_order);
10683 *offsetp += 4;
10684 field32(tvb, offsetp, t, hf_x11_struct_sync_TRIGGER_wait_type, byte_order);
10685 struct_sync_INT64(tvb, offsetp, t, byte_order, 1);
10686 field32(tvb, offsetp, t, hf_x11_struct_sync_TRIGGER_test_type, byte_order);
10687 }
10688}
10689
10690static void struct_sync_WAITCONDITION(tvbuff_t *tvb, int *offsetp, proto_tree *root, unsigned byte_order _U_, int count)
10691{
10692 int i;
10693 for (i = 0; i < count; i++) {
10694 proto_item *item;
10695 proto_tree *t;
10696
10697 item = proto_tree_add_item(root, hf_x11_struct_sync_WAITCONDITION, tvb, *offsetp, 28, ENC_NA);
10698 t = proto_item_add_subtree(item, ett_x11_rectangle);
10699 struct_sync_TRIGGER(tvb, offsetp, t, byte_order, 1);
10700 struct_sync_INT64(tvb, offsetp, t, byte_order, 1);
10701 }
10702}
10703
10704static void struct_present_Notify(tvbuff_t *tvb, int *offsetp, proto_tree *root, unsigned byte_order _U_, int count)
10705{
10706 int i;
10707 for (i = 0; i < count; i++) {
10708 proto_item *item;
10709 proto_tree *t;
10710
10711 item = proto_tree_add_item(root, hf_x11_struct_present_Notify, tvb, *offsetp, 8, ENC_NA);
10712 t = proto_item_add_subtree(item, ett_x11_rectangle);
10713 proto_tree_add_item(t, hf_x11_struct_present_Notify_window, tvb, *offsetp, 4, byte_order);
10714 *offsetp += 4;
10715 proto_tree_add_item(t, hf_x11_struct_present_Notify_serial, tvb, *offsetp, 4, byte_order);
10716 *offsetp += 4;
10717 }
10718}
10719
10720static void presentQueryVersion(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
10721{
10722 proto_tree_add_item(t, hf_x11_present_QueryVersion_major_version, tvb, *offsetp, 4, byte_order);
10723 *offsetp += 4;
10724 proto_tree_add_item(t, hf_x11_present_QueryVersion_minor_version, tvb, *offsetp, 4, byte_order);
10725 *offsetp += 4;
10726}
10727static void presentQueryVersion_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
10728{
10729 int sequence_number;
10730
10731 col_append_fstr(pinfo->cinfo, COL_INFO, "-QueryVersion");
10732
10733 REPLY(reply);
10734 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
10735 *offsetp += 1;
10736 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
10737 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
10738 "%d (present-QueryVersion)", sequence_number);
10739 *offsetp += 2;
10740 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
10741 *offsetp += 4;
10742 proto_tree_add_item(t, hf_x11_present_QueryVersion_reply_major_version, tvb, *offsetp, 4, byte_order);
10743 *offsetp += 4;
10744 proto_tree_add_item(t, hf_x11_present_QueryVersion_reply_minor_version, tvb, *offsetp, 4, byte_order);
10745 *offsetp += 4;
10746}
10747
10748static void presentPixmap(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
10749{
10750 proto_tree_add_item(t, hf_x11_present_Pixmap_window, tvb, *offsetp, 4, byte_order);
10751 *offsetp += 4;
10752 proto_tree_add_item(t, hf_x11_present_Pixmap_pixmap, tvb, *offsetp, 4, byte_order);
10753 *offsetp += 4;
10754 proto_tree_add_item(t, hf_x11_present_Pixmap_serial, tvb, *offsetp, 4, byte_order);
10755 *offsetp += 4;
10756 proto_tree_add_item(t, hf_x11_present_Pixmap_valid, tvb, *offsetp, 4, byte_order);
10757 *offsetp += 4;
10758 proto_tree_add_item(t, hf_x11_present_Pixmap_update, tvb, *offsetp, 4, byte_order);
10759 *offsetp += 4;
10760 proto_tree_add_item(t, hf_x11_present_Pixmap_x_off, tvb, *offsetp, 2, byte_order);
10761 *offsetp += 2;
10762 proto_tree_add_item(t, hf_x11_present_Pixmap_y_off, tvb, *offsetp, 2, byte_order);
10763 *offsetp += 2;
10764 proto_tree_add_item(t, hf_x11_present_Pixmap_target_crtc, tvb, *offsetp, 4, byte_order);
10765 *offsetp += 4;
10766 proto_tree_add_item(t, hf_x11_present_Pixmap_wait_fence, tvb, *offsetp, 4, byte_order);
10767 *offsetp += 4;
10768 proto_tree_add_item(t, hf_x11_present_Pixmap_idle_fence, tvb, *offsetp, 4, byte_order);
10769 *offsetp += 4;
10770 proto_tree_add_item(t, hf_x11_present_Pixmap_options, tvb, *offsetp, 4, byte_order);
10771 *offsetp += 4;
10772 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 4, ENC_NA);
10773 *offsetp += 4;
10774 proto_tree_add_item(t, hf_x11_present_Pixmap_target_msc, tvb, *offsetp, 8, byte_order);
10775 *offsetp += 8;
10776 proto_tree_add_item(t, hf_x11_present_Pixmap_divisor, tvb, *offsetp, 8, byte_order);
10777 *offsetp += 8;
10778 proto_tree_add_item(t, hf_x11_present_Pixmap_remainder, tvb, *offsetp, 8, byte_order);
10779 *offsetp += 8;
10780 struct_present_Notify(tvb, offsetp, t, byte_order, (length - 72) / 8);
10781}
10782
10783static void presentNotifyMSC(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
10784{
10785 proto_tree_add_item(t, hf_x11_present_NotifyMSC_window, tvb, *offsetp, 4, byte_order);
10786 *offsetp += 4;
10787 proto_tree_add_item(t, hf_x11_present_NotifyMSC_serial, tvb, *offsetp, 4, byte_order);
10788 *offsetp += 4;
10789 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 4, ENC_NA);
10790 *offsetp += 4;
10791 proto_tree_add_item(t, hf_x11_present_NotifyMSC_target_msc, tvb, *offsetp, 8, byte_order);
10792 *offsetp += 8;
10793 proto_tree_add_item(t, hf_x11_present_NotifyMSC_divisor, tvb, *offsetp, 8, byte_order);
10794 *offsetp += 8;
10795 proto_tree_add_item(t, hf_x11_present_NotifyMSC_remainder, tvb, *offsetp, 8, byte_order);
10796 *offsetp += 8;
10797}
10798
10799static void presentSelectInput(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
10800{
10801 proto_tree_add_item(t, hf_x11_present_SelectInput_eid, tvb, *offsetp, 4, byte_order);
10802 *offsetp += 4;
10803 proto_tree_add_item(t, hf_x11_present_SelectInput_window, tvb, *offsetp, 4, byte_order);
10804 *offsetp += 4;
10805 {
10806 static int* const event_mask_bits [] = {
10807 &hf_x11_present_SelectInput_event_mask_mask_ConfigureNotify,
10808 &hf_x11_present_SelectInput_event_mask_mask_CompleteNotify,
10809 &hf_x11_present_SelectInput_event_mask_mask_IdleNotify,
10810 &hf_x11_present_SelectInput_event_mask_mask_RedirectNotify,
10811 NULL
10812 };
10813 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_present_SelectInput_event_mask, ett_x11_rectangle, event_mask_bits, byte_order);
10814 }
10815 *offsetp += 4;
10816}
10817
10818static void presentQueryCapabilities(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
10819{
10820 proto_tree_add_item(t, hf_x11_present_QueryCapabilities_target, tvb, *offsetp, 4, byte_order);
10821 *offsetp += 4;
10822}
10823static void presentQueryCapabilities_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
10824{
10825 int sequence_number;
10826
10827 col_append_fstr(pinfo->cinfo, COL_INFO, "-QueryCapabilities");
10828
10829 REPLY(reply);
10830 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
10831 *offsetp += 1;
10832 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
10833 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
10834 "%d (present-QueryCapabilities)", sequence_number);
10835 *offsetp += 2;
10836 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
10837 *offsetp += 4;
10838 proto_tree_add_item(t, hf_x11_present_QueryCapabilities_reply_capabilities, tvb, *offsetp, 4, byte_order);
10839 *offsetp += 4;
10840}
10841
10842static void presentPixmapSynced(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
10843{
10844 proto_tree_add_item(t, hf_x11_present_PixmapSynced_window, tvb, *offsetp, 4, byte_order);
10845 *offsetp += 4;
10846 proto_tree_add_item(t, hf_x11_present_PixmapSynced_pixmap, tvb, *offsetp, 4, byte_order);
10847 *offsetp += 4;
10848 proto_tree_add_item(t, hf_x11_present_PixmapSynced_serial, tvb, *offsetp, 4, byte_order);
10849 *offsetp += 4;
10850 proto_tree_add_item(t, hf_x11_present_PixmapSynced_valid, tvb, *offsetp, 4, byte_order);
10851 *offsetp += 4;
10852 proto_tree_add_item(t, hf_x11_present_PixmapSynced_update, tvb, *offsetp, 4, byte_order);
10853 *offsetp += 4;
10854 proto_tree_add_item(t, hf_x11_present_PixmapSynced_x_off, tvb, *offsetp, 2, byte_order);
10855 *offsetp += 2;
10856 proto_tree_add_item(t, hf_x11_present_PixmapSynced_y_off, tvb, *offsetp, 2, byte_order);
10857 *offsetp += 2;
10858 proto_tree_add_item(t, hf_x11_present_PixmapSynced_target_crtc, tvb, *offsetp, 4, byte_order);
10859 *offsetp += 4;
10860 proto_tree_add_item(t, hf_x11_present_PixmapSynced_acquire_syncobj, tvb, *offsetp, 4, byte_order);
10861 *offsetp += 4;
10862 proto_tree_add_item(t, hf_x11_present_PixmapSynced_release_syncobj, tvb, *offsetp, 4, byte_order);
10863 *offsetp += 4;
10864 proto_tree_add_item(t, hf_x11_present_PixmapSynced_acquire_point, tvb, *offsetp, 8, byte_order);
10865 *offsetp += 8;
10866 proto_tree_add_item(t, hf_x11_present_PixmapSynced_release_point, tvb, *offsetp, 8, byte_order);
10867 *offsetp += 8;
10868 proto_tree_add_item(t, hf_x11_present_PixmapSynced_options, tvb, *offsetp, 4, byte_order);
10869 *offsetp += 4;
10870 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 4, ENC_NA);
10871 *offsetp += 4;
10872 proto_tree_add_item(t, hf_x11_present_PixmapSynced_target_msc, tvb, *offsetp, 8, byte_order);
10873 *offsetp += 8;
10874 proto_tree_add_item(t, hf_x11_present_PixmapSynced_divisor, tvb, *offsetp, 8, byte_order);
10875 *offsetp += 8;
10876 proto_tree_add_item(t, hf_x11_present_PixmapSynced_remainder, tvb, *offsetp, 8, byte_order);
10877 *offsetp += 8;
10878 struct_present_Notify(tvb, offsetp, t, byte_order, (length - 88) / 8);
10879}
10880
10881static void presentCompleteNotify(tvbuff_t *tvb, int length _U_, int *offsetp, proto_tree *t, unsigned byte_order)
10882{
10883 proto_tree_add_uint_format_value(t, hf_x11_minor_opcode, tvb, *offsetp, 2, 1,
10884 "CompleteNotify (1)");
10885 field8(tvb, offsetp, t, hf_x11_present_CompleteNotify_kind, byte_order);
10886 field8(tvb, offsetp, t, hf_x11_present_CompleteNotify_mode, byte_order);
10887 proto_tree_add_item(t, hf_x11_present_CompleteNotify_event, tvb, *offsetp, 4, byte_order);
10888 *offsetp += 4;
10889 proto_tree_add_item(t, hf_x11_present_CompleteNotify_window, tvb, *offsetp, 4, byte_order);
10890 *offsetp += 4;
10891 proto_tree_add_item(t, hf_x11_present_CompleteNotify_serial, tvb, *offsetp, 4, byte_order);
10892 *offsetp += 4;
10893 proto_tree_add_item(t, hf_x11_present_CompleteNotify_ust, tvb, *offsetp, 8, byte_order);
10894 *offsetp += 8;
10895 proto_tree_add_item(t, hf_x11_present_CompleteNotify_msc, tvb, *offsetp, 8, byte_order);
10896 *offsetp += 8;
10897}
10898
10899
10900static void presentIdleNotify(tvbuff_t *tvb, int length _U_, int *offsetp, proto_tree *t, unsigned byte_order)
10901{
10902 proto_tree_add_uint_format_value(t, hf_x11_minor_opcode, tvb, *offsetp, 2, 2,
10903 "IdleNotify (2)");
10904 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 2, ENC_NA);
10905 *offsetp += 2;
10906 proto_tree_add_item(t, hf_x11_present_IdleNotify_event, tvb, *offsetp, 4, byte_order);
10907 *offsetp += 4;
10908 proto_tree_add_item(t, hf_x11_present_IdleNotify_window, tvb, *offsetp, 4, byte_order);
10909 *offsetp += 4;
10910 proto_tree_add_item(t, hf_x11_present_IdleNotify_serial, tvb, *offsetp, 4, byte_order);
10911 *offsetp += 4;
10912 proto_tree_add_item(t, hf_x11_present_IdleNotify_pixmap, tvb, *offsetp, 4, byte_order);
10913 *offsetp += 4;
10914 proto_tree_add_item(t, hf_x11_present_IdleNotify_idle_fence, tvb, *offsetp, 4, byte_order);
10915 *offsetp += 4;
10916}
10917
10918
10919static void presentRedirectNotify(tvbuff_t *tvb, int length _U_, int *offsetp, proto_tree *t, unsigned byte_order)
10920{
10921 proto_tree_add_uint_format_value(t, hf_x11_minor_opcode, tvb, *offsetp, 2, 3,
10922 "RedirectNotify (3)");
10923 proto_tree_add_item(t, hf_x11_present_RedirectNotify_update_window, tvb, *offsetp, 1, byte_order);
10924 *offsetp += 1;
10925 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
10926 *offsetp += 1;
10927 proto_tree_add_item(t, hf_x11_present_RedirectNotify_event, tvb, *offsetp, 4, byte_order);
10928 *offsetp += 4;
10929 proto_tree_add_item(t, hf_x11_present_RedirectNotify_event_window, tvb, *offsetp, 4, byte_order);
10930 *offsetp += 4;
10931 proto_tree_add_item(t, hf_x11_present_RedirectNotify_window, tvb, *offsetp, 4, byte_order);
10932 *offsetp += 4;
10933 proto_tree_add_item(t, hf_x11_present_RedirectNotify_pixmap, tvb, *offsetp, 4, byte_order);
10934 *offsetp += 4;
10935 proto_tree_add_item(t, hf_x11_present_RedirectNotify_serial, tvb, *offsetp, 4, byte_order);
10936 *offsetp += 4;
10937 proto_tree_add_item(t, hf_x11_present_RedirectNotify_valid_region, tvb, *offsetp, 4, byte_order);
10938 *offsetp += 4;
10939 proto_tree_add_item(t, hf_x11_present_RedirectNotify_update_region, tvb, *offsetp, 4, byte_order);
10940 *offsetp += 4;
10941 struct_xproto_RECTANGLE(tvb, offsetp, t, byte_order, 1);
10942 struct_xproto_RECTANGLE(tvb, offsetp, t, byte_order, 1);
10943 proto_tree_add_item(t, hf_x11_present_RedirectNotify_x_off, tvb, *offsetp, 2, byte_order);
10944 *offsetp += 2;
10945 proto_tree_add_item(t, hf_x11_present_RedirectNotify_y_off, tvb, *offsetp, 2, byte_order);
10946 *offsetp += 2;
10947 proto_tree_add_item(t, hf_x11_present_RedirectNotify_target_crtc, tvb, *offsetp, 4, byte_order);
10948 *offsetp += 4;
10949 proto_tree_add_item(t, hf_x11_present_RedirectNotify_wait_fence, tvb, *offsetp, 4, byte_order);
10950 *offsetp += 4;
10951 proto_tree_add_item(t, hf_x11_present_RedirectNotify_idle_fence, tvb, *offsetp, 4, byte_order);
10952 *offsetp += 4;
10953 proto_tree_add_item(t, hf_x11_present_RedirectNotify_options, tvb, *offsetp, 4, byte_order);
10954 *offsetp += 4;
10955 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 4, ENC_NA);
10956 *offsetp += 4;
10957 proto_tree_add_item(t, hf_x11_present_RedirectNotify_target_msc, tvb, *offsetp, 8, byte_order);
10958 *offsetp += 8;
10959 proto_tree_add_item(t, hf_x11_present_RedirectNotify_divisor, tvb, *offsetp, 8, byte_order);
10960 *offsetp += 8;
10961 proto_tree_add_item(t, hf_x11_present_RedirectNotify_remainder, tvb, *offsetp, 8, byte_order);
10962 *offsetp += 8;
10963 struct_present_Notify(tvb, offsetp, t, byte_order, (length - 104) / 8);
10964}
10965
10966static const value_string present_extension_minor[] = {
10967 { 0, "QueryVersion" },
10968 { 1, "Pixmap" },
10969 { 2, "NotifyMSC" },
10970 { 3, "SelectInput" },
10971 { 4, "QueryCapabilities" },
10972 { 5, "PixmapSynced" },
10973 { 0, NULL }
10974};
10975static const x11_event_info present_events[] = {
10976 { NULL, NULL }
10977};
10978static const x11_generic_event_info present_generic_events[] = {
10979 { 1, presentCompleteNotify },
10980 { 2, presentIdleNotify },
10981 { 3, presentRedirectNotify },
10982 { 0, NULL },
10983};
10984
10985static const x11_reply_info present_replies[] = {
10986 { 0, presentQueryVersion_Reply },
10987 { 4, presentQueryCapabilities_Reply },
10988 { 0, NULL }
10989};
10990
10991static void dispatch_present(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
10992{
10993 int minor, length;
10994 minor = CARD8(present_extension_minor);
10995 length = REQUEST_LENGTH();
10996
10997 col_append_fstr(pinfo->cinfo, COL_INFO, "-%s",
10998 val_to_str(minor, present_extension_minor,
10999 "<Unknown opcode %d>"));
11000 switch (minor) {
11001 case 0:
11002 presentQueryVersion(tvb, pinfo, offsetp, t, byte_order, length);
11003 break;
11004 case 1:
11005 presentPixmap(tvb, pinfo, offsetp, t, byte_order, length);
11006 break;
11007 case 2:
11008 presentNotifyMSC(tvb, pinfo, offsetp, t, byte_order, length);
11009 break;
11010 case 3:
11011 presentSelectInput(tvb, pinfo, offsetp, t, byte_order, length);
11012 break;
11013 case 4:
11014 presentQueryCapabilities(tvb, pinfo, offsetp, t, byte_order, length);
11015 break;
11016 case 5:
11017 presentPixmapSynced(tvb, pinfo, offsetp, t, byte_order, length);
11018 break;
11019 /* No need for a default case here, since Unknown is printed above,
11020 and UNDECODED() is taken care of by dissect_x11_request */
11021 }
11022}
11023
11024static void register_present(void)
11025{
11026 set_handler("Present", dispatch_present, present_errors, present_events, present_generic_events, present_replies);
11027}
11028
11029static void randrQueryVersion(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
11030{
11031 proto_tree_add_item(t, hf_x11_randr_QueryVersion_major_version, tvb, *offsetp, 4, byte_order);
11032 *offsetp += 4;
11033 proto_tree_add_item(t, hf_x11_randr_QueryVersion_minor_version, tvb, *offsetp, 4, byte_order);
11034 *offsetp += 4;
11035}
11036static void randrQueryVersion_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
11037{
11038 int sequence_number;
11039
11040 col_append_fstr(pinfo->cinfo, COL_INFO, "-QueryVersion");
11041
11042 REPLY(reply);
11043 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
11044 *offsetp += 1;
11045 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
11046 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
11047 "%d (randr-QueryVersion)", sequence_number);
11048 *offsetp += 2;
11049 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
11050 *offsetp += 4;
11051 proto_tree_add_item(t, hf_x11_randr_QueryVersion_reply_major_version, tvb, *offsetp, 4, byte_order);
11052 *offsetp += 4;
11053 proto_tree_add_item(t, hf_x11_randr_QueryVersion_reply_minor_version, tvb, *offsetp, 4, byte_order);
11054 *offsetp += 4;
11055 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 16, ENC_NA);
11056 *offsetp += 16;
11057}
11058
11059static void randrSetScreenConfig(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
11060{
11061 proto_tree_add_item(t, hf_x11_randr_SetScreenConfig_window, tvb, *offsetp, 4, byte_order);
11062 *offsetp += 4;
11063 proto_tree_add_item(t, hf_x11_randr_SetScreenConfig_timestamp, tvb, *offsetp, 4, byte_order);
11064 *offsetp += 4;
11065 proto_tree_add_item(t, hf_x11_randr_SetScreenConfig_config_timestamp, tvb, *offsetp, 4, byte_order);
11066 *offsetp += 4;
11067 proto_tree_add_item(t, hf_x11_randr_SetScreenConfig_sizeID, tvb, *offsetp, 2, byte_order);
11068 *offsetp += 2;
11069 {
11070 static int* const rotation_bits [] = {
11071 &hf_x11_randr_SetScreenConfig_rotation_mask_Rotate_0,
11072 &hf_x11_randr_SetScreenConfig_rotation_mask_Rotate_90,
11073 &hf_x11_randr_SetScreenConfig_rotation_mask_Rotate_180,
11074 &hf_x11_randr_SetScreenConfig_rotation_mask_Rotate_270,
11075 &hf_x11_randr_SetScreenConfig_rotation_mask_Reflect_X,
11076 &hf_x11_randr_SetScreenConfig_rotation_mask_Reflect_Y,
11077 NULL
11078 };
11079 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_randr_SetScreenConfig_rotation, ett_x11_rectangle, rotation_bits, byte_order);
11080 }
11081 *offsetp += 2;
11082 proto_tree_add_item(t, hf_x11_randr_SetScreenConfig_rate, tvb, *offsetp, 2, byte_order);
11083 *offsetp += 2;
11084 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 2, ENC_NA);
11085 *offsetp += 2;
11086}
11087static void randrSetScreenConfig_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
11088{
11089 int sequence_number;
11090
11091 col_append_fstr(pinfo->cinfo, COL_INFO, "-SetScreenConfig");
11092
11093 REPLY(reply);
11094 field8(tvb, offsetp, t, hf_x11_randr_SetScreenConfig_reply_status, byte_order);
11095 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
11096 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
11097 "%d (randr-SetScreenConfig)", sequence_number);
11098 *offsetp += 2;
11099 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
11100 *offsetp += 4;
11101 proto_tree_add_item(t, hf_x11_randr_SetScreenConfig_reply_new_timestamp, tvb, *offsetp, 4, byte_order);
11102 *offsetp += 4;
11103 proto_tree_add_item(t, hf_x11_randr_SetScreenConfig_reply_config_timestamp, tvb, *offsetp, 4, byte_order);
11104 *offsetp += 4;
11105 proto_tree_add_item(t, hf_x11_randr_SetScreenConfig_reply_root, tvb, *offsetp, 4, byte_order);
11106 *offsetp += 4;
11107 field16(tvb, offsetp, t, hf_x11_randr_SetScreenConfig_reply_subpixel_order, byte_order);
11108 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 10, ENC_NA);
11109 *offsetp += 10;
11110}
11111
11112static void randrSelectInput(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
11113{
11114 proto_tree_add_item(t, hf_x11_randr_SelectInput_window, tvb, *offsetp, 4, byte_order);
11115 *offsetp += 4;
11116 {
11117 static int* const enable_bits [] = {
11118 &hf_x11_randr_SelectInput_enable_mask_ScreenChange,
11119 &hf_x11_randr_SelectInput_enable_mask_CrtcChange,
11120 &hf_x11_randr_SelectInput_enable_mask_OutputChange,
11121 &hf_x11_randr_SelectInput_enable_mask_OutputProperty,
11122 &hf_x11_randr_SelectInput_enable_mask_ProviderChange,
11123 &hf_x11_randr_SelectInput_enable_mask_ProviderProperty,
11124 &hf_x11_randr_SelectInput_enable_mask_ResourceChange,
11125 &hf_x11_randr_SelectInput_enable_mask_Lease,
11126 NULL
11127 };
11128 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_randr_SelectInput_enable, ett_x11_rectangle, enable_bits, byte_order);
11129 }
11130 *offsetp += 2;
11131 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 2, ENC_NA);
11132 *offsetp += 2;
11133}
11134
11135static void randrGetScreenInfo(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
11136{
11137 proto_tree_add_item(t, hf_x11_randr_GetScreenInfo_window, tvb, *offsetp, 4, byte_order);
11138 *offsetp += 4;
11139}
11140static void randrGetScreenInfo_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
11141{
11142 int sequence_number;
11143 int f_nSizes;
11144 int f_nInfo;
11145
11146 col_append_fstr(pinfo->cinfo, COL_INFO, "-GetScreenInfo");
11147
11148 REPLY(reply);
11149 {
11150 static int* const rotations_bits [] = {
11151 &hf_x11_randr_GetScreenInfo_reply_rotations_mask_Rotate_0,
11152 &hf_x11_randr_GetScreenInfo_reply_rotations_mask_Rotate_90,
11153 &hf_x11_randr_GetScreenInfo_reply_rotations_mask_Rotate_180,
11154 &hf_x11_randr_GetScreenInfo_reply_rotations_mask_Rotate_270,
11155 &hf_x11_randr_GetScreenInfo_reply_rotations_mask_Reflect_X,
11156 &hf_x11_randr_GetScreenInfo_reply_rotations_mask_Reflect_Y,
11157 NULL
11158 };
11159 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_randr_GetScreenInfo_reply_rotations, ett_x11_rectangle, rotations_bits, byte_order);
11160 }
11161 *offsetp += 1;
11162 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
11163 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
11164 "%d (randr-GetScreenInfo)", sequence_number);
11165 *offsetp += 2;
11166 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
11167 *offsetp += 4;
11168 proto_tree_add_item(t, hf_x11_randr_GetScreenInfo_reply_root, tvb, *offsetp, 4, byte_order);
11169 *offsetp += 4;
11170 proto_tree_add_item(t, hf_x11_randr_GetScreenInfo_reply_timestamp, tvb, *offsetp, 4, byte_order);
11171 *offsetp += 4;
11172 proto_tree_add_item(t, hf_x11_randr_GetScreenInfo_reply_config_timestamp, tvb, *offsetp, 4, byte_order);
11173 *offsetp += 4;
11174 f_nSizes = tvb_get_uint16(tvb, *offsetp, byte_order);
11175 proto_tree_add_item(t, hf_x11_randr_GetScreenInfo_reply_nSizes, tvb, *offsetp, 2, byte_order);
11176 *offsetp += 2;
11177 proto_tree_add_item(t, hf_x11_randr_GetScreenInfo_reply_sizeID, tvb, *offsetp, 2, byte_order);
11178 *offsetp += 2;
11179 {
11180 static int* const rotation_bits [] = {
11181 &hf_x11_randr_GetScreenInfo_reply_rotation_mask_Rotate_0,
11182 &hf_x11_randr_GetScreenInfo_reply_rotation_mask_Rotate_90,
11183 &hf_x11_randr_GetScreenInfo_reply_rotation_mask_Rotate_180,
11184 &hf_x11_randr_GetScreenInfo_reply_rotation_mask_Rotate_270,
11185 &hf_x11_randr_GetScreenInfo_reply_rotation_mask_Reflect_X,
11186 &hf_x11_randr_GetScreenInfo_reply_rotation_mask_Reflect_Y,
11187 NULL
11188 };
11189 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_randr_GetScreenInfo_reply_rotation, ett_x11_rectangle, rotation_bits, byte_order);
11190 }
11191 *offsetp += 2;
11192 proto_tree_add_item(t, hf_x11_randr_GetScreenInfo_reply_rate, tvb, *offsetp, 2, byte_order);
11193 *offsetp += 2;
11194 f_nInfo = tvb_get_uint16(tvb, *offsetp, byte_order);
11195 proto_tree_add_item(t, hf_x11_randr_GetScreenInfo_reply_nInfo, tvb, *offsetp, 2, byte_order);
11196 *offsetp += 2;
11197 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 2, ENC_NA);
11198 *offsetp += 2;
11199 struct_randr_ScreenSize(tvb, offsetp, t, byte_order, f_nSizes);
11200 struct_randr_RefreshRates(tvb, offsetp, t, byte_order, (f_nInfo - f_nSizes));
11201}
11202
11203static void randrGetScreenSizeRange(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
11204{
11205 proto_tree_add_item(t, hf_x11_randr_GetScreenSizeRange_window, tvb, *offsetp, 4, byte_order);
11206 *offsetp += 4;
11207}
11208static void randrGetScreenSizeRange_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
11209{
11210 int sequence_number;
11211
11212 col_append_fstr(pinfo->cinfo, COL_INFO, "-GetScreenSizeRange");
11213
11214 REPLY(reply);
11215 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
11216 *offsetp += 1;
11217 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
11218 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
11219 "%d (randr-GetScreenSizeRange)", sequence_number);
11220 *offsetp += 2;
11221 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
11222 *offsetp += 4;
11223 proto_tree_add_item(t, hf_x11_randr_GetScreenSizeRange_reply_min_width, tvb, *offsetp, 2, byte_order);
11224 *offsetp += 2;
11225 proto_tree_add_item(t, hf_x11_randr_GetScreenSizeRange_reply_min_height, tvb, *offsetp, 2, byte_order);
11226 *offsetp += 2;
11227 proto_tree_add_item(t, hf_x11_randr_GetScreenSizeRange_reply_max_width, tvb, *offsetp, 2, byte_order);
11228 *offsetp += 2;
11229 proto_tree_add_item(t, hf_x11_randr_GetScreenSizeRange_reply_max_height, tvb, *offsetp, 2, byte_order);
11230 *offsetp += 2;
11231 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 16, ENC_NA);
11232 *offsetp += 16;
11233}
11234
11235static void randrSetScreenSize(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
11236{
11237 proto_tree_add_item(t, hf_x11_randr_SetScreenSize_window, tvb, *offsetp, 4, byte_order);
11238 *offsetp += 4;
11239 proto_tree_add_item(t, hf_x11_randr_SetScreenSize_width, tvb, *offsetp, 2, byte_order);
11240 *offsetp += 2;
11241 proto_tree_add_item(t, hf_x11_randr_SetScreenSize_height, tvb, *offsetp, 2, byte_order);
11242 *offsetp += 2;
11243 proto_tree_add_item(t, hf_x11_randr_SetScreenSize_mm_width, tvb, *offsetp, 4, byte_order);
11244 *offsetp += 4;
11245 proto_tree_add_item(t, hf_x11_randr_SetScreenSize_mm_height, tvb, *offsetp, 4, byte_order);
11246 *offsetp += 4;
11247}
11248
11249static void randrGetScreenResources(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
11250{
11251 proto_tree_add_item(t, hf_x11_randr_GetScreenResources_window, tvb, *offsetp, 4, byte_order);
11252 *offsetp += 4;
11253}
11254static void randrGetScreenResources_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
11255{
11256 int sequence_number;
11257 int f_num_crtcs;
11258 int f_num_outputs;
11259 int f_num_modes;
11260 int f_names_len;
11261
11262 col_append_fstr(pinfo->cinfo, COL_INFO, "-GetScreenResources");
11263
11264 REPLY(reply);
11265 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
11266 *offsetp += 1;
11267 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
11268 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
11269 "%d (randr-GetScreenResources)", sequence_number);
11270 *offsetp += 2;
11271 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
11272 *offsetp += 4;
11273 proto_tree_add_item(t, hf_x11_randr_GetScreenResources_reply_timestamp, tvb, *offsetp, 4, byte_order);
11274 *offsetp += 4;
11275 proto_tree_add_item(t, hf_x11_randr_GetScreenResources_reply_config_timestamp, tvb, *offsetp, 4, byte_order);
11276 *offsetp += 4;
11277 f_num_crtcs = tvb_get_uint16(tvb, *offsetp, byte_order);
11278 proto_tree_add_item(t, hf_x11_randr_GetScreenResources_reply_num_crtcs, tvb, *offsetp, 2, byte_order);
11279 *offsetp += 2;
11280 f_num_outputs = tvb_get_uint16(tvb, *offsetp, byte_order);
11281 proto_tree_add_item(t, hf_x11_randr_GetScreenResources_reply_num_outputs, tvb, *offsetp, 2, byte_order);
11282 *offsetp += 2;
11283 f_num_modes = tvb_get_uint16(tvb, *offsetp, byte_order);
11284 proto_tree_add_item(t, hf_x11_randr_GetScreenResources_reply_num_modes, tvb, *offsetp, 2, byte_order);
11285 *offsetp += 2;
11286 f_names_len = tvb_get_uint16(tvb, *offsetp, byte_order);
11287 proto_tree_add_item(t, hf_x11_randr_GetScreenResources_reply_names_len, tvb, *offsetp, 2, byte_order);
11288 *offsetp += 2;
11289 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 8, ENC_NA);
11290 *offsetp += 8;
11291 listOfCard32(tvb, offsetp, t, hf_x11_randr_GetScreenResources_reply_crtcs, hf_x11_randr_GetScreenResources_reply_crtcs_item, f_num_crtcs, byte_order);
11292 listOfCard32(tvb, offsetp, t, hf_x11_randr_GetScreenResources_reply_outputs, hf_x11_randr_GetScreenResources_reply_outputs_item, f_num_outputs, byte_order);
11293 struct_randr_ModeInfo(tvb, offsetp, t, byte_order, f_num_modes);
11294 listOfByte(tvb, offsetp, t, hf_x11_randr_GetScreenResources_reply_names, f_names_len, byte_order);
11295}
11296
11297static void randrGetOutputInfo(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
11298{
11299 proto_tree_add_item(t, hf_x11_randr_GetOutputInfo_output, tvb, *offsetp, 4, byte_order);
11300 *offsetp += 4;
11301 proto_tree_add_item(t, hf_x11_randr_GetOutputInfo_config_timestamp, tvb, *offsetp, 4, byte_order);
11302 *offsetp += 4;
11303}
11304static void randrGetOutputInfo_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
11305{
11306 int sequence_number;
11307 int f_num_crtcs;
11308 int f_num_modes;
11309 int f_num_clones;
11310 int f_name_len;
11311
11312 col_append_fstr(pinfo->cinfo, COL_INFO, "-GetOutputInfo");
11313
11314 REPLY(reply);
11315 field8(tvb, offsetp, t, hf_x11_randr_GetOutputInfo_reply_status, byte_order);
11316 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
11317 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
11318 "%d (randr-GetOutputInfo)", sequence_number);
11319 *offsetp += 2;
11320 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
11321 *offsetp += 4;
11322 proto_tree_add_item(t, hf_x11_randr_GetOutputInfo_reply_timestamp, tvb, *offsetp, 4, byte_order);
11323 *offsetp += 4;
11324 proto_tree_add_item(t, hf_x11_randr_GetOutputInfo_reply_crtc, tvb, *offsetp, 4, byte_order);
11325 *offsetp += 4;
11326 proto_tree_add_item(t, hf_x11_randr_GetOutputInfo_reply_mm_width, tvb, *offsetp, 4, byte_order);
11327 *offsetp += 4;
11328 proto_tree_add_item(t, hf_x11_randr_GetOutputInfo_reply_mm_height, tvb, *offsetp, 4, byte_order);
11329 *offsetp += 4;
11330 field8(tvb, offsetp, t, hf_x11_randr_GetOutputInfo_reply_connection, byte_order);
11331 field8(tvb, offsetp, t, hf_x11_randr_GetOutputInfo_reply_subpixel_order, byte_order);
11332 f_num_crtcs = tvb_get_uint16(tvb, *offsetp, byte_order);
11333 proto_tree_add_item(t, hf_x11_randr_GetOutputInfo_reply_num_crtcs, tvb, *offsetp, 2, byte_order);
11334 *offsetp += 2;
11335 f_num_modes = tvb_get_uint16(tvb, *offsetp, byte_order);
11336 proto_tree_add_item(t, hf_x11_randr_GetOutputInfo_reply_num_modes, tvb, *offsetp, 2, byte_order);
11337 *offsetp += 2;
11338 proto_tree_add_item(t, hf_x11_randr_GetOutputInfo_reply_num_preferred, tvb, *offsetp, 2, byte_order);
11339 *offsetp += 2;
11340 f_num_clones = tvb_get_uint16(tvb, *offsetp, byte_order);
11341 proto_tree_add_item(t, hf_x11_randr_GetOutputInfo_reply_num_clones, tvb, *offsetp, 2, byte_order);
11342 *offsetp += 2;
11343 f_name_len = tvb_get_uint16(tvb, *offsetp, byte_order);
11344 proto_tree_add_item(t, hf_x11_randr_GetOutputInfo_reply_name_len, tvb, *offsetp, 2, byte_order);
11345 *offsetp += 2;
11346 listOfCard32(tvb, offsetp, t, hf_x11_randr_GetOutputInfo_reply_crtcs, hf_x11_randr_GetOutputInfo_reply_crtcs_item, f_num_crtcs, byte_order);
11347 listOfCard32(tvb, offsetp, t, hf_x11_randr_GetOutputInfo_reply_modes, hf_x11_randr_GetOutputInfo_reply_modes_item, f_num_modes, byte_order);
11348 listOfCard32(tvb, offsetp, t, hf_x11_randr_GetOutputInfo_reply_clones, hf_x11_randr_GetOutputInfo_reply_clones_item, f_num_clones, byte_order);
11349 listOfByte(tvb, offsetp, t, hf_x11_randr_GetOutputInfo_reply_name, f_name_len, byte_order);
11350}
11351
11352static void randrListOutputProperties(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
11353{
11354 proto_tree_add_item(t, hf_x11_randr_ListOutputProperties_output, tvb, *offsetp, 4, byte_order);
11355 *offsetp += 4;
11356}
11357static void randrListOutputProperties_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
11358{
11359 int sequence_number;
11360 int f_num_atoms;
11361
11362 col_append_fstr(pinfo->cinfo, COL_INFO, "-ListOutputProperties");
11363
11364 REPLY(reply);
11365 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
11366 *offsetp += 1;
11367 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
11368 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
11369 "%d (randr-ListOutputProperties)", sequence_number);
11370 *offsetp += 2;
11371 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
11372 *offsetp += 4;
11373 f_num_atoms = tvb_get_uint16(tvb, *offsetp, byte_order);
11374 proto_tree_add_item(t, hf_x11_randr_ListOutputProperties_reply_num_atoms, tvb, *offsetp, 2, byte_order);
11375 *offsetp += 2;
11376 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 22, ENC_NA);
11377 *offsetp += 22;
11378 listOfCard32(tvb, offsetp, t, hf_x11_randr_ListOutputProperties_reply_atoms, hf_x11_randr_ListOutputProperties_reply_atoms_item, f_num_atoms, byte_order);
11379}
11380
11381static void randrQueryOutputProperty(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
11382{
11383 proto_tree_add_item(t, hf_x11_randr_QueryOutputProperty_output, tvb, *offsetp, 4, byte_order);
11384 *offsetp += 4;
11385 proto_tree_add_item(t, hf_x11_randr_QueryOutputProperty_property, tvb, *offsetp, 4, byte_order);
11386 *offsetp += 4;
11387}
11388static void randrQueryOutputProperty_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
11389{
11390 int sequence_number;
11391 int f_length;
11392
11393 col_append_fstr(pinfo->cinfo, COL_INFO, "-QueryOutputProperty");
11394
11395 REPLY(reply);
11396 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
11397 *offsetp += 1;
11398 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
11399 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
11400 "%d (randr-QueryOutputProperty)", sequence_number);
11401 *offsetp += 2;
11402 f_length = tvb_get_uint32(tvb, *offsetp, byte_order);
11403 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
11404 *offsetp += 4;
11405 proto_tree_add_item(t, hf_x11_randr_QueryOutputProperty_reply_pending, tvb, *offsetp, 1, byte_order);
11406 *offsetp += 1;
11407 proto_tree_add_item(t, hf_x11_randr_QueryOutputProperty_reply_range, tvb, *offsetp, 1, byte_order);
11408 *offsetp += 1;
11409 proto_tree_add_item(t, hf_x11_randr_QueryOutputProperty_reply_immutable, tvb, *offsetp, 1, byte_order);
11410 *offsetp += 1;
11411 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 21, ENC_NA);
11412 *offsetp += 21;
11413 listOfInt32(tvb, offsetp, t, hf_x11_randr_QueryOutputProperty_reply_validValues, hf_x11_randr_QueryOutputProperty_reply_validValues_item, f_length, byte_order);
11414}
11415
11416static void randrConfigureOutputProperty(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
11417{
11418 proto_tree_add_item(t, hf_x11_randr_ConfigureOutputProperty_output, tvb, *offsetp, 4, byte_order);
11419 *offsetp += 4;
11420 proto_tree_add_item(t, hf_x11_randr_ConfigureOutputProperty_property, tvb, *offsetp, 4, byte_order);
11421 *offsetp += 4;
11422 proto_tree_add_item(t, hf_x11_randr_ConfigureOutputProperty_pending, tvb, *offsetp, 1, byte_order);
11423 *offsetp += 1;
11424 proto_tree_add_item(t, hf_x11_randr_ConfigureOutputProperty_range, tvb, *offsetp, 1, byte_order);
11425 *offsetp += 1;
11426 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 2, ENC_NA);
11427 *offsetp += 2;
11428 listOfInt32(tvb, offsetp, t, hf_x11_randr_ConfigureOutputProperty_values, hf_x11_randr_ConfigureOutputProperty_values_item, (length - 16) / 4, byte_order);
11429}
11430
11431static void randrChangeOutputProperty(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
11432{
11433 int f_format;
11434 int f_num_units;
11435 proto_tree_add_item(t, hf_x11_randr_ChangeOutputProperty_output, tvb, *offsetp, 4, byte_order);
11436 *offsetp += 4;
11437 proto_tree_add_item(t, hf_x11_randr_ChangeOutputProperty_property, tvb, *offsetp, 4, byte_order);
11438 *offsetp += 4;
11439 proto_tree_add_item(t, hf_x11_randr_ChangeOutputProperty_type, tvb, *offsetp, 4, byte_order);
11440 *offsetp += 4;
11441 f_format = tvb_get_uint8(tvb, *offsetp);
11442 proto_tree_add_item(t, hf_x11_randr_ChangeOutputProperty_format, tvb, *offsetp, 1, byte_order);
11443 *offsetp += 1;
11444 field8(tvb, offsetp, t, hf_x11_randr_ChangeOutputProperty_mode, byte_order);
11445 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 2, ENC_NA);
11446 *offsetp += 2;
11447 f_num_units = tvb_get_uint32(tvb, *offsetp, byte_order);
11448 proto_tree_add_item(t, hf_x11_randr_ChangeOutputProperty_num_units, tvb, *offsetp, 4, byte_order);
11449 *offsetp += 4;
11450 listOfByte(tvb, offsetp, t, hf_x11_randr_ChangeOutputProperty_data, ((f_num_units * f_format) / 8), byte_order);
11451 length -= ((f_num_units * f_format) / 8) * 1;
11452}
11453
11454static void randrDeleteOutputProperty(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
11455{
11456 proto_tree_add_item(t, hf_x11_randr_DeleteOutputProperty_output, tvb, *offsetp, 4, byte_order);
11457 *offsetp += 4;
11458 proto_tree_add_item(t, hf_x11_randr_DeleteOutputProperty_property, tvb, *offsetp, 4, byte_order);
11459 *offsetp += 4;
11460}
11461
11462static void randrGetOutputProperty(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
11463{
11464 proto_tree_add_item(t, hf_x11_randr_GetOutputProperty_output, tvb, *offsetp, 4, byte_order);
11465 *offsetp += 4;
11466 proto_tree_add_item(t, hf_x11_randr_GetOutputProperty_property, tvb, *offsetp, 4, byte_order);
11467 *offsetp += 4;
11468 field32(tvb, offsetp, t, hf_x11_randr_GetOutputProperty_type, byte_order);
11469 proto_tree_add_item(t, hf_x11_randr_GetOutputProperty_long_offset, tvb, *offsetp, 4, byte_order);
11470 *offsetp += 4;
11471 proto_tree_add_item(t, hf_x11_randr_GetOutputProperty_long_length, tvb, *offsetp, 4, byte_order);
11472 *offsetp += 4;
11473 proto_tree_add_item(t, hf_x11_randr_GetOutputProperty_delete, tvb, *offsetp, 1, byte_order);
11474 *offsetp += 1;
11475 proto_tree_add_item(t, hf_x11_randr_GetOutputProperty_pending, tvb, *offsetp, 1, byte_order);
11476 *offsetp += 1;
11477 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 2, ENC_NA);
11478 *offsetp += 2;
11479}
11480static void randrGetOutputProperty_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
11481{
11482 int sequence_number;
11483 int f_format;
11484 int f_num_items;
11485
11486 col_append_fstr(pinfo->cinfo, COL_INFO, "-GetOutputProperty");
11487
11488 REPLY(reply);
11489 f_format = tvb_get_uint8(tvb, *offsetp);
11490 proto_tree_add_item(t, hf_x11_randr_GetOutputProperty_reply_format, tvb, *offsetp, 1, byte_order);
11491 *offsetp += 1;
11492 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
11493 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
11494 "%d (randr-GetOutputProperty)", sequence_number);
11495 *offsetp += 2;
11496 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
11497 *offsetp += 4;
11498 field32(tvb, offsetp, t, hf_x11_randr_GetOutputProperty_reply_type, byte_order);
11499 proto_tree_add_item(t, hf_x11_randr_GetOutputProperty_reply_bytes_after, tvb, *offsetp, 4, byte_order);
11500 *offsetp += 4;
11501 f_num_items = tvb_get_uint32(tvb, *offsetp, byte_order);
11502 proto_tree_add_item(t, hf_x11_randr_GetOutputProperty_reply_num_items, tvb, *offsetp, 4, byte_order);
11503 *offsetp += 4;
11504 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 12, ENC_NA);
11505 *offsetp += 12;
11506 listOfByte(tvb, offsetp, t, hf_x11_randr_GetOutputProperty_reply_data, (f_num_items * (f_format / 8)), byte_order);
11507}
11508
11509static void randrCreateMode(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
11510{
11511 proto_tree_add_item(t, hf_x11_randr_CreateMode_window, tvb, *offsetp, 4, byte_order);
11512 *offsetp += 4;
11513 struct_randr_ModeInfo(tvb, offsetp, t, byte_order, 1);
11514 listOfByte(tvb, offsetp, t, hf_x11_randr_CreateMode_name, (length - 40) / 1, byte_order);
11515}
11516static void randrCreateMode_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
11517{
11518 int sequence_number;
11519
11520 col_append_fstr(pinfo->cinfo, COL_INFO, "-CreateMode");
11521
11522 REPLY(reply);
11523 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
11524 *offsetp += 1;
11525 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
11526 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
11527 "%d (randr-CreateMode)", sequence_number);
11528 *offsetp += 2;
11529 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
11530 *offsetp += 4;
11531 proto_tree_add_item(t, hf_x11_randr_CreateMode_reply_mode, tvb, *offsetp, 4, byte_order);
11532 *offsetp += 4;
11533 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 20, ENC_NA);
11534 *offsetp += 20;
11535}
11536
11537static void randrDestroyMode(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
11538{
11539 proto_tree_add_item(t, hf_x11_randr_DestroyMode_mode, tvb, *offsetp, 4, byte_order);
11540 *offsetp += 4;
11541}
11542
11543static void randrAddOutputMode(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
11544{
11545 proto_tree_add_item(t, hf_x11_randr_AddOutputMode_output, tvb, *offsetp, 4, byte_order);
11546 *offsetp += 4;
11547 proto_tree_add_item(t, hf_x11_randr_AddOutputMode_mode, tvb, *offsetp, 4, byte_order);
11548 *offsetp += 4;
11549}
11550
11551static void randrDeleteOutputMode(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
11552{
11553 proto_tree_add_item(t, hf_x11_randr_DeleteOutputMode_output, tvb, *offsetp, 4, byte_order);
11554 *offsetp += 4;
11555 proto_tree_add_item(t, hf_x11_randr_DeleteOutputMode_mode, tvb, *offsetp, 4, byte_order);
11556 *offsetp += 4;
11557}
11558
11559static void randrGetCrtcInfo(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
11560{
11561 proto_tree_add_item(t, hf_x11_randr_GetCrtcInfo_crtc, tvb, *offsetp, 4, byte_order);
11562 *offsetp += 4;
11563 proto_tree_add_item(t, hf_x11_randr_GetCrtcInfo_config_timestamp, tvb, *offsetp, 4, byte_order);
11564 *offsetp += 4;
11565}
11566static void randrGetCrtcInfo_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
11567{
11568 int sequence_number;
11569 int f_num_outputs;
11570 int f_num_possible_outputs;
11571
11572 col_append_fstr(pinfo->cinfo, COL_INFO, "-GetCrtcInfo");
11573
11574 REPLY(reply);
11575 field8(tvb, offsetp, t, hf_x11_randr_GetCrtcInfo_reply_status, byte_order);
11576 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
11577 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
11578 "%d (randr-GetCrtcInfo)", sequence_number);
11579 *offsetp += 2;
11580 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
11581 *offsetp += 4;
11582 proto_tree_add_item(t, hf_x11_randr_GetCrtcInfo_reply_timestamp, tvb, *offsetp, 4, byte_order);
11583 *offsetp += 4;
11584 proto_tree_add_item(t, hf_x11_randr_GetCrtcInfo_reply_x, tvb, *offsetp, 2, byte_order);
11585 *offsetp += 2;
11586 proto_tree_add_item(t, hf_x11_randr_GetCrtcInfo_reply_y, tvb, *offsetp, 2, byte_order);
11587 *offsetp += 2;
11588 proto_tree_add_item(t, hf_x11_randr_GetCrtcInfo_reply_width, tvb, *offsetp, 2, byte_order);
11589 *offsetp += 2;
11590 proto_tree_add_item(t, hf_x11_randr_GetCrtcInfo_reply_height, tvb, *offsetp, 2, byte_order);
11591 *offsetp += 2;
11592 proto_tree_add_item(t, hf_x11_randr_GetCrtcInfo_reply_mode, tvb, *offsetp, 4, byte_order);
11593 *offsetp += 4;
11594 {
11595 static int* const rotation_bits [] = {
11596 &hf_x11_randr_GetCrtcInfo_reply_rotation_mask_Rotate_0,
11597 &hf_x11_randr_GetCrtcInfo_reply_rotation_mask_Rotate_90,
11598 &hf_x11_randr_GetCrtcInfo_reply_rotation_mask_Rotate_180,
11599 &hf_x11_randr_GetCrtcInfo_reply_rotation_mask_Rotate_270,
11600 &hf_x11_randr_GetCrtcInfo_reply_rotation_mask_Reflect_X,
11601 &hf_x11_randr_GetCrtcInfo_reply_rotation_mask_Reflect_Y,
11602 NULL
11603 };
11604 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_randr_GetCrtcInfo_reply_rotation, ett_x11_rectangle, rotation_bits, byte_order);
11605 }
11606 *offsetp += 2;
11607 {
11608 static int* const rotations_bits [] = {
11609 &hf_x11_randr_GetCrtcInfo_reply_rotations_mask_Rotate_0,
11610 &hf_x11_randr_GetCrtcInfo_reply_rotations_mask_Rotate_90,
11611 &hf_x11_randr_GetCrtcInfo_reply_rotations_mask_Rotate_180,
11612 &hf_x11_randr_GetCrtcInfo_reply_rotations_mask_Rotate_270,
11613 &hf_x11_randr_GetCrtcInfo_reply_rotations_mask_Reflect_X,
11614 &hf_x11_randr_GetCrtcInfo_reply_rotations_mask_Reflect_Y,
11615 NULL
11616 };
11617 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_randr_GetCrtcInfo_reply_rotations, ett_x11_rectangle, rotations_bits, byte_order);
11618 }
11619 *offsetp += 2;
11620 f_num_outputs = tvb_get_uint16(tvb, *offsetp, byte_order);
11621 proto_tree_add_item(t, hf_x11_randr_GetCrtcInfo_reply_num_outputs, tvb, *offsetp, 2, byte_order);
11622 *offsetp += 2;
11623 f_num_possible_outputs = tvb_get_uint16(tvb, *offsetp, byte_order);
11624 proto_tree_add_item(t, hf_x11_randr_GetCrtcInfo_reply_num_possible_outputs, tvb, *offsetp, 2, byte_order);
11625 *offsetp += 2;
11626 listOfCard32(tvb, offsetp, t, hf_x11_randr_GetCrtcInfo_reply_outputs, hf_x11_randr_GetCrtcInfo_reply_outputs_item, f_num_outputs, byte_order);
11627 listOfCard32(tvb, offsetp, t, hf_x11_randr_GetCrtcInfo_reply_possible, hf_x11_randr_GetCrtcInfo_reply_possible_item, f_num_possible_outputs, byte_order);
11628}
11629
11630static void randrSetCrtcConfig(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
11631{
11632 proto_tree_add_item(t, hf_x11_randr_SetCrtcConfig_crtc, tvb, *offsetp, 4, byte_order);
11633 *offsetp += 4;
11634 proto_tree_add_item(t, hf_x11_randr_SetCrtcConfig_timestamp, tvb, *offsetp, 4, byte_order);
11635 *offsetp += 4;
11636 proto_tree_add_item(t, hf_x11_randr_SetCrtcConfig_config_timestamp, tvb, *offsetp, 4, byte_order);
11637 *offsetp += 4;
11638 proto_tree_add_item(t, hf_x11_randr_SetCrtcConfig_x, tvb, *offsetp, 2, byte_order);
11639 *offsetp += 2;
11640 proto_tree_add_item(t, hf_x11_randr_SetCrtcConfig_y, tvb, *offsetp, 2, byte_order);
11641 *offsetp += 2;
11642 proto_tree_add_item(t, hf_x11_randr_SetCrtcConfig_mode, tvb, *offsetp, 4, byte_order);
11643 *offsetp += 4;
11644 {
11645 static int* const rotation_bits [] = {
11646 &hf_x11_randr_SetCrtcConfig_rotation_mask_Rotate_0,
11647 &hf_x11_randr_SetCrtcConfig_rotation_mask_Rotate_90,
11648 &hf_x11_randr_SetCrtcConfig_rotation_mask_Rotate_180,
11649 &hf_x11_randr_SetCrtcConfig_rotation_mask_Rotate_270,
11650 &hf_x11_randr_SetCrtcConfig_rotation_mask_Reflect_X,
11651 &hf_x11_randr_SetCrtcConfig_rotation_mask_Reflect_Y,
11652 NULL
11653 };
11654 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_randr_SetCrtcConfig_rotation, ett_x11_rectangle, rotation_bits, byte_order);
11655 }
11656 *offsetp += 2;
11657 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 2, ENC_NA);
11658 *offsetp += 2;
11659 listOfCard32(tvb, offsetp, t, hf_x11_randr_SetCrtcConfig_outputs, hf_x11_randr_SetCrtcConfig_outputs_item, (length - 28) / 4, byte_order);
11660}
11661static void randrSetCrtcConfig_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
11662{
11663 int sequence_number;
11664
11665 col_append_fstr(pinfo->cinfo, COL_INFO, "-SetCrtcConfig");
11666
11667 REPLY(reply);
11668 field8(tvb, offsetp, t, hf_x11_randr_SetCrtcConfig_reply_status, byte_order);
11669 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
11670 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
11671 "%d (randr-SetCrtcConfig)", sequence_number);
11672 *offsetp += 2;
11673 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
11674 *offsetp += 4;
11675 proto_tree_add_item(t, hf_x11_randr_SetCrtcConfig_reply_timestamp, tvb, *offsetp, 4, byte_order);
11676 *offsetp += 4;
11677 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 20, ENC_NA);
11678 *offsetp += 20;
11679}
11680
11681static void randrGetCrtcGammaSize(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
11682{
11683 proto_tree_add_item(t, hf_x11_randr_GetCrtcGammaSize_crtc, tvb, *offsetp, 4, byte_order);
11684 *offsetp += 4;
11685}
11686static void randrGetCrtcGammaSize_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
11687{
11688 int sequence_number;
11689
11690 col_append_fstr(pinfo->cinfo, COL_INFO, "-GetCrtcGammaSize");
11691
11692 REPLY(reply);
11693 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
11694 *offsetp += 1;
11695 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
11696 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
11697 "%d (randr-GetCrtcGammaSize)", sequence_number);
11698 *offsetp += 2;
11699 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
11700 *offsetp += 4;
11701 proto_tree_add_item(t, hf_x11_randr_GetCrtcGammaSize_reply_size, tvb, *offsetp, 2, byte_order);
11702 *offsetp += 2;
11703 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 22, ENC_NA);
11704 *offsetp += 22;
11705}
11706
11707static void randrGetCrtcGamma(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
11708{
11709 proto_tree_add_item(t, hf_x11_randr_GetCrtcGamma_crtc, tvb, *offsetp, 4, byte_order);
11710 *offsetp += 4;
11711}
11712static void randrGetCrtcGamma_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
11713{
11714 int sequence_number;
11715 int f_size;
11716
11717 col_append_fstr(pinfo->cinfo, COL_INFO, "-GetCrtcGamma");
11718
11719 REPLY(reply);
11720 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
11721 *offsetp += 1;
11722 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
11723 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
11724 "%d (randr-GetCrtcGamma)", sequence_number);
11725 *offsetp += 2;
11726 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
11727 *offsetp += 4;
11728 f_size = tvb_get_uint16(tvb, *offsetp, byte_order);
11729 proto_tree_add_item(t, hf_x11_randr_GetCrtcGamma_reply_size, tvb, *offsetp, 2, byte_order);
11730 *offsetp += 2;
11731 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 22, ENC_NA);
11732 *offsetp += 22;
11733 listOfCard16(tvb, offsetp, t, hf_x11_randr_GetCrtcGamma_reply_red, hf_x11_randr_GetCrtcGamma_reply_red_item, f_size, byte_order);
11734 listOfCard16(tvb, offsetp, t, hf_x11_randr_GetCrtcGamma_reply_green, hf_x11_randr_GetCrtcGamma_reply_green_item, f_size, byte_order);
11735 listOfCard16(tvb, offsetp, t, hf_x11_randr_GetCrtcGamma_reply_blue, hf_x11_randr_GetCrtcGamma_reply_blue_item, f_size, byte_order);
11736}
11737
11738static void randrSetCrtcGamma(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
11739{
11740 int f_size;
11741 proto_tree_add_item(t, hf_x11_randr_SetCrtcGamma_crtc, tvb, *offsetp, 4, byte_order);
11742 *offsetp += 4;
11743 f_size = tvb_get_uint16(tvb, *offsetp, byte_order);
11744 proto_tree_add_item(t, hf_x11_randr_SetCrtcGamma_size, tvb, *offsetp, 2, byte_order);
11745 *offsetp += 2;
11746 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 2, ENC_NA);
11747 *offsetp += 2;
11748 listOfCard16(tvb, offsetp, t, hf_x11_randr_SetCrtcGamma_red, hf_x11_randr_SetCrtcGamma_red_item, f_size, byte_order);
11749 length -= f_size * 2;
11750 listOfCard16(tvb, offsetp, t, hf_x11_randr_SetCrtcGamma_green, hf_x11_randr_SetCrtcGamma_green_item, f_size, byte_order);
11751 length -= f_size * 2;
11752 listOfCard16(tvb, offsetp, t, hf_x11_randr_SetCrtcGamma_blue, hf_x11_randr_SetCrtcGamma_blue_item, f_size, byte_order);
11753 length -= f_size * 2;
11754}
11755
11756static void randrGetScreenResourcesCurrent(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
11757{
11758 proto_tree_add_item(t, hf_x11_randr_GetScreenResourcesCurrent_window, tvb, *offsetp, 4, byte_order);
11759 *offsetp += 4;
11760}
11761static void randrGetScreenResourcesCurrent_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
11762{
11763 int sequence_number;
11764 int f_num_crtcs;
11765 int f_num_outputs;
11766 int f_num_modes;
11767 int f_names_len;
11768
11769 col_append_fstr(pinfo->cinfo, COL_INFO, "-GetScreenResourcesCurrent");
11770
11771 REPLY(reply);
11772 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
11773 *offsetp += 1;
11774 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
11775 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
11776 "%d (randr-GetScreenResourcesCurrent)", sequence_number);
11777 *offsetp += 2;
11778 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
11779 *offsetp += 4;
11780 proto_tree_add_item(t, hf_x11_randr_GetScreenResourcesCurrent_reply_timestamp, tvb, *offsetp, 4, byte_order);
11781 *offsetp += 4;
11782 proto_tree_add_item(t, hf_x11_randr_GetScreenResourcesCurrent_reply_config_timestamp, tvb, *offsetp, 4, byte_order);
11783 *offsetp += 4;
11784 f_num_crtcs = tvb_get_uint16(tvb, *offsetp, byte_order);
11785 proto_tree_add_item(t, hf_x11_randr_GetScreenResourcesCurrent_reply_num_crtcs, tvb, *offsetp, 2, byte_order);
11786 *offsetp += 2;
11787 f_num_outputs = tvb_get_uint16(tvb, *offsetp, byte_order);
11788 proto_tree_add_item(t, hf_x11_randr_GetScreenResourcesCurrent_reply_num_outputs, tvb, *offsetp, 2, byte_order);
11789 *offsetp += 2;
11790 f_num_modes = tvb_get_uint16(tvb, *offsetp, byte_order);
11791 proto_tree_add_item(t, hf_x11_randr_GetScreenResourcesCurrent_reply_num_modes, tvb, *offsetp, 2, byte_order);
11792 *offsetp += 2;
11793 f_names_len = tvb_get_uint16(tvb, *offsetp, byte_order);
11794 proto_tree_add_item(t, hf_x11_randr_GetScreenResourcesCurrent_reply_names_len, tvb, *offsetp, 2, byte_order);
11795 *offsetp += 2;
11796 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 8, ENC_NA);
11797 *offsetp += 8;
11798 listOfCard32(tvb, offsetp, t, hf_x11_randr_GetScreenResourcesCurrent_reply_crtcs, hf_x11_randr_GetScreenResourcesCurrent_reply_crtcs_item, f_num_crtcs, byte_order);
11799 listOfCard32(tvb, offsetp, t, hf_x11_randr_GetScreenResourcesCurrent_reply_outputs, hf_x11_randr_GetScreenResourcesCurrent_reply_outputs_item, f_num_outputs, byte_order);
11800 struct_randr_ModeInfo(tvb, offsetp, t, byte_order, f_num_modes);
11801 listOfByte(tvb, offsetp, t, hf_x11_randr_GetScreenResourcesCurrent_reply_names, f_names_len, byte_order);
11802}
11803
11804static void randrSetCrtcTransform(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
11805{
11806 int f_filter_len;
11807 proto_tree_add_item(t, hf_x11_randr_SetCrtcTransform_crtc, tvb, *offsetp, 4, byte_order);
11808 *offsetp += 4;
11809 struct_render_TRANSFORM(tvb, offsetp, t, byte_order, 1);
11810 f_filter_len = tvb_get_uint16(tvb, *offsetp, byte_order);
11811 proto_tree_add_item(t, hf_x11_randr_SetCrtcTransform_filter_len, tvb, *offsetp, 2, byte_order);
11812 *offsetp += 2;
11813 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 2, ENC_NA);
11814 *offsetp += 2;
11815 listOfByte(tvb, offsetp, t, hf_x11_randr_SetCrtcTransform_filter_name, f_filter_len, byte_order);
11816 length -= f_filter_len * 1;
11817 if (*offsetp % 4) {
11818 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, (4 - *offsetp % 4), ENC_NA);
11819 *offsetp += (4 - *offsetp % 4);
11820 }
11821 length = ((length + 3) & ~3);
11822 listOfInt32(tvb, offsetp, t, hf_x11_randr_SetCrtcTransform_filter_params, hf_x11_randr_SetCrtcTransform_filter_params_item, (length - 48) / 4, byte_order);
11823}
11824
11825static void randrGetCrtcTransform(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
11826{
11827 proto_tree_add_item(t, hf_x11_randr_GetCrtcTransform_crtc, tvb, *offsetp, 4, byte_order);
11828 *offsetp += 4;
11829}
11830static void randrGetCrtcTransform_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
11831{
11832 int sequence_number;
11833 int f_pending_len;
11834 int f_pending_nparams;
11835 int f_current_len;
11836 int f_current_nparams;
11837
11838 col_append_fstr(pinfo->cinfo, COL_INFO, "-GetCrtcTransform");
11839
11840 REPLY(reply);
11841 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
11842 *offsetp += 1;
11843 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
11844 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
11845 "%d (randr-GetCrtcTransform)", sequence_number);
11846 *offsetp += 2;
11847 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
11848 *offsetp += 4;
11849 struct_render_TRANSFORM(tvb, offsetp, t, byte_order, 1);
11850 proto_tree_add_item(t, hf_x11_randr_GetCrtcTransform_reply_has_transforms, tvb, *offsetp, 1, byte_order);
11851 *offsetp += 1;
11852 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 3, ENC_NA);
11853 *offsetp += 3;
11854 struct_render_TRANSFORM(tvb, offsetp, t, byte_order, 1);
11855 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 4, ENC_NA);
11856 *offsetp += 4;
11857 f_pending_len = tvb_get_uint16(tvb, *offsetp, byte_order);
11858 proto_tree_add_item(t, hf_x11_randr_GetCrtcTransform_reply_pending_len, tvb, *offsetp, 2, byte_order);
11859 *offsetp += 2;
11860 f_pending_nparams = tvb_get_uint16(tvb, *offsetp, byte_order);
11861 proto_tree_add_item(t, hf_x11_randr_GetCrtcTransform_reply_pending_nparams, tvb, *offsetp, 2, byte_order);
11862 *offsetp += 2;
11863 f_current_len = tvb_get_uint16(tvb, *offsetp, byte_order);
11864 proto_tree_add_item(t, hf_x11_randr_GetCrtcTransform_reply_current_len, tvb, *offsetp, 2, byte_order);
11865 *offsetp += 2;
11866 f_current_nparams = tvb_get_uint16(tvb, *offsetp, byte_order);
11867 proto_tree_add_item(t, hf_x11_randr_GetCrtcTransform_reply_current_nparams, tvb, *offsetp, 2, byte_order);
11868 *offsetp += 2;
11869 listOfByte(tvb, offsetp, t, hf_x11_randr_GetCrtcTransform_reply_pending_filter_name, f_pending_len, byte_order);
11870 if (*offsetp % 4) {
11871 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, (4 - *offsetp % 4), ENC_NA);
11872 *offsetp += (4 - *offsetp % 4);
11873 }
11874 listOfInt32(tvb, offsetp, t, hf_x11_randr_GetCrtcTransform_reply_pending_params, hf_x11_randr_GetCrtcTransform_reply_pending_params_item, f_pending_nparams, byte_order);
11875 listOfByte(tvb, offsetp, t, hf_x11_randr_GetCrtcTransform_reply_current_filter_name, f_current_len, byte_order);
11876 if (*offsetp % 4) {
11877 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, (4 - *offsetp % 4), ENC_NA);
11878 *offsetp += (4 - *offsetp % 4);
11879 }
11880 listOfInt32(tvb, offsetp, t, hf_x11_randr_GetCrtcTransform_reply_current_params, hf_x11_randr_GetCrtcTransform_reply_current_params_item, f_current_nparams, byte_order);
11881}
11882
11883static void randrGetPanning(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
11884{
11885 proto_tree_add_item(t, hf_x11_randr_GetPanning_crtc, tvb, *offsetp, 4, byte_order);
11886 *offsetp += 4;
11887}
11888static void randrGetPanning_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
11889{
11890 int sequence_number;
11891
11892 col_append_fstr(pinfo->cinfo, COL_INFO, "-GetPanning");
11893
11894 REPLY(reply);
11895 field8(tvb, offsetp, t, hf_x11_randr_GetPanning_reply_status, byte_order);
11896 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
11897 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
11898 "%d (randr-GetPanning)", sequence_number);
11899 *offsetp += 2;
11900 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
11901 *offsetp += 4;
11902 proto_tree_add_item(t, hf_x11_randr_GetPanning_reply_timestamp, tvb, *offsetp, 4, byte_order);
11903 *offsetp += 4;
11904 proto_tree_add_item(t, hf_x11_randr_GetPanning_reply_left, tvb, *offsetp, 2, byte_order);
11905 *offsetp += 2;
11906 proto_tree_add_item(t, hf_x11_randr_GetPanning_reply_top, tvb, *offsetp, 2, byte_order);
11907 *offsetp += 2;
11908 proto_tree_add_item(t, hf_x11_randr_GetPanning_reply_width, tvb, *offsetp, 2, byte_order);
11909 *offsetp += 2;
11910 proto_tree_add_item(t, hf_x11_randr_GetPanning_reply_height, tvb, *offsetp, 2, byte_order);
11911 *offsetp += 2;
11912 proto_tree_add_item(t, hf_x11_randr_GetPanning_reply_track_left, tvb, *offsetp, 2, byte_order);
11913 *offsetp += 2;
11914 proto_tree_add_item(t, hf_x11_randr_GetPanning_reply_track_top, tvb, *offsetp, 2, byte_order);
11915 *offsetp += 2;
11916 proto_tree_add_item(t, hf_x11_randr_GetPanning_reply_track_width, tvb, *offsetp, 2, byte_order);
11917 *offsetp += 2;
11918 proto_tree_add_item(t, hf_x11_randr_GetPanning_reply_track_height, tvb, *offsetp, 2, byte_order);
11919 *offsetp += 2;
11920 proto_tree_add_item(t, hf_x11_randr_GetPanning_reply_border_left, tvb, *offsetp, 2, byte_order);
11921 *offsetp += 2;
11922 proto_tree_add_item(t, hf_x11_randr_GetPanning_reply_border_top, tvb, *offsetp, 2, byte_order);
11923 *offsetp += 2;
11924 proto_tree_add_item(t, hf_x11_randr_GetPanning_reply_border_right, tvb, *offsetp, 2, byte_order);
11925 *offsetp += 2;
11926 proto_tree_add_item(t, hf_x11_randr_GetPanning_reply_border_bottom, tvb, *offsetp, 2, byte_order);
11927 *offsetp += 2;
11928}
11929
11930static void randrSetPanning(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
11931{
11932 proto_tree_add_item(t, hf_x11_randr_SetPanning_crtc, tvb, *offsetp, 4, byte_order);
11933 *offsetp += 4;
11934 proto_tree_add_item(t, hf_x11_randr_SetPanning_timestamp, tvb, *offsetp, 4, byte_order);
11935 *offsetp += 4;
11936 proto_tree_add_item(t, hf_x11_randr_SetPanning_left, tvb, *offsetp, 2, byte_order);
11937 *offsetp += 2;
11938 proto_tree_add_item(t, hf_x11_randr_SetPanning_top, tvb, *offsetp, 2, byte_order);
11939 *offsetp += 2;
11940 proto_tree_add_item(t, hf_x11_randr_SetPanning_width, tvb, *offsetp, 2, byte_order);
11941 *offsetp += 2;
11942 proto_tree_add_item(t, hf_x11_randr_SetPanning_height, tvb, *offsetp, 2, byte_order);
11943 *offsetp += 2;
11944 proto_tree_add_item(t, hf_x11_randr_SetPanning_track_left, tvb, *offsetp, 2, byte_order);
11945 *offsetp += 2;
11946 proto_tree_add_item(t, hf_x11_randr_SetPanning_track_top, tvb, *offsetp, 2, byte_order);
11947 *offsetp += 2;
11948 proto_tree_add_item(t, hf_x11_randr_SetPanning_track_width, tvb, *offsetp, 2, byte_order);
11949 *offsetp += 2;
11950 proto_tree_add_item(t, hf_x11_randr_SetPanning_track_height, tvb, *offsetp, 2, byte_order);
11951 *offsetp += 2;
11952 proto_tree_add_item(t, hf_x11_randr_SetPanning_border_left, tvb, *offsetp, 2, byte_order);
11953 *offsetp += 2;
11954 proto_tree_add_item(t, hf_x11_randr_SetPanning_border_top, tvb, *offsetp, 2, byte_order);
11955 *offsetp += 2;
11956 proto_tree_add_item(t, hf_x11_randr_SetPanning_border_right, tvb, *offsetp, 2, byte_order);
11957 *offsetp += 2;
11958 proto_tree_add_item(t, hf_x11_randr_SetPanning_border_bottom, tvb, *offsetp, 2, byte_order);
11959 *offsetp += 2;
11960}
11961static void randrSetPanning_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
11962{
11963 int sequence_number;
11964
11965 col_append_fstr(pinfo->cinfo, COL_INFO, "-SetPanning");
11966
11967 REPLY(reply);
11968 field8(tvb, offsetp, t, hf_x11_randr_SetPanning_reply_status, byte_order);
11969 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
11970 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
11971 "%d (randr-SetPanning)", sequence_number);
11972 *offsetp += 2;
11973 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
11974 *offsetp += 4;
11975 proto_tree_add_item(t, hf_x11_randr_SetPanning_reply_timestamp, tvb, *offsetp, 4, byte_order);
11976 *offsetp += 4;
11977}
11978
11979static void randrSetOutputPrimary(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
11980{
11981 proto_tree_add_item(t, hf_x11_randr_SetOutputPrimary_window, tvb, *offsetp, 4, byte_order);
11982 *offsetp += 4;
11983 proto_tree_add_item(t, hf_x11_randr_SetOutputPrimary_output, tvb, *offsetp, 4, byte_order);
11984 *offsetp += 4;
11985}
11986
11987static void randrGetOutputPrimary(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
11988{
11989 proto_tree_add_item(t, hf_x11_randr_GetOutputPrimary_window, tvb, *offsetp, 4, byte_order);
11990 *offsetp += 4;
11991}
11992static void randrGetOutputPrimary_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
11993{
11994 int sequence_number;
11995
11996 col_append_fstr(pinfo->cinfo, COL_INFO, "-GetOutputPrimary");
11997
11998 REPLY(reply);
11999 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
12000 *offsetp += 1;
12001 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
12002 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
12003 "%d (randr-GetOutputPrimary)", sequence_number);
12004 *offsetp += 2;
12005 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
12006 *offsetp += 4;
12007 proto_tree_add_item(t, hf_x11_randr_GetOutputPrimary_reply_output, tvb, *offsetp, 4, byte_order);
12008 *offsetp += 4;
12009}
12010
12011static void randrGetProviders(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
12012{
12013 proto_tree_add_item(t, hf_x11_randr_GetProviders_window, tvb, *offsetp, 4, byte_order);
12014 *offsetp += 4;
12015}
12016static void randrGetProviders_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
12017{
12018 int sequence_number;
12019 int f_num_providers;
12020
12021 col_append_fstr(pinfo->cinfo, COL_INFO, "-GetProviders");
12022
12023 REPLY(reply);
12024 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
12025 *offsetp += 1;
12026 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
12027 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
12028 "%d (randr-GetProviders)", sequence_number);
12029 *offsetp += 2;
12030 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
12031 *offsetp += 4;
12032 proto_tree_add_item(t, hf_x11_randr_GetProviders_reply_timestamp, tvb, *offsetp, 4, byte_order);
12033 *offsetp += 4;
12034 f_num_providers = tvb_get_uint16(tvb, *offsetp, byte_order);
12035 proto_tree_add_item(t, hf_x11_randr_GetProviders_reply_num_providers, tvb, *offsetp, 2, byte_order);
12036 *offsetp += 2;
12037 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 18, ENC_NA);
12038 *offsetp += 18;
12039 listOfCard32(tvb, offsetp, t, hf_x11_randr_GetProviders_reply_providers, hf_x11_randr_GetProviders_reply_providers_item, f_num_providers, byte_order);
12040}
12041
12042static void randrGetProviderInfo(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
12043{
12044 proto_tree_add_item(t, hf_x11_randr_GetProviderInfo_provider, tvb, *offsetp, 4, byte_order);
12045 *offsetp += 4;
12046 proto_tree_add_item(t, hf_x11_randr_GetProviderInfo_config_timestamp, tvb, *offsetp, 4, byte_order);
12047 *offsetp += 4;
12048}
12049static void randrGetProviderInfo_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
12050{
12051 int sequence_number;
12052 int f_num_crtcs;
12053 int f_num_outputs;
12054 int f_num_associated_providers;
12055 int f_name_len;
12056
12057 col_append_fstr(pinfo->cinfo, COL_INFO, "-GetProviderInfo");
12058
12059 REPLY(reply);
12060 proto_tree_add_item(t, hf_x11_randr_GetProviderInfo_reply_status, tvb, *offsetp, 1, byte_order);
12061 *offsetp += 1;
12062 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
12063 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
12064 "%d (randr-GetProviderInfo)", sequence_number);
12065 *offsetp += 2;
12066 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
12067 *offsetp += 4;
12068 proto_tree_add_item(t, hf_x11_randr_GetProviderInfo_reply_timestamp, tvb, *offsetp, 4, byte_order);
12069 *offsetp += 4;
12070 {
12071 static int* const capabilities_bits [] = {
12072 &hf_x11_randr_GetProviderInfo_reply_capabilities_mask_SourceOutput,
12073 &hf_x11_randr_GetProviderInfo_reply_capabilities_mask_SinkOutput,
12074 &hf_x11_randr_GetProviderInfo_reply_capabilities_mask_SourceOffload,
12075 &hf_x11_randr_GetProviderInfo_reply_capabilities_mask_SinkOffload,
12076 NULL
12077 };
12078 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_randr_GetProviderInfo_reply_capabilities, ett_x11_rectangle, capabilities_bits, byte_order);
12079 }
12080 *offsetp += 4;
12081 f_num_crtcs = tvb_get_uint16(tvb, *offsetp, byte_order);
12082 proto_tree_add_item(t, hf_x11_randr_GetProviderInfo_reply_num_crtcs, tvb, *offsetp, 2, byte_order);
12083 *offsetp += 2;
12084 f_num_outputs = tvb_get_uint16(tvb, *offsetp, byte_order);
12085 proto_tree_add_item(t, hf_x11_randr_GetProviderInfo_reply_num_outputs, tvb, *offsetp, 2, byte_order);
12086 *offsetp += 2;
12087 f_num_associated_providers = tvb_get_uint16(tvb, *offsetp, byte_order);
12088 proto_tree_add_item(t, hf_x11_randr_GetProviderInfo_reply_num_associated_providers, tvb, *offsetp, 2, byte_order);
12089 *offsetp += 2;
12090 f_name_len = tvb_get_uint16(tvb, *offsetp, byte_order);
12091 proto_tree_add_item(t, hf_x11_randr_GetProviderInfo_reply_name_len, tvb, *offsetp, 2, byte_order);
12092 *offsetp += 2;
12093 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 8, ENC_NA);
12094 *offsetp += 8;
12095 listOfCard32(tvb, offsetp, t, hf_x11_randr_GetProviderInfo_reply_crtcs, hf_x11_randr_GetProviderInfo_reply_crtcs_item, f_num_crtcs, byte_order);
12096 listOfCard32(tvb, offsetp, t, hf_x11_randr_GetProviderInfo_reply_outputs, hf_x11_randr_GetProviderInfo_reply_outputs_item, f_num_outputs, byte_order);
12097 listOfCard32(tvb, offsetp, t, hf_x11_randr_GetProviderInfo_reply_associated_providers, hf_x11_randr_GetProviderInfo_reply_associated_providers_item, f_num_associated_providers, byte_order);
12098 listOfCard32(tvb, offsetp, t, hf_x11_randr_GetProviderInfo_reply_associated_capability, hf_x11_randr_GetProviderInfo_reply_associated_capability_item, f_num_associated_providers, byte_order);
12099 listOfByte(tvb, offsetp, t, hf_x11_randr_GetProviderInfo_reply_name, f_name_len, byte_order);
12100}
12101
12102static void randrSetProviderOffloadSink(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
12103{
12104 proto_tree_add_item(t, hf_x11_randr_SetProviderOffloadSink_provider, tvb, *offsetp, 4, byte_order);
12105 *offsetp += 4;
12106 proto_tree_add_item(t, hf_x11_randr_SetProviderOffloadSink_sink_provider, tvb, *offsetp, 4, byte_order);
12107 *offsetp += 4;
12108 proto_tree_add_item(t, hf_x11_randr_SetProviderOffloadSink_config_timestamp, tvb, *offsetp, 4, byte_order);
12109 *offsetp += 4;
12110}
12111
12112static void randrSetProviderOutputSource(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
12113{
12114 proto_tree_add_item(t, hf_x11_randr_SetProviderOutputSource_provider, tvb, *offsetp, 4, byte_order);
12115 *offsetp += 4;
12116 proto_tree_add_item(t, hf_x11_randr_SetProviderOutputSource_source_provider, tvb, *offsetp, 4, byte_order);
12117 *offsetp += 4;
12118 proto_tree_add_item(t, hf_x11_randr_SetProviderOutputSource_config_timestamp, tvb, *offsetp, 4, byte_order);
12119 *offsetp += 4;
12120}
12121
12122static void randrListProviderProperties(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
12123{
12124 proto_tree_add_item(t, hf_x11_randr_ListProviderProperties_provider, tvb, *offsetp, 4, byte_order);
12125 *offsetp += 4;
12126}
12127static void randrListProviderProperties_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
12128{
12129 int sequence_number;
12130 int f_num_atoms;
12131
12132 col_append_fstr(pinfo->cinfo, COL_INFO, "-ListProviderProperties");
12133
12134 REPLY(reply);
12135 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
12136 *offsetp += 1;
12137 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
12138 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
12139 "%d (randr-ListProviderProperties)", sequence_number);
12140 *offsetp += 2;
12141 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
12142 *offsetp += 4;
12143 f_num_atoms = tvb_get_uint16(tvb, *offsetp, byte_order);
12144 proto_tree_add_item(t, hf_x11_randr_ListProviderProperties_reply_num_atoms, tvb, *offsetp, 2, byte_order);
12145 *offsetp += 2;
12146 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 22, ENC_NA);
12147 *offsetp += 22;
12148 listOfCard32(tvb, offsetp, t, hf_x11_randr_ListProviderProperties_reply_atoms, hf_x11_randr_ListProviderProperties_reply_atoms_item, f_num_atoms, byte_order);
12149}
12150
12151static void randrQueryProviderProperty(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
12152{
12153 proto_tree_add_item(t, hf_x11_randr_QueryProviderProperty_provider, tvb, *offsetp, 4, byte_order);
12154 *offsetp += 4;
12155 proto_tree_add_item(t, hf_x11_randr_QueryProviderProperty_property, tvb, *offsetp, 4, byte_order);
12156 *offsetp += 4;
12157}
12158static void randrQueryProviderProperty_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
12159{
12160 int sequence_number;
12161 int f_length;
12162
12163 col_append_fstr(pinfo->cinfo, COL_INFO, "-QueryProviderProperty");
12164
12165 REPLY(reply);
12166 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
12167 *offsetp += 1;
12168 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
12169 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
12170 "%d (randr-QueryProviderProperty)", sequence_number);
12171 *offsetp += 2;
12172 f_length = tvb_get_uint32(tvb, *offsetp, byte_order);
12173 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
12174 *offsetp += 4;
12175 proto_tree_add_item(t, hf_x11_randr_QueryProviderProperty_reply_pending, tvb, *offsetp, 1, byte_order);
12176 *offsetp += 1;
12177 proto_tree_add_item(t, hf_x11_randr_QueryProviderProperty_reply_range, tvb, *offsetp, 1, byte_order);
12178 *offsetp += 1;
12179 proto_tree_add_item(t, hf_x11_randr_QueryProviderProperty_reply_immutable, tvb, *offsetp, 1, byte_order);
12180 *offsetp += 1;
12181 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 21, ENC_NA);
12182 *offsetp += 21;
12183 listOfInt32(tvb, offsetp, t, hf_x11_randr_QueryProviderProperty_reply_valid_values, hf_x11_randr_QueryProviderProperty_reply_valid_values_item, f_length, byte_order);
12184}
12185
12186static void randrConfigureProviderProperty(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
12187{
12188 proto_tree_add_item(t, hf_x11_randr_ConfigureProviderProperty_provider, tvb, *offsetp, 4, byte_order);
12189 *offsetp += 4;
12190 proto_tree_add_item(t, hf_x11_randr_ConfigureProviderProperty_property, tvb, *offsetp, 4, byte_order);
12191 *offsetp += 4;
12192 proto_tree_add_item(t, hf_x11_randr_ConfigureProviderProperty_pending, tvb, *offsetp, 1, byte_order);
12193 *offsetp += 1;
12194 proto_tree_add_item(t, hf_x11_randr_ConfigureProviderProperty_range, tvb, *offsetp, 1, byte_order);
12195 *offsetp += 1;
12196 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 2, ENC_NA);
12197 *offsetp += 2;
12198 listOfInt32(tvb, offsetp, t, hf_x11_randr_ConfigureProviderProperty_values, hf_x11_randr_ConfigureProviderProperty_values_item, (length - 16) / 4, byte_order);
12199}
12200
12201static void randrChangeProviderProperty(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
12202{
12203 int f_format;
12204 int f_num_items;
12205 proto_tree_add_item(t, hf_x11_randr_ChangeProviderProperty_provider, tvb, *offsetp, 4, byte_order);
12206 *offsetp += 4;
12207 proto_tree_add_item(t, hf_x11_randr_ChangeProviderProperty_property, tvb, *offsetp, 4, byte_order);
12208 *offsetp += 4;
12209 proto_tree_add_item(t, hf_x11_randr_ChangeProviderProperty_type, tvb, *offsetp, 4, byte_order);
12210 *offsetp += 4;
12211 f_format = tvb_get_uint8(tvb, *offsetp);
12212 proto_tree_add_item(t, hf_x11_randr_ChangeProviderProperty_format, tvb, *offsetp, 1, byte_order);
12213 *offsetp += 1;
12214 proto_tree_add_item(t, hf_x11_randr_ChangeProviderProperty_mode, tvb, *offsetp, 1, byte_order);
12215 *offsetp += 1;
12216 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 2, ENC_NA);
12217 *offsetp += 2;
12218 f_num_items = tvb_get_uint32(tvb, *offsetp, byte_order);
12219 proto_tree_add_item(t, hf_x11_randr_ChangeProviderProperty_num_items, tvb, *offsetp, 4, byte_order);
12220 *offsetp += 4;
12221 listOfByte(tvb, offsetp, t, hf_x11_randr_ChangeProviderProperty_data, (f_num_items * (f_format / 8)), byte_order);
12222 length -= (f_num_items * (f_format / 8)) * 1;
12223}
12224
12225static void randrDeleteProviderProperty(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
12226{
12227 proto_tree_add_item(t, hf_x11_randr_DeleteProviderProperty_provider, tvb, *offsetp, 4, byte_order);
12228 *offsetp += 4;
12229 proto_tree_add_item(t, hf_x11_randr_DeleteProviderProperty_property, tvb, *offsetp, 4, byte_order);
12230 *offsetp += 4;
12231}
12232
12233static void randrGetProviderProperty(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
12234{
12235 proto_tree_add_item(t, hf_x11_randr_GetProviderProperty_provider, tvb, *offsetp, 4, byte_order);
12236 *offsetp += 4;
12237 proto_tree_add_item(t, hf_x11_randr_GetProviderProperty_property, tvb, *offsetp, 4, byte_order);
12238 *offsetp += 4;
12239 proto_tree_add_item(t, hf_x11_randr_GetProviderProperty_type, tvb, *offsetp, 4, byte_order);
12240 *offsetp += 4;
12241 proto_tree_add_item(t, hf_x11_randr_GetProviderProperty_long_offset, tvb, *offsetp, 4, byte_order);
12242 *offsetp += 4;
12243 proto_tree_add_item(t, hf_x11_randr_GetProviderProperty_long_length, tvb, *offsetp, 4, byte_order);
12244 *offsetp += 4;
12245 proto_tree_add_item(t, hf_x11_randr_GetProviderProperty_delete, tvb, *offsetp, 1, byte_order);
12246 *offsetp += 1;
12247 proto_tree_add_item(t, hf_x11_randr_GetProviderProperty_pending, tvb, *offsetp, 1, byte_order);
12248 *offsetp += 1;
12249 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 2, ENC_NA);
12250 *offsetp += 2;
12251}
12252static void randrGetProviderProperty_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
12253{
12254 int sequence_number;
12255 int f_format;
12256 int f_num_items;
12257
12258 col_append_fstr(pinfo->cinfo, COL_INFO, "-GetProviderProperty");
12259
12260 REPLY(reply);
12261 f_format = tvb_get_uint8(tvb, *offsetp);
12262 proto_tree_add_item(t, hf_x11_randr_GetProviderProperty_reply_format, tvb, *offsetp, 1, byte_order);
12263 *offsetp += 1;
12264 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
12265 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
12266 "%d (randr-GetProviderProperty)", sequence_number);
12267 *offsetp += 2;
12268 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
12269 *offsetp += 4;
12270 proto_tree_add_item(t, hf_x11_randr_GetProviderProperty_reply_type, tvb, *offsetp, 4, byte_order);
12271 *offsetp += 4;
12272 proto_tree_add_item(t, hf_x11_randr_GetProviderProperty_reply_bytes_after, tvb, *offsetp, 4, byte_order);
12273 *offsetp += 4;
12274 f_num_items = tvb_get_uint32(tvb, *offsetp, byte_order);
12275 proto_tree_add_item(t, hf_x11_randr_GetProviderProperty_reply_num_items, tvb, *offsetp, 4, byte_order);
12276 *offsetp += 4;
12277 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 12, ENC_NA);
12278 *offsetp += 12;
12279 listOfByte(tvb, offsetp, t, hf_x11_randr_GetProviderProperty_reply_data, (f_num_items * (f_format / 8)), byte_order);
12280}
12281
12282static void randrGetMonitors(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
12283{
12284 proto_tree_add_item(t, hf_x11_randr_GetMonitors_window, tvb, *offsetp, 4, byte_order);
12285 *offsetp += 4;
12286 proto_tree_add_item(t, hf_x11_randr_GetMonitors_get_active, tvb, *offsetp, 1, byte_order);
12287 *offsetp += 1;
12288}
12289static void randrGetMonitors_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
12290{
12291 int sequence_number;
12292 int f_nMonitors;
12293
12294 col_append_fstr(pinfo->cinfo, COL_INFO, "-GetMonitors");
12295
12296 REPLY(reply);
12297 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
12298 *offsetp += 1;
12299 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
12300 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
12301 "%d (randr-GetMonitors)", sequence_number);
12302 *offsetp += 2;
12303 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
12304 *offsetp += 4;
12305 proto_tree_add_item(t, hf_x11_randr_GetMonitors_reply_timestamp, tvb, *offsetp, 4, byte_order);
12306 *offsetp += 4;
12307 f_nMonitors = tvb_get_uint32(tvb, *offsetp, byte_order);
12308 proto_tree_add_item(t, hf_x11_randr_GetMonitors_reply_nMonitors, tvb, *offsetp, 4, byte_order);
12309 *offsetp += 4;
12310 proto_tree_add_item(t, hf_x11_randr_GetMonitors_reply_nOutputs, tvb, *offsetp, 4, byte_order);
12311 *offsetp += 4;
12312 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 12, ENC_NA);
12313 *offsetp += 12;
12314 struct_randr_MonitorInfo(tvb, offsetp, t, byte_order, f_nMonitors);
12315}
12316
12317static void randrSetMonitor(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
12318{
12319 proto_tree_add_item(t, hf_x11_randr_SetMonitor_window, tvb, *offsetp, 4, byte_order);
12320 *offsetp += 4;
12321 struct_randr_MonitorInfo(tvb, offsetp, t, byte_order, 1);
12322}
12323
12324static void randrDeleteMonitor(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
12325{
12326 proto_tree_add_item(t, hf_x11_randr_DeleteMonitor_window, tvb, *offsetp, 4, byte_order);
12327 *offsetp += 4;
12328 proto_tree_add_item(t, hf_x11_randr_DeleteMonitor_name, tvb, *offsetp, 4, byte_order);
12329 *offsetp += 4;
12330}
12331
12332static void randrCreateLease(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
12333{
12334 int f_num_crtcs;
12335 int f_num_outputs;
12336 proto_tree_add_item(t, hf_x11_randr_CreateLease_window, tvb, *offsetp, 4, byte_order);
12337 *offsetp += 4;
12338 proto_tree_add_item(t, hf_x11_randr_CreateLease_lid, tvb, *offsetp, 4, byte_order);
12339 *offsetp += 4;
12340 f_num_crtcs = tvb_get_uint16(tvb, *offsetp, byte_order);
12341 proto_tree_add_item(t, hf_x11_randr_CreateLease_num_crtcs, tvb, *offsetp, 2, byte_order);
12342 *offsetp += 2;
12343 f_num_outputs = tvb_get_uint16(tvb, *offsetp, byte_order);
12344 proto_tree_add_item(t, hf_x11_randr_CreateLease_num_outputs, tvb, *offsetp, 2, byte_order);
12345 *offsetp += 2;
12346 listOfCard32(tvb, offsetp, t, hf_x11_randr_CreateLease_crtcs, hf_x11_randr_CreateLease_crtcs_item, f_num_crtcs, byte_order);
12347 length -= f_num_crtcs * 4;
12348 listOfCard32(tvb, offsetp, t, hf_x11_randr_CreateLease_outputs, hf_x11_randr_CreateLease_outputs_item, f_num_outputs, byte_order);
12349 length -= f_num_outputs * 4;
12350}
12351static void randrCreateLease_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
12352{
12353 int sequence_number;
12354
12355 col_append_fstr(pinfo->cinfo, COL_INFO, "-CreateLease");
12356
12357 REPLY(reply);
12358 proto_tree_add_item(t, hf_x11_randr_CreateLease_reply_nfd, tvb, *offsetp, 1, byte_order);
12359 *offsetp += 1;
12360 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
12361 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
12362 "%d (randr-CreateLease)", sequence_number);
12363 *offsetp += 2;
12364 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
12365 *offsetp += 4;
12366 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 24, ENC_NA);
12367 *offsetp += 24;
12368}
12369
12370static void randrFreeLease(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
12371{
12372 proto_tree_add_item(t, hf_x11_randr_FreeLease_lid, tvb, *offsetp, 4, byte_order);
12373 *offsetp += 4;
12374 proto_tree_add_item(t, hf_x11_randr_FreeLease_terminate, tvb, *offsetp, 1, ENC_NA);
12375 *offsetp += 1;
12376}
12377
12378static void struct_randr_NotifyData(tvbuff_t *tvb, int *offsetp, proto_tree *root, unsigned byte_order, int count)
12379{
12380 int i;
12381 int base = *offsetp;
12382 for (i = 0; i < count; i++) {
12383 proto_item *item;
12384 proto_tree *t;
12385 item = proto_tree_add_item(root, hf_x11_union_randr_NotifyData, tvb, base, 28, ENC_NA);
12386 t = proto_item_add_subtree(item, ett_x11_rectangle);
12387
12388 *offsetp = base;
12389 struct_randr_CrtcChange(tvb, offsetp, t, byte_order, 1);
12390 *offsetp = base;
12391 struct_randr_OutputChange(tvb, offsetp, t, byte_order, 1);
12392 *offsetp = base;
12393 struct_randr_OutputProperty(tvb, offsetp, t, byte_order, 1);
12394 *offsetp = base;
12395 struct_randr_ProviderChange(tvb, offsetp, t, byte_order, 1);
12396 *offsetp = base;
12397 struct_randr_ProviderProperty(tvb, offsetp, t, byte_order, 1);
12398 *offsetp = base;
12399 struct_randr_ResourceChange(tvb, offsetp, t, byte_order, 1);
12400 *offsetp = base;
12401 struct_randr_LeaseNotify(tvb, offsetp, t, byte_order, 1);
12402 base += 28;
12403 }
12404 *offsetp = base;
12405}
12406
12407static void randrNotify(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order)
12408{
12409 field8(tvb, offsetp, t, hf_x11_randr_Notify_subCode, byte_order);
12410 CARD16(event_sequencenumber);
12411 struct_randr_NotifyData(tvb, offsetp, t, byte_order, 1);
12412}
12413
12414static const value_string randr_extension_minor[] = {
12415 { 0, "QueryVersion" },
12416 { 2, "SetScreenConfig" },
12417 { 4, "SelectInput" },
12418 { 5, "GetScreenInfo" },
12419 { 6, "GetScreenSizeRange" },
12420 { 7, "SetScreenSize" },
12421 { 8, "GetScreenResources" },
12422 { 9, "GetOutputInfo" },
12423 { 10, "ListOutputProperties" },
12424 { 11, "QueryOutputProperty" },
12425 { 12, "ConfigureOutputProperty" },
12426 { 13, "ChangeOutputProperty" },
12427 { 14, "DeleteOutputProperty" },
12428 { 15, "GetOutputProperty" },
12429 { 16, "CreateMode" },
12430 { 17, "DestroyMode" },
12431 { 18, "AddOutputMode" },
12432 { 19, "DeleteOutputMode" },
12433 { 20, "GetCrtcInfo" },
12434 { 21, "SetCrtcConfig" },
12435 { 22, "GetCrtcGammaSize" },
12436 { 23, "GetCrtcGamma" },
12437 { 24, "SetCrtcGamma" },
12438 { 25, "GetScreenResourcesCurrent" },
12439 { 26, "SetCrtcTransform" },
12440 { 27, "GetCrtcTransform" },
12441 { 28, "GetPanning" },
12442 { 29, "SetPanning" },
12443 { 30, "SetOutputPrimary" },
12444 { 31, "GetOutputPrimary" },
12445 { 32, "GetProviders" },
12446 { 33, "GetProviderInfo" },
12447 { 34, "SetProviderOffloadSink" },
12448 { 35, "SetProviderOutputSource" },
12449 { 36, "ListProviderProperties" },
12450 { 37, "QueryProviderProperty" },
12451 { 38, "ConfigureProviderProperty" },
12452 { 39, "ChangeProviderProperty" },
12453 { 40, "DeleteProviderProperty" },
12454 { 41, "GetProviderProperty" },
12455 { 42, "GetMonitors" },
12456 { 43, "SetMonitor" },
12457 { 44, "DeleteMonitor" },
12458 { 45, "CreateLease" },
12459 { 46, "FreeLease" },
12460 { 0, NULL }
12461};
12462static const x11_event_info randr_events[] = {
12463 { "randr-Notify", randrNotify },
12464 { NULL, NULL }
12465};
12466static const x11_reply_info randr_replies[] = {
12467 { 0, randrQueryVersion_Reply },
12468 { 2, randrSetScreenConfig_Reply },
12469 { 5, randrGetScreenInfo_Reply },
12470 { 6, randrGetScreenSizeRange_Reply },
12471 { 8, randrGetScreenResources_Reply },
12472 { 9, randrGetOutputInfo_Reply },
12473 { 10, randrListOutputProperties_Reply },
12474 { 11, randrQueryOutputProperty_Reply },
12475 { 15, randrGetOutputProperty_Reply },
12476 { 16, randrCreateMode_Reply },
12477 { 20, randrGetCrtcInfo_Reply },
12478 { 21, randrSetCrtcConfig_Reply },
12479 { 22, randrGetCrtcGammaSize_Reply },
12480 { 23, randrGetCrtcGamma_Reply },
12481 { 25, randrGetScreenResourcesCurrent_Reply },
12482 { 27, randrGetCrtcTransform_Reply },
12483 { 28, randrGetPanning_Reply },
12484 { 29, randrSetPanning_Reply },
12485 { 31, randrGetOutputPrimary_Reply },
12486 { 32, randrGetProviders_Reply },
12487 { 33, randrGetProviderInfo_Reply },
12488 { 36, randrListProviderProperties_Reply },
12489 { 37, randrQueryProviderProperty_Reply },
12490 { 41, randrGetProviderProperty_Reply },
12491 { 42, randrGetMonitors_Reply },
12492 { 45, randrCreateLease_Reply },
12493 { 0, NULL }
12494};
12495
12496static void dispatch_randr(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
12497{
12498 int minor, length;
12499 minor = CARD8(randr_extension_minor);
12500 length = REQUEST_LENGTH();
12501
12502 col_append_fstr(pinfo->cinfo, COL_INFO, "-%s",
12503 val_to_str(minor, randr_extension_minor,
12504 "<Unknown opcode %d>"));
12505 switch (minor) {
12506 case 0:
12507 randrQueryVersion(tvb, pinfo, offsetp, t, byte_order, length);
12508 break;
12509 case 2:
12510 randrSetScreenConfig(tvb, pinfo, offsetp, t, byte_order, length);
12511 break;
12512 case 4:
12513 randrSelectInput(tvb, pinfo, offsetp, t, byte_order, length);
12514 break;
12515 case 5:
12516 randrGetScreenInfo(tvb, pinfo, offsetp, t, byte_order, length);
12517 break;
12518 case 6:
12519 randrGetScreenSizeRange(tvb, pinfo, offsetp, t, byte_order, length);
12520 break;
12521 case 7:
12522 randrSetScreenSize(tvb, pinfo, offsetp, t, byte_order, length);
12523 break;
12524 case 8:
12525 randrGetScreenResources(tvb, pinfo, offsetp, t, byte_order, length);
12526 break;
12527 case 9:
12528 randrGetOutputInfo(tvb, pinfo, offsetp, t, byte_order, length);
12529 break;
12530 case 10:
12531 randrListOutputProperties(tvb, pinfo, offsetp, t, byte_order, length);
12532 break;
12533 case 11:
12534 randrQueryOutputProperty(tvb, pinfo, offsetp, t, byte_order, length);
12535 break;
12536 case 12:
12537 randrConfigureOutputProperty(tvb, pinfo, offsetp, t, byte_order, length);
12538 break;
12539 case 13:
12540 randrChangeOutputProperty(tvb, pinfo, offsetp, t, byte_order, length);
12541 break;
12542 case 14:
12543 randrDeleteOutputProperty(tvb, pinfo, offsetp, t, byte_order, length);
12544 break;
12545 case 15:
12546 randrGetOutputProperty(tvb, pinfo, offsetp, t, byte_order, length);
12547 break;
12548 case 16:
12549 randrCreateMode(tvb, pinfo, offsetp, t, byte_order, length);
12550 break;
12551 case 17:
12552 randrDestroyMode(tvb, pinfo, offsetp, t, byte_order, length);
12553 break;
12554 case 18:
12555 randrAddOutputMode(tvb, pinfo, offsetp, t, byte_order, length);
12556 break;
12557 case 19:
12558 randrDeleteOutputMode(tvb, pinfo, offsetp, t, byte_order, length);
12559 break;
12560 case 20:
12561 randrGetCrtcInfo(tvb, pinfo, offsetp, t, byte_order, length);
12562 break;
12563 case 21:
12564 randrSetCrtcConfig(tvb, pinfo, offsetp, t, byte_order, length);
12565 break;
12566 case 22:
12567 randrGetCrtcGammaSize(tvb, pinfo, offsetp, t, byte_order, length);
12568 break;
12569 case 23:
12570 randrGetCrtcGamma(tvb, pinfo, offsetp, t, byte_order, length);
12571 break;
12572 case 24:
12573 randrSetCrtcGamma(tvb, pinfo, offsetp, t, byte_order, length);
12574 break;
12575 case 25:
12576 randrGetScreenResourcesCurrent(tvb, pinfo, offsetp, t, byte_order, length);
12577 break;
12578 case 26:
12579 randrSetCrtcTransform(tvb, pinfo, offsetp, t, byte_order, length);
12580 break;
12581 case 27:
12582 randrGetCrtcTransform(tvb, pinfo, offsetp, t, byte_order, length);
12583 break;
12584 case 28:
12585 randrGetPanning(tvb, pinfo, offsetp, t, byte_order, length);
12586 break;
12587 case 29:
12588 randrSetPanning(tvb, pinfo, offsetp, t, byte_order, length);
12589 break;
12590 case 30:
12591 randrSetOutputPrimary(tvb, pinfo, offsetp, t, byte_order, length);
12592 break;
12593 case 31:
12594 randrGetOutputPrimary(tvb, pinfo, offsetp, t, byte_order, length);
12595 break;
12596 case 32:
12597 randrGetProviders(tvb, pinfo, offsetp, t, byte_order, length);
12598 break;
12599 case 33:
12600 randrGetProviderInfo(tvb, pinfo, offsetp, t, byte_order, length);
12601 break;
12602 case 34:
12603 randrSetProviderOffloadSink(tvb, pinfo, offsetp, t, byte_order, length);
12604 break;
12605 case 35:
12606 randrSetProviderOutputSource(tvb, pinfo, offsetp, t, byte_order, length);
12607 break;
12608 case 36:
12609 randrListProviderProperties(tvb, pinfo, offsetp, t, byte_order, length);
12610 break;
12611 case 37:
12612 randrQueryProviderProperty(tvb, pinfo, offsetp, t, byte_order, length);
12613 break;
12614 case 38:
12615 randrConfigureProviderProperty(tvb, pinfo, offsetp, t, byte_order, length);
12616 break;
12617 case 39:
12618 randrChangeProviderProperty(tvb, pinfo, offsetp, t, byte_order, length);
12619 break;
12620 case 40:
12621 randrDeleteProviderProperty(tvb, pinfo, offsetp, t, byte_order, length);
12622 break;
12623 case 41:
12624 randrGetProviderProperty(tvb, pinfo, offsetp, t, byte_order, length);
12625 break;
12626 case 42:
12627 randrGetMonitors(tvb, pinfo, offsetp, t, byte_order, length);
12628 break;
12629 case 43:
12630 randrSetMonitor(tvb, pinfo, offsetp, t, byte_order, length);
12631 break;
12632 case 44:
12633 randrDeleteMonitor(tvb, pinfo, offsetp, t, byte_order, length);
12634 break;
12635 case 45:
12636 randrCreateLease(tvb, pinfo, offsetp, t, byte_order, length);
12637 break;
12638 case 46:
12639 randrFreeLease(tvb, pinfo, offsetp, t, byte_order, length);
12640 break;
12641 /* No need for a default case here, since Unknown is printed above,
12642 and UNDECODED() is taken care of by dissect_x11_request */
12643 }
12644}
12645
12646static void register_randr(void)
12647{
12648 set_handler("RANDR", dispatch_randr, randr_errors, randr_events, NULL, randr_replies);
12649}
12650
12651static void struct_record_Range8(tvbuff_t *tvb, int *offsetp, proto_tree *root, unsigned byte_order _U_, int count)
12652{
12653 int i;
12654 for (i = 0; i < count; i++) {
12655 proto_item *item;
12656 proto_tree *t;
12657
12658 item = proto_tree_add_item(root, hf_x11_struct_record_Range8, tvb, *offsetp, 2, ENC_NA);
12659 t = proto_item_add_subtree(item, ett_x11_rectangle);
12660 proto_tree_add_item(t, hf_x11_struct_record_Range8_first, tvb, *offsetp, 1, byte_order);
12661 *offsetp += 1;
12662 proto_tree_add_item(t, hf_x11_struct_record_Range8_last, tvb, *offsetp, 1, byte_order);
12663 *offsetp += 1;
12664 }
12665}
12666
12667static void struct_record_Range16(tvbuff_t *tvb, int *offsetp, proto_tree *root, unsigned byte_order _U_, int count)
12668{
12669 int i;
12670 for (i = 0; i < count; i++) {
12671 proto_item *item;
12672 proto_tree *t;
12673
12674 item = proto_tree_add_item(root, hf_x11_struct_record_Range16, tvb, *offsetp, 4, ENC_NA);
12675 t = proto_item_add_subtree(item, ett_x11_rectangle);
12676 proto_tree_add_item(t, hf_x11_struct_record_Range16_first, tvb, *offsetp, 2, byte_order);
12677 *offsetp += 2;
12678 proto_tree_add_item(t, hf_x11_struct_record_Range16_last, tvb, *offsetp, 2, byte_order);
12679 *offsetp += 2;
12680 }
12681}
12682
12683static void struct_record_ExtRange(tvbuff_t *tvb, int *offsetp, proto_tree *root, unsigned byte_order _U_, int count)
12684{
12685 int i;
12686 for (i = 0; i < count; i++) {
12687 proto_item *item;
12688 proto_tree *t;
12689
12690 item = proto_tree_add_item(root, hf_x11_struct_record_ExtRange, tvb, *offsetp, 6, ENC_NA);
12691 t = proto_item_add_subtree(item, ett_x11_rectangle);
12692 struct_record_Range8(tvb, offsetp, t, byte_order, 1);
12693 struct_record_Range16(tvb, offsetp, t, byte_order, 1);
12694 }
12695}
12696
12697static void struct_record_Range(tvbuff_t *tvb, int *offsetp, proto_tree *root, unsigned byte_order _U_, int count)
12698{
12699 int i;
12700 for (i = 0; i < count; i++) {
12701 proto_item *item;
12702 proto_tree *t;
12703
12704 item = proto_tree_add_item(root, hf_x11_struct_record_Range, tvb, *offsetp, 24, ENC_NA);
12705 t = proto_item_add_subtree(item, ett_x11_rectangle);
12706 struct_record_Range8(tvb, offsetp, t, byte_order, 1);
12707 struct_record_Range8(tvb, offsetp, t, byte_order, 1);
12708 struct_record_ExtRange(tvb, offsetp, t, byte_order, 1);
12709 struct_record_ExtRange(tvb, offsetp, t, byte_order, 1);
12710 struct_record_Range8(tvb, offsetp, t, byte_order, 1);
12711 struct_record_Range8(tvb, offsetp, t, byte_order, 1);
12712 struct_record_Range8(tvb, offsetp, t, byte_order, 1);
12713 proto_tree_add_item(t, hf_x11_struct_record_Range_client_started, tvb, *offsetp, 1, byte_order);
12714 *offsetp += 1;
12715 proto_tree_add_item(t, hf_x11_struct_record_Range_client_died, tvb, *offsetp, 1, byte_order);
12716 *offsetp += 1;
12717 }
12718}
12719
12720static int struct_size_record_ClientInfo(tvbuff_t *tvb _U_, int *offsetp _U_, unsigned byte_order _U_)
12721{
12722 int size = 0;
12723 int f_num_ranges;
12724 f_num_ranges = tvb_get_uint32(tvb, *offsetp + size + 4, byte_order);
12725 size += f_num_ranges * 24;
12726 return size + 8;
12727}
12728
12729static void struct_record_ClientInfo(tvbuff_t *tvb, int *offsetp, proto_tree *root, unsigned byte_order _U_, int count)
12730{
12731 int i;
12732 for (i = 0; i < count; i++) {
12733 proto_item *item;
12734 proto_tree *t;
12735 int f_num_ranges;
12736
12737 item = proto_tree_add_item(root, hf_x11_struct_record_ClientInfo, tvb, *offsetp, struct_size_record_ClientInfo(tvb, offsetp, byte_order), ENC_NA);
12738 t = proto_item_add_subtree(item, ett_x11_rectangle);
12739 proto_tree_add_item(t, hf_x11_struct_record_ClientInfo_client_resource, tvb, *offsetp, 4, byte_order);
12740 *offsetp += 4;
12741 f_num_ranges = tvb_get_uint32(tvb, *offsetp, byte_order);
12742 proto_tree_add_item(t, hf_x11_struct_record_ClientInfo_num_ranges, tvb, *offsetp, 4, byte_order);
12743 *offsetp += 4;
12744 struct_record_Range(tvb, offsetp, t, byte_order, f_num_ranges);
12745 }
12746}
12747
12748static void recordQueryVersion(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
12749{
12750 proto_tree_add_item(t, hf_x11_record_QueryVersion_major_version, tvb, *offsetp, 2, byte_order);
12751 *offsetp += 2;
12752 proto_tree_add_item(t, hf_x11_record_QueryVersion_minor_version, tvb, *offsetp, 2, byte_order);
12753 *offsetp += 2;
12754}
12755static void recordQueryVersion_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
12756{
12757 int sequence_number;
12758
12759 col_append_fstr(pinfo->cinfo, COL_INFO, "-QueryVersion");
12760
12761 REPLY(reply);
12762 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
12763 *offsetp += 1;
12764 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
12765 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
12766 "%d (record-QueryVersion)", sequence_number);
12767 *offsetp += 2;
12768 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
12769 *offsetp += 4;
12770 proto_tree_add_item(t, hf_x11_record_QueryVersion_reply_major_version, tvb, *offsetp, 2, byte_order);
12771 *offsetp += 2;
12772 proto_tree_add_item(t, hf_x11_record_QueryVersion_reply_minor_version, tvb, *offsetp, 2, byte_order);
12773 *offsetp += 2;
12774}
12775
12776static void recordCreateContext(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
12777{
12778 int f_num_client_specs;
12779 int f_num_ranges;
12780 proto_tree_add_item(t, hf_x11_record_CreateContext_context, tvb, *offsetp, 4, byte_order);
12781 *offsetp += 4;
12782 proto_tree_add_item(t, hf_x11_record_CreateContext_element_header, tvb, *offsetp, 1, byte_order);
12783 *offsetp += 1;
12784 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 3, ENC_NA);
12785 *offsetp += 3;
12786 f_num_client_specs = tvb_get_uint32(tvb, *offsetp, byte_order);
12787 proto_tree_add_item(t, hf_x11_record_CreateContext_num_client_specs, tvb, *offsetp, 4, byte_order);
12788 *offsetp += 4;
12789 f_num_ranges = tvb_get_uint32(tvb, *offsetp, byte_order);
12790 proto_tree_add_item(t, hf_x11_record_CreateContext_num_ranges, tvb, *offsetp, 4, byte_order);
12791 *offsetp += 4;
12792 listOfCard32(tvb, offsetp, t, hf_x11_record_CreateContext_client_specs, hf_x11_record_CreateContext_client_specs_item, f_num_client_specs, byte_order);
12793 length -= f_num_client_specs * 4;
12794 struct_record_Range(tvb, offsetp, t, byte_order, f_num_ranges);
12795 length -= f_num_ranges * 24;
12796}
12797
12798static void recordRegisterClients(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
12799{
12800 int f_num_client_specs;
12801 int f_num_ranges;
12802 proto_tree_add_item(t, hf_x11_record_RegisterClients_context, tvb, *offsetp, 4, byte_order);
12803 *offsetp += 4;
12804 proto_tree_add_item(t, hf_x11_record_RegisterClients_element_header, tvb, *offsetp, 1, byte_order);
12805 *offsetp += 1;
12806 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 3, ENC_NA);
12807 *offsetp += 3;
12808 f_num_client_specs = tvb_get_uint32(tvb, *offsetp, byte_order);
12809 proto_tree_add_item(t, hf_x11_record_RegisterClients_num_client_specs, tvb, *offsetp, 4, byte_order);
12810 *offsetp += 4;
12811 f_num_ranges = tvb_get_uint32(tvb, *offsetp, byte_order);
12812 proto_tree_add_item(t, hf_x11_record_RegisterClients_num_ranges, tvb, *offsetp, 4, byte_order);
12813 *offsetp += 4;
12814 listOfCard32(tvb, offsetp, t, hf_x11_record_RegisterClients_client_specs, hf_x11_record_RegisterClients_client_specs_item, f_num_client_specs, byte_order);
12815 length -= f_num_client_specs * 4;
12816 struct_record_Range(tvb, offsetp, t, byte_order, f_num_ranges);
12817 length -= f_num_ranges * 24;
12818}
12819
12820static void recordUnregisterClients(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
12821{
12822 int f_num_client_specs;
12823 proto_tree_add_item(t, hf_x11_record_UnregisterClients_context, tvb, *offsetp, 4, byte_order);
12824 *offsetp += 4;
12825 f_num_client_specs = tvb_get_uint32(tvb, *offsetp, byte_order);
12826 proto_tree_add_item(t, hf_x11_record_UnregisterClients_num_client_specs, tvb, *offsetp, 4, byte_order);
12827 *offsetp += 4;
12828 listOfCard32(tvb, offsetp, t, hf_x11_record_UnregisterClients_client_specs, hf_x11_record_UnregisterClients_client_specs_item, f_num_client_specs, byte_order);
12829 length -= f_num_client_specs * 4;
12830}
12831
12832static void recordGetContext(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
12833{
12834 proto_tree_add_item(t, hf_x11_record_GetContext_context, tvb, *offsetp, 4, byte_order);
12835 *offsetp += 4;
12836}
12837static void recordGetContext_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
12838{
12839 int sequence_number;
12840 int f_num_intercepted_clients;
12841
12842 col_append_fstr(pinfo->cinfo, COL_INFO, "-GetContext");
12843
12844 REPLY(reply);
12845 proto_tree_add_item(t, hf_x11_record_GetContext_reply_enabled, tvb, *offsetp, 1, byte_order);
12846 *offsetp += 1;
12847 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
12848 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
12849 "%d (record-GetContext)", sequence_number);
12850 *offsetp += 2;
12851 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
12852 *offsetp += 4;
12853 proto_tree_add_item(t, hf_x11_record_GetContext_reply_element_header, tvb, *offsetp, 1, byte_order);
12854 *offsetp += 1;
12855 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 3, ENC_NA);
12856 *offsetp += 3;
12857 f_num_intercepted_clients = tvb_get_uint32(tvb, *offsetp, byte_order);
12858 proto_tree_add_item(t, hf_x11_record_GetContext_reply_num_intercepted_clients, tvb, *offsetp, 4, byte_order);
12859 *offsetp += 4;
12860 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 16, ENC_NA);
12861 *offsetp += 16;
12862 struct_record_ClientInfo(tvb, offsetp, t, byte_order, f_num_intercepted_clients);
12863}
12864
12865static void recordEnableContext(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
12866{
12867 proto_tree_add_item(t, hf_x11_record_EnableContext_context, tvb, *offsetp, 4, byte_order);
12868 *offsetp += 4;
12869}
12870static void recordEnableContext_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
12871{
12872 int sequence_number;
12873 int f_length;
12874
12875 col_append_fstr(pinfo->cinfo, COL_INFO, "-EnableContext");
12876
12877 REPLY(reply);
12878 proto_tree_add_item(t, hf_x11_record_EnableContext_reply_category, tvb, *offsetp, 1, byte_order);
12879 *offsetp += 1;
12880 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
12881 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
12882 "%d (record-EnableContext)", sequence_number);
12883 *offsetp += 2;
12884 f_length = tvb_get_uint32(tvb, *offsetp, byte_order);
12885 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
12886 *offsetp += 4;
12887 proto_tree_add_item(t, hf_x11_record_EnableContext_reply_element_header, tvb, *offsetp, 1, byte_order);
12888 *offsetp += 1;
12889 proto_tree_add_item(t, hf_x11_record_EnableContext_reply_client_swapped, tvb, *offsetp, 1, byte_order);
12890 *offsetp += 1;
12891 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 2, ENC_NA);
12892 *offsetp += 2;
12893 proto_tree_add_item(t, hf_x11_record_EnableContext_reply_xid_base, tvb, *offsetp, 4, byte_order);
12894 *offsetp += 4;
12895 proto_tree_add_item(t, hf_x11_record_EnableContext_reply_server_time, tvb, *offsetp, 4, byte_order);
12896 *offsetp += 4;
12897 proto_tree_add_item(t, hf_x11_record_EnableContext_reply_rec_sequence_num, tvb, *offsetp, 4, byte_order);
12898 *offsetp += 4;
12899 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 8, ENC_NA);
12900 *offsetp += 8;
12901 listOfByte(tvb, offsetp, t, hf_x11_record_EnableContext_reply_data, (f_length * 4), byte_order);
12902}
12903
12904static void recordDisableContext(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
12905{
12906 proto_tree_add_item(t, hf_x11_record_DisableContext_context, tvb, *offsetp, 4, byte_order);
12907 *offsetp += 4;
12908}
12909
12910static void recordFreeContext(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
12911{
12912 proto_tree_add_item(t, hf_x11_record_FreeContext_context, tvb, *offsetp, 4, byte_order);
12913 *offsetp += 4;
12914}
12915static const value_string record_extension_minor[] = {
12916 { 0, "QueryVersion" },
12917 { 1, "CreateContext" },
12918 { 2, "RegisterClients" },
12919 { 3, "UnregisterClients" },
12920 { 4, "GetContext" },
12921 { 5, "EnableContext" },
12922 { 6, "DisableContext" },
12923 { 7, "FreeContext" },
12924 { 0, NULL }
12925};
12926static const x11_event_info record_events[] = {
12927 { NULL, NULL }
12928};
12929static const x11_reply_info record_replies[] = {
12930 { 0, recordQueryVersion_Reply },
12931 { 4, recordGetContext_Reply },
12932 { 5, recordEnableContext_Reply },
12933 { 0, NULL }
12934};
12935
12936static void dispatch_record(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
12937{
12938 int minor, length;
12939 minor = CARD8(record_extension_minor);
12940 length = REQUEST_LENGTH();
12941
12942 col_append_fstr(pinfo->cinfo, COL_INFO, "-%s",
12943 val_to_str(minor, record_extension_minor,
12944 "<Unknown opcode %d>"));
12945 switch (minor) {
12946 case 0:
12947 recordQueryVersion(tvb, pinfo, offsetp, t, byte_order, length);
12948 break;
12949 case 1:
12950 recordCreateContext(tvb, pinfo, offsetp, t, byte_order, length);
12951 break;
12952 case 2:
12953 recordRegisterClients(tvb, pinfo, offsetp, t, byte_order, length);
12954 break;
12955 case 3:
12956 recordUnregisterClients(tvb, pinfo, offsetp, t, byte_order, length);
12957 break;
12958 case 4:
12959 recordGetContext(tvb, pinfo, offsetp, t, byte_order, length);
12960 break;
12961 case 5:
12962 recordEnableContext(tvb, pinfo, offsetp, t, byte_order, length);
12963 break;
12964 case 6:
12965 recordDisableContext(tvb, pinfo, offsetp, t, byte_order, length);
12966 break;
12967 case 7:
12968 recordFreeContext(tvb, pinfo, offsetp, t, byte_order, length);
12969 break;
12970 /* No need for a default case here, since Unknown is printed above,
12971 and UNDECODED() is taken care of by dissect_x11_request */
12972 }
12973}
12974
12975static void register_record(void)
12976{
12977 set_handler("RECORD", dispatch_record, record_errors, record_events, NULL, record_replies);
12978}
12979
12980static void renderQueryVersion(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
12981{
12982 proto_tree_add_item(t, hf_x11_render_QueryVersion_client_major_version, tvb, *offsetp, 4, byte_order);
12983 *offsetp += 4;
12984 proto_tree_add_item(t, hf_x11_render_QueryVersion_client_minor_version, tvb, *offsetp, 4, byte_order);
12985 *offsetp += 4;
12986}
12987static void renderQueryVersion_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
12988{
12989 int sequence_number;
12990
12991 col_append_fstr(pinfo->cinfo, COL_INFO, "-QueryVersion");
12992
12993 REPLY(reply);
12994 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
12995 *offsetp += 1;
12996 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
12997 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
12998 "%d (render-QueryVersion)", sequence_number);
12999 *offsetp += 2;
13000 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
13001 *offsetp += 4;
13002 proto_tree_add_item(t, hf_x11_render_QueryVersion_reply_major_version, tvb, *offsetp, 4, byte_order);
13003 *offsetp += 4;
13004 proto_tree_add_item(t, hf_x11_render_QueryVersion_reply_minor_version, tvb, *offsetp, 4, byte_order);
13005 *offsetp += 4;
13006 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 16, ENC_NA);
13007 *offsetp += 16;
13008}
13009
13010static void renderQueryPictFormats(tvbuff_t *tvb _U_, packet_info *pinfo _U_, int *offsetp _U_, proto_tree *t _U_, unsigned byte_order _U_, int length _U_)
13011{
13012}
13013static void renderQueryPictFormats_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
13014{
13015 int sequence_number;
13016 int f_num_formats;
13017 int f_num_screens;
13018 int f_num_subpixel;
13019
13020 col_append_fstr(pinfo->cinfo, COL_INFO, "-QueryPictFormats");
13021
13022 REPLY(reply);
13023 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
13024 *offsetp += 1;
13025 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
13026 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
13027 "%d (render-QueryPictFormats)", sequence_number);
13028 *offsetp += 2;
13029 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
13030 *offsetp += 4;
13031 f_num_formats = tvb_get_uint32(tvb, *offsetp, byte_order);
13032 proto_tree_add_item(t, hf_x11_render_QueryPictFormats_reply_num_formats, tvb, *offsetp, 4, byte_order);
13033 *offsetp += 4;
13034 f_num_screens = tvb_get_uint32(tvb, *offsetp, byte_order);
13035 proto_tree_add_item(t, hf_x11_render_QueryPictFormats_reply_num_screens, tvb, *offsetp, 4, byte_order);
13036 *offsetp += 4;
13037 proto_tree_add_item(t, hf_x11_render_QueryPictFormats_reply_num_depths, tvb, *offsetp, 4, byte_order);
13038 *offsetp += 4;
13039 proto_tree_add_item(t, hf_x11_render_QueryPictFormats_reply_num_visuals, tvb, *offsetp, 4, byte_order);
13040 *offsetp += 4;
13041 f_num_subpixel = tvb_get_uint32(tvb, *offsetp, byte_order);
13042 proto_tree_add_item(t, hf_x11_render_QueryPictFormats_reply_num_subpixel, tvb, *offsetp, 4, byte_order);
13043 *offsetp += 4;
13044 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 4, ENC_NA);
13045 *offsetp += 4;
13046 struct_render_PICTFORMINFO(tvb, offsetp, t, byte_order, f_num_formats);
13047 struct_render_PICTSCREEN(tvb, offsetp, t, byte_order, f_num_screens);
13048 listOfCard32(tvb, offsetp, t, hf_x11_render_QueryPictFormats_reply_subpixels, hf_x11_render_QueryPictFormats_reply_subpixels_item, f_num_subpixel, byte_order);
13049}
13050
13051static void renderQueryPictIndexValues(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
13052{
13053 proto_tree_add_item(t, hf_x11_render_QueryPictIndexValues_format, tvb, *offsetp, 4, byte_order);
13054 *offsetp += 4;
13055}
13056static void renderQueryPictIndexValues_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
13057{
13058 int sequence_number;
13059 int f_num_values;
13060
13061 col_append_fstr(pinfo->cinfo, COL_INFO, "-QueryPictIndexValues");
13062
13063 REPLY(reply);
13064 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
13065 *offsetp += 1;
13066 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
13067 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
13068 "%d (render-QueryPictIndexValues)", sequence_number);
13069 *offsetp += 2;
13070 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
13071 *offsetp += 4;
13072 f_num_values = tvb_get_uint32(tvb, *offsetp, byte_order);
13073 proto_tree_add_item(t, hf_x11_render_QueryPictIndexValues_reply_num_values, tvb, *offsetp, 4, byte_order);
13074 *offsetp += 4;
13075 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 20, ENC_NA);
13076 *offsetp += 20;
13077 struct_render_INDEXVALUE(tvb, offsetp, t, byte_order, f_num_values);
13078}
13079
13080static void renderCreatePicture(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
13081{
13082 int f_value_mask;
13083 proto_tree_add_item(t, hf_x11_render_CreatePicture_pid, tvb, *offsetp, 4, byte_order);
13084 *offsetp += 4;
13085 proto_tree_add_item(t, hf_x11_render_CreatePicture_drawable, tvb, *offsetp, 4, byte_order);
13086 *offsetp += 4;
13087 proto_tree_add_item(t, hf_x11_render_CreatePicture_format, tvb, *offsetp, 4, byte_order);
13088 *offsetp += 4;
13089 f_value_mask = tvb_get_uint32(tvb, *offsetp, byte_order);
13090 {
13091 static int* const value_mask_bits [] = {
13092 &hf_x11_render_CreatePicture_value_mask_mask_Repeat,
13093 &hf_x11_render_CreatePicture_value_mask_mask_AlphaMap,
13094 &hf_x11_render_CreatePicture_value_mask_mask_AlphaXOrigin,
13095 &hf_x11_render_CreatePicture_value_mask_mask_AlphaYOrigin,
13096 &hf_x11_render_CreatePicture_value_mask_mask_ClipXOrigin,
13097 &hf_x11_render_CreatePicture_value_mask_mask_ClipYOrigin,
13098 &hf_x11_render_CreatePicture_value_mask_mask_ClipMask,
13099 &hf_x11_render_CreatePicture_value_mask_mask_GraphicsExposure,
13100 &hf_x11_render_CreatePicture_value_mask_mask_SubwindowMode,
13101 &hf_x11_render_CreatePicture_value_mask_mask_PolyEdge,
13102 &hf_x11_render_CreatePicture_value_mask_mask_PolyMode,
13103 &hf_x11_render_CreatePicture_value_mask_mask_Dither,
13104 &hf_x11_render_CreatePicture_value_mask_mask_ComponentAlpha,
13105 NULL
13106 };
13107 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_render_CreatePicture_value_mask, ett_x11_rectangle, value_mask_bits, byte_order);
13108 }
13109 *offsetp += 4;
13110 if (f_value_mask & (1U << 0)) {
13111 field32(tvb, offsetp, t, hf_x11_render_CreatePicture_Repeat_repeat, byte_order);
13112 }
13113 if (f_value_mask & (1U << 1)) {
13114 proto_tree_add_item(t, hf_x11_render_CreatePicture_AlphaMap_alphamap, tvb, *offsetp, 4, byte_order);
13115 *offsetp += 4;
13116 }
13117 if (f_value_mask & (1U << 2)) {
13118 proto_tree_add_item(t, hf_x11_render_CreatePicture_AlphaXOrigin_alphaxorigin, tvb, *offsetp, 4, byte_order);
13119 *offsetp += 4;
13120 }
13121 if (f_value_mask & (1U << 3)) {
13122 proto_tree_add_item(t, hf_x11_render_CreatePicture_AlphaYOrigin_alphayorigin, tvb, *offsetp, 4, byte_order);
13123 *offsetp += 4;
13124 }
13125 if (f_value_mask & (1U << 4)) {
13126 proto_tree_add_item(t, hf_x11_render_CreatePicture_ClipXOrigin_clipxorigin, tvb, *offsetp, 4, byte_order);
13127 *offsetp += 4;
13128 }
13129 if (f_value_mask & (1U << 5)) {
13130 proto_tree_add_item(t, hf_x11_render_CreatePicture_ClipYOrigin_clipyorigin, tvb, *offsetp, 4, byte_order);
13131 *offsetp += 4;
13132 }
13133 if (f_value_mask & (1U << 6)) {
13134 proto_tree_add_item(t, hf_x11_render_CreatePicture_ClipMask_clipmask, tvb, *offsetp, 4, byte_order);
13135 *offsetp += 4;
13136 }
13137 if (f_value_mask & (1U << 7)) {
13138 proto_tree_add_item(t, hf_x11_render_CreatePicture_GraphicsExposure_graphicsexposure, tvb, *offsetp, 4, byte_order);
13139 *offsetp += 4;
13140 }
13141 if (f_value_mask & (1U << 8)) {
13142 field32(tvb, offsetp, t, hf_x11_render_CreatePicture_SubwindowMode_subwindowmode, byte_order);
13143 }
13144 if (f_value_mask & (1U << 9)) {
13145 field32(tvb, offsetp, t, hf_x11_render_CreatePicture_PolyEdge_polyedge, byte_order);
13146 }
13147 if (f_value_mask & (1U << 10)) {
13148 field32(tvb, offsetp, t, hf_x11_render_CreatePicture_PolyMode_polymode, byte_order);
13149 }
13150 if (f_value_mask & (1U << 11)) {
13151 proto_tree_add_item(t, hf_x11_render_CreatePicture_Dither_dither, tvb, *offsetp, 4, byte_order);
13152 *offsetp += 4;
13153 }
13154 if (f_value_mask & (1U << 12)) {
13155 proto_tree_add_item(t, hf_x11_render_CreatePicture_ComponentAlpha_componentalpha, tvb, *offsetp, 4, byte_order);
13156 *offsetp += 4;
13157 }
13158}
13159
13160static void renderChangePicture(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
13161{
13162 int f_value_mask;
13163 proto_tree_add_item(t, hf_x11_render_ChangePicture_picture, tvb, *offsetp, 4, byte_order);
13164 *offsetp += 4;
13165 f_value_mask = tvb_get_uint32(tvb, *offsetp, byte_order);
13166 {
13167 static int* const value_mask_bits [] = {
13168 &hf_x11_render_ChangePicture_value_mask_mask_Repeat,
13169 &hf_x11_render_ChangePicture_value_mask_mask_AlphaMap,
13170 &hf_x11_render_ChangePicture_value_mask_mask_AlphaXOrigin,
13171 &hf_x11_render_ChangePicture_value_mask_mask_AlphaYOrigin,
13172 &hf_x11_render_ChangePicture_value_mask_mask_ClipXOrigin,
13173 &hf_x11_render_ChangePicture_value_mask_mask_ClipYOrigin,
13174 &hf_x11_render_ChangePicture_value_mask_mask_ClipMask,
13175 &hf_x11_render_ChangePicture_value_mask_mask_GraphicsExposure,
13176 &hf_x11_render_ChangePicture_value_mask_mask_SubwindowMode,
13177 &hf_x11_render_ChangePicture_value_mask_mask_PolyEdge,
13178 &hf_x11_render_ChangePicture_value_mask_mask_PolyMode,
13179 &hf_x11_render_ChangePicture_value_mask_mask_Dither,
13180 &hf_x11_render_ChangePicture_value_mask_mask_ComponentAlpha,
13181 NULL
13182 };
13183 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_render_ChangePicture_value_mask, ett_x11_rectangle, value_mask_bits, byte_order);
13184 }
13185 *offsetp += 4;
13186 if (f_value_mask & (1U << 0)) {
13187 field32(tvb, offsetp, t, hf_x11_render_ChangePicture_Repeat_repeat, byte_order);
13188 }
13189 if (f_value_mask & (1U << 1)) {
13190 proto_tree_add_item(t, hf_x11_render_ChangePicture_AlphaMap_alphamap, tvb, *offsetp, 4, byte_order);
13191 *offsetp += 4;
13192 }
13193 if (f_value_mask & (1U << 2)) {
13194 proto_tree_add_item(t, hf_x11_render_ChangePicture_AlphaXOrigin_alphaxorigin, tvb, *offsetp, 4, byte_order);
13195 *offsetp += 4;
13196 }
13197 if (f_value_mask & (1U << 3)) {
13198 proto_tree_add_item(t, hf_x11_render_ChangePicture_AlphaYOrigin_alphayorigin, tvb, *offsetp, 4, byte_order);
13199 *offsetp += 4;
13200 }
13201 if (f_value_mask & (1U << 4)) {
13202 proto_tree_add_item(t, hf_x11_render_ChangePicture_ClipXOrigin_clipxorigin, tvb, *offsetp, 4, byte_order);
13203 *offsetp += 4;
13204 }
13205 if (f_value_mask & (1U << 5)) {
13206 proto_tree_add_item(t, hf_x11_render_ChangePicture_ClipYOrigin_clipyorigin, tvb, *offsetp, 4, byte_order);
13207 *offsetp += 4;
13208 }
13209 if (f_value_mask & (1U << 6)) {
13210 proto_tree_add_item(t, hf_x11_render_ChangePicture_ClipMask_clipmask, tvb, *offsetp, 4, byte_order);
13211 *offsetp += 4;
13212 }
13213 if (f_value_mask & (1U << 7)) {
13214 proto_tree_add_item(t, hf_x11_render_ChangePicture_GraphicsExposure_graphicsexposure, tvb, *offsetp, 4, byte_order);
13215 *offsetp += 4;
13216 }
13217 if (f_value_mask & (1U << 8)) {
13218 field32(tvb, offsetp, t, hf_x11_render_ChangePicture_SubwindowMode_subwindowmode, byte_order);
13219 }
13220 if (f_value_mask & (1U << 9)) {
13221 field32(tvb, offsetp, t, hf_x11_render_ChangePicture_PolyEdge_polyedge, byte_order);
13222 }
13223 if (f_value_mask & (1U << 10)) {
13224 field32(tvb, offsetp, t, hf_x11_render_ChangePicture_PolyMode_polymode, byte_order);
13225 }
13226 if (f_value_mask & (1U << 11)) {
13227 proto_tree_add_item(t, hf_x11_render_ChangePicture_Dither_dither, tvb, *offsetp, 4, byte_order);
13228 *offsetp += 4;
13229 }
13230 if (f_value_mask & (1U << 12)) {
13231 proto_tree_add_item(t, hf_x11_render_ChangePicture_ComponentAlpha_componentalpha, tvb, *offsetp, 4, byte_order);
13232 *offsetp += 4;
13233 }
13234}
13235
13236static void renderSetPictureClipRectangles(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
13237{
13238 proto_tree_add_item(t, hf_x11_render_SetPictureClipRectangles_picture, tvb, *offsetp, 4, byte_order);
13239 *offsetp += 4;
13240 proto_tree_add_item(t, hf_x11_render_SetPictureClipRectangles_clip_x_origin, tvb, *offsetp, 2, byte_order);
13241 *offsetp += 2;
13242 proto_tree_add_item(t, hf_x11_render_SetPictureClipRectangles_clip_y_origin, tvb, *offsetp, 2, byte_order);
13243 *offsetp += 2;
13244 struct_xproto_RECTANGLE(tvb, offsetp, t, byte_order, (length - 12) / 8);
13245}
13246
13247static void renderFreePicture(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
13248{
13249 proto_tree_add_item(t, hf_x11_render_FreePicture_picture, tvb, *offsetp, 4, byte_order);
13250 *offsetp += 4;
13251}
13252
13253static void renderComposite(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
13254{
13255 field8(tvb, offsetp, t, hf_x11_render_Composite_op, byte_order);
13256 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 3, ENC_NA);
13257 *offsetp += 3;
13258 proto_tree_add_item(t, hf_x11_render_Composite_src, tvb, *offsetp, 4, byte_order);
13259 *offsetp += 4;
13260 field32(tvb, offsetp, t, hf_x11_render_Composite_mask, byte_order);
13261 proto_tree_add_item(t, hf_x11_render_Composite_dst, tvb, *offsetp, 4, byte_order);
13262 *offsetp += 4;
13263 proto_tree_add_item(t, hf_x11_render_Composite_src_x, tvb, *offsetp, 2, byte_order);
13264 *offsetp += 2;
13265 proto_tree_add_item(t, hf_x11_render_Composite_src_y, tvb, *offsetp, 2, byte_order);
13266 *offsetp += 2;
13267 proto_tree_add_item(t, hf_x11_render_Composite_mask_x, tvb, *offsetp, 2, byte_order);
13268 *offsetp += 2;
13269 proto_tree_add_item(t, hf_x11_render_Composite_mask_y, tvb, *offsetp, 2, byte_order);
13270 *offsetp += 2;
13271 proto_tree_add_item(t, hf_x11_render_Composite_dst_x, tvb, *offsetp, 2, byte_order);
13272 *offsetp += 2;
13273 proto_tree_add_item(t, hf_x11_render_Composite_dst_y, tvb, *offsetp, 2, byte_order);
13274 *offsetp += 2;
13275 proto_tree_add_item(t, hf_x11_render_Composite_width, tvb, *offsetp, 2, byte_order);
13276 *offsetp += 2;
13277 proto_tree_add_item(t, hf_x11_render_Composite_height, tvb, *offsetp, 2, byte_order);
13278 *offsetp += 2;
13279}
13280
13281static void renderTrapezoids(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
13282{
13283 field8(tvb, offsetp, t, hf_x11_render_Trapezoids_op, byte_order);
13284 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 3, ENC_NA);
13285 *offsetp += 3;
13286 proto_tree_add_item(t, hf_x11_render_Trapezoids_src, tvb, *offsetp, 4, byte_order);
13287 *offsetp += 4;
13288 proto_tree_add_item(t, hf_x11_render_Trapezoids_dst, tvb, *offsetp, 4, byte_order);
13289 *offsetp += 4;
13290 proto_tree_add_item(t, hf_x11_render_Trapezoids_mask_format, tvb, *offsetp, 4, byte_order);
13291 *offsetp += 4;
13292 proto_tree_add_item(t, hf_x11_render_Trapezoids_src_x, tvb, *offsetp, 2, byte_order);
13293 *offsetp += 2;
13294 proto_tree_add_item(t, hf_x11_render_Trapezoids_src_y, tvb, *offsetp, 2, byte_order);
13295 *offsetp += 2;
13296 struct_render_TRAPEZOID(tvb, offsetp, t, byte_order, (length - 24) / 40);
13297}
13298
13299static void renderTriangles(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
13300{
13301 field8(tvb, offsetp, t, hf_x11_render_Triangles_op, byte_order);
13302 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 3, ENC_NA);
13303 *offsetp += 3;
13304 proto_tree_add_item(t, hf_x11_render_Triangles_src, tvb, *offsetp, 4, byte_order);
13305 *offsetp += 4;
13306 proto_tree_add_item(t, hf_x11_render_Triangles_dst, tvb, *offsetp, 4, byte_order);
13307 *offsetp += 4;
13308 proto_tree_add_item(t, hf_x11_render_Triangles_mask_format, tvb, *offsetp, 4, byte_order);
13309 *offsetp += 4;
13310 proto_tree_add_item(t, hf_x11_render_Triangles_src_x, tvb, *offsetp, 2, byte_order);
13311 *offsetp += 2;
13312 proto_tree_add_item(t, hf_x11_render_Triangles_src_y, tvb, *offsetp, 2, byte_order);
13313 *offsetp += 2;
13314 struct_render_TRIANGLE(tvb, offsetp, t, byte_order, (length - 24) / 24);
13315}
13316
13317static void renderTriStrip(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
13318{
13319 field8(tvb, offsetp, t, hf_x11_render_TriStrip_op, byte_order);
13320 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 3, ENC_NA);
13321 *offsetp += 3;
13322 proto_tree_add_item(t, hf_x11_render_TriStrip_src, tvb, *offsetp, 4, byte_order);
13323 *offsetp += 4;
13324 proto_tree_add_item(t, hf_x11_render_TriStrip_dst, tvb, *offsetp, 4, byte_order);
13325 *offsetp += 4;
13326 proto_tree_add_item(t, hf_x11_render_TriStrip_mask_format, tvb, *offsetp, 4, byte_order);
13327 *offsetp += 4;
13328 proto_tree_add_item(t, hf_x11_render_TriStrip_src_x, tvb, *offsetp, 2, byte_order);
13329 *offsetp += 2;
13330 proto_tree_add_item(t, hf_x11_render_TriStrip_src_y, tvb, *offsetp, 2, byte_order);
13331 *offsetp += 2;
13332 struct_render_POINTFIX(tvb, offsetp, t, byte_order, (length - 24) / 8);
13333}
13334
13335static void renderTriFan(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
13336{
13337 field8(tvb, offsetp, t, hf_x11_render_TriFan_op, byte_order);
13338 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 3, ENC_NA);
13339 *offsetp += 3;
13340 proto_tree_add_item(t, hf_x11_render_TriFan_src, tvb, *offsetp, 4, byte_order);
13341 *offsetp += 4;
13342 proto_tree_add_item(t, hf_x11_render_TriFan_dst, tvb, *offsetp, 4, byte_order);
13343 *offsetp += 4;
13344 proto_tree_add_item(t, hf_x11_render_TriFan_mask_format, tvb, *offsetp, 4, byte_order);
13345 *offsetp += 4;
13346 proto_tree_add_item(t, hf_x11_render_TriFan_src_x, tvb, *offsetp, 2, byte_order);
13347 *offsetp += 2;
13348 proto_tree_add_item(t, hf_x11_render_TriFan_src_y, tvb, *offsetp, 2, byte_order);
13349 *offsetp += 2;
13350 struct_render_POINTFIX(tvb, offsetp, t, byte_order, (length - 24) / 8);
13351}
13352
13353static void renderCreateGlyphSet(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
13354{
13355 proto_tree_add_item(t, hf_x11_render_CreateGlyphSet_gsid, tvb, *offsetp, 4, byte_order);
13356 *offsetp += 4;
13357 proto_tree_add_item(t, hf_x11_render_CreateGlyphSet_format, tvb, *offsetp, 4, byte_order);
13358 *offsetp += 4;
13359}
13360
13361static void renderReferenceGlyphSet(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
13362{
13363 proto_tree_add_item(t, hf_x11_render_ReferenceGlyphSet_gsid, tvb, *offsetp, 4, byte_order);
13364 *offsetp += 4;
13365 proto_tree_add_item(t, hf_x11_render_ReferenceGlyphSet_existing, tvb, *offsetp, 4, byte_order);
13366 *offsetp += 4;
13367}
13368
13369static void renderFreeGlyphSet(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
13370{
13371 proto_tree_add_item(t, hf_x11_render_FreeGlyphSet_glyphset, tvb, *offsetp, 4, byte_order);
13372 *offsetp += 4;
13373}
13374
13375static void renderAddGlyphs(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
13376{
13377 int f_glyphs_len;
13378 proto_tree_add_item(t, hf_x11_render_AddGlyphs_glyphset, tvb, *offsetp, 4, byte_order);
13379 *offsetp += 4;
13380 f_glyphs_len = tvb_get_uint32(tvb, *offsetp, byte_order);
13381 proto_tree_add_item(t, hf_x11_render_AddGlyphs_glyphs_len, tvb, *offsetp, 4, byte_order);
13382 *offsetp += 4;
13383 listOfCard32(tvb, offsetp, t, hf_x11_render_AddGlyphs_glyphids, hf_x11_render_AddGlyphs_glyphids_item, f_glyphs_len, byte_order);
13384 length -= f_glyphs_len * 4;
13385 struct_render_GLYPHINFO(tvb, offsetp, t, byte_order, f_glyphs_len);
13386 length -= f_glyphs_len * 12;
13387 listOfByte(tvb, offsetp, t, hf_x11_render_AddGlyphs_data, (length - 12) / 1, byte_order);
13388}
13389
13390static void renderFreeGlyphs(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
13391{
13392 proto_tree_add_item(t, hf_x11_render_FreeGlyphs_glyphset, tvb, *offsetp, 4, byte_order);
13393 *offsetp += 4;
13394 listOfCard32(tvb, offsetp, t, hf_x11_render_FreeGlyphs_glyphs, hf_x11_render_FreeGlyphs_glyphs_item, (length - 8) / 4, byte_order);
13395}
13396
13397static void renderCompositeGlyphs8(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
13398{
13399 field8(tvb, offsetp, t, hf_x11_render_CompositeGlyphs8_op, byte_order);
13400 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 3, ENC_NA);
13401 *offsetp += 3;
13402 proto_tree_add_item(t, hf_x11_render_CompositeGlyphs8_src, tvb, *offsetp, 4, byte_order);
13403 *offsetp += 4;
13404 proto_tree_add_item(t, hf_x11_render_CompositeGlyphs8_dst, tvb, *offsetp, 4, byte_order);
13405 *offsetp += 4;
13406 proto_tree_add_item(t, hf_x11_render_CompositeGlyphs8_mask_format, tvb, *offsetp, 4, byte_order);
13407 *offsetp += 4;
13408 proto_tree_add_item(t, hf_x11_render_CompositeGlyphs8_glyphset, tvb, *offsetp, 4, byte_order);
13409 *offsetp += 4;
13410 proto_tree_add_item(t, hf_x11_render_CompositeGlyphs8_src_x, tvb, *offsetp, 2, byte_order);
13411 *offsetp += 2;
13412 proto_tree_add_item(t, hf_x11_render_CompositeGlyphs8_src_y, tvb, *offsetp, 2, byte_order);
13413 *offsetp += 2;
13414 listOfByte(tvb, offsetp, t, hf_x11_render_CompositeGlyphs8_glyphcmds, (length - 28) / 1, byte_order);
13415}
13416
13417static void renderCompositeGlyphs16(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
13418{
13419 field8(tvb, offsetp, t, hf_x11_render_CompositeGlyphs16_op, byte_order);
13420 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 3, ENC_NA);
13421 *offsetp += 3;
13422 proto_tree_add_item(t, hf_x11_render_CompositeGlyphs16_src, tvb, *offsetp, 4, byte_order);
13423 *offsetp += 4;
13424 proto_tree_add_item(t, hf_x11_render_CompositeGlyphs16_dst, tvb, *offsetp, 4, byte_order);
13425 *offsetp += 4;
13426 proto_tree_add_item(t, hf_x11_render_CompositeGlyphs16_mask_format, tvb, *offsetp, 4, byte_order);
13427 *offsetp += 4;
13428 proto_tree_add_item(t, hf_x11_render_CompositeGlyphs16_glyphset, tvb, *offsetp, 4, byte_order);
13429 *offsetp += 4;
13430 proto_tree_add_item(t, hf_x11_render_CompositeGlyphs16_src_x, tvb, *offsetp, 2, byte_order);
13431 *offsetp += 2;
13432 proto_tree_add_item(t, hf_x11_render_CompositeGlyphs16_src_y, tvb, *offsetp, 2, byte_order);
13433 *offsetp += 2;
13434 listOfByte(tvb, offsetp, t, hf_x11_render_CompositeGlyphs16_glyphcmds, (length - 28) / 1, byte_order);
13435}
13436
13437static void renderCompositeGlyphs32(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
13438{
13439 field8(tvb, offsetp, t, hf_x11_render_CompositeGlyphs32_op, byte_order);
13440 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 3, ENC_NA);
13441 *offsetp += 3;
13442 proto_tree_add_item(t, hf_x11_render_CompositeGlyphs32_src, tvb, *offsetp, 4, byte_order);
13443 *offsetp += 4;
13444 proto_tree_add_item(t, hf_x11_render_CompositeGlyphs32_dst, tvb, *offsetp, 4, byte_order);
13445 *offsetp += 4;
13446 proto_tree_add_item(t, hf_x11_render_CompositeGlyphs32_mask_format, tvb, *offsetp, 4, byte_order);
13447 *offsetp += 4;
13448 proto_tree_add_item(t, hf_x11_render_CompositeGlyphs32_glyphset, tvb, *offsetp, 4, byte_order);
13449 *offsetp += 4;
13450 proto_tree_add_item(t, hf_x11_render_CompositeGlyphs32_src_x, tvb, *offsetp, 2, byte_order);
13451 *offsetp += 2;
13452 proto_tree_add_item(t, hf_x11_render_CompositeGlyphs32_src_y, tvb, *offsetp, 2, byte_order);
13453 *offsetp += 2;
13454 listOfByte(tvb, offsetp, t, hf_x11_render_CompositeGlyphs32_glyphcmds, (length - 28) / 1, byte_order);
13455}
13456
13457static void renderFillRectangles(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
13458{
13459 field8(tvb, offsetp, t, hf_x11_render_FillRectangles_op, byte_order);
13460 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 3, ENC_NA);
13461 *offsetp += 3;
13462 proto_tree_add_item(t, hf_x11_render_FillRectangles_dst, tvb, *offsetp, 4, byte_order);
13463 *offsetp += 4;
13464 struct_render_COLOR(tvb, offsetp, t, byte_order, 1);
13465 struct_xproto_RECTANGLE(tvb, offsetp, t, byte_order, (length - 20) / 8);
13466}
13467
13468static void renderCreateCursor(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
13469{
13470 proto_tree_add_item(t, hf_x11_render_CreateCursor_cid, tvb, *offsetp, 4, byte_order);
13471 *offsetp += 4;
13472 proto_tree_add_item(t, hf_x11_render_CreateCursor_source, tvb, *offsetp, 4, byte_order);
13473 *offsetp += 4;
13474 proto_tree_add_item(t, hf_x11_render_CreateCursor_x, tvb, *offsetp, 2, byte_order);
13475 *offsetp += 2;
13476 proto_tree_add_item(t, hf_x11_render_CreateCursor_y, tvb, *offsetp, 2, byte_order);
13477 *offsetp += 2;
13478}
13479
13480static void renderSetPictureTransform(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
13481{
13482 proto_tree_add_item(t, hf_x11_render_SetPictureTransform_picture, tvb, *offsetp, 4, byte_order);
13483 *offsetp += 4;
13484 struct_render_TRANSFORM(tvb, offsetp, t, byte_order, 1);
13485}
13486
13487static void renderQueryFilters(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
13488{
13489 proto_tree_add_item(t, hf_x11_render_QueryFilters_drawable, tvb, *offsetp, 4, byte_order);
13490 *offsetp += 4;
13491}
13492static void renderQueryFilters_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
13493{
13494 int sequence_number;
13495 int f_num_aliases;
13496 int f_num_filters;
13497
13498 col_append_fstr(pinfo->cinfo, COL_INFO, "-QueryFilters");
13499
13500 REPLY(reply);
13501 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
13502 *offsetp += 1;
13503 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
13504 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
13505 "%d (render-QueryFilters)", sequence_number);
13506 *offsetp += 2;
13507 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
13508 *offsetp += 4;
13509 f_num_aliases = tvb_get_uint32(tvb, *offsetp, byte_order);
13510 proto_tree_add_item(t, hf_x11_render_QueryFilters_reply_num_aliases, tvb, *offsetp, 4, byte_order);
13511 *offsetp += 4;
13512 f_num_filters = tvb_get_uint32(tvb, *offsetp, byte_order);
13513 proto_tree_add_item(t, hf_x11_render_QueryFilters_reply_num_filters, tvb, *offsetp, 4, byte_order);
13514 *offsetp += 4;
13515 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 16, ENC_NA);
13516 *offsetp += 16;
13517 listOfCard16(tvb, offsetp, t, hf_x11_render_QueryFilters_reply_aliases, hf_x11_render_QueryFilters_reply_aliases_item, f_num_aliases, byte_order);
13518 struct_xproto_STR(tvb, offsetp, t, byte_order, f_num_filters);
13519}
13520
13521static void renderSetPictureFilter(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
13522{
13523 int f_filter_len;
13524 proto_tree_add_item(t, hf_x11_render_SetPictureFilter_picture, tvb, *offsetp, 4, byte_order);
13525 *offsetp += 4;
13526 f_filter_len = tvb_get_uint16(tvb, *offsetp, byte_order);
13527 proto_tree_add_item(t, hf_x11_render_SetPictureFilter_filter_len, tvb, *offsetp, 2, byte_order);
13528 *offsetp += 2;
13529 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 2, ENC_NA);
13530 *offsetp += 2;
13531 listOfByte(tvb, offsetp, t, hf_x11_render_SetPictureFilter_filter, f_filter_len, byte_order);
13532 length -= f_filter_len * 1;
13533 if (*offsetp % 4) {
13534 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, (4 - *offsetp % 4), ENC_NA);
13535 *offsetp += (4 - *offsetp % 4);
13536 }
13537 length = ((length + 3) & ~3);
13538 listOfInt32(tvb, offsetp, t, hf_x11_render_SetPictureFilter_values, hf_x11_render_SetPictureFilter_values_item, (length - 12) / 4, byte_order);
13539}
13540
13541static void renderCreateAnimCursor(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
13542{
13543 proto_tree_add_item(t, hf_x11_render_CreateAnimCursor_cid, tvb, *offsetp, 4, byte_order);
13544 *offsetp += 4;
13545 struct_render_ANIMCURSORELT(tvb, offsetp, t, byte_order, (length - 8) / 8);
13546}
13547
13548static void renderAddTraps(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
13549{
13550 proto_tree_add_item(t, hf_x11_render_AddTraps_picture, tvb, *offsetp, 4, byte_order);
13551 *offsetp += 4;
13552 proto_tree_add_item(t, hf_x11_render_AddTraps_x_off, tvb, *offsetp, 2, byte_order);
13553 *offsetp += 2;
13554 proto_tree_add_item(t, hf_x11_render_AddTraps_y_off, tvb, *offsetp, 2, byte_order);
13555 *offsetp += 2;
13556 struct_render_TRAP(tvb, offsetp, t, byte_order, (length - 12) / 24);
13557}
13558
13559static void renderCreateSolidFill(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
13560{
13561 proto_tree_add_item(t, hf_x11_render_CreateSolidFill_picture, tvb, *offsetp, 4, byte_order);
13562 *offsetp += 4;
13563 struct_render_COLOR(tvb, offsetp, t, byte_order, 1);
13564}
13565
13566static void renderCreateLinearGradient(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
13567{
13568 int f_num_stops;
13569 proto_tree_add_item(t, hf_x11_render_CreateLinearGradient_picture, tvb, *offsetp, 4, byte_order);
13570 *offsetp += 4;
13571 struct_render_POINTFIX(tvb, offsetp, t, byte_order, 1);
13572 struct_render_POINTFIX(tvb, offsetp, t, byte_order, 1);
13573 f_num_stops = tvb_get_uint32(tvb, *offsetp, byte_order);
13574 proto_tree_add_item(t, hf_x11_render_CreateLinearGradient_num_stops, tvb, *offsetp, 4, byte_order);
13575 *offsetp += 4;
13576 listOfInt32(tvb, offsetp, t, hf_x11_render_CreateLinearGradient_stops, hf_x11_render_CreateLinearGradient_stops_item, f_num_stops, byte_order);
13577 length -= f_num_stops * 4;
13578 struct_render_COLOR(tvb, offsetp, t, byte_order, f_num_stops);
13579 length -= f_num_stops * 8;
13580}
13581
13582static void renderCreateRadialGradient(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
13583{
13584 int f_num_stops;
13585 proto_tree_add_item(t, hf_x11_render_CreateRadialGradient_picture, tvb, *offsetp, 4, byte_order);
13586 *offsetp += 4;
13587 struct_render_POINTFIX(tvb, offsetp, t, byte_order, 1);
13588 struct_render_POINTFIX(tvb, offsetp, t, byte_order, 1);
13589 proto_tree_add_item(t, hf_x11_render_CreateRadialGradient_inner_radius, tvb, *offsetp, 4, byte_order);
13590 *offsetp += 4;
13591 proto_tree_add_item(t, hf_x11_render_CreateRadialGradient_outer_radius, tvb, *offsetp, 4, byte_order);
13592 *offsetp += 4;
13593 f_num_stops = tvb_get_uint32(tvb, *offsetp, byte_order);
13594 proto_tree_add_item(t, hf_x11_render_CreateRadialGradient_num_stops, tvb, *offsetp, 4, byte_order);
13595 *offsetp += 4;
13596 listOfInt32(tvb, offsetp, t, hf_x11_render_CreateRadialGradient_stops, hf_x11_render_CreateRadialGradient_stops_item, f_num_stops, byte_order);
13597 length -= f_num_stops * 4;
13598 struct_render_COLOR(tvb, offsetp, t, byte_order, f_num_stops);
13599 length -= f_num_stops * 8;
13600}
13601
13602static void renderCreateConicalGradient(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
13603{
13604 int f_num_stops;
13605 proto_tree_add_item(t, hf_x11_render_CreateConicalGradient_picture, tvb, *offsetp, 4, byte_order);
13606 *offsetp += 4;
13607 struct_render_POINTFIX(tvb, offsetp, t, byte_order, 1);
13608 proto_tree_add_item(t, hf_x11_render_CreateConicalGradient_angle, tvb, *offsetp, 4, byte_order);
13609 *offsetp += 4;
13610 f_num_stops = tvb_get_uint32(tvb, *offsetp, byte_order);
13611 proto_tree_add_item(t, hf_x11_render_CreateConicalGradient_num_stops, tvb, *offsetp, 4, byte_order);
13612 *offsetp += 4;
13613 listOfInt32(tvb, offsetp, t, hf_x11_render_CreateConicalGradient_stops, hf_x11_render_CreateConicalGradient_stops_item, f_num_stops, byte_order);
13614 length -= f_num_stops * 4;
13615 struct_render_COLOR(tvb, offsetp, t, byte_order, f_num_stops);
13616 length -= f_num_stops * 8;
13617}
13618static const value_string render_extension_minor[] = {
13619 { 0, "QueryVersion" },
13620 { 1, "QueryPictFormats" },
13621 { 2, "QueryPictIndexValues" },
13622 { 4, "CreatePicture" },
13623 { 5, "ChangePicture" },
13624 { 6, "SetPictureClipRectangles" },
13625 { 7, "FreePicture" },
13626 { 8, "Composite" },
13627 { 10, "Trapezoids" },
13628 { 11, "Triangles" },
13629 { 12, "TriStrip" },
13630 { 13, "TriFan" },
13631 { 17, "CreateGlyphSet" },
13632 { 18, "ReferenceGlyphSet" },
13633 { 19, "FreeGlyphSet" },
13634 { 20, "AddGlyphs" },
13635 { 22, "FreeGlyphs" },
13636 { 23, "CompositeGlyphs8" },
13637 { 24, "CompositeGlyphs16" },
13638 { 25, "CompositeGlyphs32" },
13639 { 26, "FillRectangles" },
13640 { 27, "CreateCursor" },
13641 { 28, "SetPictureTransform" },
13642 { 29, "QueryFilters" },
13643 { 30, "SetPictureFilter" },
13644 { 31, "CreateAnimCursor" },
13645 { 32, "AddTraps" },
13646 { 33, "CreateSolidFill" },
13647 { 34, "CreateLinearGradient" },
13648 { 35, "CreateRadialGradient" },
13649 { 36, "CreateConicalGradient" },
13650 { 0, NULL }
13651};
13652static const x11_event_info render_events[] = {
13653 { NULL, NULL }
13654};
13655static const x11_reply_info render_replies[] = {
13656 { 0, renderQueryVersion_Reply },
13657 { 1, renderQueryPictFormats_Reply },
13658 { 2, renderQueryPictIndexValues_Reply },
13659 { 29, renderQueryFilters_Reply },
13660 { 0, NULL }
13661};
13662
13663static void dispatch_render(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
13664{
13665 int minor, length;
13666 minor = CARD8(render_extension_minor);
13667 length = REQUEST_LENGTH();
13668
13669 col_append_fstr(pinfo->cinfo, COL_INFO, "-%s",
13670 val_to_str(minor, render_extension_minor,
13671 "<Unknown opcode %d>"));
13672 switch (minor) {
13673 case 0:
13674 renderQueryVersion(tvb, pinfo, offsetp, t, byte_order, length);
13675 break;
13676 case 1:
13677 renderQueryPictFormats(tvb, pinfo, offsetp, t, byte_order, length);
13678 break;
13679 case 2:
13680 renderQueryPictIndexValues(tvb, pinfo, offsetp, t, byte_order, length);
13681 break;
13682 case 4:
13683 renderCreatePicture(tvb, pinfo, offsetp, t, byte_order, length);
13684 break;
13685 case 5:
13686 renderChangePicture(tvb, pinfo, offsetp, t, byte_order, length);
13687 break;
13688 case 6:
13689 renderSetPictureClipRectangles(tvb, pinfo, offsetp, t, byte_order, length);
13690 break;
13691 case 7:
13692 renderFreePicture(tvb, pinfo, offsetp, t, byte_order, length);
13693 break;
13694 case 8:
13695 renderComposite(tvb, pinfo, offsetp, t, byte_order, length);
13696 break;
13697 case 10:
13698 renderTrapezoids(tvb, pinfo, offsetp, t, byte_order, length);
13699 break;
13700 case 11:
13701 renderTriangles(tvb, pinfo, offsetp, t, byte_order, length);
13702 break;
13703 case 12:
13704 renderTriStrip(tvb, pinfo, offsetp, t, byte_order, length);
13705 break;
13706 case 13:
13707 renderTriFan(tvb, pinfo, offsetp, t, byte_order, length);
13708 break;
13709 case 17:
13710 renderCreateGlyphSet(tvb, pinfo, offsetp, t, byte_order, length);
13711 break;
13712 case 18:
13713 renderReferenceGlyphSet(tvb, pinfo, offsetp, t, byte_order, length);
13714 break;
13715 case 19:
13716 renderFreeGlyphSet(tvb, pinfo, offsetp, t, byte_order, length);
13717 break;
13718 case 20:
13719 renderAddGlyphs(tvb, pinfo, offsetp, t, byte_order, length);
13720 break;
13721 case 22:
13722 renderFreeGlyphs(tvb, pinfo, offsetp, t, byte_order, length);
13723 break;
13724 case 23:
13725 renderCompositeGlyphs8(tvb, pinfo, offsetp, t, byte_order, length);
13726 break;
13727 case 24:
13728 renderCompositeGlyphs16(tvb, pinfo, offsetp, t, byte_order, length);
13729 break;
13730 case 25:
13731 renderCompositeGlyphs32(tvb, pinfo, offsetp, t, byte_order, length);
13732 break;
13733 case 26:
13734 renderFillRectangles(tvb, pinfo, offsetp, t, byte_order, length);
13735 break;
13736 case 27:
13737 renderCreateCursor(tvb, pinfo, offsetp, t, byte_order, length);
13738 break;
13739 case 28:
13740 renderSetPictureTransform(tvb, pinfo, offsetp, t, byte_order, length);
13741 break;
13742 case 29:
13743 renderQueryFilters(tvb, pinfo, offsetp, t, byte_order, length);
13744 break;
13745 case 30:
13746 renderSetPictureFilter(tvb, pinfo, offsetp, t, byte_order, length);
13747 break;
13748 case 31:
13749 renderCreateAnimCursor(tvb, pinfo, offsetp, t, byte_order, length);
13750 break;
13751 case 32:
13752 renderAddTraps(tvb, pinfo, offsetp, t, byte_order, length);
13753 break;
13754 case 33:
13755 renderCreateSolidFill(tvb, pinfo, offsetp, t, byte_order, length);
13756 break;
13757 case 34:
13758 renderCreateLinearGradient(tvb, pinfo, offsetp, t, byte_order, length);
13759 break;
13760 case 35:
13761 renderCreateRadialGradient(tvb, pinfo, offsetp, t, byte_order, length);
13762 break;
13763 case 36:
13764 renderCreateConicalGradient(tvb, pinfo, offsetp, t, byte_order, length);
13765 break;
13766 /* No need for a default case here, since Unknown is printed above,
13767 and UNDECODED() is taken care of by dissect_x11_request */
13768 }
13769}
13770
13771static void register_render(void)
13772{
13773 set_handler("RENDER", dispatch_render, render_errors, render_events, NULL, render_replies);
13774}
13775
13776static void struct_res_Client(tvbuff_t *tvb, int *offsetp, proto_tree *root, unsigned byte_order _U_, int count)
13777{
13778 int i;
13779 for (i = 0; i < count; i++) {
13780 proto_item *item;
13781 proto_tree *t;
13782
13783 item = proto_tree_add_item(root, hf_x11_struct_res_Client, tvb, *offsetp, 8, ENC_NA);
13784 t = proto_item_add_subtree(item, ett_x11_rectangle);
13785 proto_tree_add_item(t, hf_x11_struct_res_Client_resource_base, tvb, *offsetp, 4, byte_order);
13786 *offsetp += 4;
13787 proto_tree_add_item(t, hf_x11_struct_res_Client_resource_mask, tvb, *offsetp, 4, byte_order);
13788 *offsetp += 4;
13789 }
13790}
13791
13792static void struct_res_Type(tvbuff_t *tvb, int *offsetp, proto_tree *root, unsigned byte_order _U_, int count)
13793{
13794 int i;
13795 for (i = 0; i < count; i++) {
13796 proto_item *item;
13797 proto_tree *t;
13798
13799 item = proto_tree_add_item(root, hf_x11_struct_res_Type, tvb, *offsetp, 8, ENC_NA);
13800 t = proto_item_add_subtree(item, ett_x11_rectangle);
13801 proto_tree_add_item(t, hf_x11_struct_res_Type_resource_type, tvb, *offsetp, 4, byte_order);
13802 *offsetp += 4;
13803 proto_tree_add_item(t, hf_x11_struct_res_Type_count, tvb, *offsetp, 4, byte_order);
13804 *offsetp += 4;
13805 }
13806}
13807
13808static void struct_res_ClientIdSpec(tvbuff_t *tvb, int *offsetp, proto_tree *root, unsigned byte_order _U_, int count)
13809{
13810 int i;
13811 for (i = 0; i < count; i++) {
13812 proto_item *item;
13813 proto_tree *t;
13814
13815 item = proto_tree_add_item(root, hf_x11_struct_res_ClientIdSpec, tvb, *offsetp, 8, ENC_NA);
13816 t = proto_item_add_subtree(item, ett_x11_rectangle);
13817 proto_tree_add_item(t, hf_x11_struct_res_ClientIdSpec_client, tvb, *offsetp, 4, byte_order);
13818 *offsetp += 4;
13819 {
13820 static int* const mask_bits [] = {
13821 &hf_x11_struct_res_ClientIdSpec_mask_mask_ClientXID,
13822 &hf_x11_struct_res_ClientIdSpec_mask_mask_LocalClientPID,
13823 NULL
13824 };
13825 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_struct_res_ClientIdSpec_mask, ett_x11_rectangle, mask_bits, byte_order);
13826 }
13827 *offsetp += 4;
13828 }
13829}
13830
13831static int struct_size_res_ClientIdValue(tvbuff_t *tvb _U_, int *offsetp _U_, unsigned byte_order _U_)
13832{
13833 int size = 0;
13834 int f_length;
13835 f_length = tvb_get_uint32(tvb, *offsetp + size + 8, byte_order);
13836 size += (f_length / 4) * 4;
13837 return size + 12;
13838}
13839
13840static void struct_res_ClientIdValue(tvbuff_t *tvb, int *offsetp, proto_tree *root, unsigned byte_order _U_, int count)
13841{
13842 int i;
13843 for (i = 0; i < count; i++) {
13844 proto_item *item;
13845 proto_tree *t;
13846 int f_length;
13847
13848 item = proto_tree_add_item(root, hf_x11_struct_res_ClientIdValue, tvb, *offsetp, struct_size_res_ClientIdValue(tvb, offsetp, byte_order), ENC_NA);
13849 t = proto_item_add_subtree(item, ett_x11_rectangle);
13850 struct_res_ClientIdSpec(tvb, offsetp, t, byte_order, 1);
13851 f_length = tvb_get_uint32(tvb, *offsetp, byte_order);
13852 proto_tree_add_item(t, hf_x11_struct_res_ClientIdValue_length, tvb, *offsetp, 4, byte_order);
13853 *offsetp += 4;
13854 listOfCard32(tvb, offsetp, t, hf_x11_struct_res_ClientIdValue_value, hf_x11_struct_res_ClientIdValue_value_item, (f_length / 4), byte_order);
13855 }
13856}
13857
13858static void struct_res_ResourceIdSpec(tvbuff_t *tvb, int *offsetp, proto_tree *root, unsigned byte_order _U_, int count)
13859{
13860 int i;
13861 for (i = 0; i < count; i++) {
13862 proto_item *item;
13863 proto_tree *t;
13864
13865 item = proto_tree_add_item(root, hf_x11_struct_res_ResourceIdSpec, tvb, *offsetp, 8, ENC_NA);
13866 t = proto_item_add_subtree(item, ett_x11_rectangle);
13867 proto_tree_add_item(t, hf_x11_struct_res_ResourceIdSpec_resource, tvb, *offsetp, 4, byte_order);
13868 *offsetp += 4;
13869 proto_tree_add_item(t, hf_x11_struct_res_ResourceIdSpec_type, tvb, *offsetp, 4, byte_order);
13870 *offsetp += 4;
13871 }
13872}
13873
13874static void struct_res_ResourceSizeSpec(tvbuff_t *tvb, int *offsetp, proto_tree *root, unsigned byte_order _U_, int count)
13875{
13876 int i;
13877 for (i = 0; i < count; i++) {
13878 proto_item *item;
13879 proto_tree *t;
13880
13881 item = proto_tree_add_item(root, hf_x11_struct_res_ResourceSizeSpec, tvb, *offsetp, 20, ENC_NA);
13882 t = proto_item_add_subtree(item, ett_x11_rectangle);
13883 struct_res_ResourceIdSpec(tvb, offsetp, t, byte_order, 1);
13884 proto_tree_add_item(t, hf_x11_struct_res_ResourceSizeSpec_bytes, tvb, *offsetp, 4, byte_order);
13885 *offsetp += 4;
13886 proto_tree_add_item(t, hf_x11_struct_res_ResourceSizeSpec_ref_count, tvb, *offsetp, 4, byte_order);
13887 *offsetp += 4;
13888 proto_tree_add_item(t, hf_x11_struct_res_ResourceSizeSpec_use_count, tvb, *offsetp, 4, byte_order);
13889 *offsetp += 4;
13890 }
13891}
13892
13893static int struct_size_res_ResourceSizeValue(tvbuff_t *tvb _U_, int *offsetp _U_, unsigned byte_order _U_)
13894{
13895 int size = 0;
13896 int f_num_cross_references;
13897 f_num_cross_references = tvb_get_uint32(tvb, *offsetp + size + 20, byte_order);
13898 size += f_num_cross_references * 20;
13899 return size + 24;
13900}
13901
13902static void struct_res_ResourceSizeValue(tvbuff_t *tvb, int *offsetp, proto_tree *root, unsigned byte_order _U_, int count)
13903{
13904 int i;
13905 for (i = 0; i < count; i++) {
13906 proto_item *item;
13907 proto_tree *t;
13908 int f_num_cross_references;
13909
13910 item = proto_tree_add_item(root, hf_x11_struct_res_ResourceSizeValue, tvb, *offsetp, struct_size_res_ResourceSizeValue(tvb, offsetp, byte_order), ENC_NA);
13911 t = proto_item_add_subtree(item, ett_x11_rectangle);
13912 struct_res_ResourceSizeSpec(tvb, offsetp, t, byte_order, 1);
13913 f_num_cross_references = tvb_get_uint32(tvb, *offsetp, byte_order);
13914 proto_tree_add_item(t, hf_x11_struct_res_ResourceSizeValue_num_cross_references, tvb, *offsetp, 4, byte_order);
13915 *offsetp += 4;
13916 struct_res_ResourceSizeSpec(tvb, offsetp, t, byte_order, f_num_cross_references);
13917 }
13918}
13919
13920static void resQueryVersion(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
13921{
13922 proto_tree_add_item(t, hf_x11_res_QueryVersion_client_major, tvb, *offsetp, 1, byte_order);
13923 *offsetp += 1;
13924 proto_tree_add_item(t, hf_x11_res_QueryVersion_client_minor, tvb, *offsetp, 1, byte_order);
13925 *offsetp += 1;
13926}
13927static void resQueryVersion_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
13928{
13929 int sequence_number;
13930
13931 col_append_fstr(pinfo->cinfo, COL_INFO, "-QueryVersion");
13932
13933 REPLY(reply);
13934 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
13935 *offsetp += 1;
13936 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
13937 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
13938 "%d (res-QueryVersion)", sequence_number);
13939 *offsetp += 2;
13940 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
13941 *offsetp += 4;
13942 proto_tree_add_item(t, hf_x11_res_QueryVersion_reply_server_major, tvb, *offsetp, 2, byte_order);
13943 *offsetp += 2;
13944 proto_tree_add_item(t, hf_x11_res_QueryVersion_reply_server_minor, tvb, *offsetp, 2, byte_order);
13945 *offsetp += 2;
13946}
13947
13948static void resQueryClients(tvbuff_t *tvb _U_, packet_info *pinfo _U_, int *offsetp _U_, proto_tree *t _U_, unsigned byte_order _U_, int length _U_)
13949{
13950}
13951static void resQueryClients_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
13952{
13953 int sequence_number;
13954 int f_num_clients;
13955
13956 col_append_fstr(pinfo->cinfo, COL_INFO, "-QueryClients");
13957
13958 REPLY(reply);
13959 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
13960 *offsetp += 1;
13961 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
13962 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
13963 "%d (res-QueryClients)", sequence_number);
13964 *offsetp += 2;
13965 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
13966 *offsetp += 4;
13967 f_num_clients = tvb_get_uint32(tvb, *offsetp, byte_order);
13968 proto_tree_add_item(t, hf_x11_res_QueryClients_reply_num_clients, tvb, *offsetp, 4, byte_order);
13969 *offsetp += 4;
13970 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 20, ENC_NA);
13971 *offsetp += 20;
13972 struct_res_Client(tvb, offsetp, t, byte_order, f_num_clients);
13973}
13974
13975static void resQueryClientResources(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
13976{
13977 proto_tree_add_item(t, hf_x11_res_QueryClientResources_xid, tvb, *offsetp, 4, byte_order);
13978 *offsetp += 4;
13979}
13980static void resQueryClientResources_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
13981{
13982 int sequence_number;
13983 int f_num_types;
13984
13985 col_append_fstr(pinfo->cinfo, COL_INFO, "-QueryClientResources");
13986
13987 REPLY(reply);
13988 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
13989 *offsetp += 1;
13990 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
13991 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
13992 "%d (res-QueryClientResources)", sequence_number);
13993 *offsetp += 2;
13994 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
13995 *offsetp += 4;
13996 f_num_types = tvb_get_uint32(tvb, *offsetp, byte_order);
13997 proto_tree_add_item(t, hf_x11_res_QueryClientResources_reply_num_types, tvb, *offsetp, 4, byte_order);
13998 *offsetp += 4;
13999 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 20, ENC_NA);
14000 *offsetp += 20;
14001 struct_res_Type(tvb, offsetp, t, byte_order, f_num_types);
14002}
14003
14004static void resQueryClientPixmapBytes(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
14005{
14006 proto_tree_add_item(t, hf_x11_res_QueryClientPixmapBytes_xid, tvb, *offsetp, 4, byte_order);
14007 *offsetp += 4;
14008}
14009static void resQueryClientPixmapBytes_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
14010{
14011 int sequence_number;
14012
14013 col_append_fstr(pinfo->cinfo, COL_INFO, "-QueryClientPixmapBytes");
14014
14015 REPLY(reply);
14016 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
14017 *offsetp += 1;
14018 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
14019 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
14020 "%d (res-QueryClientPixmapBytes)", sequence_number);
14021 *offsetp += 2;
14022 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
14023 *offsetp += 4;
14024 proto_tree_add_item(t, hf_x11_res_QueryClientPixmapBytes_reply_bytes, tvb, *offsetp, 4, byte_order);
14025 *offsetp += 4;
14026 proto_tree_add_item(t, hf_x11_res_QueryClientPixmapBytes_reply_bytes_overflow, tvb, *offsetp, 4, byte_order);
14027 *offsetp += 4;
14028}
14029
14030static void resQueryClientIds(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
14031{
14032 int f_num_specs;
14033 f_num_specs = tvb_get_uint32(tvb, *offsetp, byte_order);
14034 proto_tree_add_item(t, hf_x11_res_QueryClientIds_num_specs, tvb, *offsetp, 4, byte_order);
14035 *offsetp += 4;
14036 struct_res_ClientIdSpec(tvb, offsetp, t, byte_order, f_num_specs);
14037 length -= f_num_specs * 8;
14038}
14039static void resQueryClientIds_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
14040{
14041 int sequence_number;
14042 int f_num_ids;
14043
14044 col_append_fstr(pinfo->cinfo, COL_INFO, "-QueryClientIds");
14045
14046 REPLY(reply);
14047 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
14048 *offsetp += 1;
14049 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
14050 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
14051 "%d (res-QueryClientIds)", sequence_number);
14052 *offsetp += 2;
14053 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
14054 *offsetp += 4;
14055 f_num_ids = tvb_get_uint32(tvb, *offsetp, byte_order);
14056 proto_tree_add_item(t, hf_x11_res_QueryClientIds_reply_num_ids, tvb, *offsetp, 4, byte_order);
14057 *offsetp += 4;
14058 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 20, ENC_NA);
14059 *offsetp += 20;
14060 struct_res_ClientIdValue(tvb, offsetp, t, byte_order, f_num_ids);
14061}
14062
14063static void resQueryResourceBytes(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
14064{
14065 int f_num_specs;
14066 proto_tree_add_item(t, hf_x11_res_QueryResourceBytes_client, tvb, *offsetp, 4, byte_order);
14067 *offsetp += 4;
14068 f_num_specs = tvb_get_uint32(tvb, *offsetp, byte_order);
14069 proto_tree_add_item(t, hf_x11_res_QueryResourceBytes_num_specs, tvb, *offsetp, 4, byte_order);
14070 *offsetp += 4;
14071 struct_res_ResourceIdSpec(tvb, offsetp, t, byte_order, f_num_specs);
14072 length -= f_num_specs * 8;
14073}
14074static void resQueryResourceBytes_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
14075{
14076 int sequence_number;
14077 int f_num_sizes;
14078
14079 col_append_fstr(pinfo->cinfo, COL_INFO, "-QueryResourceBytes");
14080
14081 REPLY(reply);
14082 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
14083 *offsetp += 1;
14084 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
14085 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
14086 "%d (res-QueryResourceBytes)", sequence_number);
14087 *offsetp += 2;
14088 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
14089 *offsetp += 4;
14090 f_num_sizes = tvb_get_uint32(tvb, *offsetp, byte_order);
14091 proto_tree_add_item(t, hf_x11_res_QueryResourceBytes_reply_num_sizes, tvb, *offsetp, 4, byte_order);
14092 *offsetp += 4;
14093 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 20, ENC_NA);
14094 *offsetp += 20;
14095 struct_res_ResourceSizeValue(tvb, offsetp, t, byte_order, f_num_sizes);
14096}
14097static const value_string res_extension_minor[] = {
14098 { 0, "QueryVersion" },
14099 { 1, "QueryClients" },
14100 { 2, "QueryClientResources" },
14101 { 3, "QueryClientPixmapBytes" },
14102 { 4, "QueryClientIds" },
14103 { 5, "QueryResourceBytes" },
14104 { 0, NULL }
14105};
14106static const x11_event_info res_events[] = {
14107 { NULL, NULL }
14108};
14109static const x11_reply_info res_replies[] = {
14110 { 0, resQueryVersion_Reply },
14111 { 1, resQueryClients_Reply },
14112 { 2, resQueryClientResources_Reply },
14113 { 3, resQueryClientPixmapBytes_Reply },
14114 { 4, resQueryClientIds_Reply },
14115 { 5, resQueryResourceBytes_Reply },
14116 { 0, NULL }
14117};
14118
14119static void dispatch_res(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
14120{
14121 int minor, length;
14122 minor = CARD8(res_extension_minor);
14123 length = REQUEST_LENGTH();
14124
14125 col_append_fstr(pinfo->cinfo, COL_INFO, "-%s",
14126 val_to_str(minor, res_extension_minor,
14127 "<Unknown opcode %d>"));
14128 switch (minor) {
14129 case 0:
14130 resQueryVersion(tvb, pinfo, offsetp, t, byte_order, length);
14131 break;
14132 case 1:
14133 resQueryClients(tvb, pinfo, offsetp, t, byte_order, length);
14134 break;
14135 case 2:
14136 resQueryClientResources(tvb, pinfo, offsetp, t, byte_order, length);
14137 break;
14138 case 3:
14139 resQueryClientPixmapBytes(tvb, pinfo, offsetp, t, byte_order, length);
14140 break;
14141 case 4:
14142 resQueryClientIds(tvb, pinfo, offsetp, t, byte_order, length);
14143 break;
14144 case 5:
14145 resQueryResourceBytes(tvb, pinfo, offsetp, t, byte_order, length);
14146 break;
14147 /* No need for a default case here, since Unknown is printed above,
14148 and UNDECODED() is taken care of by dissect_x11_request */
14149 }
14150}
14151
14152static void register_res(void)
14153{
14154 set_handler("X-Resource", dispatch_res, res_errors, res_events, NULL, res_replies);
14155}
14156
14157static void screensaverQueryVersion(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
14158{
14159 proto_tree_add_item(t, hf_x11_screensaver_QueryVersion_client_major_version, tvb, *offsetp, 1, byte_order);
14160 *offsetp += 1;
14161 proto_tree_add_item(t, hf_x11_screensaver_QueryVersion_client_minor_version, tvb, *offsetp, 1, byte_order);
14162 *offsetp += 1;
14163 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 2, ENC_NA);
14164 *offsetp += 2;
14165}
14166static void screensaverQueryVersion_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
14167{
14168 int sequence_number;
14169
14170 col_append_fstr(pinfo->cinfo, COL_INFO, "-QueryVersion");
14171
14172 REPLY(reply);
14173 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
14174 *offsetp += 1;
14175 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
14176 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
14177 "%d (screensaver-QueryVersion)", sequence_number);
14178 *offsetp += 2;
14179 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
14180 *offsetp += 4;
14181 proto_tree_add_item(t, hf_x11_screensaver_QueryVersion_reply_server_major_version, tvb, *offsetp, 2, byte_order);
14182 *offsetp += 2;
14183 proto_tree_add_item(t, hf_x11_screensaver_QueryVersion_reply_server_minor_version, tvb, *offsetp, 2, byte_order);
14184 *offsetp += 2;
14185 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 20, ENC_NA);
14186 *offsetp += 20;
14187}
14188
14189static void screensaverQueryInfo(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
14190{
14191 proto_tree_add_item(t, hf_x11_screensaver_QueryInfo_drawable, tvb, *offsetp, 4, byte_order);
14192 *offsetp += 4;
14193}
14194static void screensaverQueryInfo_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
14195{
14196 int sequence_number;
14197
14198 col_append_fstr(pinfo->cinfo, COL_INFO, "-QueryInfo");
14199
14200 REPLY(reply);
14201 proto_tree_add_item(t, hf_x11_screensaver_QueryInfo_reply_state, tvb, *offsetp, 1, byte_order);
14202 *offsetp += 1;
14203 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
14204 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
14205 "%d (screensaver-QueryInfo)", sequence_number);
14206 *offsetp += 2;
14207 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
14208 *offsetp += 4;
14209 proto_tree_add_item(t, hf_x11_screensaver_QueryInfo_reply_saver_window, tvb, *offsetp, 4, byte_order);
14210 *offsetp += 4;
14211 proto_tree_add_item(t, hf_x11_screensaver_QueryInfo_reply_ms_until_server, tvb, *offsetp, 4, byte_order);
14212 *offsetp += 4;
14213 proto_tree_add_item(t, hf_x11_screensaver_QueryInfo_reply_ms_since_user_input, tvb, *offsetp, 4, byte_order);
14214 *offsetp += 4;
14215 proto_tree_add_item(t, hf_x11_screensaver_QueryInfo_reply_event_mask, tvb, *offsetp, 4, byte_order);
14216 *offsetp += 4;
14217 field8(tvb, offsetp, t, hf_x11_screensaver_QueryInfo_reply_kind, byte_order);
14218 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 7, ENC_NA);
14219 *offsetp += 7;
14220}
14221
14222static void screensaverSelectInput(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
14223{
14224 proto_tree_add_item(t, hf_x11_screensaver_SelectInput_drawable, tvb, *offsetp, 4, byte_order);
14225 *offsetp += 4;
14226 {
14227 static int* const event_mask_bits [] = {
14228 &hf_x11_screensaver_SelectInput_event_mask_mask_NotifyMask,
14229 &hf_x11_screensaver_SelectInput_event_mask_mask_CycleMask,
14230 NULL
14231 };
14232 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_screensaver_SelectInput_event_mask, ett_x11_rectangle, event_mask_bits, byte_order);
14233 }
14234 *offsetp += 4;
14235}
14236
14237static void screensaverSetAttributes(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
14238{
14239 int f_value_mask;
14240 proto_tree_add_item(t, hf_x11_screensaver_SetAttributes_drawable, tvb, *offsetp, 4, byte_order);
14241 *offsetp += 4;
14242 proto_tree_add_item(t, hf_x11_screensaver_SetAttributes_x, tvb, *offsetp, 2, byte_order);
14243 *offsetp += 2;
14244 proto_tree_add_item(t, hf_x11_screensaver_SetAttributes_y, tvb, *offsetp, 2, byte_order);
14245 *offsetp += 2;
14246 proto_tree_add_item(t, hf_x11_screensaver_SetAttributes_width, tvb, *offsetp, 2, byte_order);
14247 *offsetp += 2;
14248 proto_tree_add_item(t, hf_x11_screensaver_SetAttributes_height, tvb, *offsetp, 2, byte_order);
14249 *offsetp += 2;
14250 proto_tree_add_item(t, hf_x11_screensaver_SetAttributes_border_width, tvb, *offsetp, 2, byte_order);
14251 *offsetp += 2;
14252 field8(tvb, offsetp, t, hf_x11_screensaver_SetAttributes_class, byte_order);
14253 proto_tree_add_item(t, hf_x11_screensaver_SetAttributes_depth, tvb, *offsetp, 1, byte_order);
14254 *offsetp += 1;
14255 proto_tree_add_item(t, hf_x11_screensaver_SetAttributes_visual, tvb, *offsetp, 4, byte_order);
14256 *offsetp += 4;
14257 f_value_mask = tvb_get_uint32(tvb, *offsetp, byte_order);
14258 {
14259 static int* const value_mask_bits [] = {
14260 &hf_x11_screensaver_SetAttributes_value_mask_mask_BackPixmap,
14261 &hf_x11_screensaver_SetAttributes_value_mask_mask_BackPixel,
14262 &hf_x11_screensaver_SetAttributes_value_mask_mask_BorderPixmap,
14263 &hf_x11_screensaver_SetAttributes_value_mask_mask_BorderPixel,
14264 &hf_x11_screensaver_SetAttributes_value_mask_mask_BitGravity,
14265 &hf_x11_screensaver_SetAttributes_value_mask_mask_WinGravity,
14266 &hf_x11_screensaver_SetAttributes_value_mask_mask_BackingStore,
14267 &hf_x11_screensaver_SetAttributes_value_mask_mask_BackingPlanes,
14268 &hf_x11_screensaver_SetAttributes_value_mask_mask_BackingPixel,
14269 &hf_x11_screensaver_SetAttributes_value_mask_mask_OverrideRedirect,
14270 &hf_x11_screensaver_SetAttributes_value_mask_mask_SaveUnder,
14271 &hf_x11_screensaver_SetAttributes_value_mask_mask_EventMask,
14272 &hf_x11_screensaver_SetAttributes_value_mask_mask_DontPropagate,
14273 &hf_x11_screensaver_SetAttributes_value_mask_mask_Colormap,
14274 &hf_x11_screensaver_SetAttributes_value_mask_mask_Cursor,
14275 NULL
14276 };
14277 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_screensaver_SetAttributes_value_mask, ett_x11_rectangle, value_mask_bits, byte_order);
14278 }
14279 *offsetp += 4;
14280 if (f_value_mask & (1U << 0)) {
14281 field32(tvb, offsetp, t, hf_x11_screensaver_SetAttributes_BackPixmap_background_pixmap, byte_order);
14282 }
14283 if (f_value_mask & (1U << 1)) {
14284 proto_tree_add_item(t, hf_x11_screensaver_SetAttributes_BackPixel_background_pixel, tvb, *offsetp, 4, byte_order);
14285 *offsetp += 4;
14286 }
14287 if (f_value_mask & (1U << 2)) {
14288 field32(tvb, offsetp, t, hf_x11_screensaver_SetAttributes_BorderPixmap_border_pixmap, byte_order);
14289 }
14290 if (f_value_mask & (1U << 3)) {
14291 proto_tree_add_item(t, hf_x11_screensaver_SetAttributes_BorderPixel_border_pixel, tvb, *offsetp, 4, byte_order);
14292 *offsetp += 4;
14293 }
14294 if (f_value_mask & (1U << 4)) {
14295 field32(tvb, offsetp, t, hf_x11_screensaver_SetAttributes_BitGravity_bit_gravity, byte_order);
14296 }
14297 if (f_value_mask & (1U << 5)) {
14298 field32(tvb, offsetp, t, hf_x11_screensaver_SetAttributes_WinGravity_win_gravity, byte_order);
14299 }
14300 if (f_value_mask & (1U << 6)) {
14301 field32(tvb, offsetp, t, hf_x11_screensaver_SetAttributes_BackingStore_backing_store, byte_order);
14302 }
14303 if (f_value_mask & (1U << 7)) {
14304 proto_tree_add_item(t, hf_x11_screensaver_SetAttributes_BackingPlanes_backing_planes, tvb, *offsetp, 4, byte_order);
14305 *offsetp += 4;
14306 }
14307 if (f_value_mask & (1U << 8)) {
14308 proto_tree_add_item(t, hf_x11_screensaver_SetAttributes_BackingPixel_backing_pixel, tvb, *offsetp, 4, byte_order);
14309 *offsetp += 4;
14310 }
14311 if (f_value_mask & (1U << 9)) {
14312 proto_tree_add_item(t, hf_x11_screensaver_SetAttributes_OverrideRedirect_override_redirect, tvb, *offsetp, 4, byte_order);
14313 *offsetp += 4;
14314 }
14315 if (f_value_mask & (1U << 10)) {
14316 proto_tree_add_item(t, hf_x11_screensaver_SetAttributes_SaveUnder_save_under, tvb, *offsetp, 4, byte_order);
14317 *offsetp += 4;
14318 }
14319 if (f_value_mask & (1U << 11)) {
14320 {
14321 static int* const event_mask_bits [] = {
14322 &hf_x11_screensaver_SetAttributes_EventMask_event_mask_mask_KeyPress,
14323 &hf_x11_screensaver_SetAttributes_EventMask_event_mask_mask_KeyRelease,
14324 &hf_x11_screensaver_SetAttributes_EventMask_event_mask_mask_ButtonPress,
14325 &hf_x11_screensaver_SetAttributes_EventMask_event_mask_mask_ButtonRelease,
14326 &hf_x11_screensaver_SetAttributes_EventMask_event_mask_mask_EnterWindow,
14327 &hf_x11_screensaver_SetAttributes_EventMask_event_mask_mask_LeaveWindow,
14328 &hf_x11_screensaver_SetAttributes_EventMask_event_mask_mask_PointerMotion,
14329 &hf_x11_screensaver_SetAttributes_EventMask_event_mask_mask_PointerMotionHint,
14330 &hf_x11_screensaver_SetAttributes_EventMask_event_mask_mask_Button1Motion,
14331 &hf_x11_screensaver_SetAttributes_EventMask_event_mask_mask_Button2Motion,
14332 &hf_x11_screensaver_SetAttributes_EventMask_event_mask_mask_Button3Motion,
14333 &hf_x11_screensaver_SetAttributes_EventMask_event_mask_mask_Button4Motion,
14334 &hf_x11_screensaver_SetAttributes_EventMask_event_mask_mask_Button5Motion,
14335 &hf_x11_screensaver_SetAttributes_EventMask_event_mask_mask_ButtonMotion,
14336 &hf_x11_screensaver_SetAttributes_EventMask_event_mask_mask_KeymapState,
14337 &hf_x11_screensaver_SetAttributes_EventMask_event_mask_mask_Exposure,
14338 &hf_x11_screensaver_SetAttributes_EventMask_event_mask_mask_VisibilityChange,
14339 &hf_x11_screensaver_SetAttributes_EventMask_event_mask_mask_StructureNotify,
14340 &hf_x11_screensaver_SetAttributes_EventMask_event_mask_mask_ResizeRedirect,
14341 &hf_x11_screensaver_SetAttributes_EventMask_event_mask_mask_SubstructureNotify,
14342 &hf_x11_screensaver_SetAttributes_EventMask_event_mask_mask_SubstructureRedirect,
14343 &hf_x11_screensaver_SetAttributes_EventMask_event_mask_mask_FocusChange,
14344 &hf_x11_screensaver_SetAttributes_EventMask_event_mask_mask_PropertyChange,
14345 &hf_x11_screensaver_SetAttributes_EventMask_event_mask_mask_ColorMapChange,
14346 &hf_x11_screensaver_SetAttributes_EventMask_event_mask_mask_OwnerGrabButton,
14347 NULL
14348 };
14349 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_screensaver_SetAttributes_EventMask_event_mask, ett_x11_rectangle, event_mask_bits, byte_order);
14350 }
14351 *offsetp += 4;
14352 }
14353 if (f_value_mask & (1U << 12)) {
14354 {
14355 static int* const do_not_propogate_mask_bits [] = {
14356 &hf_x11_screensaver_SetAttributes_DontPropagate_do_not_propogate_mask_mask_KeyPress,
14357 &hf_x11_screensaver_SetAttributes_DontPropagate_do_not_propogate_mask_mask_KeyRelease,
14358 &hf_x11_screensaver_SetAttributes_DontPropagate_do_not_propogate_mask_mask_ButtonPress,
14359 &hf_x11_screensaver_SetAttributes_DontPropagate_do_not_propogate_mask_mask_ButtonRelease,
14360 &hf_x11_screensaver_SetAttributes_DontPropagate_do_not_propogate_mask_mask_EnterWindow,
14361 &hf_x11_screensaver_SetAttributes_DontPropagate_do_not_propogate_mask_mask_LeaveWindow,
14362 &hf_x11_screensaver_SetAttributes_DontPropagate_do_not_propogate_mask_mask_PointerMotion,
14363 &hf_x11_screensaver_SetAttributes_DontPropagate_do_not_propogate_mask_mask_PointerMotionHint,
14364 &hf_x11_screensaver_SetAttributes_DontPropagate_do_not_propogate_mask_mask_Button1Motion,
14365 &hf_x11_screensaver_SetAttributes_DontPropagate_do_not_propogate_mask_mask_Button2Motion,
14366 &hf_x11_screensaver_SetAttributes_DontPropagate_do_not_propogate_mask_mask_Button3Motion,
14367 &hf_x11_screensaver_SetAttributes_DontPropagate_do_not_propogate_mask_mask_Button4Motion,
14368 &hf_x11_screensaver_SetAttributes_DontPropagate_do_not_propogate_mask_mask_Button5Motion,
14369 &hf_x11_screensaver_SetAttributes_DontPropagate_do_not_propogate_mask_mask_ButtonMotion,
14370 &hf_x11_screensaver_SetAttributes_DontPropagate_do_not_propogate_mask_mask_KeymapState,
14371 &hf_x11_screensaver_SetAttributes_DontPropagate_do_not_propogate_mask_mask_Exposure,
14372 &hf_x11_screensaver_SetAttributes_DontPropagate_do_not_propogate_mask_mask_VisibilityChange,
14373 &hf_x11_screensaver_SetAttributes_DontPropagate_do_not_propogate_mask_mask_StructureNotify,
14374 &hf_x11_screensaver_SetAttributes_DontPropagate_do_not_propogate_mask_mask_ResizeRedirect,
14375 &hf_x11_screensaver_SetAttributes_DontPropagate_do_not_propogate_mask_mask_SubstructureNotify,
14376 &hf_x11_screensaver_SetAttributes_DontPropagate_do_not_propogate_mask_mask_SubstructureRedirect,
14377 &hf_x11_screensaver_SetAttributes_DontPropagate_do_not_propogate_mask_mask_FocusChange,
14378 &hf_x11_screensaver_SetAttributes_DontPropagate_do_not_propogate_mask_mask_PropertyChange,
14379 &hf_x11_screensaver_SetAttributes_DontPropagate_do_not_propogate_mask_mask_ColorMapChange,
14380 &hf_x11_screensaver_SetAttributes_DontPropagate_do_not_propogate_mask_mask_OwnerGrabButton,
14381 NULL
14382 };
14383 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_screensaver_SetAttributes_DontPropagate_do_not_propogate_mask, ett_x11_rectangle, do_not_propogate_mask_bits, byte_order);
14384 }
14385 *offsetp += 4;
14386 }
14387 if (f_value_mask & (1U << 13)) {
14388 field32(tvb, offsetp, t, hf_x11_screensaver_SetAttributes_Colormap_colormap, byte_order);
14389 }
14390 if (f_value_mask & (1U << 14)) {
14391 field32(tvb, offsetp, t, hf_x11_screensaver_SetAttributes_Cursor_cursor, byte_order);
14392 }
14393}
14394
14395static void screensaverUnsetAttributes(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
14396{
14397 proto_tree_add_item(t, hf_x11_screensaver_UnsetAttributes_drawable, tvb, *offsetp, 4, byte_order);
14398 *offsetp += 4;
14399}
14400
14401static void screensaverSuspend(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
14402{
14403 proto_tree_add_item(t, hf_x11_screensaver_Suspend_suspend, tvb, *offsetp, 4, byte_order);
14404 *offsetp += 4;
14405}
14406static const value_string screensaver_extension_minor[] = {
14407 { 0, "QueryVersion" },
14408 { 1, "QueryInfo" },
14409 { 2, "SelectInput" },
14410 { 3, "SetAttributes" },
14411 { 4, "UnsetAttributes" },
14412 { 5, "Suspend" },
14413 { 0, NULL }
14414};
14415static const x11_event_info screensaver_events[] = {
14416 { NULL, NULL }
14417};
14418static const x11_reply_info screensaver_replies[] = {
14419 { 0, screensaverQueryVersion_Reply },
14420 { 1, screensaverQueryInfo_Reply },
14421 { 0, NULL }
14422};
14423
14424static void dispatch_screensaver(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
14425{
14426 int minor, length;
14427 minor = CARD8(screensaver_extension_minor);
14428 length = REQUEST_LENGTH();
14429
14430 col_append_fstr(pinfo->cinfo, COL_INFO, "-%s",
14431 val_to_str(minor, screensaver_extension_minor,
14432 "<Unknown opcode %d>"));
14433 switch (minor) {
14434 case 0:
14435 screensaverQueryVersion(tvb, pinfo, offsetp, t, byte_order, length);
14436 break;
14437 case 1:
14438 screensaverQueryInfo(tvb, pinfo, offsetp, t, byte_order, length);
14439 break;
14440 case 2:
14441 screensaverSelectInput(tvb, pinfo, offsetp, t, byte_order, length);
14442 break;
14443 case 3:
14444 screensaverSetAttributes(tvb, pinfo, offsetp, t, byte_order, length);
14445 break;
14446 case 4:
14447 screensaverUnsetAttributes(tvb, pinfo, offsetp, t, byte_order, length);
14448 break;
14449 case 5:
14450 screensaverSuspend(tvb, pinfo, offsetp, t, byte_order, length);
14451 break;
14452 /* No need for a default case here, since Unknown is printed above,
14453 and UNDECODED() is taken care of by dissect_x11_request */
14454 }
14455}
14456
14457static void register_screensaver(void)
14458{
14459 set_handler("MIT-SCREEN-SAVER", dispatch_screensaver, screensaver_errors, screensaver_events, NULL, screensaver_replies);
14460}
14461
14462static void shapeQueryVersion(tvbuff_t *tvb _U_, packet_info *pinfo _U_, int *offsetp _U_, proto_tree *t _U_, unsigned byte_order _U_, int length _U_)
14463{
14464}
14465static void shapeQueryVersion_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
14466{
14467 int sequence_number;
14468
14469 col_append_fstr(pinfo->cinfo, COL_INFO, "-QueryVersion");
14470
14471 REPLY(reply);
14472 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
14473 *offsetp += 1;
14474 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
14475 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
14476 "%d (shape-QueryVersion)", sequence_number);
14477 *offsetp += 2;
14478 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
14479 *offsetp += 4;
14480 proto_tree_add_item(t, hf_x11_shape_QueryVersion_reply_major_version, tvb, *offsetp, 2, byte_order);
14481 *offsetp += 2;
14482 proto_tree_add_item(t, hf_x11_shape_QueryVersion_reply_minor_version, tvb, *offsetp, 2, byte_order);
14483 *offsetp += 2;
14484}
14485
14486static void shapeRectangles(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
14487{
14488 field8(tvb, offsetp, t, hf_x11_shape_Rectangles_operation, byte_order);
14489 field8(tvb, offsetp, t, hf_x11_shape_Rectangles_destination_kind, byte_order);
14490 field8(tvb, offsetp, t, hf_x11_shape_Rectangles_ordering, byte_order);
14491 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
14492 *offsetp += 1;
14493 proto_tree_add_item(t, hf_x11_shape_Rectangles_destination_window, tvb, *offsetp, 4, byte_order);
14494 *offsetp += 4;
14495 proto_tree_add_item(t, hf_x11_shape_Rectangles_x_offset, tvb, *offsetp, 2, byte_order);
14496 *offsetp += 2;
14497 proto_tree_add_item(t, hf_x11_shape_Rectangles_y_offset, tvb, *offsetp, 2, byte_order);
14498 *offsetp += 2;
14499 struct_xproto_RECTANGLE(tvb, offsetp, t, byte_order, (length - 16) / 8);
14500}
14501
14502static void shapeMask(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
14503{
14504 field8(tvb, offsetp, t, hf_x11_shape_Mask_operation, byte_order);
14505 field8(tvb, offsetp, t, hf_x11_shape_Mask_destination_kind, byte_order);
14506 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 2, ENC_NA);
14507 *offsetp += 2;
14508 proto_tree_add_item(t, hf_x11_shape_Mask_destination_window, tvb, *offsetp, 4, byte_order);
14509 *offsetp += 4;
14510 proto_tree_add_item(t, hf_x11_shape_Mask_x_offset, tvb, *offsetp, 2, byte_order);
14511 *offsetp += 2;
14512 proto_tree_add_item(t, hf_x11_shape_Mask_y_offset, tvb, *offsetp, 2, byte_order);
14513 *offsetp += 2;
14514 field32(tvb, offsetp, t, hf_x11_shape_Mask_source_bitmap, byte_order);
14515}
14516
14517static void shapeCombine(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
14518{
14519 field8(tvb, offsetp, t, hf_x11_shape_Combine_operation, byte_order);
14520 field8(tvb, offsetp, t, hf_x11_shape_Combine_destination_kind, byte_order);
14521 field8(tvb, offsetp, t, hf_x11_shape_Combine_source_kind, byte_order);
14522 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
14523 *offsetp += 1;
14524 proto_tree_add_item(t, hf_x11_shape_Combine_destination_window, tvb, *offsetp, 4, byte_order);
14525 *offsetp += 4;
14526 proto_tree_add_item(t, hf_x11_shape_Combine_x_offset, tvb, *offsetp, 2, byte_order);
14527 *offsetp += 2;
14528 proto_tree_add_item(t, hf_x11_shape_Combine_y_offset, tvb, *offsetp, 2, byte_order);
14529 *offsetp += 2;
14530 proto_tree_add_item(t, hf_x11_shape_Combine_source_window, tvb, *offsetp, 4, byte_order);
14531 *offsetp += 4;
14532}
14533
14534static void shapeOffset(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
14535{
14536 field8(tvb, offsetp, t, hf_x11_shape_Offset_destination_kind, byte_order);
14537 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 3, ENC_NA);
14538 *offsetp += 3;
14539 proto_tree_add_item(t, hf_x11_shape_Offset_destination_window, tvb, *offsetp, 4, byte_order);
14540 *offsetp += 4;
14541 proto_tree_add_item(t, hf_x11_shape_Offset_x_offset, tvb, *offsetp, 2, byte_order);
14542 *offsetp += 2;
14543 proto_tree_add_item(t, hf_x11_shape_Offset_y_offset, tvb, *offsetp, 2, byte_order);
14544 *offsetp += 2;
14545}
14546
14547static void shapeQueryExtents(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
14548{
14549 proto_tree_add_item(t, hf_x11_shape_QueryExtents_destination_window, tvb, *offsetp, 4, byte_order);
14550 *offsetp += 4;
14551}
14552static void shapeQueryExtents_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
14553{
14554 int sequence_number;
14555
14556 col_append_fstr(pinfo->cinfo, COL_INFO, "-QueryExtents");
14557
14558 REPLY(reply);
14559 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
14560 *offsetp += 1;
14561 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
14562 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
14563 "%d (shape-QueryExtents)", sequence_number);
14564 *offsetp += 2;
14565 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
14566 *offsetp += 4;
14567 proto_tree_add_item(t, hf_x11_shape_QueryExtents_reply_bounding_shaped, tvb, *offsetp, 1, byte_order);
14568 *offsetp += 1;
14569 proto_tree_add_item(t, hf_x11_shape_QueryExtents_reply_clip_shaped, tvb, *offsetp, 1, byte_order);
14570 *offsetp += 1;
14571 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 2, ENC_NA);
14572 *offsetp += 2;
14573 proto_tree_add_item(t, hf_x11_shape_QueryExtents_reply_bounding_shape_extents_x, tvb, *offsetp, 2, byte_order);
14574 *offsetp += 2;
14575 proto_tree_add_item(t, hf_x11_shape_QueryExtents_reply_bounding_shape_extents_y, tvb, *offsetp, 2, byte_order);
14576 *offsetp += 2;
14577 proto_tree_add_item(t, hf_x11_shape_QueryExtents_reply_bounding_shape_extents_width, tvb, *offsetp, 2, byte_order);
14578 *offsetp += 2;
14579 proto_tree_add_item(t, hf_x11_shape_QueryExtents_reply_bounding_shape_extents_height, tvb, *offsetp, 2, byte_order);
14580 *offsetp += 2;
14581 proto_tree_add_item(t, hf_x11_shape_QueryExtents_reply_clip_shape_extents_x, tvb, *offsetp, 2, byte_order);
14582 *offsetp += 2;
14583 proto_tree_add_item(t, hf_x11_shape_QueryExtents_reply_clip_shape_extents_y, tvb, *offsetp, 2, byte_order);
14584 *offsetp += 2;
14585 proto_tree_add_item(t, hf_x11_shape_QueryExtents_reply_clip_shape_extents_width, tvb, *offsetp, 2, byte_order);
14586 *offsetp += 2;
14587 proto_tree_add_item(t, hf_x11_shape_QueryExtents_reply_clip_shape_extents_height, tvb, *offsetp, 2, byte_order);
14588 *offsetp += 2;
14589}
14590
14591static void shapeSelectInput(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
14592{
14593 proto_tree_add_item(t, hf_x11_shape_SelectInput_destination_window, tvb, *offsetp, 4, byte_order);
14594 *offsetp += 4;
14595 proto_tree_add_item(t, hf_x11_shape_SelectInput_enable, tvb, *offsetp, 1, byte_order);
14596 *offsetp += 1;
14597 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 3, ENC_NA);
14598 *offsetp += 3;
14599}
14600
14601static void shapeInputSelected(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
14602{
14603 proto_tree_add_item(t, hf_x11_shape_InputSelected_destination_window, tvb, *offsetp, 4, byte_order);
14604 *offsetp += 4;
14605}
14606static void shapeInputSelected_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
14607{
14608 int sequence_number;
14609
14610 col_append_fstr(pinfo->cinfo, COL_INFO, "-InputSelected");
14611
14612 REPLY(reply);
14613 proto_tree_add_item(t, hf_x11_shape_InputSelected_reply_enabled, tvb, *offsetp, 1, byte_order);
14614 *offsetp += 1;
14615 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
14616 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
14617 "%d (shape-InputSelected)", sequence_number);
14618 *offsetp += 2;
14619 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
14620 *offsetp += 4;
14621}
14622
14623static void shapeGetRectangles(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
14624{
14625 proto_tree_add_item(t, hf_x11_shape_GetRectangles_window, tvb, *offsetp, 4, byte_order);
14626 *offsetp += 4;
14627 field8(tvb, offsetp, t, hf_x11_shape_GetRectangles_source_kind, byte_order);
14628 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 3, ENC_NA);
14629 *offsetp += 3;
14630}
14631static void shapeGetRectangles_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
14632{
14633 int sequence_number;
14634 int f_rectangles_len;
14635
14636 col_append_fstr(pinfo->cinfo, COL_INFO, "-GetRectangles");
14637
14638 REPLY(reply);
14639 field8(tvb, offsetp, t, hf_x11_shape_GetRectangles_reply_ordering, byte_order);
14640 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
14641 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
14642 "%d (shape-GetRectangles)", sequence_number);
14643 *offsetp += 2;
14644 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
14645 *offsetp += 4;
14646 f_rectangles_len = tvb_get_uint32(tvb, *offsetp, byte_order);
14647 proto_tree_add_item(t, hf_x11_shape_GetRectangles_reply_rectangles_len, tvb, *offsetp, 4, byte_order);
14648 *offsetp += 4;
14649 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 20, ENC_NA);
14650 *offsetp += 20;
14651 struct_xproto_RECTANGLE(tvb, offsetp, t, byte_order, f_rectangles_len);
14652}
14653static const value_string shape_extension_minor[] = {
14654 { 0, "QueryVersion" },
14655 { 1, "Rectangles" },
14656 { 2, "Mask" },
14657 { 3, "Combine" },
14658 { 4, "Offset" },
14659 { 5, "QueryExtents" },
14660 { 6, "SelectInput" },
14661 { 7, "InputSelected" },
14662 { 8, "GetRectangles" },
14663 { 0, NULL }
14664};
14665static const x11_event_info shape_events[] = {
14666 { NULL, NULL }
14667};
14668static const x11_reply_info shape_replies[] = {
14669 { 0, shapeQueryVersion_Reply },
14670 { 5, shapeQueryExtents_Reply },
14671 { 7, shapeInputSelected_Reply },
14672 { 8, shapeGetRectangles_Reply },
14673 { 0, NULL }
14674};
14675
14676static void dispatch_shape(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
14677{
14678 int minor, length;
14679 minor = CARD8(shape_extension_minor);
14680 length = REQUEST_LENGTH();
14681
14682 col_append_fstr(pinfo->cinfo, COL_INFO, "-%s",
14683 val_to_str(minor, shape_extension_minor,
14684 "<Unknown opcode %d>"));
14685 switch (minor) {
14686 case 0:
14687 shapeQueryVersion(tvb, pinfo, offsetp, t, byte_order, length);
14688 break;
14689 case 1:
14690 shapeRectangles(tvb, pinfo, offsetp, t, byte_order, length);
14691 break;
14692 case 2:
14693 shapeMask(tvb, pinfo, offsetp, t, byte_order, length);
14694 break;
14695 case 3:
14696 shapeCombine(tvb, pinfo, offsetp, t, byte_order, length);
14697 break;
14698 case 4:
14699 shapeOffset(tvb, pinfo, offsetp, t, byte_order, length);
14700 break;
14701 case 5:
14702 shapeQueryExtents(tvb, pinfo, offsetp, t, byte_order, length);
14703 break;
14704 case 6:
14705 shapeSelectInput(tvb, pinfo, offsetp, t, byte_order, length);
14706 break;
14707 case 7:
14708 shapeInputSelected(tvb, pinfo, offsetp, t, byte_order, length);
14709 break;
14710 case 8:
14711 shapeGetRectangles(tvb, pinfo, offsetp, t, byte_order, length);
14712 break;
14713 /* No need for a default case here, since Unknown is printed above,
14714 and UNDECODED() is taken care of by dissect_x11_request */
14715 }
14716}
14717
14718static void register_shape(void)
14719{
14720 set_handler("SHAPE", dispatch_shape, shape_errors, shape_events, NULL, shape_replies);
14721}
14722
14723static void shmQueryVersion(tvbuff_t *tvb _U_, packet_info *pinfo _U_, int *offsetp _U_, proto_tree *t _U_, unsigned byte_order _U_, int length _U_)
14724{
14725}
14726static void shmQueryVersion_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
14727{
14728 int sequence_number;
14729
14730 col_append_fstr(pinfo->cinfo, COL_INFO, "-QueryVersion");
14731
14732 REPLY(reply);
14733 proto_tree_add_item(t, hf_x11_shm_QueryVersion_reply_shared_pixmaps, tvb, *offsetp, 1, byte_order);
14734 *offsetp += 1;
14735 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
14736 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
14737 "%d (shm-QueryVersion)", sequence_number);
14738 *offsetp += 2;
14739 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
14740 *offsetp += 4;
14741 proto_tree_add_item(t, hf_x11_shm_QueryVersion_reply_major_version, tvb, *offsetp, 2, byte_order);
14742 *offsetp += 2;
14743 proto_tree_add_item(t, hf_x11_shm_QueryVersion_reply_minor_version, tvb, *offsetp, 2, byte_order);
14744 *offsetp += 2;
14745 proto_tree_add_item(t, hf_x11_shm_QueryVersion_reply_uid, tvb, *offsetp, 2, byte_order);
14746 *offsetp += 2;
14747 proto_tree_add_item(t, hf_x11_shm_QueryVersion_reply_gid, tvb, *offsetp, 2, byte_order);
14748 *offsetp += 2;
14749 proto_tree_add_item(t, hf_x11_shm_QueryVersion_reply_pixmap_format, tvb, *offsetp, 1, byte_order);
14750 *offsetp += 1;
14751 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 15, ENC_NA);
14752 *offsetp += 15;
14753}
14754
14755static void shmAttach(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
14756{
14757 proto_tree_add_item(t, hf_x11_shm_Attach_shmseg, tvb, *offsetp, 4, byte_order);
14758 *offsetp += 4;
14759 proto_tree_add_item(t, hf_x11_shm_Attach_shmid, tvb, *offsetp, 4, byte_order);
14760 *offsetp += 4;
14761 proto_tree_add_item(t, hf_x11_shm_Attach_read_only, tvb, *offsetp, 1, byte_order);
14762 *offsetp += 1;
14763 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 3, ENC_NA);
14764 *offsetp += 3;
14765}
14766
14767static void shmDetach(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
14768{
14769 proto_tree_add_item(t, hf_x11_shm_Detach_shmseg, tvb, *offsetp, 4, byte_order);
14770 *offsetp += 4;
14771}
14772
14773static void shmPutImage(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
14774{
14775 proto_tree_add_item(t, hf_x11_shm_PutImage_drawable, tvb, *offsetp, 4, byte_order);
14776 *offsetp += 4;
14777 proto_tree_add_item(t, hf_x11_shm_PutImage_gc, tvb, *offsetp, 4, byte_order);
14778 *offsetp += 4;
14779 proto_tree_add_item(t, hf_x11_shm_PutImage_total_width, tvb, *offsetp, 2, byte_order);
14780 *offsetp += 2;
14781 proto_tree_add_item(t, hf_x11_shm_PutImage_total_height, tvb, *offsetp, 2, byte_order);
14782 *offsetp += 2;
14783 proto_tree_add_item(t, hf_x11_shm_PutImage_src_x, tvb, *offsetp, 2, byte_order);
14784 *offsetp += 2;
14785 proto_tree_add_item(t, hf_x11_shm_PutImage_src_y, tvb, *offsetp, 2, byte_order);
14786 *offsetp += 2;
14787 proto_tree_add_item(t, hf_x11_shm_PutImage_src_width, tvb, *offsetp, 2, byte_order);
14788 *offsetp += 2;
14789 proto_tree_add_item(t, hf_x11_shm_PutImage_src_height, tvb, *offsetp, 2, byte_order);
14790 *offsetp += 2;
14791 proto_tree_add_item(t, hf_x11_shm_PutImage_dst_x, tvb, *offsetp, 2, byte_order);
14792 *offsetp += 2;
14793 proto_tree_add_item(t, hf_x11_shm_PutImage_dst_y, tvb, *offsetp, 2, byte_order);
14794 *offsetp += 2;
14795 proto_tree_add_item(t, hf_x11_shm_PutImage_depth, tvb, *offsetp, 1, byte_order);
14796 *offsetp += 1;
14797 proto_tree_add_item(t, hf_x11_shm_PutImage_format, tvb, *offsetp, 1, byte_order);
14798 *offsetp += 1;
14799 proto_tree_add_item(t, hf_x11_shm_PutImage_send_event, tvb, *offsetp, 1, byte_order);
14800 *offsetp += 1;
14801 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
14802 *offsetp += 1;
14803 proto_tree_add_item(t, hf_x11_shm_PutImage_shmseg, tvb, *offsetp, 4, byte_order);
14804 *offsetp += 4;
14805 proto_tree_add_item(t, hf_x11_shm_PutImage_offset, tvb, *offsetp, 4, byte_order);
14806 *offsetp += 4;
14807}
14808
14809static void shmGetImage(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
14810{
14811 proto_tree_add_item(t, hf_x11_shm_GetImage_drawable, tvb, *offsetp, 4, byte_order);
14812 *offsetp += 4;
14813 proto_tree_add_item(t, hf_x11_shm_GetImage_x, tvb, *offsetp, 2, byte_order);
14814 *offsetp += 2;
14815 proto_tree_add_item(t, hf_x11_shm_GetImage_y, tvb, *offsetp, 2, byte_order);
14816 *offsetp += 2;
14817 proto_tree_add_item(t, hf_x11_shm_GetImage_width, tvb, *offsetp, 2, byte_order);
14818 *offsetp += 2;
14819 proto_tree_add_item(t, hf_x11_shm_GetImage_height, tvb, *offsetp, 2, byte_order);
14820 *offsetp += 2;
14821 proto_tree_add_item(t, hf_x11_shm_GetImage_plane_mask, tvb, *offsetp, 4, byte_order);
14822 *offsetp += 4;
14823 proto_tree_add_item(t, hf_x11_shm_GetImage_format, tvb, *offsetp, 1, byte_order);
14824 *offsetp += 1;
14825 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 3, ENC_NA);
14826 *offsetp += 3;
14827 proto_tree_add_item(t, hf_x11_shm_GetImage_shmseg, tvb, *offsetp, 4, byte_order);
14828 *offsetp += 4;
14829 proto_tree_add_item(t, hf_x11_shm_GetImage_offset, tvb, *offsetp, 4, byte_order);
14830 *offsetp += 4;
14831}
14832static void shmGetImage_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
14833{
14834 int sequence_number;
14835
14836 col_append_fstr(pinfo->cinfo, COL_INFO, "-GetImage");
14837
14838 REPLY(reply);
14839 proto_tree_add_item(t, hf_x11_shm_GetImage_reply_depth, tvb, *offsetp, 1, byte_order);
14840 *offsetp += 1;
14841 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
14842 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
14843 "%d (shm-GetImage)", sequence_number);
14844 *offsetp += 2;
14845 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
14846 *offsetp += 4;
14847 proto_tree_add_item(t, hf_x11_shm_GetImage_reply_visual, tvb, *offsetp, 4, byte_order);
14848 *offsetp += 4;
14849 proto_tree_add_item(t, hf_x11_shm_GetImage_reply_size, tvb, *offsetp, 4, byte_order);
14850 *offsetp += 4;
14851}
14852
14853static void shmCreatePixmap(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
14854{
14855 proto_tree_add_item(t, hf_x11_shm_CreatePixmap_pid, tvb, *offsetp, 4, byte_order);
14856 *offsetp += 4;
14857 proto_tree_add_item(t, hf_x11_shm_CreatePixmap_drawable, tvb, *offsetp, 4, byte_order);
14858 *offsetp += 4;
14859 proto_tree_add_item(t, hf_x11_shm_CreatePixmap_width, tvb, *offsetp, 2, byte_order);
14860 *offsetp += 2;
14861 proto_tree_add_item(t, hf_x11_shm_CreatePixmap_height, tvb, *offsetp, 2, byte_order);
14862 *offsetp += 2;
14863 proto_tree_add_item(t, hf_x11_shm_CreatePixmap_depth, tvb, *offsetp, 1, byte_order);
14864 *offsetp += 1;
14865 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 3, ENC_NA);
14866 *offsetp += 3;
14867 proto_tree_add_item(t, hf_x11_shm_CreatePixmap_shmseg, tvb, *offsetp, 4, byte_order);
14868 *offsetp += 4;
14869 proto_tree_add_item(t, hf_x11_shm_CreatePixmap_offset, tvb, *offsetp, 4, byte_order);
14870 *offsetp += 4;
14871}
14872
14873static void shmAttachFd(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
14874{
14875 proto_tree_add_item(t, hf_x11_shm_AttachFd_shmseg, tvb, *offsetp, 4, byte_order);
14876 *offsetp += 4;
14877 proto_tree_add_item(t, hf_x11_shm_AttachFd_read_only, tvb, *offsetp, 1, byte_order);
14878 *offsetp += 1;
14879 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 3, ENC_NA);
14880 *offsetp += 3;
14881}
14882
14883static void shmCreateSegment(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
14884{
14885 proto_tree_add_item(t, hf_x11_shm_CreateSegment_shmseg, tvb, *offsetp, 4, byte_order);
14886 *offsetp += 4;
14887 proto_tree_add_item(t, hf_x11_shm_CreateSegment_size, tvb, *offsetp, 4, byte_order);
14888 *offsetp += 4;
14889 proto_tree_add_item(t, hf_x11_shm_CreateSegment_read_only, tvb, *offsetp, 1, byte_order);
14890 *offsetp += 1;
14891 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 3, ENC_NA);
14892 *offsetp += 3;
14893}
14894static void shmCreateSegment_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
14895{
14896 int sequence_number;
14897
14898 col_append_fstr(pinfo->cinfo, COL_INFO, "-CreateSegment");
14899
14900 REPLY(reply);
14901 proto_tree_add_item(t, hf_x11_shm_CreateSegment_reply_nfd, tvb, *offsetp, 1, byte_order);
14902 *offsetp += 1;
14903 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
14904 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
14905 "%d (shm-CreateSegment)", sequence_number);
14906 *offsetp += 2;
14907 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
14908 *offsetp += 4;
14909 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 24, ENC_NA);
14910 *offsetp += 24;
14911}
14912static const value_string shm_extension_minor[] = {
14913 { 0, "QueryVersion" },
14914 { 1, "Attach" },
14915 { 2, "Detach" },
14916 { 3, "PutImage" },
14917 { 4, "GetImage" },
14918 { 5, "CreatePixmap" },
14919 { 6, "AttachFd" },
14920 { 7, "CreateSegment" },
14921 { 0, NULL }
14922};
14923static const x11_event_info shm_events[] = {
14924 { NULL, NULL }
14925};
14926static const x11_reply_info shm_replies[] = {
14927 { 0, shmQueryVersion_Reply },
14928 { 4, shmGetImage_Reply },
14929 { 7, shmCreateSegment_Reply },
14930 { 0, NULL }
14931};
14932
14933static void dispatch_shm(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
14934{
14935 int minor, length;
14936 minor = CARD8(shm_extension_minor);
14937 length = REQUEST_LENGTH();
14938
14939 col_append_fstr(pinfo->cinfo, COL_INFO, "-%s",
14940 val_to_str(minor, shm_extension_minor,
14941 "<Unknown opcode %d>"));
14942 switch (minor) {
14943 case 0:
14944 shmQueryVersion(tvb, pinfo, offsetp, t, byte_order, length);
14945 break;
14946 case 1:
14947 shmAttach(tvb, pinfo, offsetp, t, byte_order, length);
14948 break;
14949 case 2:
14950 shmDetach(tvb, pinfo, offsetp, t, byte_order, length);
14951 break;
14952 case 3:
14953 shmPutImage(tvb, pinfo, offsetp, t, byte_order, length);
14954 break;
14955 case 4:
14956 shmGetImage(tvb, pinfo, offsetp, t, byte_order, length);
14957 break;
14958 case 5:
14959 shmCreatePixmap(tvb, pinfo, offsetp, t, byte_order, length);
14960 break;
14961 case 6:
14962 shmAttachFd(tvb, pinfo, offsetp, t, byte_order, length);
14963 break;
14964 case 7:
14965 shmCreateSegment(tvb, pinfo, offsetp, t, byte_order, length);
14966 break;
14967 /* No need for a default case here, since Unknown is printed above,
14968 and UNDECODED() is taken care of by dissect_x11_request */
14969 }
14970}
14971
14972static void register_shm(void)
14973{
14974 set_handler("MIT-SHM", dispatch_shm, shm_errors, shm_events, NULL, shm_replies);
14975}
14976
14977static void syncInitialize(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
14978{
14979 proto_tree_add_item(t, hf_x11_sync_Initialize_desired_major_version, tvb, *offsetp, 1, byte_order);
14980 *offsetp += 1;
14981 proto_tree_add_item(t, hf_x11_sync_Initialize_desired_minor_version, tvb, *offsetp, 1, byte_order);
14982 *offsetp += 1;
14983}
14984static void syncInitialize_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
14985{
14986 int sequence_number;
14987
14988 col_append_fstr(pinfo->cinfo, COL_INFO, "-Initialize");
14989
14990 REPLY(reply);
14991 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
14992 *offsetp += 1;
14993 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
14994 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
14995 "%d (sync-Initialize)", sequence_number);
14996 *offsetp += 2;
14997 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
14998 *offsetp += 4;
14999 proto_tree_add_item(t, hf_x11_sync_Initialize_reply_major_version, tvb, *offsetp, 1, byte_order);
15000 *offsetp += 1;
15001 proto_tree_add_item(t, hf_x11_sync_Initialize_reply_minor_version, tvb, *offsetp, 1, byte_order);
15002 *offsetp += 1;
15003 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 22, ENC_NA);
15004 *offsetp += 22;
15005}
15006
15007static void syncListSystemCounters(tvbuff_t *tvb _U_, packet_info *pinfo _U_, int *offsetp _U_, proto_tree *t _U_, unsigned byte_order _U_, int length _U_)
15008{
15009}
15010static void syncListSystemCounters_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
15011{
15012 int sequence_number;
15013 int f_counters_len;
15014
15015 col_append_fstr(pinfo->cinfo, COL_INFO, "-ListSystemCounters");
15016
15017 REPLY(reply);
15018 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
15019 *offsetp += 1;
15020 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
15021 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
15022 "%d (sync-ListSystemCounters)", sequence_number);
15023 *offsetp += 2;
15024 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
15025 *offsetp += 4;
15026 f_counters_len = tvb_get_uint32(tvb, *offsetp, byte_order);
15027 proto_tree_add_item(t, hf_x11_sync_ListSystemCounters_reply_counters_len, tvb, *offsetp, 4, byte_order);
15028 *offsetp += 4;
15029 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 20, ENC_NA);
15030 *offsetp += 20;
15031 struct_sync_SYSTEMCOUNTER(tvb, offsetp, t, byte_order, f_counters_len);
15032}
15033
15034static void syncCreateCounter(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
15035{
15036 proto_tree_add_item(t, hf_x11_sync_CreateCounter_id, tvb, *offsetp, 4, byte_order);
15037 *offsetp += 4;
15038 struct_sync_INT64(tvb, offsetp, t, byte_order, 1);
15039}
15040
15041static void syncDestroyCounter(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
15042{
15043 proto_tree_add_item(t, hf_x11_sync_DestroyCounter_counter, tvb, *offsetp, 4, byte_order);
15044 *offsetp += 4;
15045}
15046
15047static void syncQueryCounter(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
15048{
15049 proto_tree_add_item(t, hf_x11_sync_QueryCounter_counter, tvb, *offsetp, 4, byte_order);
15050 *offsetp += 4;
15051}
15052static void syncQueryCounter_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
15053{
15054 int sequence_number;
15055
15056 col_append_fstr(pinfo->cinfo, COL_INFO, "-QueryCounter");
15057
15058 REPLY(reply);
15059 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
15060 *offsetp += 1;
15061 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
15062 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
15063 "%d (sync-QueryCounter)", sequence_number);
15064 *offsetp += 2;
15065 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
15066 *offsetp += 4;
15067 struct_sync_INT64(tvb, offsetp, t, byte_order, 1);
15068}
15069
15070static void syncAwait(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
15071{
15072 struct_sync_WAITCONDITION(tvb, offsetp, t, byte_order, (length - 4) / 28);
15073}
15074
15075static void syncChangeCounter(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
15076{
15077 proto_tree_add_item(t, hf_x11_sync_ChangeCounter_counter, tvb, *offsetp, 4, byte_order);
15078 *offsetp += 4;
15079 struct_sync_INT64(tvb, offsetp, t, byte_order, 1);
15080}
15081
15082static void syncSetCounter(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
15083{
15084 proto_tree_add_item(t, hf_x11_sync_SetCounter_counter, tvb, *offsetp, 4, byte_order);
15085 *offsetp += 4;
15086 struct_sync_INT64(tvb, offsetp, t, byte_order, 1);
15087}
15088
15089static void syncCreateAlarm(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
15090{
15091 int f_value_mask;
15092 proto_tree_add_item(t, hf_x11_sync_CreateAlarm_id, tvb, *offsetp, 4, byte_order);
15093 *offsetp += 4;
15094 f_value_mask = tvb_get_uint32(tvb, *offsetp, byte_order);
15095 {
15096 static int* const value_mask_bits [] = {
15097 &hf_x11_sync_CreateAlarm_value_mask_mask_Counter,
15098 &hf_x11_sync_CreateAlarm_value_mask_mask_ValueType,
15099 &hf_x11_sync_CreateAlarm_value_mask_mask_Value,
15100 &hf_x11_sync_CreateAlarm_value_mask_mask_TestType,
15101 &hf_x11_sync_CreateAlarm_value_mask_mask_Delta,
15102 &hf_x11_sync_CreateAlarm_value_mask_mask_Events,
15103 NULL
15104 };
15105 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_sync_CreateAlarm_value_mask, ett_x11_rectangle, value_mask_bits, byte_order);
15106 }
15107 *offsetp += 4;
15108 if (f_value_mask & (1U << 0)) {
15109 proto_tree_add_item(t, hf_x11_sync_CreateAlarm_Counter_counter, tvb, *offsetp, 4, byte_order);
15110 *offsetp += 4;
15111 }
15112 if (f_value_mask & (1U << 1)) {
15113 field32(tvb, offsetp, t, hf_x11_sync_CreateAlarm_ValueType_valueType, byte_order);
15114 }
15115 if (f_value_mask & (1U << 2)) {
15116 struct_sync_INT64(tvb, offsetp, t, byte_order, 1);
15117 }
15118 if (f_value_mask & (1U << 3)) {
15119 field32(tvb, offsetp, t, hf_x11_sync_CreateAlarm_TestType_testType, byte_order);
15120 }
15121 if (f_value_mask & (1U << 4)) {
15122 struct_sync_INT64(tvb, offsetp, t, byte_order, 1);
15123 }
15124 if (f_value_mask & (1U << 5)) {
15125 proto_tree_add_item(t, hf_x11_sync_CreateAlarm_Events_events, tvb, *offsetp, 4, byte_order);
15126 *offsetp += 4;
15127 }
15128}
15129
15130static void syncChangeAlarm(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
15131{
15132 int f_value_mask;
15133 proto_tree_add_item(t, hf_x11_sync_ChangeAlarm_id, tvb, *offsetp, 4, byte_order);
15134 *offsetp += 4;
15135 f_value_mask = tvb_get_uint32(tvb, *offsetp, byte_order);
15136 {
15137 static int* const value_mask_bits [] = {
15138 &hf_x11_sync_ChangeAlarm_value_mask_mask_Counter,
15139 &hf_x11_sync_ChangeAlarm_value_mask_mask_ValueType,
15140 &hf_x11_sync_ChangeAlarm_value_mask_mask_Value,
15141 &hf_x11_sync_ChangeAlarm_value_mask_mask_TestType,
15142 &hf_x11_sync_ChangeAlarm_value_mask_mask_Delta,
15143 &hf_x11_sync_ChangeAlarm_value_mask_mask_Events,
15144 NULL
15145 };
15146 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_sync_ChangeAlarm_value_mask, ett_x11_rectangle, value_mask_bits, byte_order);
15147 }
15148 *offsetp += 4;
15149 if (f_value_mask & (1U << 0)) {
15150 proto_tree_add_item(t, hf_x11_sync_ChangeAlarm_Counter_counter, tvb, *offsetp, 4, byte_order);
15151 *offsetp += 4;
15152 }
15153 if (f_value_mask & (1U << 1)) {
15154 field32(tvb, offsetp, t, hf_x11_sync_ChangeAlarm_ValueType_valueType, byte_order);
15155 }
15156 if (f_value_mask & (1U << 2)) {
15157 struct_sync_INT64(tvb, offsetp, t, byte_order, 1);
15158 }
15159 if (f_value_mask & (1U << 3)) {
15160 field32(tvb, offsetp, t, hf_x11_sync_ChangeAlarm_TestType_testType, byte_order);
15161 }
15162 if (f_value_mask & (1U << 4)) {
15163 struct_sync_INT64(tvb, offsetp, t, byte_order, 1);
15164 }
15165 if (f_value_mask & (1U << 5)) {
15166 proto_tree_add_item(t, hf_x11_sync_ChangeAlarm_Events_events, tvb, *offsetp, 4, byte_order);
15167 *offsetp += 4;
15168 }
15169}
15170
15171static void syncDestroyAlarm(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
15172{
15173 proto_tree_add_item(t, hf_x11_sync_DestroyAlarm_alarm, tvb, *offsetp, 4, byte_order);
15174 *offsetp += 4;
15175}
15176
15177static void syncQueryAlarm(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
15178{
15179 proto_tree_add_item(t, hf_x11_sync_QueryAlarm_alarm, tvb, *offsetp, 4, byte_order);
15180 *offsetp += 4;
15181}
15182static void syncQueryAlarm_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
15183{
15184 int sequence_number;
15185
15186 col_append_fstr(pinfo->cinfo, COL_INFO, "-QueryAlarm");
15187
15188 REPLY(reply);
15189 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
15190 *offsetp += 1;
15191 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
15192 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
15193 "%d (sync-QueryAlarm)", sequence_number);
15194 *offsetp += 2;
15195 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
15196 *offsetp += 4;
15197 struct_sync_TRIGGER(tvb, offsetp, t, byte_order, 1);
15198 struct_sync_INT64(tvb, offsetp, t, byte_order, 1);
15199 proto_tree_add_item(t, hf_x11_sync_QueryAlarm_reply_events, tvb, *offsetp, 1, byte_order);
15200 *offsetp += 1;
15201 field8(tvb, offsetp, t, hf_x11_sync_QueryAlarm_reply_state, byte_order);
15202 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 2, ENC_NA);
15203 *offsetp += 2;
15204}
15205
15206static void syncSetPriority(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
15207{
15208 proto_tree_add_item(t, hf_x11_sync_SetPriority_id, tvb, *offsetp, 4, byte_order);
15209 *offsetp += 4;
15210 proto_tree_add_item(t, hf_x11_sync_SetPriority_priority, tvb, *offsetp, 4, byte_order);
15211 *offsetp += 4;
15212}
15213
15214static void syncGetPriority(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
15215{
15216 proto_tree_add_item(t, hf_x11_sync_GetPriority_id, tvb, *offsetp, 4, byte_order);
15217 *offsetp += 4;
15218}
15219static void syncGetPriority_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
15220{
15221 int sequence_number;
15222
15223 col_append_fstr(pinfo->cinfo, COL_INFO, "-GetPriority");
15224
15225 REPLY(reply);
15226 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
15227 *offsetp += 1;
15228 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
15229 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
15230 "%d (sync-GetPriority)", sequence_number);
15231 *offsetp += 2;
15232 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
15233 *offsetp += 4;
15234 proto_tree_add_item(t, hf_x11_sync_GetPriority_reply_priority, tvb, *offsetp, 4, byte_order);
15235 *offsetp += 4;
15236}
15237
15238static void syncCreateFence(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
15239{
15240 proto_tree_add_item(t, hf_x11_sync_CreateFence_drawable, tvb, *offsetp, 4, byte_order);
15241 *offsetp += 4;
15242 proto_tree_add_item(t, hf_x11_sync_CreateFence_fence, tvb, *offsetp, 4, byte_order);
15243 *offsetp += 4;
15244 proto_tree_add_item(t, hf_x11_sync_CreateFence_initially_triggered, tvb, *offsetp, 1, byte_order);
15245 *offsetp += 1;
15246}
15247
15248static void syncTriggerFence(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
15249{
15250 proto_tree_add_item(t, hf_x11_sync_TriggerFence_fence, tvb, *offsetp, 4, byte_order);
15251 *offsetp += 4;
15252}
15253
15254static void syncResetFence(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
15255{
15256 proto_tree_add_item(t, hf_x11_sync_ResetFence_fence, tvb, *offsetp, 4, byte_order);
15257 *offsetp += 4;
15258}
15259
15260static void syncDestroyFence(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
15261{
15262 proto_tree_add_item(t, hf_x11_sync_DestroyFence_fence, tvb, *offsetp, 4, byte_order);
15263 *offsetp += 4;
15264}
15265
15266static void syncQueryFence(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
15267{
15268 proto_tree_add_item(t, hf_x11_sync_QueryFence_fence, tvb, *offsetp, 4, byte_order);
15269 *offsetp += 4;
15270}
15271static void syncQueryFence_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
15272{
15273 int sequence_number;
15274
15275 col_append_fstr(pinfo->cinfo, COL_INFO, "-QueryFence");
15276
15277 REPLY(reply);
15278 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
15279 *offsetp += 1;
15280 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
15281 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
15282 "%d (sync-QueryFence)", sequence_number);
15283 *offsetp += 2;
15284 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
15285 *offsetp += 4;
15286 proto_tree_add_item(t, hf_x11_sync_QueryFence_reply_triggered, tvb, *offsetp, 1, byte_order);
15287 *offsetp += 1;
15288 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 23, ENC_NA);
15289 *offsetp += 23;
15290}
15291
15292static void syncAwaitFence(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
15293{
15294 listOfCard32(tvb, offsetp, t, hf_x11_sync_AwaitFence_fence_list, hf_x11_sync_AwaitFence_fence_list_item, (length - 4) / 4, byte_order);
15295}
15296
15297static void syncAlarmNotify(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order)
15298{
15299 proto_tree_add_item(t, hf_x11_sync_AlarmNotify_kind, tvb, *offsetp, 1, byte_order);
15300 *offsetp += 1;
15301 CARD16(event_sequencenumber);
15302 proto_tree_add_item(t, hf_x11_sync_AlarmNotify_alarm, tvb, *offsetp, 4, byte_order);
15303 *offsetp += 4;
15304 struct_sync_INT64(tvb, offsetp, t, byte_order, 1);
15305 struct_sync_INT64(tvb, offsetp, t, byte_order, 1);
15306 proto_tree_add_item(t, hf_x11_sync_AlarmNotify_timestamp, tvb, *offsetp, 4, byte_order);
15307 *offsetp += 4;
15308 field8(tvb, offsetp, t, hf_x11_sync_AlarmNotify_state, byte_order);
15309 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 3, ENC_NA);
15310 *offsetp += 3;
15311}
15312
15313static const value_string sync_extension_minor[] = {
15314 { 0, "Initialize" },
15315 { 1, "ListSystemCounters" },
15316 { 2, "CreateCounter" },
15317 { 3, "SetCounter" },
15318 { 4, "ChangeCounter" },
15319 { 5, "QueryCounter" },
15320 { 6, "DestroyCounter" },
15321 { 7, "Await" },
15322 { 8, "CreateAlarm" },
15323 { 9, "ChangeAlarm" },
15324 { 10, "QueryAlarm" },
15325 { 11, "DestroyAlarm" },
15326 { 12, "SetPriority" },
15327 { 13, "GetPriority" },
15328 { 14, "CreateFence" },
15329 { 15, "TriggerFence" },
15330 { 16, "ResetFence" },
15331 { 17, "DestroyFence" },
15332 { 18, "QueryFence" },
15333 { 19, "AwaitFence" },
15334 { 0, NULL }
15335};
15336static const x11_event_info sync_events[] = {
15337 { "sync-AlarmNotify", syncAlarmNotify },
15338 { NULL, NULL }
15339};
15340static const x11_reply_info sync_replies[] = {
15341 { 0, syncInitialize_Reply },
15342 { 1, syncListSystemCounters_Reply },
15343 { 5, syncQueryCounter_Reply },
15344 { 10, syncQueryAlarm_Reply },
15345 { 13, syncGetPriority_Reply },
15346 { 18, syncQueryFence_Reply },
15347 { 0, NULL }
15348};
15349
15350static void dispatch_sync(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
15351{
15352 int minor, length;
15353 minor = CARD8(sync_extension_minor);
15354 length = REQUEST_LENGTH();
15355
15356 col_append_fstr(pinfo->cinfo, COL_INFO, "-%s",
15357 val_to_str(minor, sync_extension_minor,
15358 "<Unknown opcode %d>"));
15359 switch (minor) {
15360 case 0:
15361 syncInitialize(tvb, pinfo, offsetp, t, byte_order, length);
15362 break;
15363 case 1:
15364 syncListSystemCounters(tvb, pinfo, offsetp, t, byte_order, length);
15365 break;
15366 case 2:
15367 syncCreateCounter(tvb, pinfo, offsetp, t, byte_order, length);
15368 break;
15369 case 3:
15370 syncSetCounter(tvb, pinfo, offsetp, t, byte_order, length);
15371 break;
15372 case 4:
15373 syncChangeCounter(tvb, pinfo, offsetp, t, byte_order, length);
15374 break;
15375 case 5:
15376 syncQueryCounter(tvb, pinfo, offsetp, t, byte_order, length);
15377 break;
15378 case 6:
15379 syncDestroyCounter(tvb, pinfo, offsetp, t, byte_order, length);
15380 break;
15381 case 7:
15382 syncAwait(tvb, pinfo, offsetp, t, byte_order, length);
15383 break;
15384 case 8:
15385 syncCreateAlarm(tvb, pinfo, offsetp, t, byte_order, length);
15386 break;
15387 case 9:
15388 syncChangeAlarm(tvb, pinfo, offsetp, t, byte_order, length);
15389 break;
15390 case 10:
15391 syncQueryAlarm(tvb, pinfo, offsetp, t, byte_order, length);
15392 break;
15393 case 11:
15394 syncDestroyAlarm(tvb, pinfo, offsetp, t, byte_order, length);
15395 break;
15396 case 12:
15397 syncSetPriority(tvb, pinfo, offsetp, t, byte_order, length);
15398 break;
15399 case 13:
15400 syncGetPriority(tvb, pinfo, offsetp, t, byte_order, length);
15401 break;
15402 case 14:
15403 syncCreateFence(tvb, pinfo, offsetp, t, byte_order, length);
15404 break;
15405 case 15:
15406 syncTriggerFence(tvb, pinfo, offsetp, t, byte_order, length);
15407 break;
15408 case 16:
15409 syncResetFence(tvb, pinfo, offsetp, t, byte_order, length);
15410 break;
15411 case 17:
15412 syncDestroyFence(tvb, pinfo, offsetp, t, byte_order, length);
15413 break;
15414 case 18:
15415 syncQueryFence(tvb, pinfo, offsetp, t, byte_order, length);
15416 break;
15417 case 19:
15418 syncAwaitFence(tvb, pinfo, offsetp, t, byte_order, length);
15419 break;
15420 /* No need for a default case here, since Unknown is printed above,
15421 and UNDECODED() is taken care of by dissect_x11_request */
15422 }
15423}
15424
15425static void register_sync(void)
15426{
15427 set_handler("SYNC", dispatch_sync, sync_errors, sync_events, NULL, sync_replies);
15428}
15429
15430static void xc_miscGetVersion(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
15431{
15432 proto_tree_add_item(t, hf_x11_xc_misc_GetVersion_client_major_version, tvb, *offsetp, 2, byte_order);
15433 *offsetp += 2;
15434 proto_tree_add_item(t, hf_x11_xc_misc_GetVersion_client_minor_version, tvb, *offsetp, 2, byte_order);
15435 *offsetp += 2;
15436}
15437static void xc_miscGetVersion_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
15438{
15439 int sequence_number;
15440
15441 col_append_fstr(pinfo->cinfo, COL_INFO, "-GetVersion");
15442
15443 REPLY(reply);
15444 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
15445 *offsetp += 1;
15446 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
15447 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
15448 "%d (xc_misc-GetVersion)", sequence_number);
15449 *offsetp += 2;
15450 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
15451 *offsetp += 4;
15452 proto_tree_add_item(t, hf_x11_xc_misc_GetVersion_reply_server_major_version, tvb, *offsetp, 2, byte_order);
15453 *offsetp += 2;
15454 proto_tree_add_item(t, hf_x11_xc_misc_GetVersion_reply_server_minor_version, tvb, *offsetp, 2, byte_order);
15455 *offsetp += 2;
15456}
15457
15458static void xc_miscGetXIDRange(tvbuff_t *tvb _U_, packet_info *pinfo _U_, int *offsetp _U_, proto_tree *t _U_, unsigned byte_order _U_, int length _U_)
15459{
15460}
15461static void xc_miscGetXIDRange_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
15462{
15463 int sequence_number;
15464
15465 col_append_fstr(pinfo->cinfo, COL_INFO, "-GetXIDRange");
15466
15467 REPLY(reply);
15468 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
15469 *offsetp += 1;
15470 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
15471 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
15472 "%d (xc_misc-GetXIDRange)", sequence_number);
15473 *offsetp += 2;
15474 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
15475 *offsetp += 4;
15476 proto_tree_add_item(t, hf_x11_xc_misc_GetXIDRange_reply_start_id, tvb, *offsetp, 4, byte_order);
15477 *offsetp += 4;
15478 proto_tree_add_item(t, hf_x11_xc_misc_GetXIDRange_reply_count, tvb, *offsetp, 4, byte_order);
15479 *offsetp += 4;
15480}
15481
15482static void xc_miscGetXIDList(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
15483{
15484 proto_tree_add_item(t, hf_x11_xc_misc_GetXIDList_count, tvb, *offsetp, 4, byte_order);
15485 *offsetp += 4;
15486}
15487static void xc_miscGetXIDList_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
15488{
15489 int sequence_number;
15490 int f_ids_len;
15491
15492 col_append_fstr(pinfo->cinfo, COL_INFO, "-GetXIDList");
15493
15494 REPLY(reply);
15495 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
15496 *offsetp += 1;
15497 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
15498 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
15499 "%d (xc_misc-GetXIDList)", sequence_number);
15500 *offsetp += 2;
15501 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
15502 *offsetp += 4;
15503 f_ids_len = tvb_get_uint32(tvb, *offsetp, byte_order);
15504 proto_tree_add_item(t, hf_x11_xc_misc_GetXIDList_reply_ids_len, tvb, *offsetp, 4, byte_order);
15505 *offsetp += 4;
15506 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 20, ENC_NA);
15507 *offsetp += 20;
15508 listOfCard32(tvb, offsetp, t, hf_x11_xc_misc_GetXIDList_reply_ids, hf_x11_xc_misc_GetXIDList_reply_ids_item, f_ids_len, byte_order);
15509}
15510static const value_string xc_misc_extension_minor[] = {
15511 { 0, "GetVersion" },
15512 { 1, "GetXIDRange" },
15513 { 2, "GetXIDList" },
15514 { 0, NULL }
15515};
15516static const x11_event_info xc_misc_events[] = {
15517 { NULL, NULL }
15518};
15519static const x11_reply_info xc_misc_replies[] = {
15520 { 0, xc_miscGetVersion_Reply },
15521 { 1, xc_miscGetXIDRange_Reply },
15522 { 2, xc_miscGetXIDList_Reply },
15523 { 0, NULL }
15524};
15525
15526static void dispatch_xc_misc(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
15527{
15528 int minor, length;
15529 minor = CARD8(xc_misc_extension_minor);
15530 length = REQUEST_LENGTH();
15531
15532 col_append_fstr(pinfo->cinfo, COL_INFO, "-%s",
15533 val_to_str(minor, xc_misc_extension_minor,
15534 "<Unknown opcode %d>"));
15535 switch (minor) {
15536 case 0:
15537 xc_miscGetVersion(tvb, pinfo, offsetp, t, byte_order, length);
15538 break;
15539 case 1:
15540 xc_miscGetXIDRange(tvb, pinfo, offsetp, t, byte_order, length);
15541 break;
15542 case 2:
15543 xc_miscGetXIDList(tvb, pinfo, offsetp, t, byte_order, length);
15544 break;
15545 /* No need for a default case here, since Unknown is printed above,
15546 and UNDECODED() is taken care of by dissect_x11_request */
15547 }
15548}
15549
15550static void register_xc_misc(void)
15551{
15552 set_handler("XC-MISC", dispatch_xc_misc, xc_misc_errors, xc_misc_events, NULL, xc_misc_replies);
15553}
15554
15555static void xevieQueryVersion(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
15556{
15557 proto_tree_add_item(t, hf_x11_xevie_QueryVersion_client_major_version, tvb, *offsetp, 2, byte_order);
15558 *offsetp += 2;
15559 proto_tree_add_item(t, hf_x11_xevie_QueryVersion_client_minor_version, tvb, *offsetp, 2, byte_order);
15560 *offsetp += 2;
15561}
15562static void xevieQueryVersion_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
15563{
15564 int sequence_number;
15565
15566 col_append_fstr(pinfo->cinfo, COL_INFO, "-QueryVersion");
15567
15568 REPLY(reply);
15569 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
15570 *offsetp += 1;
15571 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
15572 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
15573 "%d (xevie-QueryVersion)", sequence_number);
15574 *offsetp += 2;
15575 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
15576 *offsetp += 4;
15577 proto_tree_add_item(t, hf_x11_xevie_QueryVersion_reply_server_major_version, tvb, *offsetp, 2, byte_order);
15578 *offsetp += 2;
15579 proto_tree_add_item(t, hf_x11_xevie_QueryVersion_reply_server_minor_version, tvb, *offsetp, 2, byte_order);
15580 *offsetp += 2;
15581 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 20, ENC_NA);
15582 *offsetp += 20;
15583}
15584
15585static void xevieStart(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
15586{
15587 proto_tree_add_item(t, hf_x11_xevie_Start_screen, tvb, *offsetp, 4, byte_order);
15588 *offsetp += 4;
15589}
15590static void xevieStart_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
15591{
15592 int sequence_number;
15593
15594 col_append_fstr(pinfo->cinfo, COL_INFO, "-Start");
15595
15596 REPLY(reply);
15597 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
15598 *offsetp += 1;
15599 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
15600 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
15601 "%d (xevie-Start)", sequence_number);
15602 *offsetp += 2;
15603 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
15604 *offsetp += 4;
15605 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 24, ENC_NA);
15606 *offsetp += 24;
15607}
15608
15609static void xevieEnd(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
15610{
15611 proto_tree_add_item(t, hf_x11_xevie_End_cmap, tvb, *offsetp, 4, byte_order);
15612 *offsetp += 4;
15613}
15614static void xevieEnd_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
15615{
15616 int sequence_number;
15617
15618 col_append_fstr(pinfo->cinfo, COL_INFO, "-End");
15619
15620 REPLY(reply);
15621 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
15622 *offsetp += 1;
15623 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
15624 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
15625 "%d (xevie-End)", sequence_number);
15626 *offsetp += 2;
15627 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
15628 *offsetp += 4;
15629 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 24, ENC_NA);
15630 *offsetp += 24;
15631}
15632
15633static void struct_xevie_Event(tvbuff_t *tvb, int *offsetp, proto_tree *root, unsigned byte_order _U_, int count)
15634{
15635 int i;
15636 for (i = 0; i < count; i++) {
15637 proto_item *item;
15638 proto_tree *t;
15639
15640 item = proto_tree_add_item(root, hf_x11_struct_xevie_Event, tvb, *offsetp, 32, ENC_NA);
15641 t = proto_item_add_subtree(item, ett_x11_rectangle);
15642 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 32, ENC_NA);
15643 *offsetp += 32;
15644 }
15645}
15646
15647static void xevieSend(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
15648{
15649 struct_xevie_Event(tvb, offsetp, t, byte_order, 1);
15650 proto_tree_add_item(t, hf_x11_xevie_Send_data_type, tvb, *offsetp, 4, byte_order);
15651 *offsetp += 4;
15652 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 64, ENC_NA);
15653 *offsetp += 64;
15654}
15655static void xevieSend_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
15656{
15657 int sequence_number;
15658
15659 col_append_fstr(pinfo->cinfo, COL_INFO, "-Send");
15660
15661 REPLY(reply);
15662 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
15663 *offsetp += 1;
15664 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
15665 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
15666 "%d (xevie-Send)", sequence_number);
15667 *offsetp += 2;
15668 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
15669 *offsetp += 4;
15670 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 24, ENC_NA);
15671 *offsetp += 24;
15672}
15673
15674static void xevieSelectInput(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
15675{
15676 proto_tree_add_item(t, hf_x11_xevie_SelectInput_event_mask, tvb, *offsetp, 4, byte_order);
15677 *offsetp += 4;
15678}
15679static void xevieSelectInput_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
15680{
15681 int sequence_number;
15682
15683 col_append_fstr(pinfo->cinfo, COL_INFO, "-SelectInput");
15684
15685 REPLY(reply);
15686 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
15687 *offsetp += 1;
15688 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
15689 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
15690 "%d (xevie-SelectInput)", sequence_number);
15691 *offsetp += 2;
15692 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
15693 *offsetp += 4;
15694 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 24, ENC_NA);
15695 *offsetp += 24;
15696}
15697static const value_string xevie_extension_minor[] = {
15698 { 0, "QueryVersion" },
15699 { 1, "Start" },
15700 { 2, "End" },
15701 { 3, "Send" },
15702 { 4, "SelectInput" },
15703 { 0, NULL }
15704};
15705static const x11_event_info xevie_events[] = {
15706 { NULL, NULL }
15707};
15708static const x11_reply_info xevie_replies[] = {
15709 { 0, xevieQueryVersion_Reply },
15710 { 1, xevieStart_Reply },
15711 { 2, xevieEnd_Reply },
15712 { 3, xevieSend_Reply },
15713 { 4, xevieSelectInput_Reply },
15714 { 0, NULL }
15715};
15716
15717static void dispatch_xevie(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
15718{
15719 int minor, length;
15720 minor = CARD8(xevie_extension_minor);
15721 length = REQUEST_LENGTH();
15722
15723 col_append_fstr(pinfo->cinfo, COL_INFO, "-%s",
15724 val_to_str(minor, xevie_extension_minor,
15725 "<Unknown opcode %d>"));
15726 switch (minor) {
15727 case 0:
15728 xevieQueryVersion(tvb, pinfo, offsetp, t, byte_order, length);
15729 break;
15730 case 1:
15731 xevieStart(tvb, pinfo, offsetp, t, byte_order, length);
15732 break;
15733 case 2:
15734 xevieEnd(tvb, pinfo, offsetp, t, byte_order, length);
15735 break;
15736 case 3:
15737 xevieSend(tvb, pinfo, offsetp, t, byte_order, length);
15738 break;
15739 case 4:
15740 xevieSelectInput(tvb, pinfo, offsetp, t, byte_order, length);
15741 break;
15742 /* No need for a default case here, since Unknown is printed above,
15743 and UNDECODED() is taken care of by dissect_x11_request */
15744 }
15745}
15746
15747static void register_xevie(void)
15748{
15749 set_handler("XEVIE", dispatch_xevie, xevie_errors, xevie_events, NULL, xevie_replies);
15750}
15751
15752static void struct_xf86dri_DrmClipRect(tvbuff_t *tvb, int *offsetp, proto_tree *root, unsigned byte_order _U_, int count)
15753{
15754 int i;
15755 for (i = 0; i < count; i++) {
15756 proto_item *item;
15757 proto_tree *t;
15758
15759 item = proto_tree_add_item(root, hf_x11_struct_xf86dri_DrmClipRect, tvb, *offsetp, 8, ENC_NA);
15760 t = proto_item_add_subtree(item, ett_x11_rectangle);
15761 proto_tree_add_item(t, hf_x11_struct_xf86dri_DrmClipRect_x1, tvb, *offsetp, 2, byte_order);
15762 *offsetp += 2;
15763 proto_tree_add_item(t, hf_x11_struct_xf86dri_DrmClipRect_y1, tvb, *offsetp, 2, byte_order);
15764 *offsetp += 2;
15765 proto_tree_add_item(t, hf_x11_struct_xf86dri_DrmClipRect_x2, tvb, *offsetp, 2, byte_order);
15766 *offsetp += 2;
15767 proto_tree_add_item(t, hf_x11_struct_xf86dri_DrmClipRect_x3, tvb, *offsetp, 2, byte_order);
15768 *offsetp += 2;
15769 }
15770}
15771
15772static void xf86driQueryVersion(tvbuff_t *tvb _U_, packet_info *pinfo _U_, int *offsetp _U_, proto_tree *t _U_, unsigned byte_order _U_, int length _U_)
15773{
15774}
15775static void xf86driQueryVersion_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
15776{
15777 int sequence_number;
15778
15779 col_append_fstr(pinfo->cinfo, COL_INFO, "-QueryVersion");
15780
15781 REPLY(reply);
15782 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
15783 *offsetp += 1;
15784 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
15785 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
15786 "%d (xf86dri-QueryVersion)", sequence_number);
15787 *offsetp += 2;
15788 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
15789 *offsetp += 4;
15790 proto_tree_add_item(t, hf_x11_xf86dri_QueryVersion_reply_dri_major_version, tvb, *offsetp, 2, byte_order);
15791 *offsetp += 2;
15792 proto_tree_add_item(t, hf_x11_xf86dri_QueryVersion_reply_dri_minor_version, tvb, *offsetp, 2, byte_order);
15793 *offsetp += 2;
15794 proto_tree_add_item(t, hf_x11_xf86dri_QueryVersion_reply_dri_minor_patch, tvb, *offsetp, 4, byte_order);
15795 *offsetp += 4;
15796}
15797
15798static void xf86driQueryDirectRenderingCapable(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
15799{
15800 proto_tree_add_item(t, hf_x11_xf86dri_QueryDirectRenderingCapable_screen, tvb, *offsetp, 4, byte_order);
15801 *offsetp += 4;
15802}
15803static void xf86driQueryDirectRenderingCapable_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
15804{
15805 int sequence_number;
15806
15807 col_append_fstr(pinfo->cinfo, COL_INFO, "-QueryDirectRenderingCapable");
15808
15809 REPLY(reply);
15810 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
15811 *offsetp += 1;
15812 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
15813 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
15814 "%d (xf86dri-QueryDirectRenderingCapable)", sequence_number);
15815 *offsetp += 2;
15816 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
15817 *offsetp += 4;
15818 proto_tree_add_item(t, hf_x11_xf86dri_QueryDirectRenderingCapable_reply_is_capable, tvb, *offsetp, 1, byte_order);
15819 *offsetp += 1;
15820}
15821
15822static void xf86driOpenConnection(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
15823{
15824 proto_tree_add_item(t, hf_x11_xf86dri_OpenConnection_screen, tvb, *offsetp, 4, byte_order);
15825 *offsetp += 4;
15826}
15827static void xf86driOpenConnection_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
15828{
15829 int sequence_number;
15830 int f_bus_id_len;
15831
15832 col_append_fstr(pinfo->cinfo, COL_INFO, "-OpenConnection");
15833
15834 REPLY(reply);
15835 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
15836 *offsetp += 1;
15837 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
15838 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
15839 "%d (xf86dri-OpenConnection)", sequence_number);
15840 *offsetp += 2;
15841 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
15842 *offsetp += 4;
15843 proto_tree_add_item(t, hf_x11_xf86dri_OpenConnection_reply_sarea_handle_low, tvb, *offsetp, 4, byte_order);
15844 *offsetp += 4;
15845 proto_tree_add_item(t, hf_x11_xf86dri_OpenConnection_reply_sarea_handle_high, tvb, *offsetp, 4, byte_order);
15846 *offsetp += 4;
15847 f_bus_id_len = tvb_get_uint32(tvb, *offsetp, byte_order);
15848 proto_tree_add_item(t, hf_x11_xf86dri_OpenConnection_reply_bus_id_len, tvb, *offsetp, 4, byte_order);
15849 *offsetp += 4;
15850 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 12, ENC_NA);
15851 *offsetp += 12;
15852 listOfByte(tvb, offsetp, t, hf_x11_xf86dri_OpenConnection_reply_bus_id, f_bus_id_len, byte_order);
15853}
15854
15855static void xf86driCloseConnection(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
15856{
15857 proto_tree_add_item(t, hf_x11_xf86dri_CloseConnection_screen, tvb, *offsetp, 4, byte_order);
15858 *offsetp += 4;
15859}
15860
15861static void xf86driGetClientDriverName(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
15862{
15863 proto_tree_add_item(t, hf_x11_xf86dri_GetClientDriverName_screen, tvb, *offsetp, 4, byte_order);
15864 *offsetp += 4;
15865}
15866static void xf86driGetClientDriverName_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
15867{
15868 int sequence_number;
15869 int f_client_driver_name_len;
15870
15871 col_append_fstr(pinfo->cinfo, COL_INFO, "-GetClientDriverName");
15872
15873 REPLY(reply);
15874 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
15875 *offsetp += 1;
15876 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
15877 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
15878 "%d (xf86dri-GetClientDriverName)", sequence_number);
15879 *offsetp += 2;
15880 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
15881 *offsetp += 4;
15882 proto_tree_add_item(t, hf_x11_xf86dri_GetClientDriverName_reply_client_driver_major_version, tvb, *offsetp, 4, byte_order);
15883 *offsetp += 4;
15884 proto_tree_add_item(t, hf_x11_xf86dri_GetClientDriverName_reply_client_driver_minor_version, tvb, *offsetp, 4, byte_order);
15885 *offsetp += 4;
15886 proto_tree_add_item(t, hf_x11_xf86dri_GetClientDriverName_reply_client_driver_patch_version, tvb, *offsetp, 4, byte_order);
15887 *offsetp += 4;
15888 f_client_driver_name_len = tvb_get_uint32(tvb, *offsetp, byte_order);
15889 proto_tree_add_item(t, hf_x11_xf86dri_GetClientDriverName_reply_client_driver_name_len, tvb, *offsetp, 4, byte_order);
15890 *offsetp += 4;
15891 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 8, ENC_NA);
15892 *offsetp += 8;
15893 listOfByte(tvb, offsetp, t, hf_x11_xf86dri_GetClientDriverName_reply_client_driver_name, f_client_driver_name_len, byte_order);
15894}
15895
15896static void xf86driCreateContext(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
15897{
15898 proto_tree_add_item(t, hf_x11_xf86dri_CreateContext_screen, tvb, *offsetp, 4, byte_order);
15899 *offsetp += 4;
15900 proto_tree_add_item(t, hf_x11_xf86dri_CreateContext_visual, tvb, *offsetp, 4, byte_order);
15901 *offsetp += 4;
15902 proto_tree_add_item(t, hf_x11_xf86dri_CreateContext_context, tvb, *offsetp, 4, byte_order);
15903 *offsetp += 4;
15904}
15905static void xf86driCreateContext_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
15906{
15907 int sequence_number;
15908
15909 col_append_fstr(pinfo->cinfo, COL_INFO, "-CreateContext");
15910
15911 REPLY(reply);
15912 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
15913 *offsetp += 1;
15914 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
15915 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
15916 "%d (xf86dri-CreateContext)", sequence_number);
15917 *offsetp += 2;
15918 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
15919 *offsetp += 4;
15920 proto_tree_add_item(t, hf_x11_xf86dri_CreateContext_reply_hw_context, tvb, *offsetp, 4, byte_order);
15921 *offsetp += 4;
15922}
15923
15924static void xf86driDestroyContext(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
15925{
15926 proto_tree_add_item(t, hf_x11_xf86dri_DestroyContext_screen, tvb, *offsetp, 4, byte_order);
15927 *offsetp += 4;
15928 proto_tree_add_item(t, hf_x11_xf86dri_DestroyContext_context, tvb, *offsetp, 4, byte_order);
15929 *offsetp += 4;
15930}
15931
15932static void xf86driCreateDrawable(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
15933{
15934 proto_tree_add_item(t, hf_x11_xf86dri_CreateDrawable_screen, tvb, *offsetp, 4, byte_order);
15935 *offsetp += 4;
15936 proto_tree_add_item(t, hf_x11_xf86dri_CreateDrawable_drawable, tvb, *offsetp, 4, byte_order);
15937 *offsetp += 4;
15938}
15939static void xf86driCreateDrawable_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
15940{
15941 int sequence_number;
15942
15943 col_append_fstr(pinfo->cinfo, COL_INFO, "-CreateDrawable");
15944
15945 REPLY(reply);
15946 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
15947 *offsetp += 1;
15948 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
15949 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
15950 "%d (xf86dri-CreateDrawable)", sequence_number);
15951 *offsetp += 2;
15952 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
15953 *offsetp += 4;
15954 proto_tree_add_item(t, hf_x11_xf86dri_CreateDrawable_reply_hw_drawable_handle, tvb, *offsetp, 4, byte_order);
15955 *offsetp += 4;
15956}
15957
15958static void xf86driDestroyDrawable(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
15959{
15960 proto_tree_add_item(t, hf_x11_xf86dri_DestroyDrawable_screen, tvb, *offsetp, 4, byte_order);
15961 *offsetp += 4;
15962 proto_tree_add_item(t, hf_x11_xf86dri_DestroyDrawable_drawable, tvb, *offsetp, 4, byte_order);
15963 *offsetp += 4;
15964}
15965
15966static void xf86driGetDrawableInfo(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
15967{
15968 proto_tree_add_item(t, hf_x11_xf86dri_GetDrawableInfo_screen, tvb, *offsetp, 4, byte_order);
15969 *offsetp += 4;
15970 proto_tree_add_item(t, hf_x11_xf86dri_GetDrawableInfo_drawable, tvb, *offsetp, 4, byte_order);
15971 *offsetp += 4;
15972}
15973static void xf86driGetDrawableInfo_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
15974{
15975 int sequence_number;
15976 int f_num_clip_rects;
15977 int f_num_back_clip_rects;
15978
15979 col_append_fstr(pinfo->cinfo, COL_INFO, "-GetDrawableInfo");
15980
15981 REPLY(reply);
15982 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
15983 *offsetp += 1;
15984 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
15985 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
15986 "%d (xf86dri-GetDrawableInfo)", sequence_number);
15987 *offsetp += 2;
15988 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
15989 *offsetp += 4;
15990 proto_tree_add_item(t, hf_x11_xf86dri_GetDrawableInfo_reply_drawable_table_index, tvb, *offsetp, 4, byte_order);
15991 *offsetp += 4;
15992 proto_tree_add_item(t, hf_x11_xf86dri_GetDrawableInfo_reply_drawable_table_stamp, tvb, *offsetp, 4, byte_order);
15993 *offsetp += 4;
15994 proto_tree_add_item(t, hf_x11_xf86dri_GetDrawableInfo_reply_drawable_origin_X, tvb, *offsetp, 2, byte_order);
15995 *offsetp += 2;
15996 proto_tree_add_item(t, hf_x11_xf86dri_GetDrawableInfo_reply_drawable_origin_Y, tvb, *offsetp, 2, byte_order);
15997 *offsetp += 2;
15998 proto_tree_add_item(t, hf_x11_xf86dri_GetDrawableInfo_reply_drawable_size_W, tvb, *offsetp, 2, byte_order);
15999 *offsetp += 2;
16000 proto_tree_add_item(t, hf_x11_xf86dri_GetDrawableInfo_reply_drawable_size_H, tvb, *offsetp, 2, byte_order);
16001 *offsetp += 2;
16002 f_num_clip_rects = tvb_get_uint32(tvb, *offsetp, byte_order);
16003 proto_tree_add_item(t, hf_x11_xf86dri_GetDrawableInfo_reply_num_clip_rects, tvb, *offsetp, 4, byte_order);
16004 *offsetp += 4;
16005 proto_tree_add_item(t, hf_x11_xf86dri_GetDrawableInfo_reply_back_x, tvb, *offsetp, 2, byte_order);
16006 *offsetp += 2;
16007 proto_tree_add_item(t, hf_x11_xf86dri_GetDrawableInfo_reply_back_y, tvb, *offsetp, 2, byte_order);
16008 *offsetp += 2;
16009 f_num_back_clip_rects = tvb_get_uint32(tvb, *offsetp, byte_order);
16010 proto_tree_add_item(t, hf_x11_xf86dri_GetDrawableInfo_reply_num_back_clip_rects, tvb, *offsetp, 4, byte_order);
16011 *offsetp += 4;
16012 struct_xf86dri_DrmClipRect(tvb, offsetp, t, byte_order, f_num_clip_rects);
16013 struct_xf86dri_DrmClipRect(tvb, offsetp, t, byte_order, f_num_back_clip_rects);
16014}
16015
16016static void xf86driGetDeviceInfo(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
16017{
16018 proto_tree_add_item(t, hf_x11_xf86dri_GetDeviceInfo_screen, tvb, *offsetp, 4, byte_order);
16019 *offsetp += 4;
16020}
16021static void xf86driGetDeviceInfo_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
16022{
16023 int sequence_number;
16024 int f_device_private_size;
16025
16026 col_append_fstr(pinfo->cinfo, COL_INFO, "-GetDeviceInfo");
16027
16028 REPLY(reply);
16029 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
16030 *offsetp += 1;
16031 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
16032 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
16033 "%d (xf86dri-GetDeviceInfo)", sequence_number);
16034 *offsetp += 2;
16035 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
16036 *offsetp += 4;
16037 proto_tree_add_item(t, hf_x11_xf86dri_GetDeviceInfo_reply_framebuffer_handle_low, tvb, *offsetp, 4, byte_order);
16038 *offsetp += 4;
16039 proto_tree_add_item(t, hf_x11_xf86dri_GetDeviceInfo_reply_framebuffer_handle_high, tvb, *offsetp, 4, byte_order);
16040 *offsetp += 4;
16041 proto_tree_add_item(t, hf_x11_xf86dri_GetDeviceInfo_reply_framebuffer_origin_offset, tvb, *offsetp, 4, byte_order);
16042 *offsetp += 4;
16043 proto_tree_add_item(t, hf_x11_xf86dri_GetDeviceInfo_reply_framebuffer_size, tvb, *offsetp, 4, byte_order);
16044 *offsetp += 4;
16045 proto_tree_add_item(t, hf_x11_xf86dri_GetDeviceInfo_reply_framebuffer_stride, tvb, *offsetp, 4, byte_order);
16046 *offsetp += 4;
16047 f_device_private_size = tvb_get_uint32(tvb, *offsetp, byte_order);
16048 proto_tree_add_item(t, hf_x11_xf86dri_GetDeviceInfo_reply_device_private_size, tvb, *offsetp, 4, byte_order);
16049 *offsetp += 4;
16050 listOfCard32(tvb, offsetp, t, hf_x11_xf86dri_GetDeviceInfo_reply_device_private, hf_x11_xf86dri_GetDeviceInfo_reply_device_private_item, f_device_private_size, byte_order);
16051}
16052
16053static void xf86driAuthConnection(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
16054{
16055 proto_tree_add_item(t, hf_x11_xf86dri_AuthConnection_screen, tvb, *offsetp, 4, byte_order);
16056 *offsetp += 4;
16057 proto_tree_add_item(t, hf_x11_xf86dri_AuthConnection_magic, tvb, *offsetp, 4, byte_order);
16058 *offsetp += 4;
16059}
16060static void xf86driAuthConnection_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
16061{
16062 int sequence_number;
16063
16064 col_append_fstr(pinfo->cinfo, COL_INFO, "-AuthConnection");
16065
16066 REPLY(reply);
16067 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
16068 *offsetp += 1;
16069 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
16070 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
16071 "%d (xf86dri-AuthConnection)", sequence_number);
16072 *offsetp += 2;
16073 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
16074 *offsetp += 4;
16075 proto_tree_add_item(t, hf_x11_xf86dri_AuthConnection_reply_authenticated, tvb, *offsetp, 4, byte_order);
16076 *offsetp += 4;
16077}
16078static const value_string xf86dri_extension_minor[] = {
16079 { 0, "QueryVersion" },
16080 { 1, "QueryDirectRenderingCapable" },
16081 { 2, "OpenConnection" },
16082 { 3, "CloseConnection" },
16083 { 4, "GetClientDriverName" },
16084 { 5, "CreateContext" },
16085 { 6, "DestroyContext" },
16086 { 7, "CreateDrawable" },
16087 { 8, "DestroyDrawable" },
16088 { 9, "GetDrawableInfo" },
16089 { 10, "GetDeviceInfo" },
16090 { 11, "AuthConnection" },
16091 { 0, NULL }
16092};
16093static const x11_event_info xf86dri_events[] = {
16094 { NULL, NULL }
16095};
16096static const x11_reply_info xf86dri_replies[] = {
16097 { 0, xf86driQueryVersion_Reply },
16098 { 1, xf86driQueryDirectRenderingCapable_Reply },
16099 { 2, xf86driOpenConnection_Reply },
16100 { 4, xf86driGetClientDriverName_Reply },
16101 { 5, xf86driCreateContext_Reply },
16102 { 7, xf86driCreateDrawable_Reply },
16103 { 9, xf86driGetDrawableInfo_Reply },
16104 { 10, xf86driGetDeviceInfo_Reply },
16105 { 11, xf86driAuthConnection_Reply },
16106 { 0, NULL }
16107};
16108
16109static void dispatch_xf86dri(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
16110{
16111 int minor, length;
16112 minor = CARD8(xf86dri_extension_minor);
16113 length = REQUEST_LENGTH();
16114
16115 col_append_fstr(pinfo->cinfo, COL_INFO, "-%s",
16116 val_to_str(minor, xf86dri_extension_minor,
16117 "<Unknown opcode %d>"));
16118 switch (minor) {
16119 case 0:
16120 xf86driQueryVersion(tvb, pinfo, offsetp, t, byte_order, length);
16121 break;
16122 case 1:
16123 xf86driQueryDirectRenderingCapable(tvb, pinfo, offsetp, t, byte_order, length);
16124 break;
16125 case 2:
16126 xf86driOpenConnection(tvb, pinfo, offsetp, t, byte_order, length);
16127 break;
16128 case 3:
16129 xf86driCloseConnection(tvb, pinfo, offsetp, t, byte_order, length);
16130 break;
16131 case 4:
16132 xf86driGetClientDriverName(tvb, pinfo, offsetp, t, byte_order, length);
16133 break;
16134 case 5:
16135 xf86driCreateContext(tvb, pinfo, offsetp, t, byte_order, length);
16136 break;
16137 case 6:
16138 xf86driDestroyContext(tvb, pinfo, offsetp, t, byte_order, length);
16139 break;
16140 case 7:
16141 xf86driCreateDrawable(tvb, pinfo, offsetp, t, byte_order, length);
16142 break;
16143 case 8:
16144 xf86driDestroyDrawable(tvb, pinfo, offsetp, t, byte_order, length);
16145 break;
16146 case 9:
16147 xf86driGetDrawableInfo(tvb, pinfo, offsetp, t, byte_order, length);
16148 break;
16149 case 10:
16150 xf86driGetDeviceInfo(tvb, pinfo, offsetp, t, byte_order, length);
16151 break;
16152 case 11:
16153 xf86driAuthConnection(tvb, pinfo, offsetp, t, byte_order, length);
16154 break;
16155 /* No need for a default case here, since Unknown is printed above,
16156 and UNDECODED() is taken care of by dissect_x11_request */
16157 }
16158}
16159
16160static void register_xf86dri(void)
16161{
16162 set_handler("XFree86-DRI", dispatch_xf86dri, xf86dri_errors, xf86dri_events, NULL, xf86dri_replies);
16163}
16164
16165static void struct_xf86vidmode_ModeInfo(tvbuff_t *tvb, int *offsetp, proto_tree *root, unsigned byte_order _U_, int count)
16166{
16167 int i;
16168 for (i = 0; i < count; i++) {
16169 proto_item *item;
16170 proto_tree *t;
16171
16172 item = proto_tree_add_item(root, hf_x11_struct_xf86vidmode_ModeInfo, tvb, *offsetp, 48, ENC_NA);
16173 t = proto_item_add_subtree(item, ett_x11_rectangle);
16174 proto_tree_add_item(t, hf_x11_struct_xf86vidmode_ModeInfo_dotclock, tvb, *offsetp, 4, byte_order);
16175 *offsetp += 4;
16176 proto_tree_add_item(t, hf_x11_struct_xf86vidmode_ModeInfo_hdisplay, tvb, *offsetp, 2, byte_order);
16177 *offsetp += 2;
16178 proto_tree_add_item(t, hf_x11_struct_xf86vidmode_ModeInfo_hsyncstart, tvb, *offsetp, 2, byte_order);
16179 *offsetp += 2;
16180 proto_tree_add_item(t, hf_x11_struct_xf86vidmode_ModeInfo_hsyncend, tvb, *offsetp, 2, byte_order);
16181 *offsetp += 2;
16182 proto_tree_add_item(t, hf_x11_struct_xf86vidmode_ModeInfo_htotal, tvb, *offsetp, 2, byte_order);
16183 *offsetp += 2;
16184 proto_tree_add_item(t, hf_x11_struct_xf86vidmode_ModeInfo_hskew, tvb, *offsetp, 4, byte_order);
16185 *offsetp += 4;
16186 proto_tree_add_item(t, hf_x11_struct_xf86vidmode_ModeInfo_vdisplay, tvb, *offsetp, 2, byte_order);
16187 *offsetp += 2;
16188 proto_tree_add_item(t, hf_x11_struct_xf86vidmode_ModeInfo_vsyncstart, tvb, *offsetp, 2, byte_order);
16189 *offsetp += 2;
16190 proto_tree_add_item(t, hf_x11_struct_xf86vidmode_ModeInfo_vsyncend, tvb, *offsetp, 2, byte_order);
16191 *offsetp += 2;
16192 proto_tree_add_item(t, hf_x11_struct_xf86vidmode_ModeInfo_vtotal, tvb, *offsetp, 2, byte_order);
16193 *offsetp += 2;
16194 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 4, ENC_NA);
16195 *offsetp += 4;
16196 {
16197 static int* const flags_bits [] = {
16198 &hf_x11_struct_xf86vidmode_ModeInfo_flags_mask_Positive_HSync,
16199 &hf_x11_struct_xf86vidmode_ModeInfo_flags_mask_Negative_HSync,
16200 &hf_x11_struct_xf86vidmode_ModeInfo_flags_mask_Positive_VSync,
16201 &hf_x11_struct_xf86vidmode_ModeInfo_flags_mask_Negative_VSync,
16202 &hf_x11_struct_xf86vidmode_ModeInfo_flags_mask_Interlace,
16203 &hf_x11_struct_xf86vidmode_ModeInfo_flags_mask_Composite_Sync,
16204 &hf_x11_struct_xf86vidmode_ModeInfo_flags_mask_Positive_CSync,
16205 &hf_x11_struct_xf86vidmode_ModeInfo_flags_mask_Negative_CSync,
16206 &hf_x11_struct_xf86vidmode_ModeInfo_flags_mask_HSkew,
16207 &hf_x11_struct_xf86vidmode_ModeInfo_flags_mask_Broadcast,
16208 &hf_x11_struct_xf86vidmode_ModeInfo_flags_mask_Pixmux,
16209 &hf_x11_struct_xf86vidmode_ModeInfo_flags_mask_Double_Clock,
16210 &hf_x11_struct_xf86vidmode_ModeInfo_flags_mask_Half_Clock,
16211 NULL
16212 };
16213 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_struct_xf86vidmode_ModeInfo_flags, ett_x11_rectangle, flags_bits, byte_order);
16214 }
16215 *offsetp += 4;
16216 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 12, ENC_NA);
16217 *offsetp += 12;
16218 proto_tree_add_item(t, hf_x11_struct_xf86vidmode_ModeInfo_privsize, tvb, *offsetp, 4, byte_order);
16219 *offsetp += 4;
16220 }
16221}
16222
16223static void xf86vidmodeQueryVersion(tvbuff_t *tvb _U_, packet_info *pinfo _U_, int *offsetp _U_, proto_tree *t _U_, unsigned byte_order _U_, int length _U_)
16224{
16225}
16226static void xf86vidmodeQueryVersion_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
16227{
16228 int sequence_number;
16229
16230 col_append_fstr(pinfo->cinfo, COL_INFO, "-QueryVersion");
16231
16232 REPLY(reply);
16233 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
16234 *offsetp += 1;
16235 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
16236 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
16237 "%d (xf86vidmode-QueryVersion)", sequence_number);
16238 *offsetp += 2;
16239 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
16240 *offsetp += 4;
16241 proto_tree_add_item(t, hf_x11_xf86vidmode_QueryVersion_reply_major_version, tvb, *offsetp, 2, byte_order);
16242 *offsetp += 2;
16243 proto_tree_add_item(t, hf_x11_xf86vidmode_QueryVersion_reply_minor_version, tvb, *offsetp, 2, byte_order);
16244 *offsetp += 2;
16245}
16246
16247static void xf86vidmodeGetModeLine(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
16248{
16249 proto_tree_add_item(t, hf_x11_xf86vidmode_GetModeLine_screen, tvb, *offsetp, 2, byte_order);
16250 *offsetp += 2;
16251 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 2, ENC_NA);
16252 *offsetp += 2;
16253}
16254static void xf86vidmodeGetModeLine_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
16255{
16256 int sequence_number;
16257 int f_privsize;
16258
16259 col_append_fstr(pinfo->cinfo, COL_INFO, "-GetModeLine");
16260
16261 REPLY(reply);
16262 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
16263 *offsetp += 1;
16264 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
16265 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
16266 "%d (xf86vidmode-GetModeLine)", sequence_number);
16267 *offsetp += 2;
16268 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
16269 *offsetp += 4;
16270 proto_tree_add_item(t, hf_x11_xf86vidmode_GetModeLine_reply_dotclock, tvb, *offsetp, 4, byte_order);
16271 *offsetp += 4;
16272 proto_tree_add_item(t, hf_x11_xf86vidmode_GetModeLine_reply_hdisplay, tvb, *offsetp, 2, byte_order);
16273 *offsetp += 2;
16274 proto_tree_add_item(t, hf_x11_xf86vidmode_GetModeLine_reply_hsyncstart, tvb, *offsetp, 2, byte_order);
16275 *offsetp += 2;
16276 proto_tree_add_item(t, hf_x11_xf86vidmode_GetModeLine_reply_hsyncend, tvb, *offsetp, 2, byte_order);
16277 *offsetp += 2;
16278 proto_tree_add_item(t, hf_x11_xf86vidmode_GetModeLine_reply_htotal, tvb, *offsetp, 2, byte_order);
16279 *offsetp += 2;
16280 proto_tree_add_item(t, hf_x11_xf86vidmode_GetModeLine_reply_hskew, tvb, *offsetp, 2, byte_order);
16281 *offsetp += 2;
16282 proto_tree_add_item(t, hf_x11_xf86vidmode_GetModeLine_reply_vdisplay, tvb, *offsetp, 2, byte_order);
16283 *offsetp += 2;
16284 proto_tree_add_item(t, hf_x11_xf86vidmode_GetModeLine_reply_vsyncstart, tvb, *offsetp, 2, byte_order);
16285 *offsetp += 2;
16286 proto_tree_add_item(t, hf_x11_xf86vidmode_GetModeLine_reply_vsyncend, tvb, *offsetp, 2, byte_order);
16287 *offsetp += 2;
16288 proto_tree_add_item(t, hf_x11_xf86vidmode_GetModeLine_reply_vtotal, tvb, *offsetp, 2, byte_order);
16289 *offsetp += 2;
16290 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 2, ENC_NA);
16291 *offsetp += 2;
16292 {
16293 static int* const flags_bits [] = {
16294 &hf_x11_xf86vidmode_GetModeLine_reply_flags_mask_Positive_HSync,
16295 &hf_x11_xf86vidmode_GetModeLine_reply_flags_mask_Negative_HSync,
16296 &hf_x11_xf86vidmode_GetModeLine_reply_flags_mask_Positive_VSync,
16297 &hf_x11_xf86vidmode_GetModeLine_reply_flags_mask_Negative_VSync,
16298 &hf_x11_xf86vidmode_GetModeLine_reply_flags_mask_Interlace,
16299 &hf_x11_xf86vidmode_GetModeLine_reply_flags_mask_Composite_Sync,
16300 &hf_x11_xf86vidmode_GetModeLine_reply_flags_mask_Positive_CSync,
16301 &hf_x11_xf86vidmode_GetModeLine_reply_flags_mask_Negative_CSync,
16302 &hf_x11_xf86vidmode_GetModeLine_reply_flags_mask_HSkew,
16303 &hf_x11_xf86vidmode_GetModeLine_reply_flags_mask_Broadcast,
16304 &hf_x11_xf86vidmode_GetModeLine_reply_flags_mask_Pixmux,
16305 &hf_x11_xf86vidmode_GetModeLine_reply_flags_mask_Double_Clock,
16306 &hf_x11_xf86vidmode_GetModeLine_reply_flags_mask_Half_Clock,
16307 NULL
16308 };
16309 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xf86vidmode_GetModeLine_reply_flags, ett_x11_rectangle, flags_bits, byte_order);
16310 }
16311 *offsetp += 4;
16312 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 12, ENC_NA);
16313 *offsetp += 12;
16314 f_privsize = tvb_get_uint32(tvb, *offsetp, byte_order);
16315 proto_tree_add_item(t, hf_x11_xf86vidmode_GetModeLine_reply_privsize, tvb, *offsetp, 4, byte_order);
16316 *offsetp += 4;
16317 listOfByte(tvb, offsetp, t, hf_x11_xf86vidmode_GetModeLine_reply_private, f_privsize, byte_order);
16318}
16319
16320static void xf86vidmodeModModeLine(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
16321{
16322 int f_privsize;
16323 proto_tree_add_item(t, hf_x11_xf86vidmode_ModModeLine_screen, tvb, *offsetp, 4, byte_order);
16324 *offsetp += 4;
16325 proto_tree_add_item(t, hf_x11_xf86vidmode_ModModeLine_hdisplay, tvb, *offsetp, 2, byte_order);
16326 *offsetp += 2;
16327 proto_tree_add_item(t, hf_x11_xf86vidmode_ModModeLine_hsyncstart, tvb, *offsetp, 2, byte_order);
16328 *offsetp += 2;
16329 proto_tree_add_item(t, hf_x11_xf86vidmode_ModModeLine_hsyncend, tvb, *offsetp, 2, byte_order);
16330 *offsetp += 2;
16331 proto_tree_add_item(t, hf_x11_xf86vidmode_ModModeLine_htotal, tvb, *offsetp, 2, byte_order);
16332 *offsetp += 2;
16333 proto_tree_add_item(t, hf_x11_xf86vidmode_ModModeLine_hskew, tvb, *offsetp, 2, byte_order);
16334 *offsetp += 2;
16335 proto_tree_add_item(t, hf_x11_xf86vidmode_ModModeLine_vdisplay, tvb, *offsetp, 2, byte_order);
16336 *offsetp += 2;
16337 proto_tree_add_item(t, hf_x11_xf86vidmode_ModModeLine_vsyncstart, tvb, *offsetp, 2, byte_order);
16338 *offsetp += 2;
16339 proto_tree_add_item(t, hf_x11_xf86vidmode_ModModeLine_vsyncend, tvb, *offsetp, 2, byte_order);
16340 *offsetp += 2;
16341 proto_tree_add_item(t, hf_x11_xf86vidmode_ModModeLine_vtotal, tvb, *offsetp, 2, byte_order);
16342 *offsetp += 2;
16343 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 2, ENC_NA);
16344 *offsetp += 2;
16345 {
16346 static int* const flags_bits [] = {
16347 &hf_x11_xf86vidmode_ModModeLine_flags_mask_Positive_HSync,
16348 &hf_x11_xf86vidmode_ModModeLine_flags_mask_Negative_HSync,
16349 &hf_x11_xf86vidmode_ModModeLine_flags_mask_Positive_VSync,
16350 &hf_x11_xf86vidmode_ModModeLine_flags_mask_Negative_VSync,
16351 &hf_x11_xf86vidmode_ModModeLine_flags_mask_Interlace,
16352 &hf_x11_xf86vidmode_ModModeLine_flags_mask_Composite_Sync,
16353 &hf_x11_xf86vidmode_ModModeLine_flags_mask_Positive_CSync,
16354 &hf_x11_xf86vidmode_ModModeLine_flags_mask_Negative_CSync,
16355 &hf_x11_xf86vidmode_ModModeLine_flags_mask_HSkew,
16356 &hf_x11_xf86vidmode_ModModeLine_flags_mask_Broadcast,
16357 &hf_x11_xf86vidmode_ModModeLine_flags_mask_Pixmux,
16358 &hf_x11_xf86vidmode_ModModeLine_flags_mask_Double_Clock,
16359 &hf_x11_xf86vidmode_ModModeLine_flags_mask_Half_Clock,
16360 NULL
16361 };
16362 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xf86vidmode_ModModeLine_flags, ett_x11_rectangle, flags_bits, byte_order);
16363 }
16364 *offsetp += 4;
16365 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 12, ENC_NA);
16366 *offsetp += 12;
16367 f_privsize = tvb_get_uint32(tvb, *offsetp, byte_order);
16368 proto_tree_add_item(t, hf_x11_xf86vidmode_ModModeLine_privsize, tvb, *offsetp, 4, byte_order);
16369 *offsetp += 4;
16370 listOfByte(tvb, offsetp, t, hf_x11_xf86vidmode_ModModeLine_private, f_privsize, byte_order);
16371 length -= f_privsize * 1;
16372}
16373
16374static void xf86vidmodeSwitchMode(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
16375{
16376 proto_tree_add_item(t, hf_x11_xf86vidmode_SwitchMode_screen, tvb, *offsetp, 2, byte_order);
16377 *offsetp += 2;
16378 proto_tree_add_item(t, hf_x11_xf86vidmode_SwitchMode_zoom, tvb, *offsetp, 2, byte_order);
16379 *offsetp += 2;
16380}
16381
16382static void xf86vidmodeGetMonitor(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
16383{
16384 proto_tree_add_item(t, hf_x11_xf86vidmode_GetMonitor_screen, tvb, *offsetp, 2, byte_order);
16385 *offsetp += 2;
16386 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 2, ENC_NA);
16387 *offsetp += 2;
16388}
16389static void xf86vidmodeGetMonitor_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
16390{
16391 int sequence_number;
16392 int f_vendor_length;
16393 int f_model_length;
16394 int f_num_hsync;
16395 int f_num_vsync;
16396
16397 col_append_fstr(pinfo->cinfo, COL_INFO, "-GetMonitor");
16398
16399 REPLY(reply);
16400 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
16401 *offsetp += 1;
16402 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
16403 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
16404 "%d (xf86vidmode-GetMonitor)", sequence_number);
16405 *offsetp += 2;
16406 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
16407 *offsetp += 4;
16408 f_vendor_length = tvb_get_uint8(tvb, *offsetp);
16409 proto_tree_add_item(t, hf_x11_xf86vidmode_GetMonitor_reply_vendor_length, tvb, *offsetp, 1, byte_order);
16410 *offsetp += 1;
16411 f_model_length = tvb_get_uint8(tvb, *offsetp);
16412 proto_tree_add_item(t, hf_x11_xf86vidmode_GetMonitor_reply_model_length, tvb, *offsetp, 1, byte_order);
16413 *offsetp += 1;
16414 f_num_hsync = tvb_get_uint8(tvb, *offsetp);
16415 proto_tree_add_item(t, hf_x11_xf86vidmode_GetMonitor_reply_num_hsync, tvb, *offsetp, 1, byte_order);
16416 *offsetp += 1;
16417 f_num_vsync = tvb_get_uint8(tvb, *offsetp);
16418 proto_tree_add_item(t, hf_x11_xf86vidmode_GetMonitor_reply_num_vsync, tvb, *offsetp, 1, byte_order);
16419 *offsetp += 1;
16420 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 20, ENC_NA);
16421 *offsetp += 20;
16422 listOfCard32(tvb, offsetp, t, hf_x11_xf86vidmode_GetMonitor_reply_hsync, hf_x11_xf86vidmode_GetMonitor_reply_hsync_item, f_num_hsync, byte_order);
16423 listOfCard32(tvb, offsetp, t, hf_x11_xf86vidmode_GetMonitor_reply_vsync, hf_x11_xf86vidmode_GetMonitor_reply_vsync_item, f_num_vsync, byte_order);
16424 listOfByte(tvb, offsetp, t, hf_x11_xf86vidmode_GetMonitor_reply_vendor, f_vendor_length, byte_order);
16425 listOfByte(tvb, offsetp, t, hf_x11_xf86vidmode_GetMonitor_reply_alignment_pad, (((f_vendor_length + 3) & (~3)) - f_vendor_length), byte_order);
16426 listOfByte(tvb, offsetp, t, hf_x11_xf86vidmode_GetMonitor_reply_model, f_model_length, byte_order);
16427}
16428
16429static void xf86vidmodeLockModeSwitch(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
16430{
16431 proto_tree_add_item(t, hf_x11_xf86vidmode_LockModeSwitch_screen, tvb, *offsetp, 2, byte_order);
16432 *offsetp += 2;
16433 proto_tree_add_item(t, hf_x11_xf86vidmode_LockModeSwitch_lock, tvb, *offsetp, 2, byte_order);
16434 *offsetp += 2;
16435}
16436
16437static void xf86vidmodeGetAllModeLines(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
16438{
16439 proto_tree_add_item(t, hf_x11_xf86vidmode_GetAllModeLines_screen, tvb, *offsetp, 2, byte_order);
16440 *offsetp += 2;
16441 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 2, ENC_NA);
16442 *offsetp += 2;
16443}
16444static void xf86vidmodeGetAllModeLines_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
16445{
16446 int sequence_number;
16447 int f_modecount;
16448
16449 col_append_fstr(pinfo->cinfo, COL_INFO, "-GetAllModeLines");
16450
16451 REPLY(reply);
16452 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
16453 *offsetp += 1;
16454 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
16455 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
16456 "%d (xf86vidmode-GetAllModeLines)", sequence_number);
16457 *offsetp += 2;
16458 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
16459 *offsetp += 4;
16460 f_modecount = tvb_get_uint32(tvb, *offsetp, byte_order);
16461 proto_tree_add_item(t, hf_x11_xf86vidmode_GetAllModeLines_reply_modecount, tvb, *offsetp, 4, byte_order);
16462 *offsetp += 4;
16463 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 20, ENC_NA);
16464 *offsetp += 20;
16465 struct_xf86vidmode_ModeInfo(tvb, offsetp, t, byte_order, f_modecount);
16466}
16467
16468static void xf86vidmodeAddModeLine(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
16469{
16470 int f_privsize;
16471 proto_tree_add_item(t, hf_x11_xf86vidmode_AddModeLine_screen, tvb, *offsetp, 4, byte_order);
16472 *offsetp += 4;
16473 proto_tree_add_item(t, hf_x11_xf86vidmode_AddModeLine_dotclock, tvb, *offsetp, 4, byte_order);
16474 *offsetp += 4;
16475 proto_tree_add_item(t, hf_x11_xf86vidmode_AddModeLine_hdisplay, tvb, *offsetp, 2, byte_order);
16476 *offsetp += 2;
16477 proto_tree_add_item(t, hf_x11_xf86vidmode_AddModeLine_hsyncstart, tvb, *offsetp, 2, byte_order);
16478 *offsetp += 2;
16479 proto_tree_add_item(t, hf_x11_xf86vidmode_AddModeLine_hsyncend, tvb, *offsetp, 2, byte_order);
16480 *offsetp += 2;
16481 proto_tree_add_item(t, hf_x11_xf86vidmode_AddModeLine_htotal, tvb, *offsetp, 2, byte_order);
16482 *offsetp += 2;
16483 proto_tree_add_item(t, hf_x11_xf86vidmode_AddModeLine_hskew, tvb, *offsetp, 2, byte_order);
16484 *offsetp += 2;
16485 proto_tree_add_item(t, hf_x11_xf86vidmode_AddModeLine_vdisplay, tvb, *offsetp, 2, byte_order);
16486 *offsetp += 2;
16487 proto_tree_add_item(t, hf_x11_xf86vidmode_AddModeLine_vsyncstart, tvb, *offsetp, 2, byte_order);
16488 *offsetp += 2;
16489 proto_tree_add_item(t, hf_x11_xf86vidmode_AddModeLine_vsyncend, tvb, *offsetp, 2, byte_order);
16490 *offsetp += 2;
16491 proto_tree_add_item(t, hf_x11_xf86vidmode_AddModeLine_vtotal, tvb, *offsetp, 2, byte_order);
16492 *offsetp += 2;
16493 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 2, ENC_NA);
16494 *offsetp += 2;
16495 {
16496 static int* const flags_bits [] = {
16497 &hf_x11_xf86vidmode_AddModeLine_flags_mask_Positive_HSync,
16498 &hf_x11_xf86vidmode_AddModeLine_flags_mask_Negative_HSync,
16499 &hf_x11_xf86vidmode_AddModeLine_flags_mask_Positive_VSync,
16500 &hf_x11_xf86vidmode_AddModeLine_flags_mask_Negative_VSync,
16501 &hf_x11_xf86vidmode_AddModeLine_flags_mask_Interlace,
16502 &hf_x11_xf86vidmode_AddModeLine_flags_mask_Composite_Sync,
16503 &hf_x11_xf86vidmode_AddModeLine_flags_mask_Positive_CSync,
16504 &hf_x11_xf86vidmode_AddModeLine_flags_mask_Negative_CSync,
16505 &hf_x11_xf86vidmode_AddModeLine_flags_mask_HSkew,
16506 &hf_x11_xf86vidmode_AddModeLine_flags_mask_Broadcast,
16507 &hf_x11_xf86vidmode_AddModeLine_flags_mask_Pixmux,
16508 &hf_x11_xf86vidmode_AddModeLine_flags_mask_Double_Clock,
16509 &hf_x11_xf86vidmode_AddModeLine_flags_mask_Half_Clock,
16510 NULL
16511 };
16512 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xf86vidmode_AddModeLine_flags, ett_x11_rectangle, flags_bits, byte_order);
16513 }
16514 *offsetp += 4;
16515 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 12, ENC_NA);
16516 *offsetp += 12;
16517 f_privsize = tvb_get_uint32(tvb, *offsetp, byte_order);
16518 proto_tree_add_item(t, hf_x11_xf86vidmode_AddModeLine_privsize, tvb, *offsetp, 4, byte_order);
16519 *offsetp += 4;
16520 proto_tree_add_item(t, hf_x11_xf86vidmode_AddModeLine_after_dotclock, tvb, *offsetp, 4, byte_order);
16521 *offsetp += 4;
16522 proto_tree_add_item(t, hf_x11_xf86vidmode_AddModeLine_after_hdisplay, tvb, *offsetp, 2, byte_order);
16523 *offsetp += 2;
16524 proto_tree_add_item(t, hf_x11_xf86vidmode_AddModeLine_after_hsyncstart, tvb, *offsetp, 2, byte_order);
16525 *offsetp += 2;
16526 proto_tree_add_item(t, hf_x11_xf86vidmode_AddModeLine_after_hsyncend, tvb, *offsetp, 2, byte_order);
16527 *offsetp += 2;
16528 proto_tree_add_item(t, hf_x11_xf86vidmode_AddModeLine_after_htotal, tvb, *offsetp, 2, byte_order);
16529 *offsetp += 2;
16530 proto_tree_add_item(t, hf_x11_xf86vidmode_AddModeLine_after_hskew, tvb, *offsetp, 2, byte_order);
16531 *offsetp += 2;
16532 proto_tree_add_item(t, hf_x11_xf86vidmode_AddModeLine_after_vdisplay, tvb, *offsetp, 2, byte_order);
16533 *offsetp += 2;
16534 proto_tree_add_item(t, hf_x11_xf86vidmode_AddModeLine_after_vsyncstart, tvb, *offsetp, 2, byte_order);
16535 *offsetp += 2;
16536 proto_tree_add_item(t, hf_x11_xf86vidmode_AddModeLine_after_vsyncend, tvb, *offsetp, 2, byte_order);
16537 *offsetp += 2;
16538 proto_tree_add_item(t, hf_x11_xf86vidmode_AddModeLine_after_vtotal, tvb, *offsetp, 2, byte_order);
16539 *offsetp += 2;
16540 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 2, ENC_NA);
16541 *offsetp += 2;
16542 {
16543 static int* const after_flags_bits [] = {
16544 &hf_x11_xf86vidmode_AddModeLine_after_flags_mask_Positive_HSync,
16545 &hf_x11_xf86vidmode_AddModeLine_after_flags_mask_Negative_HSync,
16546 &hf_x11_xf86vidmode_AddModeLine_after_flags_mask_Positive_VSync,
16547 &hf_x11_xf86vidmode_AddModeLine_after_flags_mask_Negative_VSync,
16548 &hf_x11_xf86vidmode_AddModeLine_after_flags_mask_Interlace,
16549 &hf_x11_xf86vidmode_AddModeLine_after_flags_mask_Composite_Sync,
16550 &hf_x11_xf86vidmode_AddModeLine_after_flags_mask_Positive_CSync,
16551 &hf_x11_xf86vidmode_AddModeLine_after_flags_mask_Negative_CSync,
16552 &hf_x11_xf86vidmode_AddModeLine_after_flags_mask_HSkew,
16553 &hf_x11_xf86vidmode_AddModeLine_after_flags_mask_Broadcast,
16554 &hf_x11_xf86vidmode_AddModeLine_after_flags_mask_Pixmux,
16555 &hf_x11_xf86vidmode_AddModeLine_after_flags_mask_Double_Clock,
16556 &hf_x11_xf86vidmode_AddModeLine_after_flags_mask_Half_Clock,
16557 NULL
16558 };
16559 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xf86vidmode_AddModeLine_after_flags, ett_x11_rectangle, after_flags_bits, byte_order);
16560 }
16561 *offsetp += 4;
16562 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 12, ENC_NA);
16563 *offsetp += 12;
16564 listOfByte(tvb, offsetp, t, hf_x11_xf86vidmode_AddModeLine_private, f_privsize, byte_order);
16565 length -= f_privsize * 1;
16566}
16567
16568static void xf86vidmodeDeleteModeLine(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
16569{
16570 int f_privsize;
16571 proto_tree_add_item(t, hf_x11_xf86vidmode_DeleteModeLine_screen, tvb, *offsetp, 4, byte_order);
16572 *offsetp += 4;
16573 proto_tree_add_item(t, hf_x11_xf86vidmode_DeleteModeLine_dotclock, tvb, *offsetp, 4, byte_order);
16574 *offsetp += 4;
16575 proto_tree_add_item(t, hf_x11_xf86vidmode_DeleteModeLine_hdisplay, tvb, *offsetp, 2, byte_order);
16576 *offsetp += 2;
16577 proto_tree_add_item(t, hf_x11_xf86vidmode_DeleteModeLine_hsyncstart, tvb, *offsetp, 2, byte_order);
16578 *offsetp += 2;
16579 proto_tree_add_item(t, hf_x11_xf86vidmode_DeleteModeLine_hsyncend, tvb, *offsetp, 2, byte_order);
16580 *offsetp += 2;
16581 proto_tree_add_item(t, hf_x11_xf86vidmode_DeleteModeLine_htotal, tvb, *offsetp, 2, byte_order);
16582 *offsetp += 2;
16583 proto_tree_add_item(t, hf_x11_xf86vidmode_DeleteModeLine_hskew, tvb, *offsetp, 2, byte_order);
16584 *offsetp += 2;
16585 proto_tree_add_item(t, hf_x11_xf86vidmode_DeleteModeLine_vdisplay, tvb, *offsetp, 2, byte_order);
16586 *offsetp += 2;
16587 proto_tree_add_item(t, hf_x11_xf86vidmode_DeleteModeLine_vsyncstart, tvb, *offsetp, 2, byte_order);
16588 *offsetp += 2;
16589 proto_tree_add_item(t, hf_x11_xf86vidmode_DeleteModeLine_vsyncend, tvb, *offsetp, 2, byte_order);
16590 *offsetp += 2;
16591 proto_tree_add_item(t, hf_x11_xf86vidmode_DeleteModeLine_vtotal, tvb, *offsetp, 2, byte_order);
16592 *offsetp += 2;
16593 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 2, ENC_NA);
16594 *offsetp += 2;
16595 {
16596 static int* const flags_bits [] = {
16597 &hf_x11_xf86vidmode_DeleteModeLine_flags_mask_Positive_HSync,
16598 &hf_x11_xf86vidmode_DeleteModeLine_flags_mask_Negative_HSync,
16599 &hf_x11_xf86vidmode_DeleteModeLine_flags_mask_Positive_VSync,
16600 &hf_x11_xf86vidmode_DeleteModeLine_flags_mask_Negative_VSync,
16601 &hf_x11_xf86vidmode_DeleteModeLine_flags_mask_Interlace,
16602 &hf_x11_xf86vidmode_DeleteModeLine_flags_mask_Composite_Sync,
16603 &hf_x11_xf86vidmode_DeleteModeLine_flags_mask_Positive_CSync,
16604 &hf_x11_xf86vidmode_DeleteModeLine_flags_mask_Negative_CSync,
16605 &hf_x11_xf86vidmode_DeleteModeLine_flags_mask_HSkew,
16606 &hf_x11_xf86vidmode_DeleteModeLine_flags_mask_Broadcast,
16607 &hf_x11_xf86vidmode_DeleteModeLine_flags_mask_Pixmux,
16608 &hf_x11_xf86vidmode_DeleteModeLine_flags_mask_Double_Clock,
16609 &hf_x11_xf86vidmode_DeleteModeLine_flags_mask_Half_Clock,
16610 NULL
16611 };
16612 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xf86vidmode_DeleteModeLine_flags, ett_x11_rectangle, flags_bits, byte_order);
16613 }
16614 *offsetp += 4;
16615 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 12, ENC_NA);
16616 *offsetp += 12;
16617 f_privsize = tvb_get_uint32(tvb, *offsetp, byte_order);
16618 proto_tree_add_item(t, hf_x11_xf86vidmode_DeleteModeLine_privsize, tvb, *offsetp, 4, byte_order);
16619 *offsetp += 4;
16620 listOfByte(tvb, offsetp, t, hf_x11_xf86vidmode_DeleteModeLine_private, f_privsize, byte_order);
16621 length -= f_privsize * 1;
16622}
16623
16624static void xf86vidmodeValidateModeLine(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
16625{
16626 int f_privsize;
16627 proto_tree_add_item(t, hf_x11_xf86vidmode_ValidateModeLine_screen, tvb, *offsetp, 4, byte_order);
16628 *offsetp += 4;
16629 proto_tree_add_item(t, hf_x11_xf86vidmode_ValidateModeLine_dotclock, tvb, *offsetp, 4, byte_order);
16630 *offsetp += 4;
16631 proto_tree_add_item(t, hf_x11_xf86vidmode_ValidateModeLine_hdisplay, tvb, *offsetp, 2, byte_order);
16632 *offsetp += 2;
16633 proto_tree_add_item(t, hf_x11_xf86vidmode_ValidateModeLine_hsyncstart, tvb, *offsetp, 2, byte_order);
16634 *offsetp += 2;
16635 proto_tree_add_item(t, hf_x11_xf86vidmode_ValidateModeLine_hsyncend, tvb, *offsetp, 2, byte_order);
16636 *offsetp += 2;
16637 proto_tree_add_item(t, hf_x11_xf86vidmode_ValidateModeLine_htotal, tvb, *offsetp, 2, byte_order);
16638 *offsetp += 2;
16639 proto_tree_add_item(t, hf_x11_xf86vidmode_ValidateModeLine_hskew, tvb, *offsetp, 2, byte_order);
16640 *offsetp += 2;
16641 proto_tree_add_item(t, hf_x11_xf86vidmode_ValidateModeLine_vdisplay, tvb, *offsetp, 2, byte_order);
16642 *offsetp += 2;
16643 proto_tree_add_item(t, hf_x11_xf86vidmode_ValidateModeLine_vsyncstart, tvb, *offsetp, 2, byte_order);
16644 *offsetp += 2;
16645 proto_tree_add_item(t, hf_x11_xf86vidmode_ValidateModeLine_vsyncend, tvb, *offsetp, 2, byte_order);
16646 *offsetp += 2;
16647 proto_tree_add_item(t, hf_x11_xf86vidmode_ValidateModeLine_vtotal, tvb, *offsetp, 2, byte_order);
16648 *offsetp += 2;
16649 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 2, ENC_NA);
16650 *offsetp += 2;
16651 {
16652 static int* const flags_bits [] = {
16653 &hf_x11_xf86vidmode_ValidateModeLine_flags_mask_Positive_HSync,
16654 &hf_x11_xf86vidmode_ValidateModeLine_flags_mask_Negative_HSync,
16655 &hf_x11_xf86vidmode_ValidateModeLine_flags_mask_Positive_VSync,
16656 &hf_x11_xf86vidmode_ValidateModeLine_flags_mask_Negative_VSync,
16657 &hf_x11_xf86vidmode_ValidateModeLine_flags_mask_Interlace,
16658 &hf_x11_xf86vidmode_ValidateModeLine_flags_mask_Composite_Sync,
16659 &hf_x11_xf86vidmode_ValidateModeLine_flags_mask_Positive_CSync,
16660 &hf_x11_xf86vidmode_ValidateModeLine_flags_mask_Negative_CSync,
16661 &hf_x11_xf86vidmode_ValidateModeLine_flags_mask_HSkew,
16662 &hf_x11_xf86vidmode_ValidateModeLine_flags_mask_Broadcast,
16663 &hf_x11_xf86vidmode_ValidateModeLine_flags_mask_Pixmux,
16664 &hf_x11_xf86vidmode_ValidateModeLine_flags_mask_Double_Clock,
16665 &hf_x11_xf86vidmode_ValidateModeLine_flags_mask_Half_Clock,
16666 NULL
16667 };
16668 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xf86vidmode_ValidateModeLine_flags, ett_x11_rectangle, flags_bits, byte_order);
16669 }
16670 *offsetp += 4;
16671 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 12, ENC_NA);
16672 *offsetp += 12;
16673 f_privsize = tvb_get_uint32(tvb, *offsetp, byte_order);
16674 proto_tree_add_item(t, hf_x11_xf86vidmode_ValidateModeLine_privsize, tvb, *offsetp, 4, byte_order);
16675 *offsetp += 4;
16676 listOfByte(tvb, offsetp, t, hf_x11_xf86vidmode_ValidateModeLine_private, f_privsize, byte_order);
16677 length -= f_privsize * 1;
16678}
16679static void xf86vidmodeValidateModeLine_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
16680{
16681 int sequence_number;
16682
16683 col_append_fstr(pinfo->cinfo, COL_INFO, "-ValidateModeLine");
16684
16685 REPLY(reply);
16686 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
16687 *offsetp += 1;
16688 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
16689 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
16690 "%d (xf86vidmode-ValidateModeLine)", sequence_number);
16691 *offsetp += 2;
16692 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
16693 *offsetp += 4;
16694 proto_tree_add_item(t, hf_x11_xf86vidmode_ValidateModeLine_reply_status, tvb, *offsetp, 4, byte_order);
16695 *offsetp += 4;
16696 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 20, ENC_NA);
16697 *offsetp += 20;
16698}
16699
16700static void xf86vidmodeSwitchToMode(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
16701{
16702 int f_privsize;
16703 proto_tree_add_item(t, hf_x11_xf86vidmode_SwitchToMode_screen, tvb, *offsetp, 4, byte_order);
16704 *offsetp += 4;
16705 proto_tree_add_item(t, hf_x11_xf86vidmode_SwitchToMode_dotclock, tvb, *offsetp, 4, byte_order);
16706 *offsetp += 4;
16707 proto_tree_add_item(t, hf_x11_xf86vidmode_SwitchToMode_hdisplay, tvb, *offsetp, 2, byte_order);
16708 *offsetp += 2;
16709 proto_tree_add_item(t, hf_x11_xf86vidmode_SwitchToMode_hsyncstart, tvb, *offsetp, 2, byte_order);
16710 *offsetp += 2;
16711 proto_tree_add_item(t, hf_x11_xf86vidmode_SwitchToMode_hsyncend, tvb, *offsetp, 2, byte_order);
16712 *offsetp += 2;
16713 proto_tree_add_item(t, hf_x11_xf86vidmode_SwitchToMode_htotal, tvb, *offsetp, 2, byte_order);
16714 *offsetp += 2;
16715 proto_tree_add_item(t, hf_x11_xf86vidmode_SwitchToMode_hskew, tvb, *offsetp, 2, byte_order);
16716 *offsetp += 2;
16717 proto_tree_add_item(t, hf_x11_xf86vidmode_SwitchToMode_vdisplay, tvb, *offsetp, 2, byte_order);
16718 *offsetp += 2;
16719 proto_tree_add_item(t, hf_x11_xf86vidmode_SwitchToMode_vsyncstart, tvb, *offsetp, 2, byte_order);
16720 *offsetp += 2;
16721 proto_tree_add_item(t, hf_x11_xf86vidmode_SwitchToMode_vsyncend, tvb, *offsetp, 2, byte_order);
16722 *offsetp += 2;
16723 proto_tree_add_item(t, hf_x11_xf86vidmode_SwitchToMode_vtotal, tvb, *offsetp, 2, byte_order);
16724 *offsetp += 2;
16725 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 2, ENC_NA);
16726 *offsetp += 2;
16727 {
16728 static int* const flags_bits [] = {
16729 &hf_x11_xf86vidmode_SwitchToMode_flags_mask_Positive_HSync,
16730 &hf_x11_xf86vidmode_SwitchToMode_flags_mask_Negative_HSync,
16731 &hf_x11_xf86vidmode_SwitchToMode_flags_mask_Positive_VSync,
16732 &hf_x11_xf86vidmode_SwitchToMode_flags_mask_Negative_VSync,
16733 &hf_x11_xf86vidmode_SwitchToMode_flags_mask_Interlace,
16734 &hf_x11_xf86vidmode_SwitchToMode_flags_mask_Composite_Sync,
16735 &hf_x11_xf86vidmode_SwitchToMode_flags_mask_Positive_CSync,
16736 &hf_x11_xf86vidmode_SwitchToMode_flags_mask_Negative_CSync,
16737 &hf_x11_xf86vidmode_SwitchToMode_flags_mask_HSkew,
16738 &hf_x11_xf86vidmode_SwitchToMode_flags_mask_Broadcast,
16739 &hf_x11_xf86vidmode_SwitchToMode_flags_mask_Pixmux,
16740 &hf_x11_xf86vidmode_SwitchToMode_flags_mask_Double_Clock,
16741 &hf_x11_xf86vidmode_SwitchToMode_flags_mask_Half_Clock,
16742 NULL
16743 };
16744 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xf86vidmode_SwitchToMode_flags, ett_x11_rectangle, flags_bits, byte_order);
16745 }
16746 *offsetp += 4;
16747 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 12, ENC_NA);
16748 *offsetp += 12;
16749 f_privsize = tvb_get_uint32(tvb, *offsetp, byte_order);
16750 proto_tree_add_item(t, hf_x11_xf86vidmode_SwitchToMode_privsize, tvb, *offsetp, 4, byte_order);
16751 *offsetp += 4;
16752 listOfByte(tvb, offsetp, t, hf_x11_xf86vidmode_SwitchToMode_private, f_privsize, byte_order);
16753 length -= f_privsize * 1;
16754}
16755
16756static void xf86vidmodeGetViewPort(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
16757{
16758 proto_tree_add_item(t, hf_x11_xf86vidmode_GetViewPort_screen, tvb, *offsetp, 2, byte_order);
16759 *offsetp += 2;
16760 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 2, ENC_NA);
16761 *offsetp += 2;
16762}
16763static void xf86vidmodeGetViewPort_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
16764{
16765 int sequence_number;
16766
16767 col_append_fstr(pinfo->cinfo, COL_INFO, "-GetViewPort");
16768
16769 REPLY(reply);
16770 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
16771 *offsetp += 1;
16772 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
16773 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
16774 "%d (xf86vidmode-GetViewPort)", sequence_number);
16775 *offsetp += 2;
16776 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
16777 *offsetp += 4;
16778 proto_tree_add_item(t, hf_x11_xf86vidmode_GetViewPort_reply_x, tvb, *offsetp, 4, byte_order);
16779 *offsetp += 4;
16780 proto_tree_add_item(t, hf_x11_xf86vidmode_GetViewPort_reply_y, tvb, *offsetp, 4, byte_order);
16781 *offsetp += 4;
16782 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 16, ENC_NA);
16783 *offsetp += 16;
16784}
16785
16786static void xf86vidmodeSetViewPort(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
16787{
16788 proto_tree_add_item(t, hf_x11_xf86vidmode_SetViewPort_screen, tvb, *offsetp, 2, byte_order);
16789 *offsetp += 2;
16790 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 2, ENC_NA);
16791 *offsetp += 2;
16792 proto_tree_add_item(t, hf_x11_xf86vidmode_SetViewPort_x, tvb, *offsetp, 4, byte_order);
16793 *offsetp += 4;
16794 proto_tree_add_item(t, hf_x11_xf86vidmode_SetViewPort_y, tvb, *offsetp, 4, byte_order);
16795 *offsetp += 4;
16796}
16797
16798static void xf86vidmodeGetDotClocks(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
16799{
16800 proto_tree_add_item(t, hf_x11_xf86vidmode_GetDotClocks_screen, tvb, *offsetp, 2, byte_order);
16801 *offsetp += 2;
16802 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 2, ENC_NA);
16803 *offsetp += 2;
16804}
16805static void xf86vidmodeGetDotClocks_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
16806{
16807 int sequence_number;
16808 int f_flags;
16809 int f_clocks;
16810
16811 col_append_fstr(pinfo->cinfo, COL_INFO, "-GetDotClocks");
16812
16813 REPLY(reply);
16814 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
16815 *offsetp += 1;
16816 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
16817 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
16818 "%d (xf86vidmode-GetDotClocks)", sequence_number);
16819 *offsetp += 2;
16820 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
16821 *offsetp += 4;
16822 f_flags = tvb_get_uint32(tvb, *offsetp, byte_order);
16823 {
16824 static int* const flags_bits [] = {
16825 &hf_x11_xf86vidmode_GetDotClocks_reply_flags_mask_Programable,
16826 NULL
16827 };
16828 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xf86vidmode_GetDotClocks_reply_flags, ett_x11_rectangle, flags_bits, byte_order);
16829 }
16830 *offsetp += 4;
16831 f_clocks = tvb_get_uint32(tvb, *offsetp, byte_order);
16832 proto_tree_add_item(t, hf_x11_xf86vidmode_GetDotClocks_reply_clocks, tvb, *offsetp, 4, byte_order);
16833 *offsetp += 4;
16834 proto_tree_add_item(t, hf_x11_xf86vidmode_GetDotClocks_reply_maxclocks, tvb, *offsetp, 4, byte_order);
16835 *offsetp += 4;
16836 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 12, ENC_NA);
16837 *offsetp += 12;
16838 listOfCard32(tvb, offsetp, t, hf_x11_xf86vidmode_GetDotClocks_reply_clock, hf_x11_xf86vidmode_GetDotClocks_reply_clock_item, ((1 - (f_flags & 1)) * f_clocks), byte_order);
16839}
16840
16841static void xf86vidmodeSetClientVersion(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
16842{
16843 proto_tree_add_item(t, hf_x11_xf86vidmode_SetClientVersion_major, tvb, *offsetp, 2, byte_order);
16844 *offsetp += 2;
16845 proto_tree_add_item(t, hf_x11_xf86vidmode_SetClientVersion_minor, tvb, *offsetp, 2, byte_order);
16846 *offsetp += 2;
16847}
16848
16849static void xf86vidmodeSetGamma(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
16850{
16851 proto_tree_add_item(t, hf_x11_xf86vidmode_SetGamma_screen, tvb, *offsetp, 2, byte_order);
16852 *offsetp += 2;
16853 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 2, ENC_NA);
16854 *offsetp += 2;
16855 proto_tree_add_item(t, hf_x11_xf86vidmode_SetGamma_red, tvb, *offsetp, 4, byte_order);
16856 *offsetp += 4;
16857 proto_tree_add_item(t, hf_x11_xf86vidmode_SetGamma_green, tvb, *offsetp, 4, byte_order);
16858 *offsetp += 4;
16859 proto_tree_add_item(t, hf_x11_xf86vidmode_SetGamma_blue, tvb, *offsetp, 4, byte_order);
16860 *offsetp += 4;
16861 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 12, ENC_NA);
16862 *offsetp += 12;
16863}
16864
16865static void xf86vidmodeGetGamma(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
16866{
16867 proto_tree_add_item(t, hf_x11_xf86vidmode_GetGamma_screen, tvb, *offsetp, 2, byte_order);
16868 *offsetp += 2;
16869 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 26, ENC_NA);
16870 *offsetp += 26;
16871}
16872static void xf86vidmodeGetGamma_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
16873{
16874 int sequence_number;
16875
16876 col_append_fstr(pinfo->cinfo, COL_INFO, "-GetGamma");
16877
16878 REPLY(reply);
16879 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
16880 *offsetp += 1;
16881 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
16882 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
16883 "%d (xf86vidmode-GetGamma)", sequence_number);
16884 *offsetp += 2;
16885 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
16886 *offsetp += 4;
16887 proto_tree_add_item(t, hf_x11_xf86vidmode_GetGamma_reply_red, tvb, *offsetp, 4, byte_order);
16888 *offsetp += 4;
16889 proto_tree_add_item(t, hf_x11_xf86vidmode_GetGamma_reply_green, tvb, *offsetp, 4, byte_order);
16890 *offsetp += 4;
16891 proto_tree_add_item(t, hf_x11_xf86vidmode_GetGamma_reply_blue, tvb, *offsetp, 4, byte_order);
16892 *offsetp += 4;
16893 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 12, ENC_NA);
16894 *offsetp += 12;
16895}
16896
16897static void xf86vidmodeGetGammaRamp(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
16898{
16899 proto_tree_add_item(t, hf_x11_xf86vidmode_GetGammaRamp_screen, tvb, *offsetp, 2, byte_order);
16900 *offsetp += 2;
16901 proto_tree_add_item(t, hf_x11_xf86vidmode_GetGammaRamp_size, tvb, *offsetp, 2, byte_order);
16902 *offsetp += 2;
16903}
16904static void xf86vidmodeGetGammaRamp_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
16905{
16906 int sequence_number;
16907 int f_size;
16908
16909 col_append_fstr(pinfo->cinfo, COL_INFO, "-GetGammaRamp");
16910
16911 REPLY(reply);
16912 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
16913 *offsetp += 1;
16914 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
16915 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
16916 "%d (xf86vidmode-GetGammaRamp)", sequence_number);
16917 *offsetp += 2;
16918 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
16919 *offsetp += 4;
16920 f_size = tvb_get_uint16(tvb, *offsetp, byte_order);
16921 proto_tree_add_item(t, hf_x11_xf86vidmode_GetGammaRamp_reply_size, tvb, *offsetp, 2, byte_order);
16922 *offsetp += 2;
16923 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 22, ENC_NA);
16924 *offsetp += 22;
16925 listOfCard16(tvb, offsetp, t, hf_x11_xf86vidmode_GetGammaRamp_reply_red, hf_x11_xf86vidmode_GetGammaRamp_reply_red_item, ((f_size + 1) & (~1)), byte_order);
16926 listOfCard16(tvb, offsetp, t, hf_x11_xf86vidmode_GetGammaRamp_reply_green, hf_x11_xf86vidmode_GetGammaRamp_reply_green_item, ((f_size + 1) & (~1)), byte_order);
16927 listOfCard16(tvb, offsetp, t, hf_x11_xf86vidmode_GetGammaRamp_reply_blue, hf_x11_xf86vidmode_GetGammaRamp_reply_blue_item, ((f_size + 1) & (~1)), byte_order);
16928}
16929
16930static void xf86vidmodeSetGammaRamp(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
16931{
16932 int f_size;
16933 proto_tree_add_item(t, hf_x11_xf86vidmode_SetGammaRamp_screen, tvb, *offsetp, 2, byte_order);
16934 *offsetp += 2;
16935 f_size = tvb_get_uint16(tvb, *offsetp, byte_order);
16936 proto_tree_add_item(t, hf_x11_xf86vidmode_SetGammaRamp_size, tvb, *offsetp, 2, byte_order);
16937 *offsetp += 2;
16938 listOfCard16(tvb, offsetp, t, hf_x11_xf86vidmode_SetGammaRamp_red, hf_x11_xf86vidmode_SetGammaRamp_red_item, ((f_size + 1) & (~1)), byte_order);
16939 length -= ((f_size + 1) & (~1)) * 2;
16940 listOfCard16(tvb, offsetp, t, hf_x11_xf86vidmode_SetGammaRamp_green, hf_x11_xf86vidmode_SetGammaRamp_green_item, ((f_size + 1) & (~1)), byte_order);
16941 length -= ((f_size + 1) & (~1)) * 2;
16942 listOfCard16(tvb, offsetp, t, hf_x11_xf86vidmode_SetGammaRamp_blue, hf_x11_xf86vidmode_SetGammaRamp_blue_item, ((f_size + 1) & (~1)), byte_order);
16943 length -= ((f_size + 1) & (~1)) * 2;
16944}
16945
16946static void xf86vidmodeGetGammaRampSize(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
16947{
16948 proto_tree_add_item(t, hf_x11_xf86vidmode_GetGammaRampSize_screen, tvb, *offsetp, 2, byte_order);
16949 *offsetp += 2;
16950 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 2, ENC_NA);
16951 *offsetp += 2;
16952}
16953static void xf86vidmodeGetGammaRampSize_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
16954{
16955 int sequence_number;
16956
16957 col_append_fstr(pinfo->cinfo, COL_INFO, "-GetGammaRampSize");
16958
16959 REPLY(reply);
16960 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
16961 *offsetp += 1;
16962 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
16963 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
16964 "%d (xf86vidmode-GetGammaRampSize)", sequence_number);
16965 *offsetp += 2;
16966 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
16967 *offsetp += 4;
16968 proto_tree_add_item(t, hf_x11_xf86vidmode_GetGammaRampSize_reply_size, tvb, *offsetp, 2, byte_order);
16969 *offsetp += 2;
16970 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 22, ENC_NA);
16971 *offsetp += 22;
16972}
16973
16974static void xf86vidmodeGetPermissions(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
16975{
16976 proto_tree_add_item(t, hf_x11_xf86vidmode_GetPermissions_screen, tvb, *offsetp, 2, byte_order);
16977 *offsetp += 2;
16978 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 2, ENC_NA);
16979 *offsetp += 2;
16980}
16981static void xf86vidmodeGetPermissions_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
16982{
16983 int sequence_number;
16984
16985 col_append_fstr(pinfo->cinfo, COL_INFO, "-GetPermissions");
16986
16987 REPLY(reply);
16988 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
16989 *offsetp += 1;
16990 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
16991 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
16992 "%d (xf86vidmode-GetPermissions)", sequence_number);
16993 *offsetp += 2;
16994 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
16995 *offsetp += 4;
16996 {
16997 static int* const permissions_bits [] = {
16998 &hf_x11_xf86vidmode_GetPermissions_reply_permissions_mask_Read,
16999 &hf_x11_xf86vidmode_GetPermissions_reply_permissions_mask_Write,
17000 NULL
17001 };
17002 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xf86vidmode_GetPermissions_reply_permissions, ett_x11_rectangle, permissions_bits, byte_order);
17003 }
17004 *offsetp += 4;
17005 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 20, ENC_NA);
17006 *offsetp += 20;
17007}
17008static const value_string xf86vidmode_extension_minor[] = {
17009 { 0, "QueryVersion" },
17010 { 1, "GetModeLine" },
17011 { 2, "ModModeLine" },
17012 { 3, "SwitchMode" },
17013 { 4, "GetMonitor" },
17014 { 5, "LockModeSwitch" },
17015 { 6, "GetAllModeLines" },
17016 { 7, "AddModeLine" },
17017 { 8, "DeleteModeLine" },
17018 { 9, "ValidateModeLine" },
17019 { 10, "SwitchToMode" },
17020 { 11, "GetViewPort" },
17021 { 12, "SetViewPort" },
17022 { 13, "GetDotClocks" },
17023 { 14, "SetClientVersion" },
17024 { 15, "SetGamma" },
17025 { 16, "GetGamma" },
17026 { 17, "GetGammaRamp" },
17027 { 18, "SetGammaRamp" },
17028 { 19, "GetGammaRampSize" },
17029 { 20, "GetPermissions" },
17030 { 0, NULL }
17031};
17032static const x11_event_info xf86vidmode_events[] = {
17033 { NULL, NULL }
17034};
17035static const x11_reply_info xf86vidmode_replies[] = {
17036 { 0, xf86vidmodeQueryVersion_Reply },
17037 { 1, xf86vidmodeGetModeLine_Reply },
17038 { 4, xf86vidmodeGetMonitor_Reply },
17039 { 6, xf86vidmodeGetAllModeLines_Reply },
17040 { 9, xf86vidmodeValidateModeLine_Reply },
17041 { 11, xf86vidmodeGetViewPort_Reply },
17042 { 13, xf86vidmodeGetDotClocks_Reply },
17043 { 16, xf86vidmodeGetGamma_Reply },
17044 { 17, xf86vidmodeGetGammaRamp_Reply },
17045 { 19, xf86vidmodeGetGammaRampSize_Reply },
17046 { 20, xf86vidmodeGetPermissions_Reply },
17047 { 0, NULL }
17048};
17049
17050static void dispatch_xf86vidmode(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
17051{
17052 int minor, length;
17053 minor = CARD8(xf86vidmode_extension_minor);
17054 length = REQUEST_LENGTH();
17055
17056 col_append_fstr(pinfo->cinfo, COL_INFO, "-%s",
17057 val_to_str(minor, xf86vidmode_extension_minor,
17058 "<Unknown opcode %d>"));
17059 switch (minor) {
17060 case 0:
17061 xf86vidmodeQueryVersion(tvb, pinfo, offsetp, t, byte_order, length);
17062 break;
17063 case 1:
17064 xf86vidmodeGetModeLine(tvb, pinfo, offsetp, t, byte_order, length);
17065 break;
17066 case 2:
17067 xf86vidmodeModModeLine(tvb, pinfo, offsetp, t, byte_order, length);
17068 break;
17069 case 3:
17070 xf86vidmodeSwitchMode(tvb, pinfo, offsetp, t, byte_order, length);
17071 break;
17072 case 4:
17073 xf86vidmodeGetMonitor(tvb, pinfo, offsetp, t, byte_order, length);
17074 break;
17075 case 5:
17076 xf86vidmodeLockModeSwitch(tvb, pinfo, offsetp, t, byte_order, length);
17077 break;
17078 case 6:
17079 xf86vidmodeGetAllModeLines(tvb, pinfo, offsetp, t, byte_order, length);
17080 break;
17081 case 7:
17082 xf86vidmodeAddModeLine(tvb, pinfo, offsetp, t, byte_order, length);
17083 break;
17084 case 8:
17085 xf86vidmodeDeleteModeLine(tvb, pinfo, offsetp, t, byte_order, length);
17086 break;
17087 case 9:
17088 xf86vidmodeValidateModeLine(tvb, pinfo, offsetp, t, byte_order, length);
17089 break;
17090 case 10:
17091 xf86vidmodeSwitchToMode(tvb, pinfo, offsetp, t, byte_order, length);
17092 break;
17093 case 11:
17094 xf86vidmodeGetViewPort(tvb, pinfo, offsetp, t, byte_order, length);
17095 break;
17096 case 12:
17097 xf86vidmodeSetViewPort(tvb, pinfo, offsetp, t, byte_order, length);
17098 break;
17099 case 13:
17100 xf86vidmodeGetDotClocks(tvb, pinfo, offsetp, t, byte_order, length);
17101 break;
17102 case 14:
17103 xf86vidmodeSetClientVersion(tvb, pinfo, offsetp, t, byte_order, length);
17104 break;
17105 case 15:
17106 xf86vidmodeSetGamma(tvb, pinfo, offsetp, t, byte_order, length);
17107 break;
17108 case 16:
17109 xf86vidmodeGetGamma(tvb, pinfo, offsetp, t, byte_order, length);
17110 break;
17111 case 17:
17112 xf86vidmodeGetGammaRamp(tvb, pinfo, offsetp, t, byte_order, length);
17113 break;
17114 case 18:
17115 xf86vidmodeSetGammaRamp(tvb, pinfo, offsetp, t, byte_order, length);
17116 break;
17117 case 19:
17118 xf86vidmodeGetGammaRampSize(tvb, pinfo, offsetp, t, byte_order, length);
17119 break;
17120 case 20:
17121 xf86vidmodeGetPermissions(tvb, pinfo, offsetp, t, byte_order, length);
17122 break;
17123 /* No need for a default case here, since Unknown is printed above,
17124 and UNDECODED() is taken care of by dissect_x11_request */
17125 }
17126}
17127
17128static void register_xf86vidmode(void)
17129{
17130 set_handler("XFree86-VidModeExtension", dispatch_xf86vidmode, xf86vidmode_errors, xf86vidmode_events, NULL, xf86vidmode_replies);
17131}
17132
17133static void xfixesQueryVersion(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
17134{
17135 proto_tree_add_item(t, hf_x11_xfixes_QueryVersion_client_major_version, tvb, *offsetp, 4, byte_order);
17136 *offsetp += 4;
17137 proto_tree_add_item(t, hf_x11_xfixes_QueryVersion_client_minor_version, tvb, *offsetp, 4, byte_order);
17138 *offsetp += 4;
17139}
17140static void xfixesQueryVersion_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
17141{
17142 int sequence_number;
17143
17144 col_append_fstr(pinfo->cinfo, COL_INFO, "-QueryVersion");
17145
17146 REPLY(reply);
17147 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
17148 *offsetp += 1;
17149 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
17150 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
17151 "%d (xfixes-QueryVersion)", sequence_number);
17152 *offsetp += 2;
17153 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
17154 *offsetp += 4;
17155 proto_tree_add_item(t, hf_x11_xfixes_QueryVersion_reply_major_version, tvb, *offsetp, 4, byte_order);
17156 *offsetp += 4;
17157 proto_tree_add_item(t, hf_x11_xfixes_QueryVersion_reply_minor_version, tvb, *offsetp, 4, byte_order);
17158 *offsetp += 4;
17159 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 16, ENC_NA);
17160 *offsetp += 16;
17161}
17162
17163static void xfixesChangeSaveSet(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
17164{
17165 field8(tvb, offsetp, t, hf_x11_xfixes_ChangeSaveSet_mode, byte_order);
17166 field8(tvb, offsetp, t, hf_x11_xfixes_ChangeSaveSet_target, byte_order);
17167 field8(tvb, offsetp, t, hf_x11_xfixes_ChangeSaveSet_map, byte_order);
17168 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
17169 *offsetp += 1;
17170 proto_tree_add_item(t, hf_x11_xfixes_ChangeSaveSet_window, tvb, *offsetp, 4, byte_order);
17171 *offsetp += 4;
17172}
17173
17174static void xfixesSelectSelectionInput(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
17175{
17176 proto_tree_add_item(t, hf_x11_xfixes_SelectSelectionInput_window, tvb, *offsetp, 4, byte_order);
17177 *offsetp += 4;
17178 proto_tree_add_item(t, hf_x11_xfixes_SelectSelectionInput_selection, tvb, *offsetp, 4, byte_order);
17179 *offsetp += 4;
17180 {
17181 static int* const event_mask_bits [] = {
17182 &hf_x11_xfixes_SelectSelectionInput_event_mask_mask_SetSelectionOwner,
17183 &hf_x11_xfixes_SelectSelectionInput_event_mask_mask_SelectionWindowDestroy,
17184 &hf_x11_xfixes_SelectSelectionInput_event_mask_mask_SelectionClientClose,
17185 NULL
17186 };
17187 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xfixes_SelectSelectionInput_event_mask, ett_x11_rectangle, event_mask_bits, byte_order);
17188 }
17189 *offsetp += 4;
17190}
17191
17192static void xfixesCursorNotify(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order)
17193{
17194 field8(tvb, offsetp, t, hf_x11_xfixes_CursorNotify_subtype, byte_order);
17195 CARD16(event_sequencenumber);
17196 proto_tree_add_item(t, hf_x11_xfixes_CursorNotify_window, tvb, *offsetp, 4, byte_order);
17197 *offsetp += 4;
17198 proto_tree_add_item(t, hf_x11_xfixes_CursorNotify_cursor_serial, tvb, *offsetp, 4, byte_order);
17199 *offsetp += 4;
17200 proto_tree_add_item(t, hf_x11_xfixes_CursorNotify_timestamp, tvb, *offsetp, 4, byte_order);
17201 *offsetp += 4;
17202 field32(tvb, offsetp, t, hf_x11_xfixes_CursorNotify_name, byte_order);
17203 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 12, ENC_NA);
17204 *offsetp += 12;
17205}
17206
17207
17208static void xfixesSelectCursorInput(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
17209{
17210 proto_tree_add_item(t, hf_x11_xfixes_SelectCursorInput_window, tvb, *offsetp, 4, byte_order);
17211 *offsetp += 4;
17212 {
17213 static int* const event_mask_bits [] = {
17214 &hf_x11_xfixes_SelectCursorInput_event_mask_mask_DisplayCursor,
17215 NULL
17216 };
17217 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xfixes_SelectCursorInput_event_mask, ett_x11_rectangle, event_mask_bits, byte_order);
17218 }
17219 *offsetp += 4;
17220}
17221
17222static void xfixesGetCursorImage(tvbuff_t *tvb _U_, packet_info *pinfo _U_, int *offsetp _U_, proto_tree *t _U_, unsigned byte_order _U_, int length _U_)
17223{
17224}
17225static void xfixesGetCursorImage_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
17226{
17227 int sequence_number;
17228 int f_width;
17229 int f_height;
17230
17231 col_append_fstr(pinfo->cinfo, COL_INFO, "-GetCursorImage");
17232
17233 REPLY(reply);
17234 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
17235 *offsetp += 1;
17236 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
17237 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
17238 "%d (xfixes-GetCursorImage)", sequence_number);
17239 *offsetp += 2;
17240 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
17241 *offsetp += 4;
17242 proto_tree_add_item(t, hf_x11_xfixes_GetCursorImage_reply_x, tvb, *offsetp, 2, byte_order);
17243 *offsetp += 2;
17244 proto_tree_add_item(t, hf_x11_xfixes_GetCursorImage_reply_y, tvb, *offsetp, 2, byte_order);
17245 *offsetp += 2;
17246 f_width = tvb_get_uint16(tvb, *offsetp, byte_order);
17247 proto_tree_add_item(t, hf_x11_xfixes_GetCursorImage_reply_width, tvb, *offsetp, 2, byte_order);
17248 *offsetp += 2;
17249 f_height = tvb_get_uint16(tvb, *offsetp, byte_order);
17250 proto_tree_add_item(t, hf_x11_xfixes_GetCursorImage_reply_height, tvb, *offsetp, 2, byte_order);
17251 *offsetp += 2;
17252 proto_tree_add_item(t, hf_x11_xfixes_GetCursorImage_reply_xhot, tvb, *offsetp, 2, byte_order);
17253 *offsetp += 2;
17254 proto_tree_add_item(t, hf_x11_xfixes_GetCursorImage_reply_yhot, tvb, *offsetp, 2, byte_order);
17255 *offsetp += 2;
17256 proto_tree_add_item(t, hf_x11_xfixes_GetCursorImage_reply_cursor_serial, tvb, *offsetp, 4, byte_order);
17257 *offsetp += 4;
17258 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 8, ENC_NA);
17259 *offsetp += 8;
17260 listOfCard32(tvb, offsetp, t, hf_x11_xfixes_GetCursorImage_reply_cursor_image, hf_x11_xfixes_GetCursorImage_reply_cursor_image_item, (f_width * f_height), byte_order);
17261}
17262
17263static void xfixesCreateRegion(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
17264{
17265 proto_tree_add_item(t, hf_x11_xfixes_CreateRegion_region, tvb, *offsetp, 4, byte_order);
17266 *offsetp += 4;
17267 struct_xproto_RECTANGLE(tvb, offsetp, t, byte_order, (length - 8) / 8);
17268}
17269
17270static void xfixesCreateRegionFromBitmap(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
17271{
17272 proto_tree_add_item(t, hf_x11_xfixes_CreateRegionFromBitmap_region, tvb, *offsetp, 4, byte_order);
17273 *offsetp += 4;
17274 proto_tree_add_item(t, hf_x11_xfixes_CreateRegionFromBitmap_bitmap, tvb, *offsetp, 4, byte_order);
17275 *offsetp += 4;
17276}
17277
17278static void xfixesCreateRegionFromWindow(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
17279{
17280 proto_tree_add_item(t, hf_x11_xfixes_CreateRegionFromWindow_region, tvb, *offsetp, 4, byte_order);
17281 *offsetp += 4;
17282 proto_tree_add_item(t, hf_x11_xfixes_CreateRegionFromWindow_window, tvb, *offsetp, 4, byte_order);
17283 *offsetp += 4;
17284 field8(tvb, offsetp, t, hf_x11_xfixes_CreateRegionFromWindow_kind, byte_order);
17285 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 3, ENC_NA);
17286 *offsetp += 3;
17287}
17288
17289static void xfixesCreateRegionFromGC(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
17290{
17291 proto_tree_add_item(t, hf_x11_xfixes_CreateRegionFromGC_region, tvb, *offsetp, 4, byte_order);
17292 *offsetp += 4;
17293 proto_tree_add_item(t, hf_x11_xfixes_CreateRegionFromGC_gc, tvb, *offsetp, 4, byte_order);
17294 *offsetp += 4;
17295}
17296
17297static void xfixesCreateRegionFromPicture(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
17298{
17299 proto_tree_add_item(t, hf_x11_xfixes_CreateRegionFromPicture_region, tvb, *offsetp, 4, byte_order);
17300 *offsetp += 4;
17301 proto_tree_add_item(t, hf_x11_xfixes_CreateRegionFromPicture_picture, tvb, *offsetp, 4, byte_order);
17302 *offsetp += 4;
17303}
17304
17305static void xfixesDestroyRegion(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
17306{
17307 proto_tree_add_item(t, hf_x11_xfixes_DestroyRegion_region, tvb, *offsetp, 4, byte_order);
17308 *offsetp += 4;
17309}
17310
17311static void xfixesSetRegion(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
17312{
17313 proto_tree_add_item(t, hf_x11_xfixes_SetRegion_region, tvb, *offsetp, 4, byte_order);
17314 *offsetp += 4;
17315 struct_xproto_RECTANGLE(tvb, offsetp, t, byte_order, (length - 8) / 8);
17316}
17317
17318static void xfixesCopyRegion(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
17319{
17320 proto_tree_add_item(t, hf_x11_xfixes_CopyRegion_source, tvb, *offsetp, 4, byte_order);
17321 *offsetp += 4;
17322 proto_tree_add_item(t, hf_x11_xfixes_CopyRegion_destination, tvb, *offsetp, 4, byte_order);
17323 *offsetp += 4;
17324}
17325
17326static void xfixesUnionRegion(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
17327{
17328 proto_tree_add_item(t, hf_x11_xfixes_UnionRegion_source1, tvb, *offsetp, 4, byte_order);
17329 *offsetp += 4;
17330 proto_tree_add_item(t, hf_x11_xfixes_UnionRegion_source2, tvb, *offsetp, 4, byte_order);
17331 *offsetp += 4;
17332 proto_tree_add_item(t, hf_x11_xfixes_UnionRegion_destination, tvb, *offsetp, 4, byte_order);
17333 *offsetp += 4;
17334}
17335
17336static void xfixesIntersectRegion(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
17337{
17338 proto_tree_add_item(t, hf_x11_xfixes_IntersectRegion_source1, tvb, *offsetp, 4, byte_order);
17339 *offsetp += 4;
17340 proto_tree_add_item(t, hf_x11_xfixes_IntersectRegion_source2, tvb, *offsetp, 4, byte_order);
17341 *offsetp += 4;
17342 proto_tree_add_item(t, hf_x11_xfixes_IntersectRegion_destination, tvb, *offsetp, 4, byte_order);
17343 *offsetp += 4;
17344}
17345
17346static void xfixesSubtractRegion(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
17347{
17348 proto_tree_add_item(t, hf_x11_xfixes_SubtractRegion_source1, tvb, *offsetp, 4, byte_order);
17349 *offsetp += 4;
17350 proto_tree_add_item(t, hf_x11_xfixes_SubtractRegion_source2, tvb, *offsetp, 4, byte_order);
17351 *offsetp += 4;
17352 proto_tree_add_item(t, hf_x11_xfixes_SubtractRegion_destination, tvb, *offsetp, 4, byte_order);
17353 *offsetp += 4;
17354}
17355
17356static void xfixesInvertRegion(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
17357{
17358 proto_tree_add_item(t, hf_x11_xfixes_InvertRegion_source, tvb, *offsetp, 4, byte_order);
17359 *offsetp += 4;
17360 struct_xproto_RECTANGLE(tvb, offsetp, t, byte_order, 1);
17361 proto_tree_add_item(t, hf_x11_xfixes_InvertRegion_destination, tvb, *offsetp, 4, byte_order);
17362 *offsetp += 4;
17363}
17364
17365static void xfixesTranslateRegion(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
17366{
17367 proto_tree_add_item(t, hf_x11_xfixes_TranslateRegion_region, tvb, *offsetp, 4, byte_order);
17368 *offsetp += 4;
17369 proto_tree_add_item(t, hf_x11_xfixes_TranslateRegion_dx, tvb, *offsetp, 2, byte_order);
17370 *offsetp += 2;
17371 proto_tree_add_item(t, hf_x11_xfixes_TranslateRegion_dy, tvb, *offsetp, 2, byte_order);
17372 *offsetp += 2;
17373}
17374
17375static void xfixesRegionExtents(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
17376{
17377 proto_tree_add_item(t, hf_x11_xfixes_RegionExtents_source, tvb, *offsetp, 4, byte_order);
17378 *offsetp += 4;
17379 proto_tree_add_item(t, hf_x11_xfixes_RegionExtents_destination, tvb, *offsetp, 4, byte_order);
17380 *offsetp += 4;
17381}
17382
17383static void xfixesFetchRegion(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
17384{
17385 proto_tree_add_item(t, hf_x11_xfixes_FetchRegion_region, tvb, *offsetp, 4, byte_order);
17386 *offsetp += 4;
17387}
17388static void xfixesFetchRegion_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
17389{
17390 int sequence_number;
17391 int f_length;
17392
17393 col_append_fstr(pinfo->cinfo, COL_INFO, "-FetchRegion");
17394
17395 REPLY(reply);
17396 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
17397 *offsetp += 1;
17398 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
17399 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
17400 "%d (xfixes-FetchRegion)", sequence_number);
17401 *offsetp += 2;
17402 f_length = tvb_get_uint32(tvb, *offsetp, byte_order);
17403 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
17404 *offsetp += 4;
17405 struct_xproto_RECTANGLE(tvb, offsetp, t, byte_order, 1);
17406 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 16, ENC_NA);
17407 *offsetp += 16;
17408 struct_xproto_RECTANGLE(tvb, offsetp, t, byte_order, (f_length / 2));
17409}
17410
17411static void xfixesSetGCClipRegion(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
17412{
17413 proto_tree_add_item(t, hf_x11_xfixes_SetGCClipRegion_gc, tvb, *offsetp, 4, byte_order);
17414 *offsetp += 4;
17415 field32(tvb, offsetp, t, hf_x11_xfixes_SetGCClipRegion_region, byte_order);
17416 proto_tree_add_item(t, hf_x11_xfixes_SetGCClipRegion_x_origin, tvb, *offsetp, 2, byte_order);
17417 *offsetp += 2;
17418 proto_tree_add_item(t, hf_x11_xfixes_SetGCClipRegion_y_origin, tvb, *offsetp, 2, byte_order);
17419 *offsetp += 2;
17420}
17421
17422static void xfixesSetWindowShapeRegion(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
17423{
17424 proto_tree_add_item(t, hf_x11_xfixes_SetWindowShapeRegion_dest, tvb, *offsetp, 4, byte_order);
17425 *offsetp += 4;
17426 field8(tvb, offsetp, t, hf_x11_xfixes_SetWindowShapeRegion_dest_kind, byte_order);
17427 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 3, ENC_NA);
17428 *offsetp += 3;
17429 proto_tree_add_item(t, hf_x11_xfixes_SetWindowShapeRegion_x_offset, tvb, *offsetp, 2, byte_order);
17430 *offsetp += 2;
17431 proto_tree_add_item(t, hf_x11_xfixes_SetWindowShapeRegion_y_offset, tvb, *offsetp, 2, byte_order);
17432 *offsetp += 2;
17433 field32(tvb, offsetp, t, hf_x11_xfixes_SetWindowShapeRegion_region, byte_order);
17434}
17435
17436static void xfixesSetPictureClipRegion(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
17437{
17438 proto_tree_add_item(t, hf_x11_xfixes_SetPictureClipRegion_picture, tvb, *offsetp, 4, byte_order);
17439 *offsetp += 4;
17440 field32(tvb, offsetp, t, hf_x11_xfixes_SetPictureClipRegion_region, byte_order);
17441 proto_tree_add_item(t, hf_x11_xfixes_SetPictureClipRegion_x_origin, tvb, *offsetp, 2, byte_order);
17442 *offsetp += 2;
17443 proto_tree_add_item(t, hf_x11_xfixes_SetPictureClipRegion_y_origin, tvb, *offsetp, 2, byte_order);
17444 *offsetp += 2;
17445}
17446
17447static void xfixesSetCursorName(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
17448{
17449 int f_nbytes;
17450 proto_tree_add_item(t, hf_x11_xfixes_SetCursorName_cursor, tvb, *offsetp, 4, byte_order);
17451 *offsetp += 4;
17452 f_nbytes = tvb_get_uint16(tvb, *offsetp, byte_order);
17453 proto_tree_add_item(t, hf_x11_xfixes_SetCursorName_nbytes, tvb, *offsetp, 2, byte_order);
17454 *offsetp += 2;
17455 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 2, ENC_NA);
17456 *offsetp += 2;
17457 listOfByte(tvb, offsetp, t, hf_x11_xfixes_SetCursorName_name, f_nbytes, byte_order);
17458 length -= f_nbytes * 1;
17459}
17460
17461static void xfixesGetCursorName(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
17462{
17463 proto_tree_add_item(t, hf_x11_xfixes_GetCursorName_cursor, tvb, *offsetp, 4, byte_order);
17464 *offsetp += 4;
17465}
17466static void xfixesGetCursorName_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
17467{
17468 int sequence_number;
17469 int f_nbytes;
17470
17471 col_append_fstr(pinfo->cinfo, COL_INFO, "-GetCursorName");
17472
17473 REPLY(reply);
17474 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
17475 *offsetp += 1;
17476 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
17477 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
17478 "%d (xfixes-GetCursorName)", sequence_number);
17479 *offsetp += 2;
17480 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
17481 *offsetp += 4;
17482 field32(tvb, offsetp, t, hf_x11_xfixes_GetCursorName_reply_atom, byte_order);
17483 f_nbytes = tvb_get_uint16(tvb, *offsetp, byte_order);
17484 proto_tree_add_item(t, hf_x11_xfixes_GetCursorName_reply_nbytes, tvb, *offsetp, 2, byte_order);
17485 *offsetp += 2;
17486 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 18, ENC_NA);
17487 *offsetp += 18;
17488 listOfByte(tvb, offsetp, t, hf_x11_xfixes_GetCursorName_reply_name, f_nbytes, byte_order);
17489}
17490
17491static void xfixesGetCursorImageAndName(tvbuff_t *tvb _U_, packet_info *pinfo _U_, int *offsetp _U_, proto_tree *t _U_, unsigned byte_order _U_, int length _U_)
17492{
17493}
17494static void xfixesGetCursorImageAndName_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
17495{
17496 int sequence_number;
17497 int f_width;
17498 int f_height;
17499 int f_nbytes;
17500
17501 col_append_fstr(pinfo->cinfo, COL_INFO, "-GetCursorImageAndName");
17502
17503 REPLY(reply);
17504 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
17505 *offsetp += 1;
17506 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
17507 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
17508 "%d (xfixes-GetCursorImageAndName)", sequence_number);
17509 *offsetp += 2;
17510 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
17511 *offsetp += 4;
17512 proto_tree_add_item(t, hf_x11_xfixes_GetCursorImageAndName_reply_x, tvb, *offsetp, 2, byte_order);
17513 *offsetp += 2;
17514 proto_tree_add_item(t, hf_x11_xfixes_GetCursorImageAndName_reply_y, tvb, *offsetp, 2, byte_order);
17515 *offsetp += 2;
17516 f_width = tvb_get_uint16(tvb, *offsetp, byte_order);
17517 proto_tree_add_item(t, hf_x11_xfixes_GetCursorImageAndName_reply_width, tvb, *offsetp, 2, byte_order);
17518 *offsetp += 2;
17519 f_height = tvb_get_uint16(tvb, *offsetp, byte_order);
17520 proto_tree_add_item(t, hf_x11_xfixes_GetCursorImageAndName_reply_height, tvb, *offsetp, 2, byte_order);
17521 *offsetp += 2;
17522 proto_tree_add_item(t, hf_x11_xfixes_GetCursorImageAndName_reply_xhot, tvb, *offsetp, 2, byte_order);
17523 *offsetp += 2;
17524 proto_tree_add_item(t, hf_x11_xfixes_GetCursorImageAndName_reply_yhot, tvb, *offsetp, 2, byte_order);
17525 *offsetp += 2;
17526 proto_tree_add_item(t, hf_x11_xfixes_GetCursorImageAndName_reply_cursor_serial, tvb, *offsetp, 4, byte_order);
17527 *offsetp += 4;
17528 field32(tvb, offsetp, t, hf_x11_xfixes_GetCursorImageAndName_reply_cursor_atom, byte_order);
17529 f_nbytes = tvb_get_uint16(tvb, *offsetp, byte_order);
17530 proto_tree_add_item(t, hf_x11_xfixes_GetCursorImageAndName_reply_nbytes, tvb, *offsetp, 2, byte_order);
17531 *offsetp += 2;
17532 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 2, ENC_NA);
17533 *offsetp += 2;
17534 listOfCard32(tvb, offsetp, t, hf_x11_xfixes_GetCursorImageAndName_reply_cursor_image, hf_x11_xfixes_GetCursorImageAndName_reply_cursor_image_item, (f_width * f_height), byte_order);
17535 listOfByte(tvb, offsetp, t, hf_x11_xfixes_GetCursorImageAndName_reply_name, f_nbytes, byte_order);
17536}
17537
17538static void xfixesChangeCursor(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
17539{
17540 proto_tree_add_item(t, hf_x11_xfixes_ChangeCursor_source, tvb, *offsetp, 4, byte_order);
17541 *offsetp += 4;
17542 proto_tree_add_item(t, hf_x11_xfixes_ChangeCursor_destination, tvb, *offsetp, 4, byte_order);
17543 *offsetp += 4;
17544}
17545
17546static void xfixesChangeCursorByName(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
17547{
17548 int f_nbytes;
17549 proto_tree_add_item(t, hf_x11_xfixes_ChangeCursorByName_src, tvb, *offsetp, 4, byte_order);
17550 *offsetp += 4;
17551 f_nbytes = tvb_get_uint16(tvb, *offsetp, byte_order);
17552 proto_tree_add_item(t, hf_x11_xfixes_ChangeCursorByName_nbytes, tvb, *offsetp, 2, byte_order);
17553 *offsetp += 2;
17554 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 2, ENC_NA);
17555 *offsetp += 2;
17556 listOfByte(tvb, offsetp, t, hf_x11_xfixes_ChangeCursorByName_name, f_nbytes, byte_order);
17557 length -= f_nbytes * 1;
17558}
17559
17560static void xfixesExpandRegion(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
17561{
17562 proto_tree_add_item(t, hf_x11_xfixes_ExpandRegion_source, tvb, *offsetp, 4, byte_order);
17563 *offsetp += 4;
17564 proto_tree_add_item(t, hf_x11_xfixes_ExpandRegion_destination, tvb, *offsetp, 4, byte_order);
17565 *offsetp += 4;
17566 proto_tree_add_item(t, hf_x11_xfixes_ExpandRegion_left, tvb, *offsetp, 2, byte_order);
17567 *offsetp += 2;
17568 proto_tree_add_item(t, hf_x11_xfixes_ExpandRegion_right, tvb, *offsetp, 2, byte_order);
17569 *offsetp += 2;
17570 proto_tree_add_item(t, hf_x11_xfixes_ExpandRegion_top, tvb, *offsetp, 2, byte_order);
17571 *offsetp += 2;
17572 proto_tree_add_item(t, hf_x11_xfixes_ExpandRegion_bottom, tvb, *offsetp, 2, byte_order);
17573 *offsetp += 2;
17574}
17575
17576static void xfixesHideCursor(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
17577{
17578 proto_tree_add_item(t, hf_x11_xfixes_HideCursor_window, tvb, *offsetp, 4, byte_order);
17579 *offsetp += 4;
17580}
17581
17582static void xfixesShowCursor(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
17583{
17584 proto_tree_add_item(t, hf_x11_xfixes_ShowCursor_window, tvb, *offsetp, 4, byte_order);
17585 *offsetp += 4;
17586}
17587
17588static void xfixesCreatePointerBarrier(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
17589{
17590 int f_num_devices;
17591 proto_tree_add_item(t, hf_x11_xfixes_CreatePointerBarrier_barrier, tvb, *offsetp, 4, byte_order);
17592 *offsetp += 4;
17593 proto_tree_add_item(t, hf_x11_xfixes_CreatePointerBarrier_window, tvb, *offsetp, 4, byte_order);
17594 *offsetp += 4;
17595 proto_tree_add_item(t, hf_x11_xfixes_CreatePointerBarrier_x1, tvb, *offsetp, 2, byte_order);
17596 *offsetp += 2;
17597 proto_tree_add_item(t, hf_x11_xfixes_CreatePointerBarrier_y1, tvb, *offsetp, 2, byte_order);
17598 *offsetp += 2;
17599 proto_tree_add_item(t, hf_x11_xfixes_CreatePointerBarrier_x2, tvb, *offsetp, 2, byte_order);
17600 *offsetp += 2;
17601 proto_tree_add_item(t, hf_x11_xfixes_CreatePointerBarrier_y2, tvb, *offsetp, 2, byte_order);
17602 *offsetp += 2;
17603 {
17604 static int* const directions_bits [] = {
17605 &hf_x11_xfixes_CreatePointerBarrier_directions_mask_PositiveX,
17606 &hf_x11_xfixes_CreatePointerBarrier_directions_mask_PositiveY,
17607 &hf_x11_xfixes_CreatePointerBarrier_directions_mask_NegativeX,
17608 &hf_x11_xfixes_CreatePointerBarrier_directions_mask_NegativeY,
17609 NULL
17610 };
17611 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xfixes_CreatePointerBarrier_directions, ett_x11_rectangle, directions_bits, byte_order);
17612 }
17613 *offsetp += 4;
17614 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 2, ENC_NA);
17615 *offsetp += 2;
17616 f_num_devices = tvb_get_uint16(tvb, *offsetp, byte_order);
17617 proto_tree_add_item(t, hf_x11_xfixes_CreatePointerBarrier_num_devices, tvb, *offsetp, 2, byte_order);
17618 *offsetp += 2;
17619 listOfCard16(tvb, offsetp, t, hf_x11_xfixes_CreatePointerBarrier_devices, hf_x11_xfixes_CreatePointerBarrier_devices_item, f_num_devices, byte_order);
17620 length -= f_num_devices * 2;
17621}
17622
17623static void xfixesDeletePointerBarrier(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
17624{
17625 proto_tree_add_item(t, hf_x11_xfixes_DeletePointerBarrier_barrier, tvb, *offsetp, 4, byte_order);
17626 *offsetp += 4;
17627}
17628
17629static void xfixesSetClientDisconnectMode(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
17630{
17631 {
17632 static int* const disconnect_mode_bits [] = {
17633 &hf_x11_xfixes_SetClientDisconnectMode_disconnect_mode_mask_Terminate,
17634 NULL
17635 };
17636 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xfixes_SetClientDisconnectMode_disconnect_mode, ett_x11_rectangle, disconnect_mode_bits, byte_order);
17637 }
17638 *offsetp += 4;
17639}
17640
17641static void xfixesGetClientDisconnectMode(tvbuff_t *tvb _U_, packet_info *pinfo _U_, int *offsetp _U_, proto_tree *t _U_, unsigned byte_order _U_, int length _U_)
17642{
17643}
17644static void xfixesGetClientDisconnectMode_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
17645{
17646 int sequence_number;
17647
17648 col_append_fstr(pinfo->cinfo, COL_INFO, "-GetClientDisconnectMode");
17649
17650 REPLY(reply);
17651 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
17652 *offsetp += 1;
17653 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
17654 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
17655 "%d (xfixes-GetClientDisconnectMode)", sequence_number);
17656 *offsetp += 2;
17657 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
17658 *offsetp += 4;
17659 {
17660 static int* const disconnect_mode_bits [] = {
17661 &hf_x11_xfixes_GetClientDisconnectMode_reply_disconnect_mode_mask_Terminate,
17662 NULL
17663 };
17664 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xfixes_GetClientDisconnectMode_reply_disconnect_mode, ett_x11_rectangle, disconnect_mode_bits, byte_order);
17665 }
17666 *offsetp += 4;
17667 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 20, ENC_NA);
17668 *offsetp += 20;
17669}
17670static const value_string xfixes_extension_minor[] = {
17671 { 0, "QueryVersion" },
17672 { 1, "ChangeSaveSet" },
17673 { 2, "SelectSelectionInput" },
17674 { 3, "SelectCursorInput" },
17675 { 4, "GetCursorImage" },
17676 { 5, "CreateRegion" },
17677 { 6, "CreateRegionFromBitmap" },
17678 { 7, "CreateRegionFromWindow" },
17679 { 8, "CreateRegionFromGC" },
17680 { 9, "CreateRegionFromPicture" },
17681 { 10, "DestroyRegion" },
17682 { 11, "SetRegion" },
17683 { 12, "CopyRegion" },
17684 { 13, "UnionRegion" },
17685 { 14, "IntersectRegion" },
17686 { 15, "SubtractRegion" },
17687 { 16, "InvertRegion" },
17688 { 17, "TranslateRegion" },
17689 { 18, "RegionExtents" },
17690 { 19, "FetchRegion" },
17691 { 20, "SetGCClipRegion" },
17692 { 21, "SetWindowShapeRegion" },
17693 { 22, "SetPictureClipRegion" },
17694 { 23, "SetCursorName" },
17695 { 24, "GetCursorName" },
17696 { 25, "GetCursorImageAndName" },
17697 { 26, "ChangeCursor" },
17698 { 27, "ChangeCursorByName" },
17699 { 28, "ExpandRegion" },
17700 { 29, "HideCursor" },
17701 { 30, "ShowCursor" },
17702 { 31, "CreatePointerBarrier" },
17703 { 32, "DeletePointerBarrier" },
17704 { 33, "SetClientDisconnectMode" },
17705 { 34, "GetClientDisconnectMode" },
17706 { 0, NULL }
17707};
17708static const x11_event_info xfixes_events[] = {
17709 { "xfixes-CursorNotify", xfixesCursorNotify },
17710 { NULL, NULL }
17711};
17712static const x11_reply_info xfixes_replies[] = {
17713 { 0, xfixesQueryVersion_Reply },
17714 { 4, xfixesGetCursorImage_Reply },
17715 { 19, xfixesFetchRegion_Reply },
17716 { 24, xfixesGetCursorName_Reply },
17717 { 25, xfixesGetCursorImageAndName_Reply },
17718 { 34, xfixesGetClientDisconnectMode_Reply },
17719 { 0, NULL }
17720};
17721
17722static void dispatch_xfixes(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
17723{
17724 int minor, length;
17725 minor = CARD8(xfixes_extension_minor);
17726 length = REQUEST_LENGTH();
17727
17728 col_append_fstr(pinfo->cinfo, COL_INFO, "-%s",
17729 val_to_str(minor, xfixes_extension_minor,
17730 "<Unknown opcode %d>"));
17731 switch (minor) {
17732 case 0:
17733 xfixesQueryVersion(tvb, pinfo, offsetp, t, byte_order, length);
17734 break;
17735 case 1:
17736 xfixesChangeSaveSet(tvb, pinfo, offsetp, t, byte_order, length);
17737 break;
17738 case 2:
17739 xfixesSelectSelectionInput(tvb, pinfo, offsetp, t, byte_order, length);
17740 break;
17741 case 3:
17742 xfixesSelectCursorInput(tvb, pinfo, offsetp, t, byte_order, length);
17743 break;
17744 case 4:
17745 xfixesGetCursorImage(tvb, pinfo, offsetp, t, byte_order, length);
17746 break;
17747 case 5:
17748 xfixesCreateRegion(tvb, pinfo, offsetp, t, byte_order, length);
17749 break;
17750 case 6:
17751 xfixesCreateRegionFromBitmap(tvb, pinfo, offsetp, t, byte_order, length);
17752 break;
17753 case 7:
17754 xfixesCreateRegionFromWindow(tvb, pinfo, offsetp, t, byte_order, length);
17755 break;
17756 case 8:
17757 xfixesCreateRegionFromGC(tvb, pinfo, offsetp, t, byte_order, length);
17758 break;
17759 case 9:
17760 xfixesCreateRegionFromPicture(tvb, pinfo, offsetp, t, byte_order, length);
17761 break;
17762 case 10:
17763 xfixesDestroyRegion(tvb, pinfo, offsetp, t, byte_order, length);
17764 break;
17765 case 11:
17766 xfixesSetRegion(tvb, pinfo, offsetp, t, byte_order, length);
17767 break;
17768 case 12:
17769 xfixesCopyRegion(tvb, pinfo, offsetp, t, byte_order, length);
17770 break;
17771 case 13:
17772 xfixesUnionRegion(tvb, pinfo, offsetp, t, byte_order, length);
17773 break;
17774 case 14:
17775 xfixesIntersectRegion(tvb, pinfo, offsetp, t, byte_order, length);
17776 break;
17777 case 15:
17778 xfixesSubtractRegion(tvb, pinfo, offsetp, t, byte_order, length);
17779 break;
17780 case 16:
17781 xfixesInvertRegion(tvb, pinfo, offsetp, t, byte_order, length);
17782 break;
17783 case 17:
17784 xfixesTranslateRegion(tvb, pinfo, offsetp, t, byte_order, length);
17785 break;
17786 case 18:
17787 xfixesRegionExtents(tvb, pinfo, offsetp, t, byte_order, length);
17788 break;
17789 case 19:
17790 xfixesFetchRegion(tvb, pinfo, offsetp, t, byte_order, length);
17791 break;
17792 case 20:
17793 xfixesSetGCClipRegion(tvb, pinfo, offsetp, t, byte_order, length);
17794 break;
17795 case 21:
17796 xfixesSetWindowShapeRegion(tvb, pinfo, offsetp, t, byte_order, length);
17797 break;
17798 case 22:
17799 xfixesSetPictureClipRegion(tvb, pinfo, offsetp, t, byte_order, length);
17800 break;
17801 case 23:
17802 xfixesSetCursorName(tvb, pinfo, offsetp, t, byte_order, length);
17803 break;
17804 case 24:
17805 xfixesGetCursorName(tvb, pinfo, offsetp, t, byte_order, length);
17806 break;
17807 case 25:
17808 xfixesGetCursorImageAndName(tvb, pinfo, offsetp, t, byte_order, length);
17809 break;
17810 case 26:
17811 xfixesChangeCursor(tvb, pinfo, offsetp, t, byte_order, length);
17812 break;
17813 case 27:
17814 xfixesChangeCursorByName(tvb, pinfo, offsetp, t, byte_order, length);
17815 break;
17816 case 28:
17817 xfixesExpandRegion(tvb, pinfo, offsetp, t, byte_order, length);
17818 break;
17819 case 29:
17820 xfixesHideCursor(tvb, pinfo, offsetp, t, byte_order, length);
17821 break;
17822 case 30:
17823 xfixesShowCursor(tvb, pinfo, offsetp, t, byte_order, length);
17824 break;
17825 case 31:
17826 xfixesCreatePointerBarrier(tvb, pinfo, offsetp, t, byte_order, length);
17827 break;
17828 case 32:
17829 xfixesDeletePointerBarrier(tvb, pinfo, offsetp, t, byte_order, length);
17830 break;
17831 case 33:
17832 xfixesSetClientDisconnectMode(tvb, pinfo, offsetp, t, byte_order, length);
17833 break;
17834 case 34:
17835 xfixesGetClientDisconnectMode(tvb, pinfo, offsetp, t, byte_order, length);
17836 break;
17837 /* No need for a default case here, since Unknown is printed above,
17838 and UNDECODED() is taken care of by dissect_x11_request */
17839 }
17840}
17841
17842static void register_xfixes(void)
17843{
17844 set_handler("XFIXES", dispatch_xfixes, xfixes_errors, xfixes_events, NULL, xfixes_replies);
17845}
17846
17847static void struct_xinerama_ScreenInfo(tvbuff_t *tvb, int *offsetp, proto_tree *root, unsigned byte_order _U_, int count)
17848{
17849 int i;
17850 for (i = 0; i < count; i++) {
17851 proto_item *item;
17852 proto_tree *t;
17853
17854 item = proto_tree_add_item(root, hf_x11_struct_xinerama_ScreenInfo, tvb, *offsetp, 8, ENC_NA);
17855 t = proto_item_add_subtree(item, ett_x11_rectangle);
17856 proto_tree_add_item(t, hf_x11_struct_xinerama_ScreenInfo_x_org, tvb, *offsetp, 2, byte_order);
17857 *offsetp += 2;
17858 proto_tree_add_item(t, hf_x11_struct_xinerama_ScreenInfo_y_org, tvb, *offsetp, 2, byte_order);
17859 *offsetp += 2;
17860 proto_tree_add_item(t, hf_x11_struct_xinerama_ScreenInfo_width, tvb, *offsetp, 2, byte_order);
17861 *offsetp += 2;
17862 proto_tree_add_item(t, hf_x11_struct_xinerama_ScreenInfo_height, tvb, *offsetp, 2, byte_order);
17863 *offsetp += 2;
17864 }
17865}
17866
17867static void xineramaQueryVersion(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
17868{
17869 proto_tree_add_item(t, hf_x11_xinerama_QueryVersion_major, tvb, *offsetp, 1, byte_order);
17870 *offsetp += 1;
17871 proto_tree_add_item(t, hf_x11_xinerama_QueryVersion_minor, tvb, *offsetp, 1, byte_order);
17872 *offsetp += 1;
17873}
17874static void xineramaQueryVersion_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
17875{
17876 int sequence_number;
17877
17878 col_append_fstr(pinfo->cinfo, COL_INFO, "-QueryVersion");
17879
17880 REPLY(reply);
17881 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
17882 *offsetp += 1;
17883 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
17884 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
17885 "%d (xinerama-QueryVersion)", sequence_number);
17886 *offsetp += 2;
17887 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
17888 *offsetp += 4;
17889 proto_tree_add_item(t, hf_x11_xinerama_QueryVersion_reply_major, tvb, *offsetp, 2, byte_order);
17890 *offsetp += 2;
17891 proto_tree_add_item(t, hf_x11_xinerama_QueryVersion_reply_minor, tvb, *offsetp, 2, byte_order);
17892 *offsetp += 2;
17893}
17894
17895static void xineramaGetState(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
17896{
17897 proto_tree_add_item(t, hf_x11_xinerama_GetState_window, tvb, *offsetp, 4, byte_order);
17898 *offsetp += 4;
17899}
17900static void xineramaGetState_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
17901{
17902 int sequence_number;
17903
17904 col_append_fstr(pinfo->cinfo, COL_INFO, "-GetState");
17905
17906 REPLY(reply);
17907 proto_tree_add_item(t, hf_x11_xinerama_GetState_reply_state, tvb, *offsetp, 1, ENC_NA);
17908 *offsetp += 1;
17909 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
17910 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
17911 "%d (xinerama-GetState)", sequence_number);
17912 *offsetp += 2;
17913 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
17914 *offsetp += 4;
17915 proto_tree_add_item(t, hf_x11_xinerama_GetState_reply_window, tvb, *offsetp, 4, byte_order);
17916 *offsetp += 4;
17917}
17918
17919static void xineramaGetScreenCount(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
17920{
17921 proto_tree_add_item(t, hf_x11_xinerama_GetScreenCount_window, tvb, *offsetp, 4, byte_order);
17922 *offsetp += 4;
17923}
17924static void xineramaGetScreenCount_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
17925{
17926 int sequence_number;
17927
17928 col_append_fstr(pinfo->cinfo, COL_INFO, "-GetScreenCount");
17929
17930 REPLY(reply);
17931 proto_tree_add_item(t, hf_x11_xinerama_GetScreenCount_reply_screen_count, tvb, *offsetp, 1, ENC_NA);
17932 *offsetp += 1;
17933 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
17934 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
17935 "%d (xinerama-GetScreenCount)", sequence_number);
17936 *offsetp += 2;
17937 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
17938 *offsetp += 4;
17939 proto_tree_add_item(t, hf_x11_xinerama_GetScreenCount_reply_window, tvb, *offsetp, 4, byte_order);
17940 *offsetp += 4;
17941}
17942
17943static void xineramaGetScreenSize(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
17944{
17945 proto_tree_add_item(t, hf_x11_xinerama_GetScreenSize_window, tvb, *offsetp, 4, byte_order);
17946 *offsetp += 4;
17947 proto_tree_add_item(t, hf_x11_xinerama_GetScreenSize_screen, tvb, *offsetp, 4, byte_order);
17948 *offsetp += 4;
17949}
17950static void xineramaGetScreenSize_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
17951{
17952 int sequence_number;
17953
17954 col_append_fstr(pinfo->cinfo, COL_INFO, "-GetScreenSize");
17955
17956 REPLY(reply);
17957 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
17958 *offsetp += 1;
17959 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
17960 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
17961 "%d (xinerama-GetScreenSize)", sequence_number);
17962 *offsetp += 2;
17963 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
17964 *offsetp += 4;
17965 proto_tree_add_item(t, hf_x11_xinerama_GetScreenSize_reply_width, tvb, *offsetp, 4, byte_order);
17966 *offsetp += 4;
17967 proto_tree_add_item(t, hf_x11_xinerama_GetScreenSize_reply_height, tvb, *offsetp, 4, byte_order);
17968 *offsetp += 4;
17969 proto_tree_add_item(t, hf_x11_xinerama_GetScreenSize_reply_window, tvb, *offsetp, 4, byte_order);
17970 *offsetp += 4;
17971 proto_tree_add_item(t, hf_x11_xinerama_GetScreenSize_reply_screen, tvb, *offsetp, 4, byte_order);
17972 *offsetp += 4;
17973}
17974
17975static void xineramaIsActive(tvbuff_t *tvb _U_, packet_info *pinfo _U_, int *offsetp _U_, proto_tree *t _U_, unsigned byte_order _U_, int length _U_)
17976{
17977}
17978static void xineramaIsActive_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
17979{
17980 int sequence_number;
17981
17982 col_append_fstr(pinfo->cinfo, COL_INFO, "-IsActive");
17983
17984 REPLY(reply);
17985 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
17986 *offsetp += 1;
17987 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
17988 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
17989 "%d (xinerama-IsActive)", sequence_number);
17990 *offsetp += 2;
17991 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
17992 *offsetp += 4;
17993 proto_tree_add_item(t, hf_x11_xinerama_IsActive_reply_state, tvb, *offsetp, 4, byte_order);
17994 *offsetp += 4;
17995}
17996
17997static void xineramaQueryScreens(tvbuff_t *tvb _U_, packet_info *pinfo _U_, int *offsetp _U_, proto_tree *t _U_, unsigned byte_order _U_, int length _U_)
17998{
17999}
18000static void xineramaQueryScreens_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
18001{
18002 int sequence_number;
18003 int f_number;
18004
18005 col_append_fstr(pinfo->cinfo, COL_INFO, "-QueryScreens");
18006
18007 REPLY(reply);
18008 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
18009 *offsetp += 1;
18010 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
18011 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
18012 "%d (xinerama-QueryScreens)", sequence_number);
18013 *offsetp += 2;
18014 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
18015 *offsetp += 4;
18016 f_number = tvb_get_uint32(tvb, *offsetp, byte_order);
18017 proto_tree_add_item(t, hf_x11_xinerama_QueryScreens_reply_number, tvb, *offsetp, 4, byte_order);
18018 *offsetp += 4;
18019 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 20, ENC_NA);
18020 *offsetp += 20;
18021 struct_xinerama_ScreenInfo(tvb, offsetp, t, byte_order, f_number);
18022}
18023static const value_string xinerama_extension_minor[] = {
18024 { 0, "QueryVersion" },
18025 { 1, "GetState" },
18026 { 2, "GetScreenCount" },
18027 { 3, "GetScreenSize" },
18028 { 4, "IsActive" },
18029 { 5, "QueryScreens" },
18030 { 0, NULL }
18031};
18032static const x11_event_info xinerama_events[] = {
18033 { NULL, NULL }
18034};
18035static const x11_reply_info xinerama_replies[] = {
18036 { 0, xineramaQueryVersion_Reply },
18037 { 1, xineramaGetState_Reply },
18038 { 2, xineramaGetScreenCount_Reply },
18039 { 3, xineramaGetScreenSize_Reply },
18040 { 4, xineramaIsActive_Reply },
18041 { 5, xineramaQueryScreens_Reply },
18042 { 0, NULL }
18043};
18044
18045static void dispatch_xinerama(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
18046{
18047 int minor, length;
18048 minor = CARD8(xinerama_extension_minor);
18049 length = REQUEST_LENGTH();
18050
18051 col_append_fstr(pinfo->cinfo, COL_INFO, "-%s",
18052 val_to_str(minor, xinerama_extension_minor,
18053 "<Unknown opcode %d>"));
18054 switch (minor) {
18055 case 0:
18056 xineramaQueryVersion(tvb, pinfo, offsetp, t, byte_order, length);
18057 break;
18058 case 1:
18059 xineramaGetState(tvb, pinfo, offsetp, t, byte_order, length);
18060 break;
18061 case 2:
18062 xineramaGetScreenCount(tvb, pinfo, offsetp, t, byte_order, length);
18063 break;
18064 case 3:
18065 xineramaGetScreenSize(tvb, pinfo, offsetp, t, byte_order, length);
18066 break;
18067 case 4:
18068 xineramaIsActive(tvb, pinfo, offsetp, t, byte_order, length);
18069 break;
18070 case 5:
18071 xineramaQueryScreens(tvb, pinfo, offsetp, t, byte_order, length);
18072 break;
18073 /* No need for a default case here, since Unknown is printed above,
18074 and UNDECODED() is taken care of by dissect_x11_request */
18075 }
18076}
18077
18078static void register_xinerama(void)
18079{
18080 set_handler("XINERAMA", dispatch_xinerama, xinerama_errors, xinerama_events, NULL, xinerama_replies);
18081}
18082
18083static void struct_xinput_FP3232(tvbuff_t *tvb, int *offsetp, proto_tree *root, unsigned byte_order _U_, int count)
18084{
18085 int i;
18086 for (i = 0; i < count; i++) {
18087 proto_item *item;
18088 proto_tree *t;
18089
18090 item = proto_tree_add_item(root, hf_x11_struct_xinput_FP3232, tvb, *offsetp, 8, ENC_NA);
18091 t = proto_item_add_subtree(item, ett_x11_rectangle);
18092 proto_tree_add_item(t, hf_x11_struct_xinput_FP3232_integral, tvb, *offsetp, 4, byte_order);
18093 *offsetp += 4;
18094 proto_tree_add_item(t, hf_x11_struct_xinput_FP3232_frac, tvb, *offsetp, 4, byte_order);
18095 *offsetp += 4;
18096 }
18097}
18098
18099static void xinputGetExtensionVersion(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
18100{
18101 int f_name_len;
18102 f_name_len = tvb_get_uint16(tvb, *offsetp, byte_order);
18103 proto_tree_add_item(t, hf_x11_xinput_GetExtensionVersion_name_len, tvb, *offsetp, 2, byte_order);
18104 *offsetp += 2;
18105 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 2, ENC_NA);
18106 *offsetp += 2;
18107 listOfByte(tvb, offsetp, t, hf_x11_xinput_GetExtensionVersion_name, f_name_len, byte_order);
18108 length -= f_name_len * 1;
18109}
18110static void xinputGetExtensionVersion_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
18111{
18112 int sequence_number;
18113
18114 col_append_fstr(pinfo->cinfo, COL_INFO, "-GetExtensionVersion");
18115
18116 REPLY(reply);
18117 proto_tree_add_item(t, hf_x11_xinput_GetExtensionVersion_reply_xi_reply_type, tvb, *offsetp, 1, byte_order);
18118 *offsetp += 1;
18119 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
18120 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
18121 "%d (xinput-GetExtensionVersion)", sequence_number);
18122 *offsetp += 2;
18123 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
18124 *offsetp += 4;
18125 proto_tree_add_item(t, hf_x11_xinput_GetExtensionVersion_reply_server_major, tvb, *offsetp, 2, byte_order);
18126 *offsetp += 2;
18127 proto_tree_add_item(t, hf_x11_xinput_GetExtensionVersion_reply_server_minor, tvb, *offsetp, 2, byte_order);
18128 *offsetp += 2;
18129 proto_tree_add_item(t, hf_x11_xinput_GetExtensionVersion_reply_present, tvb, *offsetp, 1, byte_order);
18130 *offsetp += 1;
18131 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 19, ENC_NA);
18132 *offsetp += 19;
18133}
18134
18135static void struct_xinput_DeviceInfo(tvbuff_t *tvb, int *offsetp, proto_tree *root, unsigned byte_order _U_, int count)
18136{
18137 int i;
18138 for (i = 0; i < count; i++) {
18139 proto_item *item;
18140 proto_tree *t;
18141
18142 item = proto_tree_add_item(root, hf_x11_struct_xinput_DeviceInfo, tvb, *offsetp, 8, ENC_NA);
18143 t = proto_item_add_subtree(item, ett_x11_rectangle);
18144 proto_tree_add_item(t, hf_x11_struct_xinput_DeviceInfo_device_type, tvb, *offsetp, 4, byte_order);
18145 *offsetp += 4;
18146 proto_tree_add_item(t, hf_x11_struct_xinput_DeviceInfo_device_id, tvb, *offsetp, 1, byte_order);
18147 *offsetp += 1;
18148 proto_tree_add_item(t, hf_x11_struct_xinput_DeviceInfo_num_class_info, tvb, *offsetp, 1, byte_order);
18149 *offsetp += 1;
18150 field8(tvb, offsetp, t, hf_x11_struct_xinput_DeviceInfo_device_use, byte_order);
18151 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
18152 *offsetp += 1;
18153 }
18154}
18155
18156static void struct_xinput_AxisInfo(tvbuff_t *tvb, int *offsetp, proto_tree *root, unsigned byte_order _U_, int count)
18157{
18158 int i;
18159 for (i = 0; i < count; i++) {
18160 proto_item *item;
18161 proto_tree *t;
18162
18163 item = proto_tree_add_item(root, hf_x11_struct_xinput_AxisInfo, tvb, *offsetp, 12, ENC_NA);
18164 t = proto_item_add_subtree(item, ett_x11_rectangle);
18165 proto_tree_add_item(t, hf_x11_struct_xinput_AxisInfo_resolution, tvb, *offsetp, 4, byte_order);
18166 *offsetp += 4;
18167 proto_tree_add_item(t, hf_x11_struct_xinput_AxisInfo_minimum, tvb, *offsetp, 4, byte_order);
18168 *offsetp += 4;
18169 proto_tree_add_item(t, hf_x11_struct_xinput_AxisInfo_maximum, tvb, *offsetp, 4, byte_order);
18170 *offsetp += 4;
18171 }
18172}
18173
18174static int struct_size_xinput_InputInfo(tvbuff_t *tvb _U_, int *offsetp _U_, unsigned byte_order _U_)
18175{
18176 int size = 0;
18177 return size + 2;
18178}
18179
18180static void struct_xinput_InputInfo(tvbuff_t *tvb, int *offsetp, proto_tree *root, unsigned byte_order _U_, int count)
18181{
18182 int i;
18183 for (i = 0; i < count; i++) {
18184 proto_item *item;
18185 proto_tree *t;
18186 int f_class_id;
18187
18188 item = proto_tree_add_item(root, hf_x11_struct_xinput_InputInfo, tvb, *offsetp, struct_size_xinput_InputInfo(tvb, offsetp, byte_order), ENC_NA);
18189 t = proto_item_add_subtree(item, ett_x11_rectangle);
18190 f_class_id = field8(tvb, offsetp, t, hf_x11_struct_xinput_InputInfo_class_id, byte_order);
18191 proto_tree_add_item(t, hf_x11_struct_xinput_InputInfo_len, tvb, *offsetp, 1, byte_order);
18192 *offsetp += 1;
18193 if (f_class_id == 0) {
18194 proto_tree_add_item(t, hf_x11_struct_xinput_InputInfo_Key_min_keycode, tvb, *offsetp, 1, byte_order);
18195 *offsetp += 1;
18196 proto_tree_add_item(t, hf_x11_struct_xinput_InputInfo_Key_max_keycode, tvb, *offsetp, 1, byte_order);
18197 *offsetp += 1;
18198 proto_tree_add_item(t, hf_x11_struct_xinput_InputInfo_Key_num_keys, tvb, *offsetp, 2, byte_order);
18199 *offsetp += 2;
18200 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 2, ENC_NA);
18201 *offsetp += 2;
18202 }
18203 if (f_class_id == 1) {
18204 proto_tree_add_item(t, hf_x11_struct_xinput_InputInfo_Button_num_buttons, tvb, *offsetp, 2, byte_order);
18205 *offsetp += 2;
18206 }
18207 if (f_class_id == 2) {
18208 int f_axes_len;
18209 f_axes_len = tvb_get_uint8(tvb, *offsetp);
18210 proto_tree_add_item(t, hf_x11_struct_xinput_InputInfo_Valuator_axes_len, tvb, *offsetp, 1, byte_order);
18211 *offsetp += 1;
18212 field8(tvb, offsetp, t, hf_x11_struct_xinput_InputInfo_Valuator_mode, byte_order);
18213 proto_tree_add_item(t, hf_x11_struct_xinput_InputInfo_Valuator_motion_size, tvb, *offsetp, 4, byte_order);
18214 *offsetp += 4;
18215 struct_xinput_AxisInfo(tvb, offsetp, t, byte_order, f_axes_len);
18216 }
18217 }
18218}
18219
18220static void xinputListInputDevices(tvbuff_t *tvb _U_, packet_info *pinfo _U_, int *offsetp _U_, proto_tree *t _U_, unsigned byte_order _U_, int length _U_)
18221{
18222}
18223static void xinputListInputDevices_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
18224{
18225 int sequence_number;
18226 int f_devices_len;
18227 int sumof_devices = 0;
18228
18229 col_append_fstr(pinfo->cinfo, COL_INFO, "-ListInputDevices");
18230
18231 REPLY(reply);
18232 proto_tree_add_item(t, hf_x11_xinput_ListInputDevices_reply_xi_reply_type, tvb, *offsetp, 1, byte_order);
18233 *offsetp += 1;
18234 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
18235 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
18236 "%d (xinput-ListInputDevices)", sequence_number);
18237 *offsetp += 2;
18238 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
18239 *offsetp += 4;
18240 f_devices_len = tvb_get_uint8(tvb, *offsetp);
18241 proto_tree_add_item(t, hf_x11_xinput_ListInputDevices_reply_devices_len, tvb, *offsetp, 1, byte_order);
18242 *offsetp += 1;
18243 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 23, ENC_NA);
18244 *offsetp += 23;
18245 struct_xinput_DeviceInfo(tvb, offsetp, t, byte_order, f_devices_len);
18246 struct_xinput_InputInfo(tvb, offsetp, t, byte_order, sumof_devices);
18247 struct_xproto_STR(tvb, offsetp, t, byte_order, f_devices_len);
18248 if (*offsetp % 4) {
18249 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, (4 - *offsetp % 4), ENC_NA);
18250 *offsetp += (4 - *offsetp % 4);
18251 }
18252}
18253
18254static void struct_xinput_InputClassInfo(tvbuff_t *tvb, int *offsetp, proto_tree *root, unsigned byte_order _U_, int count)
18255{
18256 int i;
18257 for (i = 0; i < count; i++) {
18258 proto_item *item;
18259 proto_tree *t;
18260
18261 item = proto_tree_add_item(root, hf_x11_struct_xinput_InputClassInfo, tvb, *offsetp, 2, ENC_NA);
18262 t = proto_item_add_subtree(item, ett_x11_rectangle);
18263 field8(tvb, offsetp, t, hf_x11_struct_xinput_InputClassInfo_class_id, byte_order);
18264 proto_tree_add_item(t, hf_x11_struct_xinput_InputClassInfo_event_type_base, tvb, *offsetp, 1, byte_order);
18265 *offsetp += 1;
18266 }
18267}
18268
18269static void xinputOpenDevice(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
18270{
18271 proto_tree_add_item(t, hf_x11_xinput_OpenDevice_device_id, tvb, *offsetp, 1, byte_order);
18272 *offsetp += 1;
18273 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 3, ENC_NA);
18274 *offsetp += 3;
18275}
18276static void xinputOpenDevice_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
18277{
18278 int sequence_number;
18279 int f_num_classes;
18280
18281 col_append_fstr(pinfo->cinfo, COL_INFO, "-OpenDevice");
18282
18283 REPLY(reply);
18284 proto_tree_add_item(t, hf_x11_xinput_OpenDevice_reply_xi_reply_type, tvb, *offsetp, 1, byte_order);
18285 *offsetp += 1;
18286 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
18287 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
18288 "%d (xinput-OpenDevice)", sequence_number);
18289 *offsetp += 2;
18290 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
18291 *offsetp += 4;
18292 f_num_classes = tvb_get_uint8(tvb, *offsetp);
18293 proto_tree_add_item(t, hf_x11_xinput_OpenDevice_reply_num_classes, tvb, *offsetp, 1, byte_order);
18294 *offsetp += 1;
18295 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 23, ENC_NA);
18296 *offsetp += 23;
18297 struct_xinput_InputClassInfo(tvb, offsetp, t, byte_order, f_num_classes);
18298 if (*offsetp % 4) {
18299 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, (4 - *offsetp % 4), ENC_NA);
18300 *offsetp += (4 - *offsetp % 4);
18301 }
18302}
18303
18304static void xinputCloseDevice(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
18305{
18306 proto_tree_add_item(t, hf_x11_xinput_CloseDevice_device_id, tvb, *offsetp, 1, byte_order);
18307 *offsetp += 1;
18308 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 3, ENC_NA);
18309 *offsetp += 3;
18310}
18311
18312static void xinputSetDeviceMode(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
18313{
18314 proto_tree_add_item(t, hf_x11_xinput_SetDeviceMode_device_id, tvb, *offsetp, 1, byte_order);
18315 *offsetp += 1;
18316 field8(tvb, offsetp, t, hf_x11_xinput_SetDeviceMode_mode, byte_order);
18317 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 2, ENC_NA);
18318 *offsetp += 2;
18319}
18320static void xinputSetDeviceMode_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
18321{
18322 int sequence_number;
18323
18324 col_append_fstr(pinfo->cinfo, COL_INFO, "-SetDeviceMode");
18325
18326 REPLY(reply);
18327 proto_tree_add_item(t, hf_x11_xinput_SetDeviceMode_reply_xi_reply_type, tvb, *offsetp, 1, byte_order);
18328 *offsetp += 1;
18329 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
18330 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
18331 "%d (xinput-SetDeviceMode)", sequence_number);
18332 *offsetp += 2;
18333 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
18334 *offsetp += 4;
18335 field8(tvb, offsetp, t, hf_x11_xinput_SetDeviceMode_reply_status, byte_order);
18336 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 23, ENC_NA);
18337 *offsetp += 23;
18338}
18339
18340static void xinputSelectExtensionEvent(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
18341{
18342 int f_num_classes;
18343 proto_tree_add_item(t, hf_x11_xinput_SelectExtensionEvent_window, tvb, *offsetp, 4, byte_order);
18344 *offsetp += 4;
18345 f_num_classes = tvb_get_uint16(tvb, *offsetp, byte_order);
18346 proto_tree_add_item(t, hf_x11_xinput_SelectExtensionEvent_num_classes, tvb, *offsetp, 2, byte_order);
18347 *offsetp += 2;
18348 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 2, ENC_NA);
18349 *offsetp += 2;
18350 listOfCard32(tvb, offsetp, t, hf_x11_xinput_SelectExtensionEvent_classes, hf_x11_xinput_SelectExtensionEvent_classes_item, f_num_classes, byte_order);
18351 length -= f_num_classes * 4;
18352}
18353
18354static void xinputGetSelectedExtensionEvents(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
18355{
18356 proto_tree_add_item(t, hf_x11_xinput_GetSelectedExtensionEvents_window, tvb, *offsetp, 4, byte_order);
18357 *offsetp += 4;
18358}
18359static void xinputGetSelectedExtensionEvents_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
18360{
18361 int sequence_number;
18362 int f_num_this_classes;
18363 int f_num_all_classes;
18364
18365 col_append_fstr(pinfo->cinfo, COL_INFO, "-GetSelectedExtensionEvents");
18366
18367 REPLY(reply);
18368 proto_tree_add_item(t, hf_x11_xinput_GetSelectedExtensionEvents_reply_xi_reply_type, tvb, *offsetp, 1, byte_order);
18369 *offsetp += 1;
18370 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
18371 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
18372 "%d (xinput-GetSelectedExtensionEvents)", sequence_number);
18373 *offsetp += 2;
18374 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
18375 *offsetp += 4;
18376 f_num_this_classes = tvb_get_uint16(tvb, *offsetp, byte_order);
18377 proto_tree_add_item(t, hf_x11_xinput_GetSelectedExtensionEvents_reply_num_this_classes, tvb, *offsetp, 2, byte_order);
18378 *offsetp += 2;
18379 f_num_all_classes = tvb_get_uint16(tvb, *offsetp, byte_order);
18380 proto_tree_add_item(t, hf_x11_xinput_GetSelectedExtensionEvents_reply_num_all_classes, tvb, *offsetp, 2, byte_order);
18381 *offsetp += 2;
18382 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 20, ENC_NA);
18383 *offsetp += 20;
18384 listOfCard32(tvb, offsetp, t, hf_x11_xinput_GetSelectedExtensionEvents_reply_this_classes, hf_x11_xinput_GetSelectedExtensionEvents_reply_this_classes_item, f_num_this_classes, byte_order);
18385 listOfCard32(tvb, offsetp, t, hf_x11_xinput_GetSelectedExtensionEvents_reply_all_classes, hf_x11_xinput_GetSelectedExtensionEvents_reply_all_classes_item, f_num_all_classes, byte_order);
18386}
18387
18388static void xinputChangeDeviceDontPropagateList(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
18389{
18390 int f_num_classes;
18391 proto_tree_add_item(t, hf_x11_xinput_ChangeDeviceDontPropagateList_window, tvb, *offsetp, 4, byte_order);
18392 *offsetp += 4;
18393 f_num_classes = tvb_get_uint16(tvb, *offsetp, byte_order);
18394 proto_tree_add_item(t, hf_x11_xinput_ChangeDeviceDontPropagateList_num_classes, tvb, *offsetp, 2, byte_order);
18395 *offsetp += 2;
18396 field8(tvb, offsetp, t, hf_x11_xinput_ChangeDeviceDontPropagateList_mode, byte_order);
18397 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
18398 *offsetp += 1;
18399 listOfCard32(tvb, offsetp, t, hf_x11_xinput_ChangeDeviceDontPropagateList_classes, hf_x11_xinput_ChangeDeviceDontPropagateList_classes_item, f_num_classes, byte_order);
18400 length -= f_num_classes * 4;
18401}
18402
18403static void xinputGetDeviceDontPropagateList(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
18404{
18405 proto_tree_add_item(t, hf_x11_xinput_GetDeviceDontPropagateList_window, tvb, *offsetp, 4, byte_order);
18406 *offsetp += 4;
18407}
18408static void xinputGetDeviceDontPropagateList_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
18409{
18410 int sequence_number;
18411 int f_num_classes;
18412
18413 col_append_fstr(pinfo->cinfo, COL_INFO, "-GetDeviceDontPropagateList");
18414
18415 REPLY(reply);
18416 proto_tree_add_item(t, hf_x11_xinput_GetDeviceDontPropagateList_reply_xi_reply_type, tvb, *offsetp, 1, byte_order);
18417 *offsetp += 1;
18418 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
18419 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
18420 "%d (xinput-GetDeviceDontPropagateList)", sequence_number);
18421 *offsetp += 2;
18422 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
18423 *offsetp += 4;
18424 f_num_classes = tvb_get_uint16(tvb, *offsetp, byte_order);
18425 proto_tree_add_item(t, hf_x11_xinput_GetDeviceDontPropagateList_reply_num_classes, tvb, *offsetp, 2, byte_order);
18426 *offsetp += 2;
18427 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 22, ENC_NA);
18428 *offsetp += 22;
18429 listOfCard32(tvb, offsetp, t, hf_x11_xinput_GetDeviceDontPropagateList_reply_classes, hf_x11_xinput_GetDeviceDontPropagateList_reply_classes_item, f_num_classes, byte_order);
18430}
18431
18432static int struct_size_xinput_DeviceTimeCoord(tvbuff_t *tvb _U_, int *offsetp _U_, unsigned byte_order _U_, int p_num_axes)
18433{
18434 int size = 0;
18435 size += p_num_axes * 4;
18436 return size + 4;
18437}
18438
18439static void struct_xinput_DeviceTimeCoord(tvbuff_t *tvb, int *offsetp, proto_tree *root, unsigned byte_order _U_, int count, int p_num_axes)
18440{
18441 int i;
18442 for (i = 0; i < count; i++) {
18443 proto_item *item;
18444 proto_tree *t;
18445
18446 item = proto_tree_add_item(root, hf_x11_struct_xinput_DeviceTimeCoord, tvb, *offsetp, struct_size_xinput_DeviceTimeCoord(tvb, offsetp, byte_order, p_num_axes), ENC_NA);
18447 t = proto_item_add_subtree(item, ett_x11_rectangle);
18448 proto_tree_add_item(t, hf_x11_struct_xinput_DeviceTimeCoord_time, tvb, *offsetp, 4, byte_order);
18449 *offsetp += 4;
18450 listOfInt32(tvb, offsetp, t, hf_x11_struct_xinput_DeviceTimeCoord_axisvalues, hf_x11_struct_xinput_DeviceTimeCoord_axisvalues_item, p_num_axes, byte_order);
18451 }
18452}
18453
18454static void xinputGetDeviceMotionEvents(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
18455{
18456 proto_tree_add_item(t, hf_x11_xinput_GetDeviceMotionEvents_start, tvb, *offsetp, 4, byte_order);
18457 *offsetp += 4;
18458 field32(tvb, offsetp, t, hf_x11_xinput_GetDeviceMotionEvents_stop, byte_order);
18459 proto_tree_add_item(t, hf_x11_xinput_GetDeviceMotionEvents_device_id, tvb, *offsetp, 1, byte_order);
18460 *offsetp += 1;
18461 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 3, ENC_NA);
18462 *offsetp += 3;
18463}
18464static void xinputGetDeviceMotionEvents_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
18465{
18466 int sequence_number;
18467 int f_num_events;
18468 int f_num_axes;
18469
18470 col_append_fstr(pinfo->cinfo, COL_INFO, "-GetDeviceMotionEvents");
18471
18472 REPLY(reply);
18473 proto_tree_add_item(t, hf_x11_xinput_GetDeviceMotionEvents_reply_xi_reply_type, tvb, *offsetp, 1, byte_order);
18474 *offsetp += 1;
18475 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
18476 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
18477 "%d (xinput-GetDeviceMotionEvents)", sequence_number);
18478 *offsetp += 2;
18479 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
18480 *offsetp += 4;
18481 f_num_events = tvb_get_uint32(tvb, *offsetp, byte_order);
18482 proto_tree_add_item(t, hf_x11_xinput_GetDeviceMotionEvents_reply_num_events, tvb, *offsetp, 4, byte_order);
18483 *offsetp += 4;
18484 f_num_axes = tvb_get_uint8(tvb, *offsetp);
18485 proto_tree_add_item(t, hf_x11_xinput_GetDeviceMotionEvents_reply_num_axes, tvb, *offsetp, 1, byte_order);
18486 *offsetp += 1;
18487 field8(tvb, offsetp, t, hf_x11_xinput_GetDeviceMotionEvents_reply_device_mode, byte_order);
18488 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 18, ENC_NA);
18489 *offsetp += 18;
18490 struct_xinput_DeviceTimeCoord(tvb, offsetp, t, byte_order, f_num_events, f_num_axes);
18491}
18492
18493static void xinputChangeKeyboardDevice(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
18494{
18495 proto_tree_add_item(t, hf_x11_xinput_ChangeKeyboardDevice_device_id, tvb, *offsetp, 1, byte_order);
18496 *offsetp += 1;
18497 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 3, ENC_NA);
18498 *offsetp += 3;
18499}
18500static void xinputChangeKeyboardDevice_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
18501{
18502 int sequence_number;
18503
18504 col_append_fstr(pinfo->cinfo, COL_INFO, "-ChangeKeyboardDevice");
18505
18506 REPLY(reply);
18507 proto_tree_add_item(t, hf_x11_xinput_ChangeKeyboardDevice_reply_xi_reply_type, tvb, *offsetp, 1, byte_order);
18508 *offsetp += 1;
18509 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
18510 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
18511 "%d (xinput-ChangeKeyboardDevice)", sequence_number);
18512 *offsetp += 2;
18513 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
18514 *offsetp += 4;
18515 field8(tvb, offsetp, t, hf_x11_xinput_ChangeKeyboardDevice_reply_status, byte_order);
18516 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 23, ENC_NA);
18517 *offsetp += 23;
18518}
18519
18520static void xinputChangePointerDevice(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
18521{
18522 proto_tree_add_item(t, hf_x11_xinput_ChangePointerDevice_x_axis, tvb, *offsetp, 1, byte_order);
18523 *offsetp += 1;
18524 proto_tree_add_item(t, hf_x11_xinput_ChangePointerDevice_y_axis, tvb, *offsetp, 1, byte_order);
18525 *offsetp += 1;
18526 proto_tree_add_item(t, hf_x11_xinput_ChangePointerDevice_device_id, tvb, *offsetp, 1, byte_order);
18527 *offsetp += 1;
18528 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
18529 *offsetp += 1;
18530}
18531static void xinputChangePointerDevice_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
18532{
18533 int sequence_number;
18534
18535 col_append_fstr(pinfo->cinfo, COL_INFO, "-ChangePointerDevice");
18536
18537 REPLY(reply);
18538 proto_tree_add_item(t, hf_x11_xinput_ChangePointerDevice_reply_xi_reply_type, tvb, *offsetp, 1, byte_order);
18539 *offsetp += 1;
18540 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
18541 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
18542 "%d (xinput-ChangePointerDevice)", sequence_number);
18543 *offsetp += 2;
18544 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
18545 *offsetp += 4;
18546 field8(tvb, offsetp, t, hf_x11_xinput_ChangePointerDevice_reply_status, byte_order);
18547 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 23, ENC_NA);
18548 *offsetp += 23;
18549}
18550
18551static void xinputGrabDevice(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
18552{
18553 int f_num_classes;
18554 proto_tree_add_item(t, hf_x11_xinput_GrabDevice_grab_window, tvb, *offsetp, 4, byte_order);
18555 *offsetp += 4;
18556 field32(tvb, offsetp, t, hf_x11_xinput_GrabDevice_time, byte_order);
18557 f_num_classes = tvb_get_uint16(tvb, *offsetp, byte_order);
18558 proto_tree_add_item(t, hf_x11_xinput_GrabDevice_num_classes, tvb, *offsetp, 2, byte_order);
18559 *offsetp += 2;
18560 field8(tvb, offsetp, t, hf_x11_xinput_GrabDevice_this_device_mode, byte_order);
18561 field8(tvb, offsetp, t, hf_x11_xinput_GrabDevice_other_device_mode, byte_order);
18562 proto_tree_add_item(t, hf_x11_xinput_GrabDevice_owner_events, tvb, *offsetp, 1, byte_order);
18563 *offsetp += 1;
18564 proto_tree_add_item(t, hf_x11_xinput_GrabDevice_device_id, tvb, *offsetp, 1, byte_order);
18565 *offsetp += 1;
18566 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 2, ENC_NA);
18567 *offsetp += 2;
18568 listOfCard32(tvb, offsetp, t, hf_x11_xinput_GrabDevice_classes, hf_x11_xinput_GrabDevice_classes_item, f_num_classes, byte_order);
18569 length -= f_num_classes * 4;
18570}
18571static void xinputGrabDevice_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
18572{
18573 int sequence_number;
18574
18575 col_append_fstr(pinfo->cinfo, COL_INFO, "-GrabDevice");
18576
18577 REPLY(reply);
18578 proto_tree_add_item(t, hf_x11_xinput_GrabDevice_reply_xi_reply_type, tvb, *offsetp, 1, byte_order);
18579 *offsetp += 1;
18580 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
18581 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
18582 "%d (xinput-GrabDevice)", sequence_number);
18583 *offsetp += 2;
18584 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
18585 *offsetp += 4;
18586 field8(tvb, offsetp, t, hf_x11_xinput_GrabDevice_reply_status, byte_order);
18587 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 23, ENC_NA);
18588 *offsetp += 23;
18589}
18590
18591static void xinputUngrabDevice(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
18592{
18593 field32(tvb, offsetp, t, hf_x11_xinput_UngrabDevice_time, byte_order);
18594 proto_tree_add_item(t, hf_x11_xinput_UngrabDevice_device_id, tvb, *offsetp, 1, byte_order);
18595 *offsetp += 1;
18596 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 3, ENC_NA);
18597 *offsetp += 3;
18598}
18599
18600static void xinputGrabDeviceKey(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
18601{
18602 int f_num_classes;
18603 proto_tree_add_item(t, hf_x11_xinput_GrabDeviceKey_grab_window, tvb, *offsetp, 4, byte_order);
18604 *offsetp += 4;
18605 f_num_classes = tvb_get_uint16(tvb, *offsetp, byte_order);
18606 proto_tree_add_item(t, hf_x11_xinput_GrabDeviceKey_num_classes, tvb, *offsetp, 2, byte_order);
18607 *offsetp += 2;
18608 {
18609 static int* const modifiers_bits [] = {
18610 &hf_x11_xinput_GrabDeviceKey_modifiers_mask_Shift,
18611 &hf_x11_xinput_GrabDeviceKey_modifiers_mask_Lock,
18612 &hf_x11_xinput_GrabDeviceKey_modifiers_mask_Control,
18613 &hf_x11_xinput_GrabDeviceKey_modifiers_mask_1,
18614 &hf_x11_xinput_GrabDeviceKey_modifiers_mask_2,
18615 &hf_x11_xinput_GrabDeviceKey_modifiers_mask_3,
18616 &hf_x11_xinput_GrabDeviceKey_modifiers_mask_4,
18617 &hf_x11_xinput_GrabDeviceKey_modifiers_mask_5,
18618 &hf_x11_xinput_GrabDeviceKey_modifiers_mask_Any,
18619 NULL
18620 };
18621 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xinput_GrabDeviceKey_modifiers, ett_x11_rectangle, modifiers_bits, byte_order);
18622 }
18623 *offsetp += 2;
18624 field8(tvb, offsetp, t, hf_x11_xinput_GrabDeviceKey_modifier_device, byte_order);
18625 proto_tree_add_item(t, hf_x11_xinput_GrabDeviceKey_grabbed_device, tvb, *offsetp, 1, byte_order);
18626 *offsetp += 1;
18627 field8(tvb, offsetp, t, hf_x11_xinput_GrabDeviceKey_key, byte_order);
18628 field8(tvb, offsetp, t, hf_x11_xinput_GrabDeviceKey_this_device_mode, byte_order);
18629 field8(tvb, offsetp, t, hf_x11_xinput_GrabDeviceKey_other_device_mode, byte_order);
18630 proto_tree_add_item(t, hf_x11_xinput_GrabDeviceKey_owner_events, tvb, *offsetp, 1, byte_order);
18631 *offsetp += 1;
18632 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 2, ENC_NA);
18633 *offsetp += 2;
18634 listOfCard32(tvb, offsetp, t, hf_x11_xinput_GrabDeviceKey_classes, hf_x11_xinput_GrabDeviceKey_classes_item, f_num_classes, byte_order);
18635 length -= f_num_classes * 4;
18636}
18637
18638static void xinputUngrabDeviceKey(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
18639{
18640 proto_tree_add_item(t, hf_x11_xinput_UngrabDeviceKey_grabWindow, tvb, *offsetp, 4, byte_order);
18641 *offsetp += 4;
18642 {
18643 static int* const modifiers_bits [] = {
18644 &hf_x11_xinput_UngrabDeviceKey_modifiers_mask_Shift,
18645 &hf_x11_xinput_UngrabDeviceKey_modifiers_mask_Lock,
18646 &hf_x11_xinput_UngrabDeviceKey_modifiers_mask_Control,
18647 &hf_x11_xinput_UngrabDeviceKey_modifiers_mask_1,
18648 &hf_x11_xinput_UngrabDeviceKey_modifiers_mask_2,
18649 &hf_x11_xinput_UngrabDeviceKey_modifiers_mask_3,
18650 &hf_x11_xinput_UngrabDeviceKey_modifiers_mask_4,
18651 &hf_x11_xinput_UngrabDeviceKey_modifiers_mask_5,
18652 &hf_x11_xinput_UngrabDeviceKey_modifiers_mask_Any,
18653 NULL
18654 };
18655 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xinput_UngrabDeviceKey_modifiers, ett_x11_rectangle, modifiers_bits, byte_order);
18656 }
18657 *offsetp += 2;
18658 field8(tvb, offsetp, t, hf_x11_xinput_UngrabDeviceKey_modifier_device, byte_order);
18659 field8(tvb, offsetp, t, hf_x11_xinput_UngrabDeviceKey_key, byte_order);
18660 proto_tree_add_item(t, hf_x11_xinput_UngrabDeviceKey_grabbed_device, tvb, *offsetp, 1, byte_order);
18661 *offsetp += 1;
18662}
18663
18664static void xinputGrabDeviceButton(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
18665{
18666 int f_num_classes;
18667 proto_tree_add_item(t, hf_x11_xinput_GrabDeviceButton_grab_window, tvb, *offsetp, 4, byte_order);
18668 *offsetp += 4;
18669 proto_tree_add_item(t, hf_x11_xinput_GrabDeviceButton_grabbed_device, tvb, *offsetp, 1, byte_order);
18670 *offsetp += 1;
18671 field8(tvb, offsetp, t, hf_x11_xinput_GrabDeviceButton_modifier_device, byte_order);
18672 f_num_classes = tvb_get_uint16(tvb, *offsetp, byte_order);
18673 proto_tree_add_item(t, hf_x11_xinput_GrabDeviceButton_num_classes, tvb, *offsetp, 2, byte_order);
18674 *offsetp += 2;
18675 {
18676 static int* const modifiers_bits [] = {
18677 &hf_x11_xinput_GrabDeviceButton_modifiers_mask_Shift,
18678 &hf_x11_xinput_GrabDeviceButton_modifiers_mask_Lock,
18679 &hf_x11_xinput_GrabDeviceButton_modifiers_mask_Control,
18680 &hf_x11_xinput_GrabDeviceButton_modifiers_mask_1,
18681 &hf_x11_xinput_GrabDeviceButton_modifiers_mask_2,
18682 &hf_x11_xinput_GrabDeviceButton_modifiers_mask_3,
18683 &hf_x11_xinput_GrabDeviceButton_modifiers_mask_4,
18684 &hf_x11_xinput_GrabDeviceButton_modifiers_mask_5,
18685 &hf_x11_xinput_GrabDeviceButton_modifiers_mask_Any,
18686 NULL
18687 };
18688 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xinput_GrabDeviceButton_modifiers, ett_x11_rectangle, modifiers_bits, byte_order);
18689 }
18690 *offsetp += 2;
18691 field8(tvb, offsetp, t, hf_x11_xinput_GrabDeviceButton_this_device_mode, byte_order);
18692 field8(tvb, offsetp, t, hf_x11_xinput_GrabDeviceButton_other_device_mode, byte_order);
18693 field8(tvb, offsetp, t, hf_x11_xinput_GrabDeviceButton_button, byte_order);
18694 proto_tree_add_item(t, hf_x11_xinput_GrabDeviceButton_owner_events, tvb, *offsetp, 1, byte_order);
18695 *offsetp += 1;
18696 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 2, ENC_NA);
18697 *offsetp += 2;
18698 listOfCard32(tvb, offsetp, t, hf_x11_xinput_GrabDeviceButton_classes, hf_x11_xinput_GrabDeviceButton_classes_item, f_num_classes, byte_order);
18699 length -= f_num_classes * 4;
18700}
18701
18702static void xinputUngrabDeviceButton(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
18703{
18704 proto_tree_add_item(t, hf_x11_xinput_UngrabDeviceButton_grab_window, tvb, *offsetp, 4, byte_order);
18705 *offsetp += 4;
18706 {
18707 static int* const modifiers_bits [] = {
18708 &hf_x11_xinput_UngrabDeviceButton_modifiers_mask_Shift,
18709 &hf_x11_xinput_UngrabDeviceButton_modifiers_mask_Lock,
18710 &hf_x11_xinput_UngrabDeviceButton_modifiers_mask_Control,
18711 &hf_x11_xinput_UngrabDeviceButton_modifiers_mask_1,
18712 &hf_x11_xinput_UngrabDeviceButton_modifiers_mask_2,
18713 &hf_x11_xinput_UngrabDeviceButton_modifiers_mask_3,
18714 &hf_x11_xinput_UngrabDeviceButton_modifiers_mask_4,
18715 &hf_x11_xinput_UngrabDeviceButton_modifiers_mask_5,
18716 &hf_x11_xinput_UngrabDeviceButton_modifiers_mask_Any,
18717 NULL
18718 };
18719 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xinput_UngrabDeviceButton_modifiers, ett_x11_rectangle, modifiers_bits, byte_order);
18720 }
18721 *offsetp += 2;
18722 field8(tvb, offsetp, t, hf_x11_xinput_UngrabDeviceButton_modifier_device, byte_order);
18723 field8(tvb, offsetp, t, hf_x11_xinput_UngrabDeviceButton_button, byte_order);
18724 proto_tree_add_item(t, hf_x11_xinput_UngrabDeviceButton_grabbed_device, tvb, *offsetp, 1, byte_order);
18725 *offsetp += 1;
18726 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 3, ENC_NA);
18727 *offsetp += 3;
18728}
18729
18730static void xinputAllowDeviceEvents(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
18731{
18732 field32(tvb, offsetp, t, hf_x11_xinput_AllowDeviceEvents_time, byte_order);
18733 field8(tvb, offsetp, t, hf_x11_xinput_AllowDeviceEvents_mode, byte_order);
18734 proto_tree_add_item(t, hf_x11_xinput_AllowDeviceEvents_device_id, tvb, *offsetp, 1, byte_order);
18735 *offsetp += 1;
18736 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 2, ENC_NA);
18737 *offsetp += 2;
18738}
18739
18740static void xinputGetDeviceFocus(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
18741{
18742 proto_tree_add_item(t, hf_x11_xinput_GetDeviceFocus_device_id, tvb, *offsetp, 1, byte_order);
18743 *offsetp += 1;
18744 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 3, ENC_NA);
18745 *offsetp += 3;
18746}
18747static void xinputGetDeviceFocus_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
18748{
18749 int sequence_number;
18750
18751 col_append_fstr(pinfo->cinfo, COL_INFO, "-GetDeviceFocus");
18752
18753 REPLY(reply);
18754 proto_tree_add_item(t, hf_x11_xinput_GetDeviceFocus_reply_xi_reply_type, tvb, *offsetp, 1, byte_order);
18755 *offsetp += 1;
18756 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
18757 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
18758 "%d (xinput-GetDeviceFocus)", sequence_number);
18759 *offsetp += 2;
18760 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
18761 *offsetp += 4;
18762 field32(tvb, offsetp, t, hf_x11_xinput_GetDeviceFocus_reply_focus, byte_order);
18763 proto_tree_add_item(t, hf_x11_xinput_GetDeviceFocus_reply_time, tvb, *offsetp, 4, byte_order);
18764 *offsetp += 4;
18765 field8(tvb, offsetp, t, hf_x11_xinput_GetDeviceFocus_reply_revert_to, byte_order);
18766 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 15, ENC_NA);
18767 *offsetp += 15;
18768}
18769
18770static void xinputSetDeviceFocus(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
18771{
18772 field32(tvb, offsetp, t, hf_x11_xinput_SetDeviceFocus_focus, byte_order);
18773 field32(tvb, offsetp, t, hf_x11_xinput_SetDeviceFocus_time, byte_order);
18774 field8(tvb, offsetp, t, hf_x11_xinput_SetDeviceFocus_revert_to, byte_order);
18775 proto_tree_add_item(t, hf_x11_xinput_SetDeviceFocus_device_id, tvb, *offsetp, 1, byte_order);
18776 *offsetp += 1;
18777 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 2, ENC_NA);
18778 *offsetp += 2;
18779}
18780
18781static int struct_size_xinput_FeedbackState(tvbuff_t *tvb _U_, int *offsetp _U_, unsigned byte_order _U_)
18782{
18783 int size = 0;
18784 return size + 4;
18785}
18786
18787static void struct_xinput_FeedbackState(tvbuff_t *tvb, int *offsetp, proto_tree *root, unsigned byte_order _U_, int count)
18788{
18789 int i;
18790 for (i = 0; i < count; i++) {
18791 proto_item *item;
18792 proto_tree *t;
18793 int f_class_id;
18794
18795 item = proto_tree_add_item(root, hf_x11_struct_xinput_FeedbackState, tvb, *offsetp, struct_size_xinput_FeedbackState(tvb, offsetp, byte_order), ENC_NA);
18796 t = proto_item_add_subtree(item, ett_x11_rectangle);
18797 f_class_id = field8(tvb, offsetp, t, hf_x11_struct_xinput_FeedbackState_class_id, byte_order);
18798 proto_tree_add_item(t, hf_x11_struct_xinput_FeedbackState_feedback_id, tvb, *offsetp, 1, byte_order);
18799 *offsetp += 1;
18800 proto_tree_add_item(t, hf_x11_struct_xinput_FeedbackState_len, tvb, *offsetp, 2, byte_order);
18801 *offsetp += 2;
18802 if (f_class_id == 0) {
18803 proto_tree_add_item(t, hf_x11_struct_xinput_FeedbackState_Keyboard_pitch, tvb, *offsetp, 2, byte_order);
18804 *offsetp += 2;
18805 proto_tree_add_item(t, hf_x11_struct_xinput_FeedbackState_Keyboard_duration, tvb, *offsetp, 2, byte_order);
18806 *offsetp += 2;
18807 proto_tree_add_item(t, hf_x11_struct_xinput_FeedbackState_Keyboard_led_mask, tvb, *offsetp, 4, byte_order);
18808 *offsetp += 4;
18809 proto_tree_add_item(t, hf_x11_struct_xinput_FeedbackState_Keyboard_led_values, tvb, *offsetp, 4, byte_order);
18810 *offsetp += 4;
18811 proto_tree_add_item(t, hf_x11_struct_xinput_FeedbackState_Keyboard_global_auto_repeat, tvb, *offsetp, 1, byte_order);
18812 *offsetp += 1;
18813 proto_tree_add_item(t, hf_x11_struct_xinput_FeedbackState_Keyboard_click, tvb, *offsetp, 1, byte_order);
18814 *offsetp += 1;
18815 proto_tree_add_item(t, hf_x11_struct_xinput_FeedbackState_Keyboard_percent, tvb, *offsetp, 1, byte_order);
18816 *offsetp += 1;
18817 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
18818 *offsetp += 1;
18819 listOfByte(tvb, offsetp, t, hf_x11_struct_xinput_FeedbackState_Keyboard_auto_repeats, 32, byte_order);
18820 }
18821 if (f_class_id == 1) {
18822 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 2, ENC_NA);
18823 *offsetp += 2;
18824 proto_tree_add_item(t, hf_x11_struct_xinput_FeedbackState_Pointer_accel_num, tvb, *offsetp, 2, byte_order);
18825 *offsetp += 2;
18826 proto_tree_add_item(t, hf_x11_struct_xinput_FeedbackState_Pointer_accel_denom, tvb, *offsetp, 2, byte_order);
18827 *offsetp += 2;
18828 proto_tree_add_item(t, hf_x11_struct_xinput_FeedbackState_Pointer_threshold, tvb, *offsetp, 2, byte_order);
18829 *offsetp += 2;
18830 }
18831 if (f_class_id == 2) {
18832 int f_num_keysyms;
18833 proto_tree_add_item(t, hf_x11_struct_xinput_FeedbackState_String_max_symbols, tvb, *offsetp, 2, byte_order);
18834 *offsetp += 2;
18835 f_num_keysyms = tvb_get_uint16(tvb, *offsetp, byte_order);
18836 proto_tree_add_item(t, hf_x11_struct_xinput_FeedbackState_String_num_keysyms, tvb, *offsetp, 2, byte_order);
18837 *offsetp += 2;
18838 listOfCard32(tvb, offsetp, t, hf_x11_struct_xinput_FeedbackState_String_keysyms, hf_x11_struct_xinput_FeedbackState_String_keysyms_item, f_num_keysyms, byte_order);
18839 }
18840 if (f_class_id == 3) {
18841 proto_tree_add_item(t, hf_x11_struct_xinput_FeedbackState_Integer_resolution, tvb, *offsetp, 4, byte_order);
18842 *offsetp += 4;
18843 proto_tree_add_item(t, hf_x11_struct_xinput_FeedbackState_Integer_min_value, tvb, *offsetp, 4, byte_order);
18844 *offsetp += 4;
18845 proto_tree_add_item(t, hf_x11_struct_xinput_FeedbackState_Integer_max_value, tvb, *offsetp, 4, byte_order);
18846 *offsetp += 4;
18847 }
18848 if (f_class_id == 4) {
18849 proto_tree_add_item(t, hf_x11_struct_xinput_FeedbackState_Led_led_mask, tvb, *offsetp, 4, byte_order);
18850 *offsetp += 4;
18851 proto_tree_add_item(t, hf_x11_struct_xinput_FeedbackState_Led_led_values, tvb, *offsetp, 4, byte_order);
18852 *offsetp += 4;
18853 }
18854 if (f_class_id == 5) {
18855 proto_tree_add_item(t, hf_x11_struct_xinput_FeedbackState_Bell_percent, tvb, *offsetp, 1, byte_order);
18856 *offsetp += 1;
18857 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 3, ENC_NA);
18858 *offsetp += 3;
18859 proto_tree_add_item(t, hf_x11_struct_xinput_FeedbackState_Bell_pitch, tvb, *offsetp, 2, byte_order);
18860 *offsetp += 2;
18861 proto_tree_add_item(t, hf_x11_struct_xinput_FeedbackState_Bell_duration, tvb, *offsetp, 2, byte_order);
18862 *offsetp += 2;
18863 }
18864 }
18865}
18866
18867static void xinputGetFeedbackControl(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
18868{
18869 proto_tree_add_item(t, hf_x11_xinput_GetFeedbackControl_device_id, tvb, *offsetp, 1, byte_order);
18870 *offsetp += 1;
18871 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 3, ENC_NA);
18872 *offsetp += 3;
18873}
18874static void xinputGetFeedbackControl_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
18875{
18876 int sequence_number;
18877 int f_num_feedbacks;
18878
18879 col_append_fstr(pinfo->cinfo, COL_INFO, "-GetFeedbackControl");
18880
18881 REPLY(reply);
18882 proto_tree_add_item(t, hf_x11_xinput_GetFeedbackControl_reply_xi_reply_type, tvb, *offsetp, 1, byte_order);
18883 *offsetp += 1;
18884 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
18885 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
18886 "%d (xinput-GetFeedbackControl)", sequence_number);
18887 *offsetp += 2;
18888 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
18889 *offsetp += 4;
18890 f_num_feedbacks = tvb_get_uint16(tvb, *offsetp, byte_order);
18891 proto_tree_add_item(t, hf_x11_xinput_GetFeedbackControl_reply_num_feedbacks, tvb, *offsetp, 2, byte_order);
18892 *offsetp += 2;
18893 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 22, ENC_NA);
18894 *offsetp += 22;
18895 struct_xinput_FeedbackState(tvb, offsetp, t, byte_order, f_num_feedbacks);
18896}
18897
18898static int struct_size_xinput_FeedbackCtl(tvbuff_t *tvb _U_, int *offsetp _U_, unsigned byte_order _U_)
18899{
18900 int size = 0;
18901 return size + 4;
18902}
18903
18904static void struct_xinput_FeedbackCtl(tvbuff_t *tvb, int *offsetp, proto_tree *root, unsigned byte_order _U_, int count)
18905{
18906 int i;
18907 for (i = 0; i < count; i++) {
18908 proto_item *item;
18909 proto_tree *t;
18910 int f_class_id;
18911
18912 item = proto_tree_add_item(root, hf_x11_struct_xinput_FeedbackCtl, tvb, *offsetp, struct_size_xinput_FeedbackCtl(tvb, offsetp, byte_order), ENC_NA);
18913 t = proto_item_add_subtree(item, ett_x11_rectangle);
18914 f_class_id = field8(tvb, offsetp, t, hf_x11_struct_xinput_FeedbackCtl_class_id, byte_order);
18915 proto_tree_add_item(t, hf_x11_struct_xinput_FeedbackCtl_feedback_id, tvb, *offsetp, 1, byte_order);
18916 *offsetp += 1;
18917 proto_tree_add_item(t, hf_x11_struct_xinput_FeedbackCtl_len, tvb, *offsetp, 2, byte_order);
18918 *offsetp += 2;
18919 if (f_class_id == 0) {
18920 proto_tree_add_item(t, hf_x11_struct_xinput_FeedbackCtl_Keyboard_key, tvb, *offsetp, 1, byte_order);
18921 *offsetp += 1;
18922 proto_tree_add_item(t, hf_x11_struct_xinput_FeedbackCtl_Keyboard_auto_repeat_mode, tvb, *offsetp, 1, byte_order);
18923 *offsetp += 1;
18924 proto_tree_add_item(t, hf_x11_struct_xinput_FeedbackCtl_Keyboard_key_click_percent, tvb, *offsetp, 1, byte_order);
18925 *offsetp += 1;
18926 proto_tree_add_item(t, hf_x11_struct_xinput_FeedbackCtl_Keyboard_bell_percent, tvb, *offsetp, 1, byte_order);
18927 *offsetp += 1;
18928 proto_tree_add_item(t, hf_x11_struct_xinput_FeedbackCtl_Keyboard_bell_pitch, tvb, *offsetp, 2, byte_order);
18929 *offsetp += 2;
18930 proto_tree_add_item(t, hf_x11_struct_xinput_FeedbackCtl_Keyboard_bell_duration, tvb, *offsetp, 2, byte_order);
18931 *offsetp += 2;
18932 proto_tree_add_item(t, hf_x11_struct_xinput_FeedbackCtl_Keyboard_led_mask, tvb, *offsetp, 4, byte_order);
18933 *offsetp += 4;
18934 proto_tree_add_item(t, hf_x11_struct_xinput_FeedbackCtl_Keyboard_led_values, tvb, *offsetp, 4, byte_order);
18935 *offsetp += 4;
18936 }
18937 if (f_class_id == 1) {
18938 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 2, ENC_NA);
18939 *offsetp += 2;
18940 proto_tree_add_item(t, hf_x11_struct_xinput_FeedbackCtl_Pointer_num, tvb, *offsetp, 2, byte_order);
18941 *offsetp += 2;
18942 proto_tree_add_item(t, hf_x11_struct_xinput_FeedbackCtl_Pointer_denom, tvb, *offsetp, 2, byte_order);
18943 *offsetp += 2;
18944 proto_tree_add_item(t, hf_x11_struct_xinput_FeedbackCtl_Pointer_threshold, tvb, *offsetp, 2, byte_order);
18945 *offsetp += 2;
18946 }
18947 if (f_class_id == 2) {
18948 int f_num_keysyms;
18949 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 2, ENC_NA);
18950 *offsetp += 2;
18951 f_num_keysyms = tvb_get_uint16(tvb, *offsetp, byte_order);
18952 proto_tree_add_item(t, hf_x11_struct_xinput_FeedbackCtl_String_num_keysyms, tvb, *offsetp, 2, byte_order);
18953 *offsetp += 2;
18954 listOfCard32(tvb, offsetp, t, hf_x11_struct_xinput_FeedbackCtl_String_keysyms, hf_x11_struct_xinput_FeedbackCtl_String_keysyms_item, f_num_keysyms, byte_order);
18955 }
18956 if (f_class_id == 3) {
18957 proto_tree_add_item(t, hf_x11_struct_xinput_FeedbackCtl_Integer_int_to_display, tvb, *offsetp, 4, byte_order);
18958 *offsetp += 4;
18959 }
18960 if (f_class_id == 4) {
18961 proto_tree_add_item(t, hf_x11_struct_xinput_FeedbackCtl_Led_led_mask, tvb, *offsetp, 4, byte_order);
18962 *offsetp += 4;
18963 proto_tree_add_item(t, hf_x11_struct_xinput_FeedbackCtl_Led_led_values, tvb, *offsetp, 4, byte_order);
18964 *offsetp += 4;
18965 }
18966 if (f_class_id == 5) {
18967 proto_tree_add_item(t, hf_x11_struct_xinput_FeedbackCtl_Bell_percent, tvb, *offsetp, 1, byte_order);
18968 *offsetp += 1;
18969 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 3, ENC_NA);
18970 *offsetp += 3;
18971 proto_tree_add_item(t, hf_x11_struct_xinput_FeedbackCtl_Bell_pitch, tvb, *offsetp, 2, byte_order);
18972 *offsetp += 2;
18973 proto_tree_add_item(t, hf_x11_struct_xinput_FeedbackCtl_Bell_duration, tvb, *offsetp, 2, byte_order);
18974 *offsetp += 2;
18975 }
18976 }
18977}
18978
18979static void xinputChangeFeedbackControl(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
18980{
18981 {
18982 static int* const mask_bits [] = {
18983 &hf_x11_xinput_ChangeFeedbackControl_mask_mask_AccelNum,
18984 &hf_x11_xinput_ChangeFeedbackControl_mask_mask_AccelDenom,
18985 &hf_x11_xinput_ChangeFeedbackControl_mask_mask_Threshold,
18986 &hf_x11_xinput_ChangeFeedbackControl_mask_mask_Duration,
18987 &hf_x11_xinput_ChangeFeedbackControl_mask_mask_Led,
18988 &hf_x11_xinput_ChangeFeedbackControl_mask_mask_LedMode,
18989 &hf_x11_xinput_ChangeFeedbackControl_mask_mask_Key,
18990 &hf_x11_xinput_ChangeFeedbackControl_mask_mask_AutoRepeatMode,
18991 NULL
18992 };
18993 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xinput_ChangeFeedbackControl_mask, ett_x11_rectangle, mask_bits, byte_order);
18994 }
18995 *offsetp += 4;
18996 proto_tree_add_item(t, hf_x11_xinput_ChangeFeedbackControl_device_id, tvb, *offsetp, 1, byte_order);
18997 *offsetp += 1;
18998 proto_tree_add_item(t, hf_x11_xinput_ChangeFeedbackControl_feedback_id, tvb, *offsetp, 1, byte_order);
18999 *offsetp += 1;
19000 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 2, ENC_NA);
19001 *offsetp += 2;
19002 struct_xinput_FeedbackCtl(tvb, offsetp, t, byte_order, 1);
19003}
19004
19005static void xinputGetDeviceKeyMapping(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
19006{
19007 proto_tree_add_item(t, hf_x11_xinput_GetDeviceKeyMapping_device_id, tvb, *offsetp, 1, byte_order);
19008 *offsetp += 1;
19009 proto_tree_add_item(t, hf_x11_xinput_GetDeviceKeyMapping_first_keycode, tvb, *offsetp, 1, byte_order);
19010 *offsetp += 1;
19011 proto_tree_add_item(t, hf_x11_xinput_GetDeviceKeyMapping_count, tvb, *offsetp, 1, byte_order);
19012 *offsetp += 1;
19013 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
19014 *offsetp += 1;
19015}
19016static void xinputGetDeviceKeyMapping_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
19017{
19018 int sequence_number;
19019 int f_length;
19020
19021 col_append_fstr(pinfo->cinfo, COL_INFO, "-GetDeviceKeyMapping");
19022
19023 REPLY(reply);
19024 proto_tree_add_item(t, hf_x11_xinput_GetDeviceKeyMapping_reply_xi_reply_type, tvb, *offsetp, 1, byte_order);
19025 *offsetp += 1;
19026 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
19027 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
19028 "%d (xinput-GetDeviceKeyMapping)", sequence_number);
19029 *offsetp += 2;
19030 f_length = tvb_get_uint32(tvb, *offsetp, byte_order);
19031 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
19032 *offsetp += 4;
19033 proto_tree_add_item(t, hf_x11_xinput_GetDeviceKeyMapping_reply_keysyms_per_keycode, tvb, *offsetp, 1, byte_order);
19034 *offsetp += 1;
19035 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 23, ENC_NA);
19036 *offsetp += 23;
19037 listOfCard32(tvb, offsetp, t, hf_x11_xinput_GetDeviceKeyMapping_reply_keysyms, hf_x11_xinput_GetDeviceKeyMapping_reply_keysyms_item, f_length, byte_order);
19038}
19039
19040static void xinputChangeDeviceKeyMapping(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
19041{
19042 int f_keysyms_per_keycode;
19043 int f_keycode_count;
19044 proto_tree_add_item(t, hf_x11_xinput_ChangeDeviceKeyMapping_device_id, tvb, *offsetp, 1, byte_order);
19045 *offsetp += 1;
19046 proto_tree_add_item(t, hf_x11_xinput_ChangeDeviceKeyMapping_first_keycode, tvb, *offsetp, 1, byte_order);
19047 *offsetp += 1;
19048 f_keysyms_per_keycode = tvb_get_uint8(tvb, *offsetp);
19049 proto_tree_add_item(t, hf_x11_xinput_ChangeDeviceKeyMapping_keysyms_per_keycode, tvb, *offsetp, 1, byte_order);
19050 *offsetp += 1;
19051 f_keycode_count = tvb_get_uint8(tvb, *offsetp);
19052 proto_tree_add_item(t, hf_x11_xinput_ChangeDeviceKeyMapping_keycode_count, tvb, *offsetp, 1, byte_order);
19053 *offsetp += 1;
19054 listOfCard32(tvb, offsetp, t, hf_x11_xinput_ChangeDeviceKeyMapping_keysyms, hf_x11_xinput_ChangeDeviceKeyMapping_keysyms_item, (f_keycode_count * f_keysyms_per_keycode), byte_order);
19055 length -= (f_keycode_count * f_keysyms_per_keycode) * 4;
19056}
19057
19058static void xinputGetDeviceModifierMapping(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
19059{
19060 proto_tree_add_item(t, hf_x11_xinput_GetDeviceModifierMapping_device_id, tvb, *offsetp, 1, byte_order);
19061 *offsetp += 1;
19062 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 3, ENC_NA);
19063 *offsetp += 3;
19064}
19065static void xinputGetDeviceModifierMapping_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
19066{
19067 int sequence_number;
19068 int f_keycodes_per_modifier;
19069
19070 col_append_fstr(pinfo->cinfo, COL_INFO, "-GetDeviceModifierMapping");
19071
19072 REPLY(reply);
19073 proto_tree_add_item(t, hf_x11_xinput_GetDeviceModifierMapping_reply_xi_reply_type, tvb, *offsetp, 1, byte_order);
19074 *offsetp += 1;
19075 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
19076 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
19077 "%d (xinput-GetDeviceModifierMapping)", sequence_number);
19078 *offsetp += 2;
19079 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
19080 *offsetp += 4;
19081 f_keycodes_per_modifier = tvb_get_uint8(tvb, *offsetp);
19082 proto_tree_add_item(t, hf_x11_xinput_GetDeviceModifierMapping_reply_keycodes_per_modifier, tvb, *offsetp, 1, byte_order);
19083 *offsetp += 1;
19084 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 23, ENC_NA);
19085 *offsetp += 23;
19086 listOfByte(tvb, offsetp, t, hf_x11_xinput_GetDeviceModifierMapping_reply_keymaps, (f_keycodes_per_modifier * 8), byte_order);
19087}
19088
19089static void xinputSetDeviceModifierMapping(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
19090{
19091 int f_keycodes_per_modifier;
19092 proto_tree_add_item(t, hf_x11_xinput_SetDeviceModifierMapping_device_id, tvb, *offsetp, 1, byte_order);
19093 *offsetp += 1;
19094 f_keycodes_per_modifier = tvb_get_uint8(tvb, *offsetp);
19095 proto_tree_add_item(t, hf_x11_xinput_SetDeviceModifierMapping_keycodes_per_modifier, tvb, *offsetp, 1, byte_order);
19096 *offsetp += 1;
19097 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 2, ENC_NA);
19098 *offsetp += 2;
19099 listOfByte(tvb, offsetp, t, hf_x11_xinput_SetDeviceModifierMapping_keymaps, (f_keycodes_per_modifier * 8), byte_order);
19100 length -= (f_keycodes_per_modifier * 8) * 1;
19101}
19102static void xinputSetDeviceModifierMapping_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
19103{
19104 int sequence_number;
19105
19106 col_append_fstr(pinfo->cinfo, COL_INFO, "-SetDeviceModifierMapping");
19107
19108 REPLY(reply);
19109 proto_tree_add_item(t, hf_x11_xinput_SetDeviceModifierMapping_reply_xi_reply_type, tvb, *offsetp, 1, byte_order);
19110 *offsetp += 1;
19111 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
19112 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
19113 "%d (xinput-SetDeviceModifierMapping)", sequence_number);
19114 *offsetp += 2;
19115 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
19116 *offsetp += 4;
19117 field8(tvb, offsetp, t, hf_x11_xinput_SetDeviceModifierMapping_reply_status, byte_order);
19118 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 23, ENC_NA);
19119 *offsetp += 23;
19120}
19121
19122static void xinputGetDeviceButtonMapping(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
19123{
19124 proto_tree_add_item(t, hf_x11_xinput_GetDeviceButtonMapping_device_id, tvb, *offsetp, 1, byte_order);
19125 *offsetp += 1;
19126 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 3, ENC_NA);
19127 *offsetp += 3;
19128}
19129static void xinputGetDeviceButtonMapping_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
19130{
19131 int sequence_number;
19132 int f_map_size;
19133
19134 col_append_fstr(pinfo->cinfo, COL_INFO, "-GetDeviceButtonMapping");
19135
19136 REPLY(reply);
19137 proto_tree_add_item(t, hf_x11_xinput_GetDeviceButtonMapping_reply_xi_reply_type, tvb, *offsetp, 1, byte_order);
19138 *offsetp += 1;
19139 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
19140 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
19141 "%d (xinput-GetDeviceButtonMapping)", sequence_number);
19142 *offsetp += 2;
19143 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
19144 *offsetp += 4;
19145 f_map_size = tvb_get_uint8(tvb, *offsetp);
19146 proto_tree_add_item(t, hf_x11_xinput_GetDeviceButtonMapping_reply_map_size, tvb, *offsetp, 1, byte_order);
19147 *offsetp += 1;
19148 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 23, ENC_NA);
19149 *offsetp += 23;
19150 listOfByte(tvb, offsetp, t, hf_x11_xinput_GetDeviceButtonMapping_reply_map, f_map_size, byte_order);
19151 if (*offsetp % 4) {
19152 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, (4 - *offsetp % 4), ENC_NA);
19153 *offsetp += (4 - *offsetp % 4);
19154 }
19155}
19156
19157static void xinputSetDeviceButtonMapping(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
19158{
19159 int f_map_size;
19160 proto_tree_add_item(t, hf_x11_xinput_SetDeviceButtonMapping_device_id, tvb, *offsetp, 1, byte_order);
19161 *offsetp += 1;
19162 f_map_size = tvb_get_uint8(tvb, *offsetp);
19163 proto_tree_add_item(t, hf_x11_xinput_SetDeviceButtonMapping_map_size, tvb, *offsetp, 1, byte_order);
19164 *offsetp += 1;
19165 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 2, ENC_NA);
19166 *offsetp += 2;
19167 listOfByte(tvb, offsetp, t, hf_x11_xinput_SetDeviceButtonMapping_map, f_map_size, byte_order);
19168 length -= f_map_size * 1;
19169}
19170static void xinputSetDeviceButtonMapping_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
19171{
19172 int sequence_number;
19173
19174 col_append_fstr(pinfo->cinfo, COL_INFO, "-SetDeviceButtonMapping");
19175
19176 REPLY(reply);
19177 proto_tree_add_item(t, hf_x11_xinput_SetDeviceButtonMapping_reply_xi_reply_type, tvb, *offsetp, 1, byte_order);
19178 *offsetp += 1;
19179 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
19180 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
19181 "%d (xinput-SetDeviceButtonMapping)", sequence_number);
19182 *offsetp += 2;
19183 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
19184 *offsetp += 4;
19185 field8(tvb, offsetp, t, hf_x11_xinput_SetDeviceButtonMapping_reply_status, byte_order);
19186 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 23, ENC_NA);
19187 *offsetp += 23;
19188}
19189
19190static int struct_size_xinput_InputState(tvbuff_t *tvb _U_, int *offsetp _U_, unsigned byte_order _U_)
19191{
19192 int size = 0;
19193 return size + 2;
19194}
19195
19196static void struct_xinput_InputState(tvbuff_t *tvb, int *offsetp, proto_tree *root, unsigned byte_order _U_, int count)
19197{
19198 int i;
19199 for (i = 0; i < count; i++) {
19200 proto_item *item;
19201 proto_tree *t;
19202 int f_class_id;
19203
19204 item = proto_tree_add_item(root, hf_x11_struct_xinput_InputState, tvb, *offsetp, struct_size_xinput_InputState(tvb, offsetp, byte_order), ENC_NA);
19205 t = proto_item_add_subtree(item, ett_x11_rectangle);
19206 f_class_id = field8(tvb, offsetp, t, hf_x11_struct_xinput_InputState_class_id, byte_order);
19207 proto_tree_add_item(t, hf_x11_struct_xinput_InputState_len, tvb, *offsetp, 1, byte_order);
19208 *offsetp += 1;
19209 if (f_class_id == 0) {
19210 proto_tree_add_item(t, hf_x11_struct_xinput_InputState_Key_num_keys, tvb, *offsetp, 1, byte_order);
19211 *offsetp += 1;
19212 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
19213 *offsetp += 1;
19214 listOfByte(tvb, offsetp, t, hf_x11_struct_xinput_InputState_Key_keys, 32, byte_order);
19215 }
19216 if (f_class_id == 1) {
19217 proto_tree_add_item(t, hf_x11_struct_xinput_InputState_Button_num_buttons, tvb, *offsetp, 1, byte_order);
19218 *offsetp += 1;
19219 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
19220 *offsetp += 1;
19221 listOfByte(tvb, offsetp, t, hf_x11_struct_xinput_InputState_Button_buttons, 32, byte_order);
19222 }
19223 if (f_class_id == 2) {
19224 int f_num_valuators;
19225 f_num_valuators = tvb_get_uint8(tvb, *offsetp);
19226 proto_tree_add_item(t, hf_x11_struct_xinput_InputState_Valuator_num_valuators, tvb, *offsetp, 1, byte_order);
19227 *offsetp += 1;
19228 {
19229 static int* const mode_bits [] = {
19230 &hf_x11_struct_xinput_InputState_Valuator_mode_mask_DeviceModeAbsolute,
19231 &hf_x11_struct_xinput_InputState_Valuator_mode_mask_OutOfProximity,
19232 NULL
19233 };
19234 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_struct_xinput_InputState_Valuator_mode, ett_x11_rectangle, mode_bits, byte_order);
19235 }
19236 *offsetp += 1;
19237 listOfInt32(tvb, offsetp, t, hf_x11_struct_xinput_InputState_Valuator_valuators, hf_x11_struct_xinput_InputState_Valuator_valuators_item, f_num_valuators, byte_order);
19238 }
19239 }
19240}
19241
19242static void xinputQueryDeviceState(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
19243{
19244 proto_tree_add_item(t, hf_x11_xinput_QueryDeviceState_device_id, tvb, *offsetp, 1, byte_order);
19245 *offsetp += 1;
19246 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 3, ENC_NA);
19247 *offsetp += 3;
19248}
19249static void xinputQueryDeviceState_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
19250{
19251 int sequence_number;
19252 int f_num_classes;
19253
19254 col_append_fstr(pinfo->cinfo, COL_INFO, "-QueryDeviceState");
19255
19256 REPLY(reply);
19257 proto_tree_add_item(t, hf_x11_xinput_QueryDeviceState_reply_xi_reply_type, tvb, *offsetp, 1, byte_order);
19258 *offsetp += 1;
19259 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
19260 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
19261 "%d (xinput-QueryDeviceState)", sequence_number);
19262 *offsetp += 2;
19263 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
19264 *offsetp += 4;
19265 f_num_classes = tvb_get_uint8(tvb, *offsetp);
19266 proto_tree_add_item(t, hf_x11_xinput_QueryDeviceState_reply_num_classes, tvb, *offsetp, 1, byte_order);
19267 *offsetp += 1;
19268 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 23, ENC_NA);
19269 *offsetp += 23;
19270 struct_xinput_InputState(tvb, offsetp, t, byte_order, f_num_classes);
19271}
19272
19273static void xinputDeviceBell(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
19274{
19275 proto_tree_add_item(t, hf_x11_xinput_DeviceBell_device_id, tvb, *offsetp, 1, byte_order);
19276 *offsetp += 1;
19277 proto_tree_add_item(t, hf_x11_xinput_DeviceBell_feedback_id, tvb, *offsetp, 1, byte_order);
19278 *offsetp += 1;
19279 proto_tree_add_item(t, hf_x11_xinput_DeviceBell_feedback_class, tvb, *offsetp, 1, byte_order);
19280 *offsetp += 1;
19281 proto_tree_add_item(t, hf_x11_xinput_DeviceBell_percent, tvb, *offsetp, 1, byte_order);
19282 *offsetp += 1;
19283}
19284
19285static void xinputSetDeviceValuators(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
19286{
19287 int f_num_valuators;
19288 proto_tree_add_item(t, hf_x11_xinput_SetDeviceValuators_device_id, tvb, *offsetp, 1, byte_order);
19289 *offsetp += 1;
19290 proto_tree_add_item(t, hf_x11_xinput_SetDeviceValuators_first_valuator, tvb, *offsetp, 1, byte_order);
19291 *offsetp += 1;
19292 f_num_valuators = tvb_get_uint8(tvb, *offsetp);
19293 proto_tree_add_item(t, hf_x11_xinput_SetDeviceValuators_num_valuators, tvb, *offsetp, 1, byte_order);
19294 *offsetp += 1;
19295 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
19296 *offsetp += 1;
19297 listOfInt32(tvb, offsetp, t, hf_x11_xinput_SetDeviceValuators_valuators, hf_x11_xinput_SetDeviceValuators_valuators_item, f_num_valuators, byte_order);
19298 length -= f_num_valuators * 4;
19299}
19300static void xinputSetDeviceValuators_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
19301{
19302 int sequence_number;
19303
19304 col_append_fstr(pinfo->cinfo, COL_INFO, "-SetDeviceValuators");
19305
19306 REPLY(reply);
19307 proto_tree_add_item(t, hf_x11_xinput_SetDeviceValuators_reply_xi_reply_type, tvb, *offsetp, 1, byte_order);
19308 *offsetp += 1;
19309 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
19310 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
19311 "%d (xinput-SetDeviceValuators)", sequence_number);
19312 *offsetp += 2;
19313 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
19314 *offsetp += 4;
19315 field8(tvb, offsetp, t, hf_x11_xinput_SetDeviceValuators_reply_status, byte_order);
19316 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 23, ENC_NA);
19317 *offsetp += 23;
19318}
19319
19320static int struct_size_xinput_DeviceState(tvbuff_t *tvb _U_, int *offsetp _U_, unsigned byte_order _U_)
19321{
19322 int size = 0;
19323 return size + 4;
19324}
19325
19326static void struct_xinput_DeviceState(tvbuff_t *tvb, int *offsetp, proto_tree *root, unsigned byte_order _U_, int count)
19327{
19328 int i;
19329 for (i = 0; i < count; i++) {
19330 proto_item *item;
19331 proto_tree *t;
19332 int f_control_id;
19333
19334 item = proto_tree_add_item(root, hf_x11_struct_xinput_DeviceState, tvb, *offsetp, struct_size_xinput_DeviceState(tvb, offsetp, byte_order), ENC_NA);
19335 t = proto_item_add_subtree(item, ett_x11_rectangle);
19336 f_control_id = field16(tvb, offsetp, t, hf_x11_struct_xinput_DeviceState_control_id, byte_order);
19337 proto_tree_add_item(t, hf_x11_struct_xinput_DeviceState_len, tvb, *offsetp, 2, byte_order);
19338 *offsetp += 2;
19339 if (f_control_id == 1) {
19340 int f_num_valuators;
19341 f_num_valuators = tvb_get_uint32(tvb, *offsetp, byte_order);
19342 proto_tree_add_item(t, hf_x11_struct_xinput_DeviceState_resolution_num_valuators, tvb, *offsetp, 4, byte_order);
19343 *offsetp += 4;
19344 listOfCard32(tvb, offsetp, t, hf_x11_struct_xinput_DeviceState_resolution_resolution_values, hf_x11_struct_xinput_DeviceState_resolution_resolution_values_item, f_num_valuators, byte_order);
19345 listOfCard32(tvb, offsetp, t, hf_x11_struct_xinput_DeviceState_resolution_resolution_min, hf_x11_struct_xinput_DeviceState_resolution_resolution_min_item, f_num_valuators, byte_order);
19346 listOfCard32(tvb, offsetp, t, hf_x11_struct_xinput_DeviceState_resolution_resolution_max, hf_x11_struct_xinput_DeviceState_resolution_resolution_max_item, f_num_valuators, byte_order);
19347 }
19348 if (f_control_id == 2) {
19349 proto_tree_add_item(t, hf_x11_struct_xinput_DeviceState_abs_calib_min_x, tvb, *offsetp, 4, byte_order);
19350 *offsetp += 4;
19351 proto_tree_add_item(t, hf_x11_struct_xinput_DeviceState_abs_calib_max_x, tvb, *offsetp, 4, byte_order);
19352 *offsetp += 4;
19353 proto_tree_add_item(t, hf_x11_struct_xinput_DeviceState_abs_calib_min_y, tvb, *offsetp, 4, byte_order);
19354 *offsetp += 4;
19355 proto_tree_add_item(t, hf_x11_struct_xinput_DeviceState_abs_calib_max_y, tvb, *offsetp, 4, byte_order);
19356 *offsetp += 4;
19357 proto_tree_add_item(t, hf_x11_struct_xinput_DeviceState_abs_calib_flip_x, tvb, *offsetp, 4, byte_order);
19358 *offsetp += 4;
19359 proto_tree_add_item(t, hf_x11_struct_xinput_DeviceState_abs_calib_flip_y, tvb, *offsetp, 4, byte_order);
19360 *offsetp += 4;
19361 proto_tree_add_item(t, hf_x11_struct_xinput_DeviceState_abs_calib_rotation, tvb, *offsetp, 4, byte_order);
19362 *offsetp += 4;
19363 proto_tree_add_item(t, hf_x11_struct_xinput_DeviceState_abs_calib_button_threshold, tvb, *offsetp, 4, byte_order);
19364 *offsetp += 4;
19365 }
19366 if (f_control_id == 3) {
19367 proto_tree_add_item(t, hf_x11_struct_xinput_DeviceState_core_status, tvb, *offsetp, 1, byte_order);
19368 *offsetp += 1;
19369 proto_tree_add_item(t, hf_x11_struct_xinput_DeviceState_core_iscore, tvb, *offsetp, 1, byte_order);
19370 *offsetp += 1;
19371 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 2, ENC_NA);
19372 *offsetp += 2;
19373 }
19374 if (f_control_id == 4) {
19375 proto_tree_add_item(t, hf_x11_struct_xinput_DeviceState_enable_enable, tvb, *offsetp, 1, byte_order);
19376 *offsetp += 1;
19377 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 3, ENC_NA);
19378 *offsetp += 3;
19379 }
19380 if (f_control_id == 5) {
19381 proto_tree_add_item(t, hf_x11_struct_xinput_DeviceState_abs_area_offset_x, tvb, *offsetp, 4, byte_order);
19382 *offsetp += 4;
19383 proto_tree_add_item(t, hf_x11_struct_xinput_DeviceState_abs_area_offset_y, tvb, *offsetp, 4, byte_order);
19384 *offsetp += 4;
19385 proto_tree_add_item(t, hf_x11_struct_xinput_DeviceState_abs_area_width, tvb, *offsetp, 4, byte_order);
19386 *offsetp += 4;
19387 proto_tree_add_item(t, hf_x11_struct_xinput_DeviceState_abs_area_height, tvb, *offsetp, 4, byte_order);
19388 *offsetp += 4;
19389 proto_tree_add_item(t, hf_x11_struct_xinput_DeviceState_abs_area_screen, tvb, *offsetp, 4, byte_order);
19390 *offsetp += 4;
19391 proto_tree_add_item(t, hf_x11_struct_xinput_DeviceState_abs_area_following, tvb, *offsetp, 4, byte_order);
19392 *offsetp += 4;
19393 }
19394 }
19395}
19396
19397static void xinputGetDeviceControl(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
19398{
19399 field16(tvb, offsetp, t, hf_x11_xinput_GetDeviceControl_control_id, byte_order);
19400 proto_tree_add_item(t, hf_x11_xinput_GetDeviceControl_device_id, tvb, *offsetp, 1, byte_order);
19401 *offsetp += 1;
19402 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
19403 *offsetp += 1;
19404}
19405static void xinputGetDeviceControl_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
19406{
19407 int sequence_number;
19408
19409 col_append_fstr(pinfo->cinfo, COL_INFO, "-GetDeviceControl");
19410
19411 REPLY(reply);
19412 proto_tree_add_item(t, hf_x11_xinput_GetDeviceControl_reply_xi_reply_type, tvb, *offsetp, 1, byte_order);
19413 *offsetp += 1;
19414 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
19415 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
19416 "%d (xinput-GetDeviceControl)", sequence_number);
19417 *offsetp += 2;
19418 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
19419 *offsetp += 4;
19420 field8(tvb, offsetp, t, hf_x11_xinput_GetDeviceControl_reply_status, byte_order);
19421 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 23, ENC_NA);
19422 *offsetp += 23;
19423 struct_xinput_DeviceState(tvb, offsetp, t, byte_order, 1);
19424}
19425
19426static int struct_size_xinput_DeviceCtl(tvbuff_t *tvb _U_, int *offsetp _U_, unsigned byte_order _U_)
19427{
19428 int size = 0;
19429 return size + 4;
19430}
19431
19432static void struct_xinput_DeviceCtl(tvbuff_t *tvb, int *offsetp, proto_tree *root, unsigned byte_order _U_, int count)
19433{
19434 int i;
19435 for (i = 0; i < count; i++) {
19436 proto_item *item;
19437 proto_tree *t;
19438 int f_control_id;
19439
19440 item = proto_tree_add_item(root, hf_x11_struct_xinput_DeviceCtl, tvb, *offsetp, struct_size_xinput_DeviceCtl(tvb, offsetp, byte_order), ENC_NA);
19441 t = proto_item_add_subtree(item, ett_x11_rectangle);
19442 f_control_id = field16(tvb, offsetp, t, hf_x11_struct_xinput_DeviceCtl_control_id, byte_order);
19443 proto_tree_add_item(t, hf_x11_struct_xinput_DeviceCtl_len, tvb, *offsetp, 2, byte_order);
19444 *offsetp += 2;
19445 if (f_control_id == 1) {
19446 int f_num_valuators;
19447 proto_tree_add_item(t, hf_x11_struct_xinput_DeviceCtl_resolution_first_valuator, tvb, *offsetp, 1, byte_order);
19448 *offsetp += 1;
19449 f_num_valuators = tvb_get_uint8(tvb, *offsetp);
19450 proto_tree_add_item(t, hf_x11_struct_xinput_DeviceCtl_resolution_num_valuators, tvb, *offsetp, 1, byte_order);
19451 *offsetp += 1;
19452 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 2, ENC_NA);
19453 *offsetp += 2;
19454 listOfCard32(tvb, offsetp, t, hf_x11_struct_xinput_DeviceCtl_resolution_resolution_values, hf_x11_struct_xinput_DeviceCtl_resolution_resolution_values_item, f_num_valuators, byte_order);
19455 }
19456 if (f_control_id == 2) {
19457 proto_tree_add_item(t, hf_x11_struct_xinput_DeviceCtl_abs_calib_min_x, tvb, *offsetp, 4, byte_order);
19458 *offsetp += 4;
19459 proto_tree_add_item(t, hf_x11_struct_xinput_DeviceCtl_abs_calib_max_x, tvb, *offsetp, 4, byte_order);
19460 *offsetp += 4;
19461 proto_tree_add_item(t, hf_x11_struct_xinput_DeviceCtl_abs_calib_min_y, tvb, *offsetp, 4, byte_order);
19462 *offsetp += 4;
19463 proto_tree_add_item(t, hf_x11_struct_xinput_DeviceCtl_abs_calib_max_y, tvb, *offsetp, 4, byte_order);
19464 *offsetp += 4;
19465 proto_tree_add_item(t, hf_x11_struct_xinput_DeviceCtl_abs_calib_flip_x, tvb, *offsetp, 4, byte_order);
19466 *offsetp += 4;
19467 proto_tree_add_item(t, hf_x11_struct_xinput_DeviceCtl_abs_calib_flip_y, tvb, *offsetp, 4, byte_order);
19468 *offsetp += 4;
19469 proto_tree_add_item(t, hf_x11_struct_xinput_DeviceCtl_abs_calib_rotation, tvb, *offsetp, 4, byte_order);
19470 *offsetp += 4;
19471 proto_tree_add_item(t, hf_x11_struct_xinput_DeviceCtl_abs_calib_button_threshold, tvb, *offsetp, 4, byte_order);
19472 *offsetp += 4;
19473 }
19474 if (f_control_id == 3) {
19475 proto_tree_add_item(t, hf_x11_struct_xinput_DeviceCtl_core_status, tvb, *offsetp, 1, byte_order);
19476 *offsetp += 1;
19477 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 3, ENC_NA);
19478 *offsetp += 3;
19479 }
19480 if (f_control_id == 4) {
19481 proto_tree_add_item(t, hf_x11_struct_xinput_DeviceCtl_enable_enable, tvb, *offsetp, 1, byte_order);
19482 *offsetp += 1;
19483 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 3, ENC_NA);
19484 *offsetp += 3;
19485 }
19486 if (f_control_id == 5) {
19487 proto_tree_add_item(t, hf_x11_struct_xinput_DeviceCtl_abs_area_offset_x, tvb, *offsetp, 4, byte_order);
19488 *offsetp += 4;
19489 proto_tree_add_item(t, hf_x11_struct_xinput_DeviceCtl_abs_area_offset_y, tvb, *offsetp, 4, byte_order);
19490 *offsetp += 4;
19491 proto_tree_add_item(t, hf_x11_struct_xinput_DeviceCtl_abs_area_width, tvb, *offsetp, 4, byte_order);
19492 *offsetp += 4;
19493 proto_tree_add_item(t, hf_x11_struct_xinput_DeviceCtl_abs_area_height, tvb, *offsetp, 4, byte_order);
19494 *offsetp += 4;
19495 proto_tree_add_item(t, hf_x11_struct_xinput_DeviceCtl_abs_area_screen, tvb, *offsetp, 4, byte_order);
19496 *offsetp += 4;
19497 proto_tree_add_item(t, hf_x11_struct_xinput_DeviceCtl_abs_area_following, tvb, *offsetp, 4, byte_order);
19498 *offsetp += 4;
19499 }
19500 }
19501}
19502
19503static void xinputChangeDeviceControl(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
19504{
19505 field16(tvb, offsetp, t, hf_x11_xinput_ChangeDeviceControl_control_id, byte_order);
19506 proto_tree_add_item(t, hf_x11_xinput_ChangeDeviceControl_device_id, tvb, *offsetp, 1, byte_order);
19507 *offsetp += 1;
19508 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
19509 *offsetp += 1;
19510 struct_xinput_DeviceCtl(tvb, offsetp, t, byte_order, 1);
19511}
19512static void xinputChangeDeviceControl_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
19513{
19514 int sequence_number;
19515
19516 col_append_fstr(pinfo->cinfo, COL_INFO, "-ChangeDeviceControl");
19517
19518 REPLY(reply);
19519 proto_tree_add_item(t, hf_x11_xinput_ChangeDeviceControl_reply_xi_reply_type, tvb, *offsetp, 1, byte_order);
19520 *offsetp += 1;
19521 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
19522 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
19523 "%d (xinput-ChangeDeviceControl)", sequence_number);
19524 *offsetp += 2;
19525 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
19526 *offsetp += 4;
19527 field8(tvb, offsetp, t, hf_x11_xinput_ChangeDeviceControl_reply_status, byte_order);
19528 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 23, ENC_NA);
19529 *offsetp += 23;
19530}
19531
19532static void xinputListDeviceProperties(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
19533{
19534 proto_tree_add_item(t, hf_x11_xinput_ListDeviceProperties_device_id, tvb, *offsetp, 1, byte_order);
19535 *offsetp += 1;
19536 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 3, ENC_NA);
19537 *offsetp += 3;
19538}
19539static void xinputListDeviceProperties_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
19540{
19541 int sequence_number;
19542 int f_num_atoms;
19543
19544 col_append_fstr(pinfo->cinfo, COL_INFO, "-ListDeviceProperties");
19545
19546 REPLY(reply);
19547 proto_tree_add_item(t, hf_x11_xinput_ListDeviceProperties_reply_xi_reply_type, tvb, *offsetp, 1, byte_order);
19548 *offsetp += 1;
19549 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
19550 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
19551 "%d (xinput-ListDeviceProperties)", sequence_number);
19552 *offsetp += 2;
19553 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
19554 *offsetp += 4;
19555 f_num_atoms = tvb_get_uint16(tvb, *offsetp, byte_order);
19556 proto_tree_add_item(t, hf_x11_xinput_ListDeviceProperties_reply_num_atoms, tvb, *offsetp, 2, byte_order);
19557 *offsetp += 2;
19558 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 22, ENC_NA);
19559 *offsetp += 22;
19560 listOfCard32(tvb, offsetp, t, hf_x11_xinput_ListDeviceProperties_reply_atoms, hf_x11_xinput_ListDeviceProperties_reply_atoms_item, f_num_atoms, byte_order);
19561}
19562
19563static void xinputChangeDeviceProperty(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
19564{
19565 int f_format;
19566 int f_num_items;
19567 proto_tree_add_item(t, hf_x11_xinput_ChangeDeviceProperty_property, tvb, *offsetp, 4, byte_order);
19568 *offsetp += 4;
19569 proto_tree_add_item(t, hf_x11_xinput_ChangeDeviceProperty_type, tvb, *offsetp, 4, byte_order);
19570 *offsetp += 4;
19571 proto_tree_add_item(t, hf_x11_xinput_ChangeDeviceProperty_device_id, tvb, *offsetp, 1, byte_order);
19572 *offsetp += 1;
19573 f_format = field8(tvb, offsetp, t, hf_x11_xinput_ChangeDeviceProperty_format, byte_order);
19574 field8(tvb, offsetp, t, hf_x11_xinput_ChangeDeviceProperty_mode, byte_order);
19575 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
19576 *offsetp += 1;
19577 f_num_items = tvb_get_uint32(tvb, *offsetp, byte_order);
19578 proto_tree_add_item(t, hf_x11_xinput_ChangeDeviceProperty_num_items, tvb, *offsetp, 4, byte_order);
19579 *offsetp += 4;
19580 if (f_format == 8) {
19581 listOfByte(tvb, offsetp, t, hf_x11_xinput_ChangeDeviceProperty_8Bits_data8, f_num_items, byte_order);
19582 length -= f_num_items * 1;
19583 if (*offsetp % 4) {
19584 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, (4 - *offsetp % 4), ENC_NA);
19585 *offsetp += (4 - *offsetp % 4);
19586 }
19587 length = ((length + 3) & ~3);
19588 }
19589 if (f_format == 16) {
19590 listOfCard16(tvb, offsetp, t, hf_x11_xinput_ChangeDeviceProperty_16Bits_data16, hf_x11_xinput_ChangeDeviceProperty_16Bits_data16_item, f_num_items, byte_order);
19591 length -= f_num_items * 2;
19592 if (*offsetp % 4) {
19593 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, (4 - *offsetp % 4), ENC_NA);
19594 *offsetp += (4 - *offsetp % 4);
19595 }
19596 length = ((length + 3) & ~3);
19597 }
19598 if (f_format == 32) {
19599 listOfCard32(tvb, offsetp, t, hf_x11_xinput_ChangeDeviceProperty_32Bits_data32, hf_x11_xinput_ChangeDeviceProperty_32Bits_data32_item, f_num_items, byte_order);
19600 length -= f_num_items * 4;
19601 }
19602}
19603
19604static void xinputDeleteDeviceProperty(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
19605{
19606 proto_tree_add_item(t, hf_x11_xinput_DeleteDeviceProperty_property, tvb, *offsetp, 4, byte_order);
19607 *offsetp += 4;
19608 proto_tree_add_item(t, hf_x11_xinput_DeleteDeviceProperty_device_id, tvb, *offsetp, 1, byte_order);
19609 *offsetp += 1;
19610 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 3, ENC_NA);
19611 *offsetp += 3;
19612}
19613
19614static void xinputGetDeviceProperty(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
19615{
19616 proto_tree_add_item(t, hf_x11_xinput_GetDeviceProperty_property, tvb, *offsetp, 4, byte_order);
19617 *offsetp += 4;
19618 proto_tree_add_item(t, hf_x11_xinput_GetDeviceProperty_type, tvb, *offsetp, 4, byte_order);
19619 *offsetp += 4;
19620 proto_tree_add_item(t, hf_x11_xinput_GetDeviceProperty_offset, tvb, *offsetp, 4, byte_order);
19621 *offsetp += 4;
19622 proto_tree_add_item(t, hf_x11_xinput_GetDeviceProperty_len, tvb, *offsetp, 4, byte_order);
19623 *offsetp += 4;
19624 proto_tree_add_item(t, hf_x11_xinput_GetDeviceProperty_device_id, tvb, *offsetp, 1, byte_order);
19625 *offsetp += 1;
19626 proto_tree_add_item(t, hf_x11_xinput_GetDeviceProperty_delete, tvb, *offsetp, 1, byte_order);
19627 *offsetp += 1;
19628 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 2, ENC_NA);
19629 *offsetp += 2;
19630}
19631static void xinputGetDeviceProperty_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
19632{
19633 int sequence_number;
19634 int f_num_items;
19635 int f_format;
19636
19637 col_append_fstr(pinfo->cinfo, COL_INFO, "-GetDeviceProperty");
19638
19639 REPLY(reply);
19640 proto_tree_add_item(t, hf_x11_xinput_GetDeviceProperty_reply_xi_reply_type, tvb, *offsetp, 1, byte_order);
19641 *offsetp += 1;
19642 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
19643 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
19644 "%d (xinput-GetDeviceProperty)", sequence_number);
19645 *offsetp += 2;
19646 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
19647 *offsetp += 4;
19648 proto_tree_add_item(t, hf_x11_xinput_GetDeviceProperty_reply_type, tvb, *offsetp, 4, byte_order);
19649 *offsetp += 4;
19650 proto_tree_add_item(t, hf_x11_xinput_GetDeviceProperty_reply_bytes_after, tvb, *offsetp, 4, byte_order);
19651 *offsetp += 4;
19652 f_num_items = tvb_get_uint32(tvb, *offsetp, byte_order);
19653 proto_tree_add_item(t, hf_x11_xinput_GetDeviceProperty_reply_num_items, tvb, *offsetp, 4, byte_order);
19654 *offsetp += 4;
19655 f_format = field8(tvb, offsetp, t, hf_x11_xinput_GetDeviceProperty_reply_format, byte_order);
19656 proto_tree_add_item(t, hf_x11_xinput_GetDeviceProperty_reply_device_id, tvb, *offsetp, 1, byte_order);
19657 *offsetp += 1;
19658 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 10, ENC_NA);
19659 *offsetp += 10;
19660 if (f_format == 8) {
19661 listOfByte(tvb, offsetp, t, hf_x11_xinput_GetDeviceProperty_reply_8Bits_data8, f_num_items, byte_order);
19662 if (*offsetp % 4) {
19663 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, (4 - *offsetp % 4), ENC_NA);
19664 *offsetp += (4 - *offsetp % 4);
19665 }
19666 }
19667 if (f_format == 16) {
19668 listOfCard16(tvb, offsetp, t, hf_x11_xinput_GetDeviceProperty_reply_16Bits_data16, hf_x11_xinput_GetDeviceProperty_reply_16Bits_data16_item, f_num_items, byte_order);
19669 if (*offsetp % 4) {
19670 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, (4 - *offsetp % 4), ENC_NA);
19671 *offsetp += (4 - *offsetp % 4);
19672 }
19673 }
19674 if (f_format == 32) {
19675 listOfCard32(tvb, offsetp, t, hf_x11_xinput_GetDeviceProperty_reply_32Bits_data32, hf_x11_xinput_GetDeviceProperty_reply_32Bits_data32_item, f_num_items, byte_order);
19676 }
19677}
19678
19679static void struct_xinput_GroupInfo(tvbuff_t *tvb, int *offsetp, proto_tree *root, unsigned byte_order _U_, int count)
19680{
19681 int i;
19682 for (i = 0; i < count; i++) {
19683 proto_item *item;
19684 proto_tree *t;
19685
19686 item = proto_tree_add_item(root, hf_x11_struct_xinput_GroupInfo, tvb, *offsetp, 4, ENC_NA);
19687 t = proto_item_add_subtree(item, ett_x11_rectangle);
19688 proto_tree_add_item(t, hf_x11_struct_xinput_GroupInfo_base, tvb, *offsetp, 1, byte_order);
19689 *offsetp += 1;
19690 proto_tree_add_item(t, hf_x11_struct_xinput_GroupInfo_latched, tvb, *offsetp, 1, byte_order);
19691 *offsetp += 1;
19692 proto_tree_add_item(t, hf_x11_struct_xinput_GroupInfo_locked, tvb, *offsetp, 1, byte_order);
19693 *offsetp += 1;
19694 proto_tree_add_item(t, hf_x11_struct_xinput_GroupInfo_effective, tvb, *offsetp, 1, byte_order);
19695 *offsetp += 1;
19696 }
19697}
19698
19699static void struct_xinput_ModifierInfo(tvbuff_t *tvb, int *offsetp, proto_tree *root, unsigned byte_order _U_, int count)
19700{
19701 int i;
19702 for (i = 0; i < count; i++) {
19703 proto_item *item;
19704 proto_tree *t;
19705
19706 item = proto_tree_add_item(root, hf_x11_struct_xinput_ModifierInfo, tvb, *offsetp, 16, ENC_NA);
19707 t = proto_item_add_subtree(item, ett_x11_rectangle);
19708 proto_tree_add_item(t, hf_x11_struct_xinput_ModifierInfo_base, tvb, *offsetp, 4, byte_order);
19709 *offsetp += 4;
19710 proto_tree_add_item(t, hf_x11_struct_xinput_ModifierInfo_latched, tvb, *offsetp, 4, byte_order);
19711 *offsetp += 4;
19712 proto_tree_add_item(t, hf_x11_struct_xinput_ModifierInfo_locked, tvb, *offsetp, 4, byte_order);
19713 *offsetp += 4;
19714 proto_tree_add_item(t, hf_x11_struct_xinput_ModifierInfo_effective, tvb, *offsetp, 4, byte_order);
19715 *offsetp += 4;
19716 }
19717}
19718
19719static void xinputXIQueryPointer(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
19720{
19721 proto_tree_add_item(t, hf_x11_xinput_XIQueryPointer_window, tvb, *offsetp, 4, byte_order);
19722 *offsetp += 4;
19723 field16(tvb, offsetp, t, hf_x11_xinput_XIQueryPointer_deviceid, byte_order);
19724 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 2, ENC_NA);
19725 *offsetp += 2;
19726}
19727static void xinputXIQueryPointer_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
19728{
19729 int sequence_number;
19730 int f_buttons_len;
19731
19732 col_append_fstr(pinfo->cinfo, COL_INFO, "-XIQueryPointer");
19733
19734 REPLY(reply);
19735 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
19736 *offsetp += 1;
19737 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
19738 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
19739 "%d (xinput-XIQueryPointer)", sequence_number);
19740 *offsetp += 2;
19741 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
19742 *offsetp += 4;
19743 proto_tree_add_item(t, hf_x11_xinput_XIQueryPointer_reply_root, tvb, *offsetp, 4, byte_order);
19744 *offsetp += 4;
19745 proto_tree_add_item(t, hf_x11_xinput_XIQueryPointer_reply_child, tvb, *offsetp, 4, byte_order);
19746 *offsetp += 4;
19747 proto_tree_add_item(t, hf_x11_xinput_XIQueryPointer_reply_root_x, tvb, *offsetp, 4, byte_order);
19748 *offsetp += 4;
19749 proto_tree_add_item(t, hf_x11_xinput_XIQueryPointer_reply_root_y, tvb, *offsetp, 4, byte_order);
19750 *offsetp += 4;
19751 proto_tree_add_item(t, hf_x11_xinput_XIQueryPointer_reply_win_x, tvb, *offsetp, 4, byte_order);
19752 *offsetp += 4;
19753 proto_tree_add_item(t, hf_x11_xinput_XIQueryPointer_reply_win_y, tvb, *offsetp, 4, byte_order);
19754 *offsetp += 4;
19755 proto_tree_add_item(t, hf_x11_xinput_XIQueryPointer_reply_same_screen, tvb, *offsetp, 1, byte_order);
19756 *offsetp += 1;
19757 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
19758 *offsetp += 1;
19759 f_buttons_len = tvb_get_uint16(tvb, *offsetp, byte_order);
19760 proto_tree_add_item(t, hf_x11_xinput_XIQueryPointer_reply_buttons_len, tvb, *offsetp, 2, byte_order);
19761 *offsetp += 2;
19762 struct_xinput_ModifierInfo(tvb, offsetp, t, byte_order, 1);
19763 struct_xinput_GroupInfo(tvb, offsetp, t, byte_order, 1);
19764 listOfCard32(tvb, offsetp, t, hf_x11_xinput_XIQueryPointer_reply_buttons, hf_x11_xinput_XIQueryPointer_reply_buttons_item, f_buttons_len, byte_order);
19765}
19766
19767static void xinputXIWarpPointer(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
19768{
19769 proto_tree_add_item(t, hf_x11_xinput_XIWarpPointer_src_win, tvb, *offsetp, 4, byte_order);
19770 *offsetp += 4;
19771 proto_tree_add_item(t, hf_x11_xinput_XIWarpPointer_dst_win, tvb, *offsetp, 4, byte_order);
19772 *offsetp += 4;
19773 proto_tree_add_item(t, hf_x11_xinput_XIWarpPointer_src_x, tvb, *offsetp, 4, byte_order);
19774 *offsetp += 4;
19775 proto_tree_add_item(t, hf_x11_xinput_XIWarpPointer_src_y, tvb, *offsetp, 4, byte_order);
19776 *offsetp += 4;
19777 proto_tree_add_item(t, hf_x11_xinput_XIWarpPointer_src_width, tvb, *offsetp, 2, byte_order);
19778 *offsetp += 2;
19779 proto_tree_add_item(t, hf_x11_xinput_XIWarpPointer_src_height, tvb, *offsetp, 2, byte_order);
19780 *offsetp += 2;
19781 proto_tree_add_item(t, hf_x11_xinput_XIWarpPointer_dst_x, tvb, *offsetp, 4, byte_order);
19782 *offsetp += 4;
19783 proto_tree_add_item(t, hf_x11_xinput_XIWarpPointer_dst_y, tvb, *offsetp, 4, byte_order);
19784 *offsetp += 4;
19785 field16(tvb, offsetp, t, hf_x11_xinput_XIWarpPointer_deviceid, byte_order);
19786 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 2, ENC_NA);
19787 *offsetp += 2;
19788}
19789
19790static void xinputXIChangeCursor(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
19791{
19792 proto_tree_add_item(t, hf_x11_xinput_XIChangeCursor_window, tvb, *offsetp, 4, byte_order);
19793 *offsetp += 4;
19794 proto_tree_add_item(t, hf_x11_xinput_XIChangeCursor_cursor, tvb, *offsetp, 4, byte_order);
19795 *offsetp += 4;
19796 field16(tvb, offsetp, t, hf_x11_xinput_XIChangeCursor_deviceid, byte_order);
19797 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 2, ENC_NA);
19798 *offsetp += 2;
19799}
19800
19801static int struct_size_xinput_HierarchyChange(tvbuff_t *tvb _U_, int *offsetp _U_, unsigned byte_order _U_)
19802{
19803 int size = 0;
19804 return size + 4;
19805}
19806
19807static void struct_xinput_HierarchyChange(tvbuff_t *tvb, int *offsetp, proto_tree *root, unsigned byte_order _U_, int count)
19808{
19809 int i;
19810 for (i = 0; i < count; i++) {
19811 proto_item *item;
19812 proto_tree *t;
19813 int f_type;
19814
19815 item = proto_tree_add_item(root, hf_x11_struct_xinput_HierarchyChange, tvb, *offsetp, struct_size_xinput_HierarchyChange(tvb, offsetp, byte_order), ENC_NA);
19816 t = proto_item_add_subtree(item, ett_x11_rectangle);
19817 f_type = field16(tvb, offsetp, t, hf_x11_struct_xinput_HierarchyChange_type, byte_order);
19818 proto_tree_add_item(t, hf_x11_struct_xinput_HierarchyChange_len, tvb, *offsetp, 2, byte_order);
19819 *offsetp += 2;
19820 if (f_type == 1) {
19821 int f_name_len;
19822 f_name_len = tvb_get_uint16(tvb, *offsetp, byte_order);
19823 proto_tree_add_item(t, hf_x11_struct_xinput_HierarchyChange_AddMaster_name_len, tvb, *offsetp, 2, byte_order);
19824 *offsetp += 2;
19825 proto_tree_add_item(t, hf_x11_struct_xinput_HierarchyChange_AddMaster_send_core, tvb, *offsetp, 1, byte_order);
19826 *offsetp += 1;
19827 proto_tree_add_item(t, hf_x11_struct_xinput_HierarchyChange_AddMaster_enable, tvb, *offsetp, 1, byte_order);
19828 *offsetp += 1;
19829 listOfByte(tvb, offsetp, t, hf_x11_struct_xinput_HierarchyChange_AddMaster_name, f_name_len, byte_order);
19830 if (*offsetp % 4) {
19831 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, (4 - *offsetp % 4), ENC_NA);
19832 *offsetp += (4 - *offsetp % 4);
19833 }
19834 }
19835 if (f_type == 2) {
19836 field16(tvb, offsetp, t, hf_x11_struct_xinput_HierarchyChange_RemoveMaster_deviceid, byte_order);
19837 field8(tvb, offsetp, t, hf_x11_struct_xinput_HierarchyChange_RemoveMaster_return_mode, byte_order);
19838 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
19839 *offsetp += 1;
19840 field16(tvb, offsetp, t, hf_x11_struct_xinput_HierarchyChange_RemoveMaster_return_pointer, byte_order);
19841 field16(tvb, offsetp, t, hf_x11_struct_xinput_HierarchyChange_RemoveMaster_return_keyboard, byte_order);
19842 }
19843 if (f_type == 3) {
19844 field16(tvb, offsetp, t, hf_x11_struct_xinput_HierarchyChange_AttachSlave_deviceid, byte_order);
19845 field16(tvb, offsetp, t, hf_x11_struct_xinput_HierarchyChange_AttachSlave_master, byte_order);
19846 }
19847 if (f_type == 4) {
19848 field16(tvb, offsetp, t, hf_x11_struct_xinput_HierarchyChange_DetachSlave_deviceid, byte_order);
19849 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 2, ENC_NA);
19850 *offsetp += 2;
19851 }
19852 }
19853}
19854
19855static void xinputXIChangeHierarchy(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
19856{
19857 int f_num_changes;
19858 f_num_changes = tvb_get_uint8(tvb, *offsetp);
19859 proto_tree_add_item(t, hf_x11_xinput_XIChangeHierarchy_num_changes, tvb, *offsetp, 1, byte_order);
19860 *offsetp += 1;
19861 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 3, ENC_NA);
19862 *offsetp += 3;
19863 struct_xinput_HierarchyChange(tvb, offsetp, t, byte_order, f_num_changes);
19864 length -= f_num_changes * 0;
19865}
19866
19867static void xinputXISetClientPointer(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
19868{
19869 proto_tree_add_item(t, hf_x11_xinput_XISetClientPointer_window, tvb, *offsetp, 4, byte_order);
19870 *offsetp += 4;
19871 field16(tvb, offsetp, t, hf_x11_xinput_XISetClientPointer_deviceid, byte_order);
19872 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 2, ENC_NA);
19873 *offsetp += 2;
19874}
19875
19876static void xinputXIGetClientPointer(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
19877{
19878 proto_tree_add_item(t, hf_x11_xinput_XIGetClientPointer_window, tvb, *offsetp, 4, byte_order);
19879 *offsetp += 4;
19880}
19881static void xinputXIGetClientPointer_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
19882{
19883 int sequence_number;
19884
19885 col_append_fstr(pinfo->cinfo, COL_INFO, "-XIGetClientPointer");
19886
19887 REPLY(reply);
19888 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
19889 *offsetp += 1;
19890 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
19891 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
19892 "%d (xinput-XIGetClientPointer)", sequence_number);
19893 *offsetp += 2;
19894 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
19895 *offsetp += 4;
19896 proto_tree_add_item(t, hf_x11_xinput_XIGetClientPointer_reply_set, tvb, *offsetp, 1, byte_order);
19897 *offsetp += 1;
19898 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
19899 *offsetp += 1;
19900 field16(tvb, offsetp, t, hf_x11_xinput_XIGetClientPointer_reply_deviceid, byte_order);
19901 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 20, ENC_NA);
19902 *offsetp += 20;
19903}
19904
19905static int struct_size_xinput_EventMask(tvbuff_t *tvb _U_, int *offsetp _U_, unsigned byte_order _U_)
19906{
19907 int size = 0;
19908 int f_mask_len;
19909 f_mask_len = tvb_get_uint16(tvb, *offsetp + size + 2, byte_order);
19910 size += f_mask_len * 4;
19911 return size + 4;
19912}
19913
19914static void struct_xinput_EventMask(tvbuff_t *tvb, int *offsetp, proto_tree *root, unsigned byte_order _U_, int count)
19915{
19916 int i;
19917 for (i = 0; i < count; i++) {
19918 proto_item *item;
19919 proto_tree *t;
19920 int f_mask_len;
19921
19922 item = proto_tree_add_item(root, hf_x11_struct_xinput_EventMask, tvb, *offsetp, struct_size_xinput_EventMask(tvb, offsetp, byte_order), ENC_NA);
19923 t = proto_item_add_subtree(item, ett_x11_rectangle);
19924 field16(tvb, offsetp, t, hf_x11_struct_xinput_EventMask_deviceid, byte_order);
19925 f_mask_len = tvb_get_uint16(tvb, *offsetp, byte_order);
19926 proto_tree_add_item(t, hf_x11_struct_xinput_EventMask_mask_len, tvb, *offsetp, 2, byte_order);
19927 *offsetp += 2;
19928 listOfCard32(tvb, offsetp, t, hf_x11_struct_xinput_EventMask_mask, hf_x11_struct_xinput_EventMask_mask_item, f_mask_len, byte_order);
19929 }
19930}
19931
19932static void xinputXISelectEvents(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
19933{
19934 int f_num_mask;
19935 proto_tree_add_item(t, hf_x11_xinput_XISelectEvents_window, tvb, *offsetp, 4, byte_order);
19936 *offsetp += 4;
19937 f_num_mask = tvb_get_uint16(tvb, *offsetp, byte_order);
19938 proto_tree_add_item(t, hf_x11_xinput_XISelectEvents_num_mask, tvb, *offsetp, 2, byte_order);
19939 *offsetp += 2;
19940 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 2, ENC_NA);
19941 *offsetp += 2;
19942 struct_xinput_EventMask(tvb, offsetp, t, byte_order, f_num_mask);
19943 length -= f_num_mask * 0;
19944}
19945
19946static void xinputXIQueryVersion(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
19947{
19948 proto_tree_add_item(t, hf_x11_xinput_XIQueryVersion_major_version, tvb, *offsetp, 2, byte_order);
19949 *offsetp += 2;
19950 proto_tree_add_item(t, hf_x11_xinput_XIQueryVersion_minor_version, tvb, *offsetp, 2, byte_order);
19951 *offsetp += 2;
19952}
19953static void xinputXIQueryVersion_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
19954{
19955 int sequence_number;
19956
19957 col_append_fstr(pinfo->cinfo, COL_INFO, "-XIQueryVersion");
19958
19959 REPLY(reply);
19960 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
19961 *offsetp += 1;
19962 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
19963 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
19964 "%d (xinput-XIQueryVersion)", sequence_number);
19965 *offsetp += 2;
19966 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
19967 *offsetp += 4;
19968 proto_tree_add_item(t, hf_x11_xinput_XIQueryVersion_reply_major_version, tvb, *offsetp, 2, byte_order);
19969 *offsetp += 2;
19970 proto_tree_add_item(t, hf_x11_xinput_XIQueryVersion_reply_minor_version, tvb, *offsetp, 2, byte_order);
19971 *offsetp += 2;
19972 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 20, ENC_NA);
19973 *offsetp += 20;
19974}
19975
19976static int struct_size_xinput_DeviceClass(tvbuff_t *tvb _U_, int *offsetp _U_, unsigned byte_order _U_)
19977{
19978 int size = 0;
19979 return size + 6;
19980}
19981
19982static void struct_xinput_DeviceClass(tvbuff_t *tvb, int *offsetp, proto_tree *root, unsigned byte_order _U_, int count)
19983{
19984 int i;
19985 for (i = 0; i < count; i++) {
19986 proto_item *item;
19987 proto_tree *t;
19988 int f_type;
19989
19990 item = proto_tree_add_item(root, hf_x11_struct_xinput_DeviceClass, tvb, *offsetp, struct_size_xinput_DeviceClass(tvb, offsetp, byte_order), ENC_NA);
19991 t = proto_item_add_subtree(item, ett_x11_rectangle);
19992 f_type = field16(tvb, offsetp, t, hf_x11_struct_xinput_DeviceClass_type, byte_order);
19993 proto_tree_add_item(t, hf_x11_struct_xinput_DeviceClass_len, tvb, *offsetp, 2, byte_order);
19994 *offsetp += 2;
19995 proto_tree_add_item(t, hf_x11_struct_xinput_DeviceClass_sourceid, tvb, *offsetp, 2, byte_order);
19996 *offsetp += 2;
19997 if (f_type == 0) {
19998 int f_num_keys;
19999 f_num_keys = tvb_get_uint16(tvb, *offsetp, byte_order);
20000 proto_tree_add_item(t, hf_x11_struct_xinput_DeviceClass_Key_num_keys, tvb, *offsetp, 2, byte_order);
20001 *offsetp += 2;
20002 listOfCard32(tvb, offsetp, t, hf_x11_struct_xinput_DeviceClass_Key_keys, hf_x11_struct_xinput_DeviceClass_Key_keys_item, f_num_keys, byte_order);
20003 }
20004 if (f_type == 1) {
20005 int f_num_buttons;
20006 f_num_buttons = tvb_get_uint16(tvb, *offsetp, byte_order);
20007 proto_tree_add_item(t, hf_x11_struct_xinput_DeviceClass_Button_num_buttons, tvb, *offsetp, 2, byte_order);
20008 *offsetp += 2;
20009 listOfCard32(tvb, offsetp, t, hf_x11_struct_xinput_DeviceClass_Button_state, hf_x11_struct_xinput_DeviceClass_Button_state_item, ((f_num_buttons + 31) / 32), byte_order);
20010 listOfCard32(tvb, offsetp, t, hf_x11_struct_xinput_DeviceClass_Button_labels, hf_x11_struct_xinput_DeviceClass_Button_labels_item, f_num_buttons, byte_order);
20011 }
20012 if (f_type == 2) {
20013 proto_tree_add_item(t, hf_x11_struct_xinput_DeviceClass_Valuator_number, tvb, *offsetp, 2, byte_order);
20014 *offsetp += 2;
20015 proto_tree_add_item(t, hf_x11_struct_xinput_DeviceClass_Valuator_label, tvb, *offsetp, 4, byte_order);
20016 *offsetp += 4;
20017 struct_xinput_FP3232(tvb, offsetp, t, byte_order, 1);
20018 struct_xinput_FP3232(tvb, offsetp, t, byte_order, 1);
20019 struct_xinput_FP3232(tvb, offsetp, t, byte_order, 1);
20020 proto_tree_add_item(t, hf_x11_struct_xinput_DeviceClass_Valuator_resolution, tvb, *offsetp, 4, byte_order);
20021 *offsetp += 4;
20022 field8(tvb, offsetp, t, hf_x11_struct_xinput_DeviceClass_Valuator_mode, byte_order);
20023 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 3, ENC_NA);
20024 *offsetp += 3;
20025 }
20026 if (f_type == 3) {
20027 proto_tree_add_item(t, hf_x11_struct_xinput_DeviceClass_Scroll_number, tvb, *offsetp, 2, byte_order);
20028 *offsetp += 2;
20029 field16(tvb, offsetp, t, hf_x11_struct_xinput_DeviceClass_Scroll_scroll_type, byte_order);
20030 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 2, ENC_NA);
20031 *offsetp += 2;
20032 {
20033 static int* const flags_bits [] = {
20034 &hf_x11_struct_xinput_DeviceClass_Scroll_flags_mask_NoEmulation,
20035 &hf_x11_struct_xinput_DeviceClass_Scroll_flags_mask_Preferred,
20036 NULL
20037 };
20038 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_struct_xinput_DeviceClass_Scroll_flags, ett_x11_rectangle, flags_bits, byte_order);
20039 }
20040 *offsetp += 4;
20041 struct_xinput_FP3232(tvb, offsetp, t, byte_order, 1);
20042 }
20043 if (f_type == 8) {
20044 field8(tvb, offsetp, t, hf_x11_struct_xinput_DeviceClass_Touch_mode, byte_order);
20045 proto_tree_add_item(t, hf_x11_struct_xinput_DeviceClass_Touch_num_touches, tvb, *offsetp, 1, byte_order);
20046 *offsetp += 1;
20047 }
20048 if (f_type == 9) {
20049 proto_tree_add_item(t, hf_x11_struct_xinput_DeviceClass_Gesture_num_touches, tvb, *offsetp, 1, byte_order);
20050 *offsetp += 1;
20051 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
20052 *offsetp += 1;
20053 }
20054 }
20055}
20056
20057static int struct_size_xinput_XIDeviceInfo(tvbuff_t *tvb _U_, int *offsetp _U_, unsigned byte_order _U_)
20058{
20059 int size = 0;
20060 int i, off;
20061 int f_name_len;
20062 int f_num_classes;
20063 f_num_classes = tvb_get_uint16(tvb, *offsetp + size + 6, byte_order);
20064 f_name_len = tvb_get_uint16(tvb, *offsetp + size + 8, byte_order);
20065 size += f_name_len * 1;
20066 size = (size + 3) & ~3;
20067 for (i = 0; i < f_num_classes; i++) {
20068 off = (*offsetp) + size + 12;
20069 size += struct_size_xinput_DeviceClass(tvb, &off, byte_order);
20070 }
20071 return size + 12;
20072}
20073
20074static void struct_xinput_XIDeviceInfo(tvbuff_t *tvb, int *offsetp, proto_tree *root, unsigned byte_order _U_, int count)
20075{
20076 int i;
20077 for (i = 0; i < count; i++) {
20078 proto_item *item;
20079 proto_tree *t;
20080 int f_num_classes;
20081 int f_name_len;
20082
20083 item = proto_tree_add_item(root, hf_x11_struct_xinput_XIDeviceInfo, tvb, *offsetp, struct_size_xinput_XIDeviceInfo(tvb, offsetp, byte_order), ENC_NA);
20084 t = proto_item_add_subtree(item, ett_x11_rectangle);
20085 field16(tvb, offsetp, t, hf_x11_struct_xinput_XIDeviceInfo_deviceid, byte_order);
20086 field16(tvb, offsetp, t, hf_x11_struct_xinput_XIDeviceInfo_type, byte_order);
20087 field16(tvb, offsetp, t, hf_x11_struct_xinput_XIDeviceInfo_attachment, byte_order);
20088 f_num_classes = tvb_get_uint16(tvb, *offsetp, byte_order);
20089 proto_tree_add_item(t, hf_x11_struct_xinput_XIDeviceInfo_num_classes, tvb, *offsetp, 2, byte_order);
20090 *offsetp += 2;
20091 f_name_len = tvb_get_uint16(tvb, *offsetp, byte_order);
20092 proto_tree_add_item(t, hf_x11_struct_xinput_XIDeviceInfo_name_len, tvb, *offsetp, 2, byte_order);
20093 *offsetp += 2;
20094 proto_tree_add_item(t, hf_x11_struct_xinput_XIDeviceInfo_enabled, tvb, *offsetp, 1, byte_order);
20095 *offsetp += 1;
20096 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
20097 *offsetp += 1;
20098 listOfByte(tvb, offsetp, t, hf_x11_struct_xinput_XIDeviceInfo_name, f_name_len, byte_order);
20099 if (*offsetp % 4) {
20100 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, (4 - *offsetp % 4), ENC_NA);
20101 *offsetp += (4 - *offsetp % 4);
20102 }
20103 struct_xinput_DeviceClass(tvb, offsetp, t, byte_order, f_num_classes);
20104 }
20105}
20106
20107static void xinputXIQueryDevice(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
20108{
20109 field16(tvb, offsetp, t, hf_x11_xinput_XIQueryDevice_deviceid, byte_order);
20110 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 2, ENC_NA);
20111 *offsetp += 2;
20112}
20113static void xinputXIQueryDevice_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
20114{
20115 int sequence_number;
20116 int f_num_infos;
20117
20118 col_append_fstr(pinfo->cinfo, COL_INFO, "-XIQueryDevice");
20119
20120 REPLY(reply);
20121 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
20122 *offsetp += 1;
20123 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
20124 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
20125 "%d (xinput-XIQueryDevice)", sequence_number);
20126 *offsetp += 2;
20127 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
20128 *offsetp += 4;
20129 f_num_infos = tvb_get_uint16(tvb, *offsetp, byte_order);
20130 proto_tree_add_item(t, hf_x11_xinput_XIQueryDevice_reply_num_infos, tvb, *offsetp, 2, byte_order);
20131 *offsetp += 2;
20132 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 22, ENC_NA);
20133 *offsetp += 22;
20134 struct_xinput_XIDeviceInfo(tvb, offsetp, t, byte_order, f_num_infos);
20135}
20136
20137static void xinputXISetFocus(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
20138{
20139 proto_tree_add_item(t, hf_x11_xinput_XISetFocus_window, tvb, *offsetp, 4, byte_order);
20140 *offsetp += 4;
20141 field32(tvb, offsetp, t, hf_x11_xinput_XISetFocus_time, byte_order);
20142 field16(tvb, offsetp, t, hf_x11_xinput_XISetFocus_deviceid, byte_order);
20143 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 2, ENC_NA);
20144 *offsetp += 2;
20145}
20146
20147static void xinputXIGetFocus(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
20148{
20149 field16(tvb, offsetp, t, hf_x11_xinput_XIGetFocus_deviceid, byte_order);
20150 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 2, ENC_NA);
20151 *offsetp += 2;
20152}
20153static void xinputXIGetFocus_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
20154{
20155 int sequence_number;
20156
20157 col_append_fstr(pinfo->cinfo, COL_INFO, "-XIGetFocus");
20158
20159 REPLY(reply);
20160 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
20161 *offsetp += 1;
20162 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
20163 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
20164 "%d (xinput-XIGetFocus)", sequence_number);
20165 *offsetp += 2;
20166 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
20167 *offsetp += 4;
20168 proto_tree_add_item(t, hf_x11_xinput_XIGetFocus_reply_focus, tvb, *offsetp, 4, byte_order);
20169 *offsetp += 4;
20170 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 20, ENC_NA);
20171 *offsetp += 20;
20172}
20173
20174static void xinputXIGrabDevice(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
20175{
20176 int f_mask_len;
20177 proto_tree_add_item(t, hf_x11_xinput_XIGrabDevice_window, tvb, *offsetp, 4, byte_order);
20178 *offsetp += 4;
20179 field32(tvb, offsetp, t, hf_x11_xinput_XIGrabDevice_time, byte_order);
20180 proto_tree_add_item(t, hf_x11_xinput_XIGrabDevice_cursor, tvb, *offsetp, 4, byte_order);
20181 *offsetp += 4;
20182 field16(tvb, offsetp, t, hf_x11_xinput_XIGrabDevice_deviceid, byte_order);
20183 field8(tvb, offsetp, t, hf_x11_xinput_XIGrabDevice_mode, byte_order);
20184 field8(tvb, offsetp, t, hf_x11_xinput_XIGrabDevice_paired_device_mode, byte_order);
20185 field8(tvb, offsetp, t, hf_x11_xinput_XIGrabDevice_owner_events, byte_order);
20186 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
20187 *offsetp += 1;
20188 f_mask_len = tvb_get_uint16(tvb, *offsetp, byte_order);
20189 proto_tree_add_item(t, hf_x11_xinput_XIGrabDevice_mask_len, tvb, *offsetp, 2, byte_order);
20190 *offsetp += 2;
20191 listOfCard32(tvb, offsetp, t, hf_x11_xinput_XIGrabDevice_mask, hf_x11_xinput_XIGrabDevice_mask_item, f_mask_len, byte_order);
20192 length -= f_mask_len * 4;
20193}
20194static void xinputXIGrabDevice_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
20195{
20196 int sequence_number;
20197
20198 col_append_fstr(pinfo->cinfo, COL_INFO, "-XIGrabDevice");
20199
20200 REPLY(reply);
20201 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
20202 *offsetp += 1;
20203 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
20204 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
20205 "%d (xinput-XIGrabDevice)", sequence_number);
20206 *offsetp += 2;
20207 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
20208 *offsetp += 4;
20209 field8(tvb, offsetp, t, hf_x11_xinput_XIGrabDevice_reply_status, byte_order);
20210 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 23, ENC_NA);
20211 *offsetp += 23;
20212}
20213
20214static void xinputXIUngrabDevice(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
20215{
20216 field32(tvb, offsetp, t, hf_x11_xinput_XIUngrabDevice_time, byte_order);
20217 field16(tvb, offsetp, t, hf_x11_xinput_XIUngrabDevice_deviceid, byte_order);
20218 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 2, ENC_NA);
20219 *offsetp += 2;
20220}
20221
20222static void xinputXIAllowEvents(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
20223{
20224 field32(tvb, offsetp, t, hf_x11_xinput_XIAllowEvents_time, byte_order);
20225 field16(tvb, offsetp, t, hf_x11_xinput_XIAllowEvents_deviceid, byte_order);
20226 field8(tvb, offsetp, t, hf_x11_xinput_XIAllowEvents_event_mode, byte_order);
20227 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
20228 *offsetp += 1;
20229 proto_tree_add_item(t, hf_x11_xinput_XIAllowEvents_touchid, tvb, *offsetp, 4, byte_order);
20230 *offsetp += 4;
20231 proto_tree_add_item(t, hf_x11_xinput_XIAllowEvents_grab_window, tvb, *offsetp, 4, byte_order);
20232 *offsetp += 4;
20233}
20234
20235static void struct_xinput_GrabModifierInfo(tvbuff_t *tvb, int *offsetp, proto_tree *root, unsigned byte_order _U_, int count)
20236{
20237 int i;
20238 for (i = 0; i < count; i++) {
20239 proto_item *item;
20240 proto_tree *t;
20241
20242 item = proto_tree_add_item(root, hf_x11_struct_xinput_GrabModifierInfo, tvb, *offsetp, 8, ENC_NA);
20243 t = proto_item_add_subtree(item, ett_x11_rectangle);
20244 field32(tvb, offsetp, t, hf_x11_struct_xinput_GrabModifierInfo_modifiers, byte_order);
20245 field8(tvb, offsetp, t, hf_x11_struct_xinput_GrabModifierInfo_status, byte_order);
20246 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 3, ENC_NA);
20247 *offsetp += 3;
20248 }
20249}
20250
20251static void xinputXIPassiveGrabDevice(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
20252{
20253 int f_num_modifiers;
20254 int f_mask_len;
20255 field32(tvb, offsetp, t, hf_x11_xinput_XIPassiveGrabDevice_time, byte_order);
20256 proto_tree_add_item(t, hf_x11_xinput_XIPassiveGrabDevice_grab_window, tvb, *offsetp, 4, byte_order);
20257 *offsetp += 4;
20258 proto_tree_add_item(t, hf_x11_xinput_XIPassiveGrabDevice_cursor, tvb, *offsetp, 4, byte_order);
20259 *offsetp += 4;
20260 proto_tree_add_item(t, hf_x11_xinput_XIPassiveGrabDevice_detail, tvb, *offsetp, 4, byte_order);
20261 *offsetp += 4;
20262 field16(tvb, offsetp, t, hf_x11_xinput_XIPassiveGrabDevice_deviceid, byte_order);
20263 f_num_modifiers = tvb_get_uint16(tvb, *offsetp, byte_order);
20264 proto_tree_add_item(t, hf_x11_xinput_XIPassiveGrabDevice_num_modifiers, tvb, *offsetp, 2, byte_order);
20265 *offsetp += 2;
20266 f_mask_len = tvb_get_uint16(tvb, *offsetp, byte_order);
20267 proto_tree_add_item(t, hf_x11_xinput_XIPassiveGrabDevice_mask_len, tvb, *offsetp, 2, byte_order);
20268 *offsetp += 2;
20269 field8(tvb, offsetp, t, hf_x11_xinput_XIPassiveGrabDevice_grab_type, byte_order);
20270 field8(tvb, offsetp, t, hf_x11_xinput_XIPassiveGrabDevice_grab_mode, byte_order);
20271 field8(tvb, offsetp, t, hf_x11_xinput_XIPassiveGrabDevice_paired_device_mode, byte_order);
20272 field8(tvb, offsetp, t, hf_x11_xinput_XIPassiveGrabDevice_owner_events, byte_order);
20273 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 2, ENC_NA);
20274 *offsetp += 2;
20275 listOfCard32(tvb, offsetp, t, hf_x11_xinput_XIPassiveGrabDevice_mask, hf_x11_xinput_XIPassiveGrabDevice_mask_item, f_mask_len, byte_order);
20276 length -= f_mask_len * 4;
20277 listOfCard32(tvb, offsetp, t, hf_x11_xinput_XIPassiveGrabDevice_modifiers, hf_x11_xinput_XIPassiveGrabDevice_modifiers_item, f_num_modifiers, byte_order);
20278 length -= f_num_modifiers * 4;
20279}
20280static void xinputXIPassiveGrabDevice_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
20281{
20282 int sequence_number;
20283 int f_num_modifiers;
20284
20285 col_append_fstr(pinfo->cinfo, COL_INFO, "-XIPassiveGrabDevice");
20286
20287 REPLY(reply);
20288 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
20289 *offsetp += 1;
20290 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
20291 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
20292 "%d (xinput-XIPassiveGrabDevice)", sequence_number);
20293 *offsetp += 2;
20294 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
20295 *offsetp += 4;
20296 f_num_modifiers = tvb_get_uint16(tvb, *offsetp, byte_order);
20297 proto_tree_add_item(t, hf_x11_xinput_XIPassiveGrabDevice_reply_num_modifiers, tvb, *offsetp, 2, byte_order);
20298 *offsetp += 2;
20299 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 22, ENC_NA);
20300 *offsetp += 22;
20301 struct_xinput_GrabModifierInfo(tvb, offsetp, t, byte_order, f_num_modifiers);
20302}
20303
20304static void xinputXIPassiveUngrabDevice(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
20305{
20306 int f_num_modifiers;
20307 proto_tree_add_item(t, hf_x11_xinput_XIPassiveUngrabDevice_grab_window, tvb, *offsetp, 4, byte_order);
20308 *offsetp += 4;
20309 proto_tree_add_item(t, hf_x11_xinput_XIPassiveUngrabDevice_detail, tvb, *offsetp, 4, byte_order);
20310 *offsetp += 4;
20311 field16(tvb, offsetp, t, hf_x11_xinput_XIPassiveUngrabDevice_deviceid, byte_order);
20312 f_num_modifiers = tvb_get_uint16(tvb, *offsetp, byte_order);
20313 proto_tree_add_item(t, hf_x11_xinput_XIPassiveUngrabDevice_num_modifiers, tvb, *offsetp, 2, byte_order);
20314 *offsetp += 2;
20315 field8(tvb, offsetp, t, hf_x11_xinput_XIPassiveUngrabDevice_grab_type, byte_order);
20316 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 3, ENC_NA);
20317 *offsetp += 3;
20318 listOfCard32(tvb, offsetp, t, hf_x11_xinput_XIPassiveUngrabDevice_modifiers, hf_x11_xinput_XIPassiveUngrabDevice_modifiers_item, f_num_modifiers, byte_order);
20319 length -= f_num_modifiers * 4;
20320}
20321
20322static void xinputXIListProperties(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
20323{
20324 field16(tvb, offsetp, t, hf_x11_xinput_XIListProperties_deviceid, byte_order);
20325 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 2, ENC_NA);
20326 *offsetp += 2;
20327}
20328static void xinputXIListProperties_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
20329{
20330 int sequence_number;
20331 int f_num_properties;
20332
20333 col_append_fstr(pinfo->cinfo, COL_INFO, "-XIListProperties");
20334
20335 REPLY(reply);
20336 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
20337 *offsetp += 1;
20338 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
20339 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
20340 "%d (xinput-XIListProperties)", sequence_number);
20341 *offsetp += 2;
20342 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
20343 *offsetp += 4;
20344 f_num_properties = tvb_get_uint16(tvb, *offsetp, byte_order);
20345 proto_tree_add_item(t, hf_x11_xinput_XIListProperties_reply_num_properties, tvb, *offsetp, 2, byte_order);
20346 *offsetp += 2;
20347 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 22, ENC_NA);
20348 *offsetp += 22;
20349 listOfCard32(tvb, offsetp, t, hf_x11_xinput_XIListProperties_reply_properties, hf_x11_xinput_XIListProperties_reply_properties_item, f_num_properties, byte_order);
20350}
20351
20352static void xinputXIChangeProperty(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
20353{
20354 int f_format;
20355 int f_num_items;
20356 field16(tvb, offsetp, t, hf_x11_xinput_XIChangeProperty_deviceid, byte_order);
20357 field8(tvb, offsetp, t, hf_x11_xinput_XIChangeProperty_mode, byte_order);
20358 f_format = field8(tvb, offsetp, t, hf_x11_xinput_XIChangeProperty_format, byte_order);
20359 proto_tree_add_item(t, hf_x11_xinput_XIChangeProperty_property, tvb, *offsetp, 4, byte_order);
20360 *offsetp += 4;
20361 proto_tree_add_item(t, hf_x11_xinput_XIChangeProperty_type, tvb, *offsetp, 4, byte_order);
20362 *offsetp += 4;
20363 f_num_items = tvb_get_uint32(tvb, *offsetp, byte_order);
20364 proto_tree_add_item(t, hf_x11_xinput_XIChangeProperty_num_items, tvb, *offsetp, 4, byte_order);
20365 *offsetp += 4;
20366 if (f_format == 8) {
20367 listOfByte(tvb, offsetp, t, hf_x11_xinput_XIChangeProperty_8Bits_data8, f_num_items, byte_order);
20368 length -= f_num_items * 1;
20369 if (*offsetp % 4) {
20370 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, (4 - *offsetp % 4), ENC_NA);
20371 *offsetp += (4 - *offsetp % 4);
20372 }
20373 length = ((length + 3) & ~3);
20374 }
20375 if (f_format == 16) {
20376 listOfCard16(tvb, offsetp, t, hf_x11_xinput_XIChangeProperty_16Bits_data16, hf_x11_xinput_XIChangeProperty_16Bits_data16_item, f_num_items, byte_order);
20377 length -= f_num_items * 2;
20378 if (*offsetp % 4) {
20379 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, (4 - *offsetp % 4), ENC_NA);
20380 *offsetp += (4 - *offsetp % 4);
20381 }
20382 length = ((length + 3) & ~3);
20383 }
20384 if (f_format == 32) {
20385 listOfCard32(tvb, offsetp, t, hf_x11_xinput_XIChangeProperty_32Bits_data32, hf_x11_xinput_XIChangeProperty_32Bits_data32_item, f_num_items, byte_order);
20386 length -= f_num_items * 4;
20387 }
20388}
20389
20390static void xinputXIDeleteProperty(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
20391{
20392 field16(tvb, offsetp, t, hf_x11_xinput_XIDeleteProperty_deviceid, byte_order);
20393 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 2, ENC_NA);
20394 *offsetp += 2;
20395 proto_tree_add_item(t, hf_x11_xinput_XIDeleteProperty_property, tvb, *offsetp, 4, byte_order);
20396 *offsetp += 4;
20397}
20398
20399static void xinputXIGetProperty(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
20400{
20401 field16(tvb, offsetp, t, hf_x11_xinput_XIGetProperty_deviceid, byte_order);
20402 proto_tree_add_item(t, hf_x11_xinput_XIGetProperty_delete, tvb, *offsetp, 1, byte_order);
20403 *offsetp += 1;
20404 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
20405 *offsetp += 1;
20406 proto_tree_add_item(t, hf_x11_xinput_XIGetProperty_property, tvb, *offsetp, 4, byte_order);
20407 *offsetp += 4;
20408 proto_tree_add_item(t, hf_x11_xinput_XIGetProperty_type, tvb, *offsetp, 4, byte_order);
20409 *offsetp += 4;
20410 proto_tree_add_item(t, hf_x11_xinput_XIGetProperty_offset, tvb, *offsetp, 4, byte_order);
20411 *offsetp += 4;
20412 proto_tree_add_item(t, hf_x11_xinput_XIGetProperty_len, tvb, *offsetp, 4, byte_order);
20413 *offsetp += 4;
20414}
20415static void xinputXIGetProperty_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
20416{
20417 int sequence_number;
20418 int f_num_items;
20419 int f_format;
20420
20421 col_append_fstr(pinfo->cinfo, COL_INFO, "-XIGetProperty");
20422
20423 REPLY(reply);
20424 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
20425 *offsetp += 1;
20426 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
20427 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
20428 "%d (xinput-XIGetProperty)", sequence_number);
20429 *offsetp += 2;
20430 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
20431 *offsetp += 4;
20432 proto_tree_add_item(t, hf_x11_xinput_XIGetProperty_reply_type, tvb, *offsetp, 4, byte_order);
20433 *offsetp += 4;
20434 proto_tree_add_item(t, hf_x11_xinput_XIGetProperty_reply_bytes_after, tvb, *offsetp, 4, byte_order);
20435 *offsetp += 4;
20436 f_num_items = tvb_get_uint32(tvb, *offsetp, byte_order);
20437 proto_tree_add_item(t, hf_x11_xinput_XIGetProperty_reply_num_items, tvb, *offsetp, 4, byte_order);
20438 *offsetp += 4;
20439 f_format = field8(tvb, offsetp, t, hf_x11_xinput_XIGetProperty_reply_format, byte_order);
20440 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 11, ENC_NA);
20441 *offsetp += 11;
20442 if (f_format == 8) {
20443 listOfByte(tvb, offsetp, t, hf_x11_xinput_XIGetProperty_reply_8Bits_data8, f_num_items, byte_order);
20444 if (*offsetp % 4) {
20445 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, (4 - *offsetp % 4), ENC_NA);
20446 *offsetp += (4 - *offsetp % 4);
20447 }
20448 }
20449 if (f_format == 16) {
20450 listOfCard16(tvb, offsetp, t, hf_x11_xinput_XIGetProperty_reply_16Bits_data16, hf_x11_xinput_XIGetProperty_reply_16Bits_data16_item, f_num_items, byte_order);
20451 if (*offsetp % 4) {
20452 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, (4 - *offsetp % 4), ENC_NA);
20453 *offsetp += (4 - *offsetp % 4);
20454 }
20455 }
20456 if (f_format == 32) {
20457 listOfCard32(tvb, offsetp, t, hf_x11_xinput_XIGetProperty_reply_32Bits_data32, hf_x11_xinput_XIGetProperty_reply_32Bits_data32_item, f_num_items, byte_order);
20458 }
20459}
20460
20461static void xinputXIGetSelectedEvents(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
20462{
20463 proto_tree_add_item(t, hf_x11_xinput_XIGetSelectedEvents_window, tvb, *offsetp, 4, byte_order);
20464 *offsetp += 4;
20465}
20466static void xinputXIGetSelectedEvents_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
20467{
20468 int sequence_number;
20469 int f_num_masks;
20470
20471 col_append_fstr(pinfo->cinfo, COL_INFO, "-XIGetSelectedEvents");
20472
20473 REPLY(reply);
20474 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
20475 *offsetp += 1;
20476 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
20477 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
20478 "%d (xinput-XIGetSelectedEvents)", sequence_number);
20479 *offsetp += 2;
20480 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
20481 *offsetp += 4;
20482 f_num_masks = tvb_get_uint16(tvb, *offsetp, byte_order);
20483 proto_tree_add_item(t, hf_x11_xinput_XIGetSelectedEvents_reply_num_masks, tvb, *offsetp, 2, byte_order);
20484 *offsetp += 2;
20485 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 22, ENC_NA);
20486 *offsetp += 22;
20487 struct_xinput_EventMask(tvb, offsetp, t, byte_order, f_num_masks);
20488}
20489
20490static void struct_xinput_BarrierReleasePointerInfo(tvbuff_t *tvb, int *offsetp, proto_tree *root, unsigned byte_order _U_, int count)
20491{
20492 int i;
20493 for (i = 0; i < count; i++) {
20494 proto_item *item;
20495 proto_tree *t;
20496
20497 item = proto_tree_add_item(root, hf_x11_struct_xinput_BarrierReleasePointerInfo, tvb, *offsetp, 12, ENC_NA);
20498 t = proto_item_add_subtree(item, ett_x11_rectangle);
20499 proto_tree_add_item(t, hf_x11_struct_xinput_BarrierReleasePointerInfo_deviceid, tvb, *offsetp, 2, byte_order);
20500 *offsetp += 2;
20501 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 2, ENC_NA);
20502 *offsetp += 2;
20503 proto_tree_add_item(t, hf_x11_struct_xinput_BarrierReleasePointerInfo_barrier, tvb, *offsetp, 4, byte_order);
20504 *offsetp += 4;
20505 proto_tree_add_item(t, hf_x11_struct_xinput_BarrierReleasePointerInfo_eventid, tvb, *offsetp, 4, byte_order);
20506 *offsetp += 4;
20507 }
20508}
20509
20510static void xinputXIBarrierReleasePointer(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
20511{
20512 int f_num_barriers;
20513 f_num_barriers = tvb_get_uint32(tvb, *offsetp, byte_order);
20514 proto_tree_add_item(t, hf_x11_xinput_XIBarrierReleasePointer_num_barriers, tvb, *offsetp, 4, byte_order);
20515 *offsetp += 4;
20516 struct_xinput_BarrierReleasePointerInfo(tvb, offsetp, t, byte_order, f_num_barriers);
20517 length -= f_num_barriers * 12;
20518}
20519
20520static void xinputDeviceKeyPress(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order)
20521{
20522 proto_tree_add_item(t, hf_x11_xinput_DeviceKeyPress_detail, tvb, *offsetp, 1, ENC_NA);
20523 *offsetp += 1;
20524 CARD16(event_sequencenumber);
20525 proto_tree_add_item(t, hf_x11_xinput_DeviceKeyPress_time, tvb, *offsetp, 4, byte_order);
20526 *offsetp += 4;
20527 proto_tree_add_item(t, hf_x11_xinput_DeviceKeyPress_root, tvb, *offsetp, 4, byte_order);
20528 *offsetp += 4;
20529 proto_tree_add_item(t, hf_x11_xinput_DeviceKeyPress_event, tvb, *offsetp, 4, byte_order);
20530 *offsetp += 4;
20531 field32(tvb, offsetp, t, hf_x11_xinput_DeviceKeyPress_child, byte_order);
20532 proto_tree_add_item(t, hf_x11_xinput_DeviceKeyPress_root_x, tvb, *offsetp, 2, byte_order);
20533 *offsetp += 2;
20534 proto_tree_add_item(t, hf_x11_xinput_DeviceKeyPress_root_y, tvb, *offsetp, 2, byte_order);
20535 *offsetp += 2;
20536 proto_tree_add_item(t, hf_x11_xinput_DeviceKeyPress_event_x, tvb, *offsetp, 2, byte_order);
20537 *offsetp += 2;
20538 proto_tree_add_item(t, hf_x11_xinput_DeviceKeyPress_event_y, tvb, *offsetp, 2, byte_order);
20539 *offsetp += 2;
20540 {
20541 static int* const state_bits [] = {
20542 &hf_x11_xinput_DeviceKeyPress_state_mask_Shift,
20543 &hf_x11_xinput_DeviceKeyPress_state_mask_Lock,
20544 &hf_x11_xinput_DeviceKeyPress_state_mask_Control,
20545 &hf_x11_xinput_DeviceKeyPress_state_mask_Mod1,
20546 &hf_x11_xinput_DeviceKeyPress_state_mask_Mod2,
20547 &hf_x11_xinput_DeviceKeyPress_state_mask_Mod3,
20548 &hf_x11_xinput_DeviceKeyPress_state_mask_Mod4,
20549 &hf_x11_xinput_DeviceKeyPress_state_mask_Mod5,
20550 &hf_x11_xinput_DeviceKeyPress_state_mask_Button1,
20551 &hf_x11_xinput_DeviceKeyPress_state_mask_Button2,
20552 &hf_x11_xinput_DeviceKeyPress_state_mask_Button3,
20553 &hf_x11_xinput_DeviceKeyPress_state_mask_Button4,
20554 &hf_x11_xinput_DeviceKeyPress_state_mask_Button5,
20555 NULL
20556 };
20557 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xinput_DeviceKeyPress_state, ett_x11_rectangle, state_bits, byte_order);
20558 }
20559 *offsetp += 2;
20560 proto_tree_add_item(t, hf_x11_xinput_DeviceKeyPress_same_screen, tvb, *offsetp, 1, byte_order);
20561 *offsetp += 1;
20562 proto_tree_add_item(t, hf_x11_xinput_DeviceKeyPress_device_id, tvb, *offsetp, 1, byte_order);
20563 *offsetp += 1;
20564}
20565
20566
20567static void xinputDeviceFocusIn(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order)
20568{
20569 field8(tvb, offsetp, t, hf_x11_xinput_DeviceFocusIn_detail, byte_order);
20570 CARD16(event_sequencenumber);
20571 proto_tree_add_item(t, hf_x11_xinput_DeviceFocusIn_time, tvb, *offsetp, 4, byte_order);
20572 *offsetp += 4;
20573 proto_tree_add_item(t, hf_x11_xinput_DeviceFocusIn_window, tvb, *offsetp, 4, byte_order);
20574 *offsetp += 4;
20575 field8(tvb, offsetp, t, hf_x11_xinput_DeviceFocusIn_mode, byte_order);
20576 proto_tree_add_item(t, hf_x11_xinput_DeviceFocusIn_device_id, tvb, *offsetp, 1, byte_order);
20577 *offsetp += 1;
20578 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 18, ENC_NA);
20579 *offsetp += 18;
20580}
20581
20582
20583static void xinputDeviceStateNotify(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order)
20584{
20585 proto_tree_add_item(t, hf_x11_xinput_DeviceStateNotify_device_id, tvb, *offsetp, 1, ENC_NA);
20586 *offsetp += 1;
20587 CARD16(event_sequencenumber);
20588 proto_tree_add_item(t, hf_x11_xinput_DeviceStateNotify_time, tvb, *offsetp, 4, byte_order);
20589 *offsetp += 4;
20590 proto_tree_add_item(t, hf_x11_xinput_DeviceStateNotify_num_keys, tvb, *offsetp, 1, byte_order);
20591 *offsetp += 1;
20592 proto_tree_add_item(t, hf_x11_xinput_DeviceStateNotify_num_buttons, tvb, *offsetp, 1, byte_order);
20593 *offsetp += 1;
20594 proto_tree_add_item(t, hf_x11_xinput_DeviceStateNotify_num_valuators, tvb, *offsetp, 1, byte_order);
20595 *offsetp += 1;
20596 {
20597 static int* const classes_reported_bits [] = {
20598 &hf_x11_xinput_DeviceStateNotify_classes_reported_mask_ReportingKeys,
20599 &hf_x11_xinput_DeviceStateNotify_classes_reported_mask_ReportingButtons,
20600 &hf_x11_xinput_DeviceStateNotify_classes_reported_mask_ReportingValuators,
20601 &hf_x11_xinput_DeviceStateNotify_classes_reported_mask_DeviceModeAbsolute,
20602 &hf_x11_xinput_DeviceStateNotify_classes_reported_mask_OutOfProximity,
20603 NULL
20604 };
20605 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xinput_DeviceStateNotify_classes_reported, ett_x11_rectangle, classes_reported_bits, byte_order);
20606 }
20607 *offsetp += 1;
20608 listOfByte(tvb, offsetp, t, hf_x11_xinput_DeviceStateNotify_buttons, 4, byte_order);
20609 listOfByte(tvb, offsetp, t, hf_x11_xinput_DeviceStateNotify_keys, 4, byte_order);
20610 listOfCard32(tvb, offsetp, t, hf_x11_xinput_DeviceStateNotify_valuators, hf_x11_xinput_DeviceStateNotify_valuators_item, 3, byte_order);
20611}
20612
20613
20614static void xinputDeviceMappingNotify(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order)
20615{
20616 proto_tree_add_item(t, hf_x11_xinput_DeviceMappingNotify_device_id, tvb, *offsetp, 1, ENC_NA);
20617 *offsetp += 1;
20618 CARD16(event_sequencenumber);
20619 field8(tvb, offsetp, t, hf_x11_xinput_DeviceMappingNotify_request, byte_order);
20620 proto_tree_add_item(t, hf_x11_xinput_DeviceMappingNotify_first_keycode, tvb, *offsetp, 1, byte_order);
20621 *offsetp += 1;
20622 proto_tree_add_item(t, hf_x11_xinput_DeviceMappingNotify_count, tvb, *offsetp, 1, byte_order);
20623 *offsetp += 1;
20624 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
20625 *offsetp += 1;
20626 proto_tree_add_item(t, hf_x11_xinput_DeviceMappingNotify_time, tvb, *offsetp, 4, byte_order);
20627 *offsetp += 4;
20628 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 20, ENC_NA);
20629 *offsetp += 20;
20630}
20631
20632
20633static void xinputChangeDeviceNotify(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order)
20634{
20635 proto_tree_add_item(t, hf_x11_xinput_ChangeDeviceNotify_device_id, tvb, *offsetp, 1, ENC_NA);
20636 *offsetp += 1;
20637 CARD16(event_sequencenumber);
20638 proto_tree_add_item(t, hf_x11_xinput_ChangeDeviceNotify_time, tvb, *offsetp, 4, byte_order);
20639 *offsetp += 4;
20640 field8(tvb, offsetp, t, hf_x11_xinput_ChangeDeviceNotify_request, byte_order);
20641 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 23, ENC_NA);
20642 *offsetp += 23;
20643}
20644
20645
20646static void xinputDeviceKeyStateNotify(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order)
20647{
20648 proto_tree_add_item(t, hf_x11_xinput_DeviceKeyStateNotify_device_id, tvb, *offsetp, 1, ENC_NA);
20649 *offsetp += 1;
20650 CARD16(event_sequencenumber);
20651 listOfByte(tvb, offsetp, t, hf_x11_xinput_DeviceKeyStateNotify_keys, 28, byte_order);
20652}
20653
20654
20655static void xinputDeviceButtonStateNotify(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order)
20656{
20657 proto_tree_add_item(t, hf_x11_xinput_DeviceButtonStateNotify_device_id, tvb, *offsetp, 1, ENC_NA);
20658 *offsetp += 1;
20659 CARD16(event_sequencenumber);
20660 listOfByte(tvb, offsetp, t, hf_x11_xinput_DeviceButtonStateNotify_buttons, 28, byte_order);
20661}
20662
20663
20664static void xinputDevicePresenceNotify(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order)
20665{
20666 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
20667 *offsetp += 1;
20668 CARD16(event_sequencenumber);
20669 proto_tree_add_item(t, hf_x11_xinput_DevicePresenceNotify_time, tvb, *offsetp, 4, byte_order);
20670 *offsetp += 4;
20671 field8(tvb, offsetp, t, hf_x11_xinput_DevicePresenceNotify_devchange, byte_order);
20672 proto_tree_add_item(t, hf_x11_xinput_DevicePresenceNotify_device_id, tvb, *offsetp, 1, ENC_NA);
20673 *offsetp += 1;
20674 proto_tree_add_item(t, hf_x11_xinput_DevicePresenceNotify_control, tvb, *offsetp, 2, byte_order);
20675 *offsetp += 2;
20676 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 20, ENC_NA);
20677 *offsetp += 20;
20678}
20679
20680
20681static void xinputDevicePropertyNotify(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order)
20682{
20683 field8(tvb, offsetp, t, hf_x11_xinput_DevicePropertyNotify_state, byte_order);
20684 CARD16(event_sequencenumber);
20685 proto_tree_add_item(t, hf_x11_xinput_DevicePropertyNotify_time, tvb, *offsetp, 4, byte_order);
20686 *offsetp += 4;
20687 proto_tree_add_item(t, hf_x11_xinput_DevicePropertyNotify_property, tvb, *offsetp, 4, byte_order);
20688 *offsetp += 4;
20689 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 19, ENC_NA);
20690 *offsetp += 19;
20691 proto_tree_add_item(t, hf_x11_xinput_DevicePropertyNotify_device_id, tvb, *offsetp, 1, byte_order);
20692 *offsetp += 1;
20693}
20694
20695
20696static void xinputDeviceChanged(tvbuff_t *tvb, int length _U_, int *offsetp, proto_tree *t, unsigned byte_order)
20697{
20698 int f_num_classes;
20699 proto_tree_add_uint_format_value(t, hf_x11_minor_opcode, tvb, *offsetp, 2, 1,
20700 "DeviceChanged (1)");
20701 field16(tvb, offsetp, t, hf_x11_xinput_DeviceChanged_deviceid, byte_order);
20702 field32(tvb, offsetp, t, hf_x11_xinput_DeviceChanged_time, byte_order);
20703 f_num_classes = tvb_get_uint16(tvb, *offsetp, byte_order);
20704 proto_tree_add_item(t, hf_x11_xinput_DeviceChanged_num_classes, tvb, *offsetp, 2, byte_order);
20705 *offsetp += 2;
20706 field16(tvb, offsetp, t, hf_x11_xinput_DeviceChanged_sourceid, byte_order);
20707 field8(tvb, offsetp, t, hf_x11_xinput_DeviceChanged_reason, byte_order);
20708 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 11, ENC_NA);
20709 *offsetp += 11;
20710 struct_xinput_DeviceClass(tvb, offsetp, t, byte_order, f_num_classes);
20711}
20712
20713
20714static void xinputKeyPress(tvbuff_t *tvb, int length _U_, int *offsetp, proto_tree *t, unsigned byte_order)
20715{
20716 int f_buttons_len;
20717 int f_valuators_len;
20718 int sumof_valuator_mask = 0;
20719 proto_tree_add_uint_format_value(t, hf_x11_minor_opcode, tvb, *offsetp, 2, 2,
20720 "KeyPress (2)");
20721 field16(tvb, offsetp, t, hf_x11_xinput_KeyPress_deviceid, byte_order);
20722 field32(tvb, offsetp, t, hf_x11_xinput_KeyPress_time, byte_order);
20723 proto_tree_add_item(t, hf_x11_xinput_KeyPress_detail, tvb, *offsetp, 4, byte_order);
20724 *offsetp += 4;
20725 proto_tree_add_item(t, hf_x11_xinput_KeyPress_root, tvb, *offsetp, 4, byte_order);
20726 *offsetp += 4;
20727 proto_tree_add_item(t, hf_x11_xinput_KeyPress_event, tvb, *offsetp, 4, byte_order);
20728 *offsetp += 4;
20729 proto_tree_add_item(t, hf_x11_xinput_KeyPress_child, tvb, *offsetp, 4, byte_order);
20730 *offsetp += 4;
20731 proto_tree_add_item(t, hf_x11_xinput_KeyPress_root_x, tvb, *offsetp, 4, byte_order);
20732 *offsetp += 4;
20733 proto_tree_add_item(t, hf_x11_xinput_KeyPress_root_y, tvb, *offsetp, 4, byte_order);
20734 *offsetp += 4;
20735 proto_tree_add_item(t, hf_x11_xinput_KeyPress_event_x, tvb, *offsetp, 4, byte_order);
20736 *offsetp += 4;
20737 proto_tree_add_item(t, hf_x11_xinput_KeyPress_event_y, tvb, *offsetp, 4, byte_order);
20738 *offsetp += 4;
20739 f_buttons_len = tvb_get_uint16(tvb, *offsetp, byte_order);
20740 proto_tree_add_item(t, hf_x11_xinput_KeyPress_buttons_len, tvb, *offsetp, 2, byte_order);
20741 *offsetp += 2;
20742 f_valuators_len = tvb_get_uint16(tvb, *offsetp, byte_order);
20743 proto_tree_add_item(t, hf_x11_xinput_KeyPress_valuators_len, tvb, *offsetp, 2, byte_order);
20744 *offsetp += 2;
20745 field16(tvb, offsetp, t, hf_x11_xinput_KeyPress_sourceid, byte_order);
20746 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 2, ENC_NA);
20747 *offsetp += 2;
20748 {
20749 static int* const flags_bits [] = {
20750 &hf_x11_xinput_KeyPress_flags_mask_KeyRepeat,
20751 NULL
20752 };
20753 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xinput_KeyPress_flags, ett_x11_rectangle, flags_bits, byte_order);
20754 }
20755 *offsetp += 4;
20756 struct_xinput_ModifierInfo(tvb, offsetp, t, byte_order, 1);
20757 struct_xinput_GroupInfo(tvb, offsetp, t, byte_order, 1);
20758 listOfCard32(tvb, offsetp, t, hf_x11_xinput_KeyPress_button_mask, hf_x11_xinput_KeyPress_button_mask_item, f_buttons_len, byte_order);
20759 {
20760 int i;
20761 for (i = 0; i < f_valuators_len; i++) {
20762 sumof_valuator_mask += tvb_get_uint32(tvb, *offsetp + i * 4, byte_order);
20763 }
20764 }
20765 listOfCard32(tvb, offsetp, t, hf_x11_xinput_KeyPress_valuator_mask, hf_x11_xinput_KeyPress_valuator_mask_item, f_valuators_len, byte_order);
20766 struct_xinput_FP3232(tvb, offsetp, t, byte_order, sumof_valuator_mask);
20767}
20768
20769
20770static void xinputButtonPress(tvbuff_t *tvb, int length _U_, int *offsetp, proto_tree *t, unsigned byte_order)
20771{
20772 int f_buttons_len;
20773 int f_valuators_len;
20774 int sumof_valuator_mask = 0;
20775 proto_tree_add_uint_format_value(t, hf_x11_minor_opcode, tvb, *offsetp, 2, 4,
20776 "ButtonPress (4)");
20777 field16(tvb, offsetp, t, hf_x11_xinput_ButtonPress_deviceid, byte_order);
20778 field32(tvb, offsetp, t, hf_x11_xinput_ButtonPress_time, byte_order);
20779 proto_tree_add_item(t, hf_x11_xinput_ButtonPress_detail, tvb, *offsetp, 4, byte_order);
20780 *offsetp += 4;
20781 proto_tree_add_item(t, hf_x11_xinput_ButtonPress_root, tvb, *offsetp, 4, byte_order);
20782 *offsetp += 4;
20783 proto_tree_add_item(t, hf_x11_xinput_ButtonPress_event, tvb, *offsetp, 4, byte_order);
20784 *offsetp += 4;
20785 proto_tree_add_item(t, hf_x11_xinput_ButtonPress_child, tvb, *offsetp, 4, byte_order);
20786 *offsetp += 4;
20787 proto_tree_add_item(t, hf_x11_xinput_ButtonPress_root_x, tvb, *offsetp, 4, byte_order);
20788 *offsetp += 4;
20789 proto_tree_add_item(t, hf_x11_xinput_ButtonPress_root_y, tvb, *offsetp, 4, byte_order);
20790 *offsetp += 4;
20791 proto_tree_add_item(t, hf_x11_xinput_ButtonPress_event_x, tvb, *offsetp, 4, byte_order);
20792 *offsetp += 4;
20793 proto_tree_add_item(t, hf_x11_xinput_ButtonPress_event_y, tvb, *offsetp, 4, byte_order);
20794 *offsetp += 4;
20795 f_buttons_len = tvb_get_uint16(tvb, *offsetp, byte_order);
20796 proto_tree_add_item(t, hf_x11_xinput_ButtonPress_buttons_len, tvb, *offsetp, 2, byte_order);
20797 *offsetp += 2;
20798 f_valuators_len = tvb_get_uint16(tvb, *offsetp, byte_order);
20799 proto_tree_add_item(t, hf_x11_xinput_ButtonPress_valuators_len, tvb, *offsetp, 2, byte_order);
20800 *offsetp += 2;
20801 field16(tvb, offsetp, t, hf_x11_xinput_ButtonPress_sourceid, byte_order);
20802 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 2, ENC_NA);
20803 *offsetp += 2;
20804 {
20805 static int* const flags_bits [] = {
20806 &hf_x11_xinput_ButtonPress_flags_mask_PointerEmulated,
20807 NULL
20808 };
20809 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xinput_ButtonPress_flags, ett_x11_rectangle, flags_bits, byte_order);
20810 }
20811 *offsetp += 4;
20812 struct_xinput_ModifierInfo(tvb, offsetp, t, byte_order, 1);
20813 struct_xinput_GroupInfo(tvb, offsetp, t, byte_order, 1);
20814 listOfCard32(tvb, offsetp, t, hf_x11_xinput_ButtonPress_button_mask, hf_x11_xinput_ButtonPress_button_mask_item, f_buttons_len, byte_order);
20815 {
20816 int i;
20817 for (i = 0; i < f_valuators_len; i++) {
20818 sumof_valuator_mask += tvb_get_uint32(tvb, *offsetp + i * 4, byte_order);
20819 }
20820 }
20821 listOfCard32(tvb, offsetp, t, hf_x11_xinput_ButtonPress_valuator_mask, hf_x11_xinput_ButtonPress_valuator_mask_item, f_valuators_len, byte_order);
20822 struct_xinput_FP3232(tvb, offsetp, t, byte_order, sumof_valuator_mask);
20823}
20824
20825
20826static void xinputEnter(tvbuff_t *tvb, int length _U_, int *offsetp, proto_tree *t, unsigned byte_order)
20827{
20828 int f_buttons_len;
20829 proto_tree_add_uint_format_value(t, hf_x11_minor_opcode, tvb, *offsetp, 2, 7,
20830 "Enter (7)");
20831 field16(tvb, offsetp, t, hf_x11_xinput_Enter_deviceid, byte_order);
20832 field32(tvb, offsetp, t, hf_x11_xinput_Enter_time, byte_order);
20833 field16(tvb, offsetp, t, hf_x11_xinput_Enter_sourceid, byte_order);
20834 field8(tvb, offsetp, t, hf_x11_xinput_Enter_mode, byte_order);
20835 field8(tvb, offsetp, t, hf_x11_xinput_Enter_detail, byte_order);
20836 proto_tree_add_item(t, hf_x11_xinput_Enter_root, tvb, *offsetp, 4, byte_order);
20837 *offsetp += 4;
20838 proto_tree_add_item(t, hf_x11_xinput_Enter_event, tvb, *offsetp, 4, byte_order);
20839 *offsetp += 4;
20840 proto_tree_add_item(t, hf_x11_xinput_Enter_child, tvb, *offsetp, 4, byte_order);
20841 *offsetp += 4;
20842 proto_tree_add_item(t, hf_x11_xinput_Enter_root_x, tvb, *offsetp, 4, byte_order);
20843 *offsetp += 4;
20844 proto_tree_add_item(t, hf_x11_xinput_Enter_root_y, tvb, *offsetp, 4, byte_order);
20845 *offsetp += 4;
20846 proto_tree_add_item(t, hf_x11_xinput_Enter_event_x, tvb, *offsetp, 4, byte_order);
20847 *offsetp += 4;
20848 proto_tree_add_item(t, hf_x11_xinput_Enter_event_y, tvb, *offsetp, 4, byte_order);
20849 *offsetp += 4;
20850 proto_tree_add_item(t, hf_x11_xinput_Enter_same_screen, tvb, *offsetp, 1, byte_order);
20851 *offsetp += 1;
20852 proto_tree_add_item(t, hf_x11_xinput_Enter_focus, tvb, *offsetp, 1, byte_order);
20853 *offsetp += 1;
20854 f_buttons_len = tvb_get_uint16(tvb, *offsetp, byte_order);
20855 proto_tree_add_item(t, hf_x11_xinput_Enter_buttons_len, tvb, *offsetp, 2, byte_order);
20856 *offsetp += 2;
20857 struct_xinput_ModifierInfo(tvb, offsetp, t, byte_order, 1);
20858 struct_xinput_GroupInfo(tvb, offsetp, t, byte_order, 1);
20859 listOfCard32(tvb, offsetp, t, hf_x11_xinput_Enter_buttons, hf_x11_xinput_Enter_buttons_item, f_buttons_len, byte_order);
20860}
20861
20862
20863static void struct_xinput_HierarchyInfo(tvbuff_t *tvb, int *offsetp, proto_tree *root, unsigned byte_order _U_, int count)
20864{
20865 int i;
20866 for (i = 0; i < count; i++) {
20867 proto_item *item;
20868 proto_tree *t;
20869
20870 item = proto_tree_add_item(root, hf_x11_struct_xinput_HierarchyInfo, tvb, *offsetp, 12, ENC_NA);
20871 t = proto_item_add_subtree(item, ett_x11_rectangle);
20872 field16(tvb, offsetp, t, hf_x11_struct_xinput_HierarchyInfo_deviceid, byte_order);
20873 field16(tvb, offsetp, t, hf_x11_struct_xinput_HierarchyInfo_attachment, byte_order);
20874 field8(tvb, offsetp, t, hf_x11_struct_xinput_HierarchyInfo_type, byte_order);
20875 proto_tree_add_item(t, hf_x11_struct_xinput_HierarchyInfo_enabled, tvb, *offsetp, 1, byte_order);
20876 *offsetp += 1;
20877 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 2, ENC_NA);
20878 *offsetp += 2;
20879 {
20880 static int* const flags_bits [] = {
20881 &hf_x11_struct_xinput_HierarchyInfo_flags_mask_MasterAdded,
20882 &hf_x11_struct_xinput_HierarchyInfo_flags_mask_MasterRemoved,
20883 &hf_x11_struct_xinput_HierarchyInfo_flags_mask_SlaveAdded,
20884 &hf_x11_struct_xinput_HierarchyInfo_flags_mask_SlaveRemoved,
20885 &hf_x11_struct_xinput_HierarchyInfo_flags_mask_SlaveAttached,
20886 &hf_x11_struct_xinput_HierarchyInfo_flags_mask_SlaveDetached,
20887 &hf_x11_struct_xinput_HierarchyInfo_flags_mask_DeviceEnabled,
20888 &hf_x11_struct_xinput_HierarchyInfo_flags_mask_DeviceDisabled,
20889 NULL
20890 };
20891 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_struct_xinput_HierarchyInfo_flags, ett_x11_rectangle, flags_bits, byte_order);
20892 }
20893 *offsetp += 4;
20894 }
20895}
20896
20897static void xinputHierarchy(tvbuff_t *tvb, int length _U_, int *offsetp, proto_tree *t, unsigned byte_order)
20898{
20899 int f_num_infos;
20900 proto_tree_add_uint_format_value(t, hf_x11_minor_opcode, tvb, *offsetp, 2, 11,
20901 "Hierarchy (11)");
20902 field16(tvb, offsetp, t, hf_x11_xinput_Hierarchy_deviceid, byte_order);
20903 field32(tvb, offsetp, t, hf_x11_xinput_Hierarchy_time, byte_order);
20904 {
20905 static int* const flags_bits [] = {
20906 &hf_x11_xinput_Hierarchy_flags_mask_MasterAdded,
20907 &hf_x11_xinput_Hierarchy_flags_mask_MasterRemoved,
20908 &hf_x11_xinput_Hierarchy_flags_mask_SlaveAdded,
20909 &hf_x11_xinput_Hierarchy_flags_mask_SlaveRemoved,
20910 &hf_x11_xinput_Hierarchy_flags_mask_SlaveAttached,
20911 &hf_x11_xinput_Hierarchy_flags_mask_SlaveDetached,
20912 &hf_x11_xinput_Hierarchy_flags_mask_DeviceEnabled,
20913 &hf_x11_xinput_Hierarchy_flags_mask_DeviceDisabled,
20914 NULL
20915 };
20916 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xinput_Hierarchy_flags, ett_x11_rectangle, flags_bits, byte_order);
20917 }
20918 *offsetp += 4;
20919 f_num_infos = tvb_get_uint16(tvb, *offsetp, byte_order);
20920 proto_tree_add_item(t, hf_x11_xinput_Hierarchy_num_infos, tvb, *offsetp, 2, byte_order);
20921 *offsetp += 2;
20922 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 10, ENC_NA);
20923 *offsetp += 10;
20924 struct_xinput_HierarchyInfo(tvb, offsetp, t, byte_order, f_num_infos);
20925}
20926
20927
20928static void xinputProperty(tvbuff_t *tvb, int length _U_, int *offsetp, proto_tree *t, unsigned byte_order)
20929{
20930 proto_tree_add_uint_format_value(t, hf_x11_minor_opcode, tvb, *offsetp, 2, 12,
20931 "Property (12)");
20932 field16(tvb, offsetp, t, hf_x11_xinput_Property_deviceid, byte_order);
20933 field32(tvb, offsetp, t, hf_x11_xinput_Property_time, byte_order);
20934 proto_tree_add_item(t, hf_x11_xinput_Property_property, tvb, *offsetp, 4, byte_order);
20935 *offsetp += 4;
20936 field8(tvb, offsetp, t, hf_x11_xinput_Property_what, byte_order);
20937 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 11, ENC_NA);
20938 *offsetp += 11;
20939}
20940
20941
20942static void xinputRawKeyPress(tvbuff_t *tvb, int length _U_, int *offsetp, proto_tree *t, unsigned byte_order)
20943{
20944 int f_valuators_len;
20945 int sumof_valuator_mask = 0;
20946 proto_tree_add_uint_format_value(t, hf_x11_minor_opcode, tvb, *offsetp, 2, 13,
20947 "RawKeyPress (13)");
20948 field16(tvb, offsetp, t, hf_x11_xinput_RawKeyPress_deviceid, byte_order);
20949 field32(tvb, offsetp, t, hf_x11_xinput_RawKeyPress_time, byte_order);
20950 proto_tree_add_item(t, hf_x11_xinput_RawKeyPress_detail, tvb, *offsetp, 4, byte_order);
20951 *offsetp += 4;
20952 proto_tree_add_item(t, hf_x11_xinput_RawKeyPress_sourceid, tvb, *offsetp, 2, byte_order);
20953 *offsetp += 2;
20954 f_valuators_len = tvb_get_uint16(tvb, *offsetp, byte_order);
20955 proto_tree_add_item(t, hf_x11_xinput_RawKeyPress_valuators_len, tvb, *offsetp, 2, byte_order);
20956 *offsetp += 2;
20957 {
20958 static int* const flags_bits [] = {
20959 &hf_x11_xinput_RawKeyPress_flags_mask_KeyRepeat,
20960 NULL
20961 };
20962 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xinput_RawKeyPress_flags, ett_x11_rectangle, flags_bits, byte_order);
20963 }
20964 *offsetp += 4;
20965 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 4, ENC_NA);
20966 *offsetp += 4;
20967 {
20968 int i;
20969 for (i = 0; i < f_valuators_len; i++) {
20970 sumof_valuator_mask += tvb_get_uint32(tvb, *offsetp + i * 4, byte_order);
20971 }
20972 }
20973 listOfCard32(tvb, offsetp, t, hf_x11_xinput_RawKeyPress_valuator_mask, hf_x11_xinput_RawKeyPress_valuator_mask_item, f_valuators_len, byte_order);
20974 struct_xinput_FP3232(tvb, offsetp, t, byte_order, sumof_valuator_mask);
20975 struct_xinput_FP3232(tvb, offsetp, t, byte_order, sumof_valuator_mask);
20976}
20977
20978
20979static void xinputRawButtonPress(tvbuff_t *tvb, int length _U_, int *offsetp, proto_tree *t, unsigned byte_order)
20980{
20981 int f_valuators_len;
20982 int sumof_valuator_mask = 0;
20983 proto_tree_add_uint_format_value(t, hf_x11_minor_opcode, tvb, *offsetp, 2, 15,
20984 "RawButtonPress (15)");
20985 field16(tvb, offsetp, t, hf_x11_xinput_RawButtonPress_deviceid, byte_order);
20986 field32(tvb, offsetp, t, hf_x11_xinput_RawButtonPress_time, byte_order);
20987 proto_tree_add_item(t, hf_x11_xinput_RawButtonPress_detail, tvb, *offsetp, 4, byte_order);
20988 *offsetp += 4;
20989 proto_tree_add_item(t, hf_x11_xinput_RawButtonPress_sourceid, tvb, *offsetp, 2, byte_order);
20990 *offsetp += 2;
20991 f_valuators_len = tvb_get_uint16(tvb, *offsetp, byte_order);
20992 proto_tree_add_item(t, hf_x11_xinput_RawButtonPress_valuators_len, tvb, *offsetp, 2, byte_order);
20993 *offsetp += 2;
20994 {
20995 static int* const flags_bits [] = {
20996 &hf_x11_xinput_RawButtonPress_flags_mask_PointerEmulated,
20997 NULL
20998 };
20999 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xinput_RawButtonPress_flags, ett_x11_rectangle, flags_bits, byte_order);
21000 }
21001 *offsetp += 4;
21002 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 4, ENC_NA);
21003 *offsetp += 4;
21004 {
21005 int i;
21006 for (i = 0; i < f_valuators_len; i++) {
21007 sumof_valuator_mask += tvb_get_uint32(tvb, *offsetp + i * 4, byte_order);
21008 }
21009 }
21010 listOfCard32(tvb, offsetp, t, hf_x11_xinput_RawButtonPress_valuator_mask, hf_x11_xinput_RawButtonPress_valuator_mask_item, f_valuators_len, byte_order);
21011 struct_xinput_FP3232(tvb, offsetp, t, byte_order, sumof_valuator_mask);
21012 struct_xinput_FP3232(tvb, offsetp, t, byte_order, sumof_valuator_mask);
21013}
21014
21015
21016static void xinputTouchBegin(tvbuff_t *tvb, int length _U_, int *offsetp, proto_tree *t, unsigned byte_order)
21017{
21018 int f_buttons_len;
21019 int f_valuators_len;
21020 int sumof_valuator_mask = 0;
21021 proto_tree_add_uint_format_value(t, hf_x11_minor_opcode, tvb, *offsetp, 2, 18,
21022 "TouchBegin (18)");
21023 field16(tvb, offsetp, t, hf_x11_xinput_TouchBegin_deviceid, byte_order);
21024 field32(tvb, offsetp, t, hf_x11_xinput_TouchBegin_time, byte_order);
21025 proto_tree_add_item(t, hf_x11_xinput_TouchBegin_detail, tvb, *offsetp, 4, byte_order);
21026 *offsetp += 4;
21027 proto_tree_add_item(t, hf_x11_xinput_TouchBegin_root, tvb, *offsetp, 4, byte_order);
21028 *offsetp += 4;
21029 proto_tree_add_item(t, hf_x11_xinput_TouchBegin_event, tvb, *offsetp, 4, byte_order);
21030 *offsetp += 4;
21031 proto_tree_add_item(t, hf_x11_xinput_TouchBegin_child, tvb, *offsetp, 4, byte_order);
21032 *offsetp += 4;
21033 proto_tree_add_item(t, hf_x11_xinput_TouchBegin_root_x, tvb, *offsetp, 4, byte_order);
21034 *offsetp += 4;
21035 proto_tree_add_item(t, hf_x11_xinput_TouchBegin_root_y, tvb, *offsetp, 4, byte_order);
21036 *offsetp += 4;
21037 proto_tree_add_item(t, hf_x11_xinput_TouchBegin_event_x, tvb, *offsetp, 4, byte_order);
21038 *offsetp += 4;
21039 proto_tree_add_item(t, hf_x11_xinput_TouchBegin_event_y, tvb, *offsetp, 4, byte_order);
21040 *offsetp += 4;
21041 f_buttons_len = tvb_get_uint16(tvb, *offsetp, byte_order);
21042 proto_tree_add_item(t, hf_x11_xinput_TouchBegin_buttons_len, tvb, *offsetp, 2, byte_order);
21043 *offsetp += 2;
21044 f_valuators_len = tvb_get_uint16(tvb, *offsetp, byte_order);
21045 proto_tree_add_item(t, hf_x11_xinput_TouchBegin_valuators_len, tvb, *offsetp, 2, byte_order);
21046 *offsetp += 2;
21047 field16(tvb, offsetp, t, hf_x11_xinput_TouchBegin_sourceid, byte_order);
21048 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 2, ENC_NA);
21049 *offsetp += 2;
21050 {
21051 static int* const flags_bits [] = {
21052 &hf_x11_xinput_TouchBegin_flags_mask_TouchPendingEnd,
21053 &hf_x11_xinput_TouchBegin_flags_mask_TouchEmulatingPointer,
21054 NULL
21055 };
21056 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xinput_TouchBegin_flags, ett_x11_rectangle, flags_bits, byte_order);
21057 }
21058 *offsetp += 4;
21059 struct_xinput_ModifierInfo(tvb, offsetp, t, byte_order, 1);
21060 struct_xinput_GroupInfo(tvb, offsetp, t, byte_order, 1);
21061 listOfCard32(tvb, offsetp, t, hf_x11_xinput_TouchBegin_button_mask, hf_x11_xinput_TouchBegin_button_mask_item, f_buttons_len, byte_order);
21062 {
21063 int i;
21064 for (i = 0; i < f_valuators_len; i++) {
21065 sumof_valuator_mask += tvb_get_uint32(tvb, *offsetp + i * 4, byte_order);
21066 }
21067 }
21068 listOfCard32(tvb, offsetp, t, hf_x11_xinput_TouchBegin_valuator_mask, hf_x11_xinput_TouchBegin_valuator_mask_item, f_valuators_len, byte_order);
21069 struct_xinput_FP3232(tvb, offsetp, t, byte_order, sumof_valuator_mask);
21070}
21071
21072
21073static void xinputTouchOwnership(tvbuff_t *tvb, int length _U_, int *offsetp, proto_tree *t, unsigned byte_order)
21074{
21075 proto_tree_add_uint_format_value(t, hf_x11_minor_opcode, tvb, *offsetp, 2, 21,
21076 "TouchOwnership (21)");
21077 field16(tvb, offsetp, t, hf_x11_xinput_TouchOwnership_deviceid, byte_order);
21078 field32(tvb, offsetp, t, hf_x11_xinput_TouchOwnership_time, byte_order);
21079 proto_tree_add_item(t, hf_x11_xinput_TouchOwnership_touchid, tvb, *offsetp, 4, byte_order);
21080 *offsetp += 4;
21081 proto_tree_add_item(t, hf_x11_xinput_TouchOwnership_root, tvb, *offsetp, 4, byte_order);
21082 *offsetp += 4;
21083 proto_tree_add_item(t, hf_x11_xinput_TouchOwnership_event, tvb, *offsetp, 4, byte_order);
21084 *offsetp += 4;
21085 proto_tree_add_item(t, hf_x11_xinput_TouchOwnership_child, tvb, *offsetp, 4, byte_order);
21086 *offsetp += 4;
21087 field16(tvb, offsetp, t, hf_x11_xinput_TouchOwnership_sourceid, byte_order);
21088 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 2, ENC_NA);
21089 *offsetp += 2;
21090 field32(tvb, offsetp, t, hf_x11_xinput_TouchOwnership_flags, byte_order);
21091 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 8, ENC_NA);
21092 *offsetp += 8;
21093}
21094
21095
21096static void xinputRawTouchBegin(tvbuff_t *tvb, int length _U_, int *offsetp, proto_tree *t, unsigned byte_order)
21097{
21098 int f_valuators_len;
21099 int sumof_valuator_mask = 0;
21100 proto_tree_add_uint_format_value(t, hf_x11_minor_opcode, tvb, *offsetp, 2, 22,
21101 "RawTouchBegin (22)");
21102 field16(tvb, offsetp, t, hf_x11_xinput_RawTouchBegin_deviceid, byte_order);
21103 field32(tvb, offsetp, t, hf_x11_xinput_RawTouchBegin_time, byte_order);
21104 proto_tree_add_item(t, hf_x11_xinput_RawTouchBegin_detail, tvb, *offsetp, 4, byte_order);
21105 *offsetp += 4;
21106 proto_tree_add_item(t, hf_x11_xinput_RawTouchBegin_sourceid, tvb, *offsetp, 2, byte_order);
21107 *offsetp += 2;
21108 f_valuators_len = tvb_get_uint16(tvb, *offsetp, byte_order);
21109 proto_tree_add_item(t, hf_x11_xinput_RawTouchBegin_valuators_len, tvb, *offsetp, 2, byte_order);
21110 *offsetp += 2;
21111 {
21112 static int* const flags_bits [] = {
21113 &hf_x11_xinput_RawTouchBegin_flags_mask_TouchPendingEnd,
21114 &hf_x11_xinput_RawTouchBegin_flags_mask_TouchEmulatingPointer,
21115 NULL
21116 };
21117 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xinput_RawTouchBegin_flags, ett_x11_rectangle, flags_bits, byte_order);
21118 }
21119 *offsetp += 4;
21120 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 4, ENC_NA);
21121 *offsetp += 4;
21122 {
21123 int i;
21124 for (i = 0; i < f_valuators_len; i++) {
21125 sumof_valuator_mask += tvb_get_uint32(tvb, *offsetp + i * 4, byte_order);
21126 }
21127 }
21128 listOfCard32(tvb, offsetp, t, hf_x11_xinput_RawTouchBegin_valuator_mask, hf_x11_xinput_RawTouchBegin_valuator_mask_item, f_valuators_len, byte_order);
21129 struct_xinput_FP3232(tvb, offsetp, t, byte_order, sumof_valuator_mask);
21130 struct_xinput_FP3232(tvb, offsetp, t, byte_order, sumof_valuator_mask);
21131}
21132
21133
21134static void xinputBarrierHit(tvbuff_t *tvb, int length _U_, int *offsetp, proto_tree *t, unsigned byte_order)
21135{
21136 proto_tree_add_uint_format_value(t, hf_x11_minor_opcode, tvb, *offsetp, 2, 25,
21137 "BarrierHit (25)");
21138 field16(tvb, offsetp, t, hf_x11_xinput_BarrierHit_deviceid, byte_order);
21139 field32(tvb, offsetp, t, hf_x11_xinput_BarrierHit_time, byte_order);
21140 proto_tree_add_item(t, hf_x11_xinput_BarrierHit_eventid, tvb, *offsetp, 4, byte_order);
21141 *offsetp += 4;
21142 proto_tree_add_item(t, hf_x11_xinput_BarrierHit_root, tvb, *offsetp, 4, byte_order);
21143 *offsetp += 4;
21144 proto_tree_add_item(t, hf_x11_xinput_BarrierHit_event, tvb, *offsetp, 4, byte_order);
21145 *offsetp += 4;
21146 proto_tree_add_item(t, hf_x11_xinput_BarrierHit_barrier, tvb, *offsetp, 4, byte_order);
21147 *offsetp += 4;
21148 proto_tree_add_item(t, hf_x11_xinput_BarrierHit_dtime, tvb, *offsetp, 4, byte_order);
21149 *offsetp += 4;
21150 {
21151 static int* const flags_bits [] = {
21152 &hf_x11_xinput_BarrierHit_flags_mask_PointerReleased,
21153 &hf_x11_xinput_BarrierHit_flags_mask_DeviceIsGrabbed,
21154 NULL
21155 };
21156 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xinput_BarrierHit_flags, ett_x11_rectangle, flags_bits, byte_order);
21157 }
21158 *offsetp += 4;
21159 field16(tvb, offsetp, t, hf_x11_xinput_BarrierHit_sourceid, byte_order);
21160 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 2, ENC_NA);
21161 *offsetp += 2;
21162 proto_tree_add_item(t, hf_x11_xinput_BarrierHit_root_x, tvb, *offsetp, 4, byte_order);
21163 *offsetp += 4;
21164 proto_tree_add_item(t, hf_x11_xinput_BarrierHit_root_y, tvb, *offsetp, 4, byte_order);
21165 *offsetp += 4;
21166 struct_xinput_FP3232(tvb, offsetp, t, byte_order, 1);
21167 struct_xinput_FP3232(tvb, offsetp, t, byte_order, 1);
21168}
21169
21170
21171static void xinputGesturePinchBegin(tvbuff_t *tvb, int length _U_, int *offsetp, proto_tree *t, unsigned byte_order)
21172{
21173 proto_tree_add_uint_format_value(t, hf_x11_minor_opcode, tvb, *offsetp, 2, 27,
21174 "GesturePinchBegin (27)");
21175 field16(tvb, offsetp, t, hf_x11_xinput_GesturePinchBegin_deviceid, byte_order);
21176 field32(tvb, offsetp, t, hf_x11_xinput_GesturePinchBegin_time, byte_order);
21177 proto_tree_add_item(t, hf_x11_xinput_GesturePinchBegin_detail, tvb, *offsetp, 4, byte_order);
21178 *offsetp += 4;
21179 proto_tree_add_item(t, hf_x11_xinput_GesturePinchBegin_root, tvb, *offsetp, 4, byte_order);
21180 *offsetp += 4;
21181 proto_tree_add_item(t, hf_x11_xinput_GesturePinchBegin_event, tvb, *offsetp, 4, byte_order);
21182 *offsetp += 4;
21183 proto_tree_add_item(t, hf_x11_xinput_GesturePinchBegin_child, tvb, *offsetp, 4, byte_order);
21184 *offsetp += 4;
21185 proto_tree_add_item(t, hf_x11_xinput_GesturePinchBegin_root_x, tvb, *offsetp, 4, byte_order);
21186 *offsetp += 4;
21187 proto_tree_add_item(t, hf_x11_xinput_GesturePinchBegin_root_y, tvb, *offsetp, 4, byte_order);
21188 *offsetp += 4;
21189 proto_tree_add_item(t, hf_x11_xinput_GesturePinchBegin_event_x, tvb, *offsetp, 4, byte_order);
21190 *offsetp += 4;
21191 proto_tree_add_item(t, hf_x11_xinput_GesturePinchBegin_event_y, tvb, *offsetp, 4, byte_order);
21192 *offsetp += 4;
21193 proto_tree_add_item(t, hf_x11_xinput_GesturePinchBegin_delta_x, tvb, *offsetp, 4, byte_order);
21194 *offsetp += 4;
21195 proto_tree_add_item(t, hf_x11_xinput_GesturePinchBegin_delta_y, tvb, *offsetp, 4, byte_order);
21196 *offsetp += 4;
21197 proto_tree_add_item(t, hf_x11_xinput_GesturePinchBegin_delta_unaccel_x, tvb, *offsetp, 4, byte_order);
21198 *offsetp += 4;
21199 proto_tree_add_item(t, hf_x11_xinput_GesturePinchBegin_delta_unaccel_y, tvb, *offsetp, 4, byte_order);
21200 *offsetp += 4;
21201 proto_tree_add_item(t, hf_x11_xinput_GesturePinchBegin_scale, tvb, *offsetp, 4, byte_order);
21202 *offsetp += 4;
21203 proto_tree_add_item(t, hf_x11_xinput_GesturePinchBegin_delta_angle, tvb, *offsetp, 4, byte_order);
21204 *offsetp += 4;
21205 field16(tvb, offsetp, t, hf_x11_xinput_GesturePinchBegin_sourceid, byte_order);
21206 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 2, ENC_NA);
21207 *offsetp += 2;
21208 struct_xinput_ModifierInfo(tvb, offsetp, t, byte_order, 1);
21209 struct_xinput_GroupInfo(tvb, offsetp, t, byte_order, 1);
21210 {
21211 static int* const flags_bits [] = {
21212 &hf_x11_xinput_GesturePinchBegin_flags_mask_GesturePinchCancelled,
21213 NULL
21214 };
21215 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xinput_GesturePinchBegin_flags, ett_x11_rectangle, flags_bits, byte_order);
21216 }
21217 *offsetp += 4;
21218}
21219
21220
21221static void xinputGestureSwipeBegin(tvbuff_t *tvb, int length _U_, int *offsetp, proto_tree *t, unsigned byte_order)
21222{
21223 proto_tree_add_uint_format_value(t, hf_x11_minor_opcode, tvb, *offsetp, 2, 30,
21224 "GestureSwipeBegin (30)");
21225 field16(tvb, offsetp, t, hf_x11_xinput_GestureSwipeBegin_deviceid, byte_order);
21226 field32(tvb, offsetp, t, hf_x11_xinput_GestureSwipeBegin_time, byte_order);
21227 proto_tree_add_item(t, hf_x11_xinput_GestureSwipeBegin_detail, tvb, *offsetp, 4, byte_order);
21228 *offsetp += 4;
21229 proto_tree_add_item(t, hf_x11_xinput_GestureSwipeBegin_root, tvb, *offsetp, 4, byte_order);
21230 *offsetp += 4;
21231 proto_tree_add_item(t, hf_x11_xinput_GestureSwipeBegin_event, tvb, *offsetp, 4, byte_order);
21232 *offsetp += 4;
21233 proto_tree_add_item(t, hf_x11_xinput_GestureSwipeBegin_child, tvb, *offsetp, 4, byte_order);
21234 *offsetp += 4;
21235 proto_tree_add_item(t, hf_x11_xinput_GestureSwipeBegin_root_x, tvb, *offsetp, 4, byte_order);
21236 *offsetp += 4;
21237 proto_tree_add_item(t, hf_x11_xinput_GestureSwipeBegin_root_y, tvb, *offsetp, 4, byte_order);
21238 *offsetp += 4;
21239 proto_tree_add_item(t, hf_x11_xinput_GestureSwipeBegin_event_x, tvb, *offsetp, 4, byte_order);
21240 *offsetp += 4;
21241 proto_tree_add_item(t, hf_x11_xinput_GestureSwipeBegin_event_y, tvb, *offsetp, 4, byte_order);
21242 *offsetp += 4;
21243 proto_tree_add_item(t, hf_x11_xinput_GestureSwipeBegin_delta_x, tvb, *offsetp, 4, byte_order);
21244 *offsetp += 4;
21245 proto_tree_add_item(t, hf_x11_xinput_GestureSwipeBegin_delta_y, tvb, *offsetp, 4, byte_order);
21246 *offsetp += 4;
21247 proto_tree_add_item(t, hf_x11_xinput_GestureSwipeBegin_delta_unaccel_x, tvb, *offsetp, 4, byte_order);
21248 *offsetp += 4;
21249 proto_tree_add_item(t, hf_x11_xinput_GestureSwipeBegin_delta_unaccel_y, tvb, *offsetp, 4, byte_order);
21250 *offsetp += 4;
21251 field16(tvb, offsetp, t, hf_x11_xinput_GestureSwipeBegin_sourceid, byte_order);
21252 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 2, ENC_NA);
21253 *offsetp += 2;
21254 struct_xinput_ModifierInfo(tvb, offsetp, t, byte_order, 1);
21255 struct_xinput_GroupInfo(tvb, offsetp, t, byte_order, 1);
21256 {
21257 static int* const flags_bits [] = {
21258 &hf_x11_xinput_GestureSwipeBegin_flags_mask_GestureSwipeCancelled,
21259 NULL
21260 };
21261 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xinput_GestureSwipeBegin_flags, ett_x11_rectangle, flags_bits, byte_order);
21262 }
21263 *offsetp += 4;
21264}
21265
21266
21267static void xinputSendExtensionEvent(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
21268{
21269 int f_num_classes;
21270 int f_num_events;
21271 proto_tree_add_item(t, hf_x11_xinput_SendExtensionEvent_destination, tvb, *offsetp, 4, byte_order);
21272 *offsetp += 4;
21273 proto_tree_add_item(t, hf_x11_xinput_SendExtensionEvent_device_id, tvb, *offsetp, 1, byte_order);
21274 *offsetp += 1;
21275 proto_tree_add_item(t, hf_x11_xinput_SendExtensionEvent_propagate, tvb, *offsetp, 1, byte_order);
21276 *offsetp += 1;
21277 f_num_classes = tvb_get_uint16(tvb, *offsetp, byte_order);
21278 proto_tree_add_item(t, hf_x11_xinput_SendExtensionEvent_num_classes, tvb, *offsetp, 2, byte_order);
21279 *offsetp += 2;
21280 f_num_events = tvb_get_uint8(tvb, *offsetp);
21281 proto_tree_add_item(t, hf_x11_xinput_SendExtensionEvent_num_events, tvb, *offsetp, 1, byte_order);
21282 *offsetp += 1;
21283 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 3, ENC_NA);
21284 *offsetp += 3;
21285 length -= f_num_events * 1;
21286 listOfCard32(tvb, offsetp, t, hf_x11_xinput_SendExtensionEvent_classes, hf_x11_xinput_SendExtensionEvent_classes_item, f_num_classes, byte_order);
21287 length -= f_num_classes * 4;
21288}
21289static const value_string xinput_extension_minor[] = {
21290 { 1, "GetExtensionVersion" },
21291 { 2, "ListInputDevices" },
21292 { 3, "OpenDevice" },
21293 { 4, "CloseDevice" },
21294 { 5, "SetDeviceMode" },
21295 { 6, "SelectExtensionEvent" },
21296 { 7, "GetSelectedExtensionEvents" },
21297 { 8, "ChangeDeviceDontPropagateList" },
21298 { 9, "GetDeviceDontPropagateList" },
21299 { 10, "GetDeviceMotionEvents" },
21300 { 11, "ChangeKeyboardDevice" },
21301 { 12, "ChangePointerDevice" },
21302 { 13, "GrabDevice" },
21303 { 14, "UngrabDevice" },
21304 { 15, "GrabDeviceKey" },
21305 { 16, "UngrabDeviceKey" },
21306 { 17, "GrabDeviceButton" },
21307 { 18, "UngrabDeviceButton" },
21308 { 19, "AllowDeviceEvents" },
21309 { 20, "GetDeviceFocus" },
21310 { 21, "SetDeviceFocus" },
21311 { 22, "GetFeedbackControl" },
21312 { 23, "ChangeFeedbackControl" },
21313 { 24, "GetDeviceKeyMapping" },
21314 { 25, "ChangeDeviceKeyMapping" },
21315 { 26, "GetDeviceModifierMapping" },
21316 { 27, "SetDeviceModifierMapping" },
21317 { 28, "GetDeviceButtonMapping" },
21318 { 29, "SetDeviceButtonMapping" },
21319 { 30, "QueryDeviceState" },
21320 { 31, "SendExtensionEvent" },
21321 { 32, "DeviceBell" },
21322 { 33, "SetDeviceValuators" },
21323 { 34, "GetDeviceControl" },
21324 { 35, "ChangeDeviceControl" },
21325 { 36, "ListDeviceProperties" },
21326 { 37, "ChangeDeviceProperty" },
21327 { 38, "DeleteDeviceProperty" },
21328 { 39, "GetDeviceProperty" },
21329 { 40, "XIQueryPointer" },
21330 { 41, "XIWarpPointer" },
21331 { 42, "XIChangeCursor" },
21332 { 43, "XIChangeHierarchy" },
21333 { 44, "XISetClientPointer" },
21334 { 45, "XIGetClientPointer" },
21335 { 46, "XISelectEvents" },
21336 { 47, "XIQueryVersion" },
21337 { 48, "XIQueryDevice" },
21338 { 49, "XISetFocus" },
21339 { 50, "XIGetFocus" },
21340 { 51, "XIGrabDevice" },
21341 { 52, "XIUngrabDevice" },
21342 { 53, "XIAllowEvents" },
21343 { 54, "XIPassiveGrabDevice" },
21344 { 55, "XIPassiveUngrabDevice" },
21345 { 56, "XIListProperties" },
21346 { 57, "XIChangeProperty" },
21347 { 58, "XIDeleteProperty" },
21348 { 59, "XIGetProperty" },
21349 { 60, "XIGetSelectedEvents" },
21350 { 61, "XIBarrierReleasePointer" },
21351 { 0, NULL }
21352};
21353static const x11_event_info xinput_events[] = {
21354 { "xinput-DeviceKeyPress", xinputDeviceKeyPress },
21355 { "xinput-DeviceFocusIn", xinputDeviceFocusIn },
21356 { "xinput-DeviceStateNotify", xinputDeviceStateNotify },
21357 { "xinput-DeviceMappingNotify", xinputDeviceMappingNotify },
21358 { "xinput-ChangeDeviceNotify", xinputChangeDeviceNotify },
21359 { "xinput-DeviceKeyStateNotify", xinputDeviceKeyStateNotify },
21360 { "xinput-DeviceButtonStateNotify", xinputDeviceButtonStateNotify },
21361 { "xinput-DevicePresenceNotify", xinputDevicePresenceNotify },
21362 { "xinput-DevicePropertyNotify", xinputDevicePropertyNotify },
21363 { NULL, NULL }
21364};
21365static const x11_generic_event_info xinput_generic_events[] = {
21366 { 1, xinputDeviceChanged },
21367 { 2, xinputKeyPress },
21368 { 4, xinputButtonPress },
21369 { 7, xinputEnter },
21370 { 11, xinputHierarchy },
21371 { 12, xinputProperty },
21372 { 13, xinputRawKeyPress },
21373 { 15, xinputRawButtonPress },
21374 { 18, xinputTouchBegin },
21375 { 21, xinputTouchOwnership },
21376 { 22, xinputRawTouchBegin },
21377 { 25, xinputBarrierHit },
21378 { 27, xinputGesturePinchBegin },
21379 { 30, xinputGestureSwipeBegin },
21380 { 0, NULL },
21381};
21382
21383static const x11_reply_info xinput_replies[] = {
21384 { 1, xinputGetExtensionVersion_Reply },
21385 { 2, xinputListInputDevices_Reply },
21386 { 3, xinputOpenDevice_Reply },
21387 { 5, xinputSetDeviceMode_Reply },
21388 { 7, xinputGetSelectedExtensionEvents_Reply },
21389 { 9, xinputGetDeviceDontPropagateList_Reply },
21390 { 10, xinputGetDeviceMotionEvents_Reply },
21391 { 11, xinputChangeKeyboardDevice_Reply },
21392 { 12, xinputChangePointerDevice_Reply },
21393 { 13, xinputGrabDevice_Reply },
21394 { 20, xinputGetDeviceFocus_Reply },
21395 { 22, xinputGetFeedbackControl_Reply },
21396 { 24, xinputGetDeviceKeyMapping_Reply },
21397 { 26, xinputGetDeviceModifierMapping_Reply },
21398 { 27, xinputSetDeviceModifierMapping_Reply },
21399 { 28, xinputGetDeviceButtonMapping_Reply },
21400 { 29, xinputSetDeviceButtonMapping_Reply },
21401 { 30, xinputQueryDeviceState_Reply },
21402 { 33, xinputSetDeviceValuators_Reply },
21403 { 34, xinputGetDeviceControl_Reply },
21404 { 35, xinputChangeDeviceControl_Reply },
21405 { 36, xinputListDeviceProperties_Reply },
21406 { 39, xinputGetDeviceProperty_Reply },
21407 { 40, xinputXIQueryPointer_Reply },
21408 { 45, xinputXIGetClientPointer_Reply },
21409 { 47, xinputXIQueryVersion_Reply },
21410 { 48, xinputXIQueryDevice_Reply },
21411 { 50, xinputXIGetFocus_Reply },
21412 { 51, xinputXIGrabDevice_Reply },
21413 { 54, xinputXIPassiveGrabDevice_Reply },
21414 { 56, xinputXIListProperties_Reply },
21415 { 59, xinputXIGetProperty_Reply },
21416 { 60, xinputXIGetSelectedEvents_Reply },
21417 { 0, NULL }
21418};
21419
21420static void dispatch_xinput(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
21421{
21422 int minor, length;
21423 minor = CARD8(xinput_extension_minor);
21424 length = REQUEST_LENGTH();
21425
21426 col_append_fstr(pinfo->cinfo, COL_INFO, "-%s",
21427 val_to_str(minor, xinput_extension_minor,
21428 "<Unknown opcode %d>"));
21429 switch (minor) {
21430 case 1:
21431 xinputGetExtensionVersion(tvb, pinfo, offsetp, t, byte_order, length);
21432 break;
21433 case 2:
21434 xinputListInputDevices(tvb, pinfo, offsetp, t, byte_order, length);
21435 break;
21436 case 3:
21437 xinputOpenDevice(tvb, pinfo, offsetp, t, byte_order, length);
21438 break;
21439 case 4:
21440 xinputCloseDevice(tvb, pinfo, offsetp, t, byte_order, length);
21441 break;
21442 case 5:
21443 xinputSetDeviceMode(tvb, pinfo, offsetp, t, byte_order, length);
21444 break;
21445 case 6:
21446 xinputSelectExtensionEvent(tvb, pinfo, offsetp, t, byte_order, length);
21447 break;
21448 case 7:
21449 xinputGetSelectedExtensionEvents(tvb, pinfo, offsetp, t, byte_order, length);
21450 break;
21451 case 8:
21452 xinputChangeDeviceDontPropagateList(tvb, pinfo, offsetp, t, byte_order, length);
21453 break;
21454 case 9:
21455 xinputGetDeviceDontPropagateList(tvb, pinfo, offsetp, t, byte_order, length);
21456 break;
21457 case 10:
21458 xinputGetDeviceMotionEvents(tvb, pinfo, offsetp, t, byte_order, length);
21459 break;
21460 case 11:
21461 xinputChangeKeyboardDevice(tvb, pinfo, offsetp, t, byte_order, length);
21462 break;
21463 case 12:
21464 xinputChangePointerDevice(tvb, pinfo, offsetp, t, byte_order, length);
21465 break;
21466 case 13:
21467 xinputGrabDevice(tvb, pinfo, offsetp, t, byte_order, length);
21468 break;
21469 case 14:
21470 xinputUngrabDevice(tvb, pinfo, offsetp, t, byte_order, length);
21471 break;
21472 case 15:
21473 xinputGrabDeviceKey(tvb, pinfo, offsetp, t, byte_order, length);
21474 break;
21475 case 16:
21476 xinputUngrabDeviceKey(tvb, pinfo, offsetp, t, byte_order, length);
21477 break;
21478 case 17:
21479 xinputGrabDeviceButton(tvb, pinfo, offsetp, t, byte_order, length);
21480 break;
21481 case 18:
21482 xinputUngrabDeviceButton(tvb, pinfo, offsetp, t, byte_order, length);
21483 break;
21484 case 19:
21485 xinputAllowDeviceEvents(tvb, pinfo, offsetp, t, byte_order, length);
21486 break;
21487 case 20:
21488 xinputGetDeviceFocus(tvb, pinfo, offsetp, t, byte_order, length);
21489 break;
21490 case 21:
21491 xinputSetDeviceFocus(tvb, pinfo, offsetp, t, byte_order, length);
21492 break;
21493 case 22:
21494 xinputGetFeedbackControl(tvb, pinfo, offsetp, t, byte_order, length);
21495 break;
21496 case 23:
21497 xinputChangeFeedbackControl(tvb, pinfo, offsetp, t, byte_order, length);
21498 break;
21499 case 24:
21500 xinputGetDeviceKeyMapping(tvb, pinfo, offsetp, t, byte_order, length);
21501 break;
21502 case 25:
21503 xinputChangeDeviceKeyMapping(tvb, pinfo, offsetp, t, byte_order, length);
21504 break;
21505 case 26:
21506 xinputGetDeviceModifierMapping(tvb, pinfo, offsetp, t, byte_order, length);
21507 break;
21508 case 27:
21509 xinputSetDeviceModifierMapping(tvb, pinfo, offsetp, t, byte_order, length);
21510 break;
21511 case 28:
21512 xinputGetDeviceButtonMapping(tvb, pinfo, offsetp, t, byte_order, length);
21513 break;
21514 case 29:
21515 xinputSetDeviceButtonMapping(tvb, pinfo, offsetp, t, byte_order, length);
21516 break;
21517 case 30:
21518 xinputQueryDeviceState(tvb, pinfo, offsetp, t, byte_order, length);
21519 break;
21520 case 31:
21521 xinputSendExtensionEvent(tvb, pinfo, offsetp, t, byte_order, length);
21522 break;
21523 case 32:
21524 xinputDeviceBell(tvb, pinfo, offsetp, t, byte_order, length);
21525 break;
21526 case 33:
21527 xinputSetDeviceValuators(tvb, pinfo, offsetp, t, byte_order, length);
21528 break;
21529 case 34:
21530 xinputGetDeviceControl(tvb, pinfo, offsetp, t, byte_order, length);
21531 break;
21532 case 35:
21533 xinputChangeDeviceControl(tvb, pinfo, offsetp, t, byte_order, length);
21534 break;
21535 case 36:
21536 xinputListDeviceProperties(tvb, pinfo, offsetp, t, byte_order, length);
21537 break;
21538 case 37:
21539 xinputChangeDeviceProperty(tvb, pinfo, offsetp, t, byte_order, length);
21540 break;
21541 case 38:
21542 xinputDeleteDeviceProperty(tvb, pinfo, offsetp, t, byte_order, length);
21543 break;
21544 case 39:
21545 xinputGetDeviceProperty(tvb, pinfo, offsetp, t, byte_order, length);
21546 break;
21547 case 40:
21548 xinputXIQueryPointer(tvb, pinfo, offsetp, t, byte_order, length);
21549 break;
21550 case 41:
21551 xinputXIWarpPointer(tvb, pinfo, offsetp, t, byte_order, length);
21552 break;
21553 case 42:
21554 xinputXIChangeCursor(tvb, pinfo, offsetp, t, byte_order, length);
21555 break;
21556 case 43:
21557 xinputXIChangeHierarchy(tvb, pinfo, offsetp, t, byte_order, length);
21558 break;
21559 case 44:
21560 xinputXISetClientPointer(tvb, pinfo, offsetp, t, byte_order, length);
21561 break;
21562 case 45:
21563 xinputXIGetClientPointer(tvb, pinfo, offsetp, t, byte_order, length);
21564 break;
21565 case 46:
21566 xinputXISelectEvents(tvb, pinfo, offsetp, t, byte_order, length);
21567 break;
21568 case 47:
21569 xinputXIQueryVersion(tvb, pinfo, offsetp, t, byte_order, length);
21570 break;
21571 case 48:
21572 xinputXIQueryDevice(tvb, pinfo, offsetp, t, byte_order, length);
21573 break;
21574 case 49:
21575 xinputXISetFocus(tvb, pinfo, offsetp, t, byte_order, length);
21576 break;
21577 case 50:
21578 xinputXIGetFocus(tvb, pinfo, offsetp, t, byte_order, length);
21579 break;
21580 case 51:
21581 xinputXIGrabDevice(tvb, pinfo, offsetp, t, byte_order, length);
21582 break;
21583 case 52:
21584 xinputXIUngrabDevice(tvb, pinfo, offsetp, t, byte_order, length);
21585 break;
21586 case 53:
21587 xinputXIAllowEvents(tvb, pinfo, offsetp, t, byte_order, length);
21588 break;
21589 case 54:
21590 xinputXIPassiveGrabDevice(tvb, pinfo, offsetp, t, byte_order, length);
21591 break;
21592 case 55:
21593 xinputXIPassiveUngrabDevice(tvb, pinfo, offsetp, t, byte_order, length);
21594 break;
21595 case 56:
21596 xinputXIListProperties(tvb, pinfo, offsetp, t, byte_order, length);
21597 break;
21598 case 57:
21599 xinputXIChangeProperty(tvb, pinfo, offsetp, t, byte_order, length);
21600 break;
21601 case 58:
21602 xinputXIDeleteProperty(tvb, pinfo, offsetp, t, byte_order, length);
21603 break;
21604 case 59:
21605 xinputXIGetProperty(tvb, pinfo, offsetp, t, byte_order, length);
21606 break;
21607 case 60:
21608 xinputXIGetSelectedEvents(tvb, pinfo, offsetp, t, byte_order, length);
21609 break;
21610 case 61:
21611 xinputXIBarrierReleasePointer(tvb, pinfo, offsetp, t, byte_order, length);
21612 break;
21613 /* No need for a default case here, since Unknown is printed above,
21614 and UNDECODED() is taken care of by dissect_x11_request */
21615 }
21616}
21617
21618static void register_xinput(void)
21619{
21620 set_handler("XInputExtension", dispatch_xinput, xinput_errors, xinput_events, xinput_generic_events, xinput_replies);
21621}
21622
21623static void struct_xkb_IndicatorMap(tvbuff_t *tvb, int *offsetp, proto_tree *root, unsigned byte_order _U_, int count)
21624{
21625 int i;
21626 for (i = 0; i < count; i++) {
21627 proto_item *item;
21628 proto_tree *t;
21629
21630 item = proto_tree_add_item(root, hf_x11_struct_xkb_IndicatorMap, tvb, *offsetp, 12, ENC_NA);
21631 t = proto_item_add_subtree(item, ett_x11_rectangle);
21632 field8(tvb, offsetp, t, hf_x11_struct_xkb_IndicatorMap_flags, byte_order);
21633 field8(tvb, offsetp, t, hf_x11_struct_xkb_IndicatorMap_whichGroups, byte_order);
21634 field8(tvb, offsetp, t, hf_x11_struct_xkb_IndicatorMap_groups, byte_order);
21635 field8(tvb, offsetp, t, hf_x11_struct_xkb_IndicatorMap_whichMods, byte_order);
21636 {
21637 static int* const mods_bits [] = {
21638 &hf_x11_struct_xkb_IndicatorMap_mods_mask_Shift,
21639 &hf_x11_struct_xkb_IndicatorMap_mods_mask_Lock,
21640 &hf_x11_struct_xkb_IndicatorMap_mods_mask_Control,
21641 &hf_x11_struct_xkb_IndicatorMap_mods_mask_1,
21642 &hf_x11_struct_xkb_IndicatorMap_mods_mask_2,
21643 &hf_x11_struct_xkb_IndicatorMap_mods_mask_3,
21644 &hf_x11_struct_xkb_IndicatorMap_mods_mask_4,
21645 &hf_x11_struct_xkb_IndicatorMap_mods_mask_5,
21646 &hf_x11_struct_xkb_IndicatorMap_mods_mask_Any,
21647 NULL
21648 };
21649 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_struct_xkb_IndicatorMap_mods, ett_x11_rectangle, mods_bits, byte_order);
21650 }
21651 *offsetp += 1;
21652 {
21653 static int* const realMods_bits [] = {
21654 &hf_x11_struct_xkb_IndicatorMap_realMods_mask_Shift,
21655 &hf_x11_struct_xkb_IndicatorMap_realMods_mask_Lock,
21656 &hf_x11_struct_xkb_IndicatorMap_realMods_mask_Control,
21657 &hf_x11_struct_xkb_IndicatorMap_realMods_mask_1,
21658 &hf_x11_struct_xkb_IndicatorMap_realMods_mask_2,
21659 &hf_x11_struct_xkb_IndicatorMap_realMods_mask_3,
21660 &hf_x11_struct_xkb_IndicatorMap_realMods_mask_4,
21661 &hf_x11_struct_xkb_IndicatorMap_realMods_mask_5,
21662 &hf_x11_struct_xkb_IndicatorMap_realMods_mask_Any,
21663 NULL
21664 };
21665 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_struct_xkb_IndicatorMap_realMods, ett_x11_rectangle, realMods_bits, byte_order);
21666 }
21667 *offsetp += 1;
21668 {
21669 static int* const vmods_bits [] = {
21670 &hf_x11_struct_xkb_IndicatorMap_vmods_mask_0,
21671 &hf_x11_struct_xkb_IndicatorMap_vmods_mask_1,
21672 &hf_x11_struct_xkb_IndicatorMap_vmods_mask_2,
21673 &hf_x11_struct_xkb_IndicatorMap_vmods_mask_3,
21674 &hf_x11_struct_xkb_IndicatorMap_vmods_mask_4,
21675 &hf_x11_struct_xkb_IndicatorMap_vmods_mask_5,
21676 &hf_x11_struct_xkb_IndicatorMap_vmods_mask_6,
21677 &hf_x11_struct_xkb_IndicatorMap_vmods_mask_7,
21678 &hf_x11_struct_xkb_IndicatorMap_vmods_mask_8,
21679 &hf_x11_struct_xkb_IndicatorMap_vmods_mask_9,
21680 &hf_x11_struct_xkb_IndicatorMap_vmods_mask_10,
21681 &hf_x11_struct_xkb_IndicatorMap_vmods_mask_11,
21682 &hf_x11_struct_xkb_IndicatorMap_vmods_mask_12,
21683 &hf_x11_struct_xkb_IndicatorMap_vmods_mask_13,
21684 &hf_x11_struct_xkb_IndicatorMap_vmods_mask_14,
21685 &hf_x11_struct_xkb_IndicatorMap_vmods_mask_15,
21686 NULL
21687 };
21688 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_struct_xkb_IndicatorMap_vmods, ett_x11_rectangle, vmods_bits, byte_order);
21689 }
21690 *offsetp += 2;
21691 {
21692 static int* const ctrls_bits [] = {
21693 &hf_x11_struct_xkb_IndicatorMap_ctrls_mask_RepeatKeys,
21694 &hf_x11_struct_xkb_IndicatorMap_ctrls_mask_SlowKeys,
21695 &hf_x11_struct_xkb_IndicatorMap_ctrls_mask_BounceKeys,
21696 &hf_x11_struct_xkb_IndicatorMap_ctrls_mask_StickyKeys,
21697 &hf_x11_struct_xkb_IndicatorMap_ctrls_mask_MouseKeys,
21698 &hf_x11_struct_xkb_IndicatorMap_ctrls_mask_MouseKeysAccel,
21699 &hf_x11_struct_xkb_IndicatorMap_ctrls_mask_AccessXKeys,
21700 &hf_x11_struct_xkb_IndicatorMap_ctrls_mask_AccessXTimeoutMask,
21701 &hf_x11_struct_xkb_IndicatorMap_ctrls_mask_AccessXFeedbackMask,
21702 &hf_x11_struct_xkb_IndicatorMap_ctrls_mask_AudibleBellMask,
21703 &hf_x11_struct_xkb_IndicatorMap_ctrls_mask_Overlay1Mask,
21704 &hf_x11_struct_xkb_IndicatorMap_ctrls_mask_Overlay2Mask,
21705 &hf_x11_struct_xkb_IndicatorMap_ctrls_mask_IgnoreGroupLockMask,
21706 NULL
21707 };
21708 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_struct_xkb_IndicatorMap_ctrls, ett_x11_rectangle, ctrls_bits, byte_order);
21709 }
21710 *offsetp += 4;
21711 }
21712}
21713
21714static void struct_xkb_ModDef(tvbuff_t *tvb, int *offsetp, proto_tree *root, unsigned byte_order _U_, int count)
21715{
21716 int i;
21717 for (i = 0; i < count; i++) {
21718 proto_item *item;
21719 proto_tree *t;
21720
21721 item = proto_tree_add_item(root, hf_x11_struct_xkb_ModDef, tvb, *offsetp, 4, ENC_NA);
21722 t = proto_item_add_subtree(item, ett_x11_rectangle);
21723 {
21724 static int* const mask_bits [] = {
21725 &hf_x11_struct_xkb_ModDef_mask_mask_Shift,
21726 &hf_x11_struct_xkb_ModDef_mask_mask_Lock,
21727 &hf_x11_struct_xkb_ModDef_mask_mask_Control,
21728 &hf_x11_struct_xkb_ModDef_mask_mask_1,
21729 &hf_x11_struct_xkb_ModDef_mask_mask_2,
21730 &hf_x11_struct_xkb_ModDef_mask_mask_3,
21731 &hf_x11_struct_xkb_ModDef_mask_mask_4,
21732 &hf_x11_struct_xkb_ModDef_mask_mask_5,
21733 &hf_x11_struct_xkb_ModDef_mask_mask_Any,
21734 NULL
21735 };
21736 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_struct_xkb_ModDef_mask, ett_x11_rectangle, mask_bits, byte_order);
21737 }
21738 *offsetp += 1;
21739 {
21740 static int* const realMods_bits [] = {
21741 &hf_x11_struct_xkb_ModDef_realMods_mask_Shift,
21742 &hf_x11_struct_xkb_ModDef_realMods_mask_Lock,
21743 &hf_x11_struct_xkb_ModDef_realMods_mask_Control,
21744 &hf_x11_struct_xkb_ModDef_realMods_mask_1,
21745 &hf_x11_struct_xkb_ModDef_realMods_mask_2,
21746 &hf_x11_struct_xkb_ModDef_realMods_mask_3,
21747 &hf_x11_struct_xkb_ModDef_realMods_mask_4,
21748 &hf_x11_struct_xkb_ModDef_realMods_mask_5,
21749 &hf_x11_struct_xkb_ModDef_realMods_mask_Any,
21750 NULL
21751 };
21752 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_struct_xkb_ModDef_realMods, ett_x11_rectangle, realMods_bits, byte_order);
21753 }
21754 *offsetp += 1;
21755 {
21756 static int* const vmods_bits [] = {
21757 &hf_x11_struct_xkb_ModDef_vmods_mask_0,
21758 &hf_x11_struct_xkb_ModDef_vmods_mask_1,
21759 &hf_x11_struct_xkb_ModDef_vmods_mask_2,
21760 &hf_x11_struct_xkb_ModDef_vmods_mask_3,
21761 &hf_x11_struct_xkb_ModDef_vmods_mask_4,
21762 &hf_x11_struct_xkb_ModDef_vmods_mask_5,
21763 &hf_x11_struct_xkb_ModDef_vmods_mask_6,
21764 &hf_x11_struct_xkb_ModDef_vmods_mask_7,
21765 &hf_x11_struct_xkb_ModDef_vmods_mask_8,
21766 &hf_x11_struct_xkb_ModDef_vmods_mask_9,
21767 &hf_x11_struct_xkb_ModDef_vmods_mask_10,
21768 &hf_x11_struct_xkb_ModDef_vmods_mask_11,
21769 &hf_x11_struct_xkb_ModDef_vmods_mask_12,
21770 &hf_x11_struct_xkb_ModDef_vmods_mask_13,
21771 &hf_x11_struct_xkb_ModDef_vmods_mask_14,
21772 &hf_x11_struct_xkb_ModDef_vmods_mask_15,
21773 NULL
21774 };
21775 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_struct_xkb_ModDef_vmods, ett_x11_rectangle, vmods_bits, byte_order);
21776 }
21777 *offsetp += 2;
21778 }
21779}
21780
21781static void struct_xkb_KeyName(tvbuff_t *tvb, int *offsetp, proto_tree *root, unsigned byte_order _U_, int count)
21782{
21783 int i;
21784 for (i = 0; i < count; i++) {
21785 proto_item *item;
21786 proto_tree *t;
21787
21788 item = proto_tree_add_item(root, hf_x11_struct_xkb_KeyName, tvb, *offsetp, 4, ENC_NA);
21789 t = proto_item_add_subtree(item, ett_x11_rectangle);
21790 listOfByte(tvb, offsetp, t, hf_x11_struct_xkb_KeyName_name, 4, byte_order);
21791 }
21792}
21793
21794static void struct_xkb_KeyAlias(tvbuff_t *tvb, int *offsetp, proto_tree *root, unsigned byte_order _U_, int count)
21795{
21796 int i;
21797 for (i = 0; i < count; i++) {
21798 proto_item *item;
21799 proto_tree *t;
21800
21801 item = proto_tree_add_item(root, hf_x11_struct_xkb_KeyAlias, tvb, *offsetp, 8, ENC_NA);
21802 t = proto_item_add_subtree(item, ett_x11_rectangle);
21803 listOfByte(tvb, offsetp, t, hf_x11_struct_xkb_KeyAlias_real, 4, byte_order);
21804 listOfByte(tvb, offsetp, t, hf_x11_struct_xkb_KeyAlias_alias, 4, byte_order);
21805 }
21806}
21807
21808static int struct_size_xkb_CountedString16(tvbuff_t *tvb _U_, int *offsetp _U_, unsigned byte_order _U_)
21809{
21810 int size = 0;
21811 int f_length;
21812 f_length = tvb_get_uint16(tvb, *offsetp + size + 0, byte_order);
21813 size += f_length * 1;
21814 size += (((f_length + 5) & (~3)) - (f_length + 2)) * 1;
21815 return size + 2;
21816}
21817
21818static void struct_xkb_CountedString16(tvbuff_t *tvb, int *offsetp, proto_tree *root, unsigned byte_order _U_, int count)
21819{
21820 int i;
21821 for (i = 0; i < count; i++) {
21822 proto_item *item;
21823 proto_tree *t;
21824 int f_length;
21825
21826 item = proto_tree_add_item(root, hf_x11_struct_xkb_CountedString16, tvb, *offsetp, struct_size_xkb_CountedString16(tvb, offsetp, byte_order), ENC_NA);
21827 t = proto_item_add_subtree(item, ett_x11_rectangle);
21828 f_length = tvb_get_uint16(tvb, *offsetp, byte_order);
21829 proto_tree_add_item(t, hf_x11_struct_xkb_CountedString16_length, tvb, *offsetp, 2, byte_order);
21830 *offsetp += 2;
21831 listOfByte(tvb, offsetp, t, hf_x11_struct_xkb_CountedString16_string, f_length, byte_order);
21832 listOfByte(tvb, offsetp, t, hf_x11_struct_xkb_CountedString16_alignment_pad, (((f_length + 5) & (~3)) - (f_length + 2)), byte_order);
21833 }
21834}
21835
21836static void struct_xkb_KTMapEntry(tvbuff_t *tvb, int *offsetp, proto_tree *root, unsigned byte_order _U_, int count)
21837{
21838 int i;
21839 for (i = 0; i < count; i++) {
21840 proto_item *item;
21841 proto_tree *t;
21842
21843 item = proto_tree_add_item(root, hf_x11_struct_xkb_KTMapEntry, tvb, *offsetp, 8, ENC_NA);
21844 t = proto_item_add_subtree(item, ett_x11_rectangle);
21845 proto_tree_add_item(t, hf_x11_struct_xkb_KTMapEntry_active, tvb, *offsetp, 1, byte_order);
21846 *offsetp += 1;
21847 {
21848 static int* const mods_mask_bits [] = {
21849 &hf_x11_struct_xkb_KTMapEntry_mods_mask_mask_Shift,
21850 &hf_x11_struct_xkb_KTMapEntry_mods_mask_mask_Lock,
21851 &hf_x11_struct_xkb_KTMapEntry_mods_mask_mask_Control,
21852 &hf_x11_struct_xkb_KTMapEntry_mods_mask_mask_1,
21853 &hf_x11_struct_xkb_KTMapEntry_mods_mask_mask_2,
21854 &hf_x11_struct_xkb_KTMapEntry_mods_mask_mask_3,
21855 &hf_x11_struct_xkb_KTMapEntry_mods_mask_mask_4,
21856 &hf_x11_struct_xkb_KTMapEntry_mods_mask_mask_5,
21857 &hf_x11_struct_xkb_KTMapEntry_mods_mask_mask_Any,
21858 NULL
21859 };
21860 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_struct_xkb_KTMapEntry_mods_mask, ett_x11_rectangle, mods_mask_bits, byte_order);
21861 }
21862 *offsetp += 1;
21863 proto_tree_add_item(t, hf_x11_struct_xkb_KTMapEntry_level, tvb, *offsetp, 1, byte_order);
21864 *offsetp += 1;
21865 {
21866 static int* const mods_mods_bits [] = {
21867 &hf_x11_struct_xkb_KTMapEntry_mods_mods_mask_Shift,
21868 &hf_x11_struct_xkb_KTMapEntry_mods_mods_mask_Lock,
21869 &hf_x11_struct_xkb_KTMapEntry_mods_mods_mask_Control,
21870 &hf_x11_struct_xkb_KTMapEntry_mods_mods_mask_1,
21871 &hf_x11_struct_xkb_KTMapEntry_mods_mods_mask_2,
21872 &hf_x11_struct_xkb_KTMapEntry_mods_mods_mask_3,
21873 &hf_x11_struct_xkb_KTMapEntry_mods_mods_mask_4,
21874 &hf_x11_struct_xkb_KTMapEntry_mods_mods_mask_5,
21875 &hf_x11_struct_xkb_KTMapEntry_mods_mods_mask_Any,
21876 NULL
21877 };
21878 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_struct_xkb_KTMapEntry_mods_mods, ett_x11_rectangle, mods_mods_bits, byte_order);
21879 }
21880 *offsetp += 1;
21881 {
21882 static int* const mods_vmods_bits [] = {
21883 &hf_x11_struct_xkb_KTMapEntry_mods_vmods_mask_0,
21884 &hf_x11_struct_xkb_KTMapEntry_mods_vmods_mask_1,
21885 &hf_x11_struct_xkb_KTMapEntry_mods_vmods_mask_2,
21886 &hf_x11_struct_xkb_KTMapEntry_mods_vmods_mask_3,
21887 &hf_x11_struct_xkb_KTMapEntry_mods_vmods_mask_4,
21888 &hf_x11_struct_xkb_KTMapEntry_mods_vmods_mask_5,
21889 &hf_x11_struct_xkb_KTMapEntry_mods_vmods_mask_6,
21890 &hf_x11_struct_xkb_KTMapEntry_mods_vmods_mask_7,
21891 &hf_x11_struct_xkb_KTMapEntry_mods_vmods_mask_8,
21892 &hf_x11_struct_xkb_KTMapEntry_mods_vmods_mask_9,
21893 &hf_x11_struct_xkb_KTMapEntry_mods_vmods_mask_10,
21894 &hf_x11_struct_xkb_KTMapEntry_mods_vmods_mask_11,
21895 &hf_x11_struct_xkb_KTMapEntry_mods_vmods_mask_12,
21896 &hf_x11_struct_xkb_KTMapEntry_mods_vmods_mask_13,
21897 &hf_x11_struct_xkb_KTMapEntry_mods_vmods_mask_14,
21898 &hf_x11_struct_xkb_KTMapEntry_mods_vmods_mask_15,
21899 NULL
21900 };
21901 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_struct_xkb_KTMapEntry_mods_vmods, ett_x11_rectangle, mods_vmods_bits, byte_order);
21902 }
21903 *offsetp += 2;
21904 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 2, ENC_NA);
21905 *offsetp += 2;
21906 }
21907}
21908
21909static int struct_size_xkb_KeyType(tvbuff_t *tvb _U_, int *offsetp _U_, unsigned byte_order _U_)
21910{
21911 int size = 0;
21912 int f_hasPreserve;
21913 int f_nMapEntries;
21914 f_nMapEntries = tvb_get_uint8(tvb, *offsetp + size + 5);
21915 f_hasPreserve = tvb_get_uint8(tvb, *offsetp + size + 6);
21916 size += f_nMapEntries * 8;
21917 size += (f_hasPreserve * f_nMapEntries) * 4;
21918 return size + 8;
21919}
21920
21921static void struct_xkb_KeyType(tvbuff_t *tvb, int *offsetp, proto_tree *root, unsigned byte_order _U_, int count)
21922{
21923 int i;
21924 for (i = 0; i < count; i++) {
21925 proto_item *item;
21926 proto_tree *t;
21927 int f_nMapEntries;
21928 int f_hasPreserve;
21929
21930 item = proto_tree_add_item(root, hf_x11_struct_xkb_KeyType, tvb, *offsetp, struct_size_xkb_KeyType(tvb, offsetp, byte_order), ENC_NA);
21931 t = proto_item_add_subtree(item, ett_x11_rectangle);
21932 {
21933 static int* const mods_mask_bits [] = {
21934 &hf_x11_struct_xkb_KeyType_mods_mask_mask_Shift,
21935 &hf_x11_struct_xkb_KeyType_mods_mask_mask_Lock,
21936 &hf_x11_struct_xkb_KeyType_mods_mask_mask_Control,
21937 &hf_x11_struct_xkb_KeyType_mods_mask_mask_1,
21938 &hf_x11_struct_xkb_KeyType_mods_mask_mask_2,
21939 &hf_x11_struct_xkb_KeyType_mods_mask_mask_3,
21940 &hf_x11_struct_xkb_KeyType_mods_mask_mask_4,
21941 &hf_x11_struct_xkb_KeyType_mods_mask_mask_5,
21942 &hf_x11_struct_xkb_KeyType_mods_mask_mask_Any,
21943 NULL
21944 };
21945 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_struct_xkb_KeyType_mods_mask, ett_x11_rectangle, mods_mask_bits, byte_order);
21946 }
21947 *offsetp += 1;
21948 {
21949 static int* const mods_mods_bits [] = {
21950 &hf_x11_struct_xkb_KeyType_mods_mods_mask_Shift,
21951 &hf_x11_struct_xkb_KeyType_mods_mods_mask_Lock,
21952 &hf_x11_struct_xkb_KeyType_mods_mods_mask_Control,
21953 &hf_x11_struct_xkb_KeyType_mods_mods_mask_1,
21954 &hf_x11_struct_xkb_KeyType_mods_mods_mask_2,
21955 &hf_x11_struct_xkb_KeyType_mods_mods_mask_3,
21956 &hf_x11_struct_xkb_KeyType_mods_mods_mask_4,
21957 &hf_x11_struct_xkb_KeyType_mods_mods_mask_5,
21958 &hf_x11_struct_xkb_KeyType_mods_mods_mask_Any,
21959 NULL
21960 };
21961 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_struct_xkb_KeyType_mods_mods, ett_x11_rectangle, mods_mods_bits, byte_order);
21962 }
21963 *offsetp += 1;
21964 {
21965 static int* const mods_vmods_bits [] = {
21966 &hf_x11_struct_xkb_KeyType_mods_vmods_mask_0,
21967 &hf_x11_struct_xkb_KeyType_mods_vmods_mask_1,
21968 &hf_x11_struct_xkb_KeyType_mods_vmods_mask_2,
21969 &hf_x11_struct_xkb_KeyType_mods_vmods_mask_3,
21970 &hf_x11_struct_xkb_KeyType_mods_vmods_mask_4,
21971 &hf_x11_struct_xkb_KeyType_mods_vmods_mask_5,
21972 &hf_x11_struct_xkb_KeyType_mods_vmods_mask_6,
21973 &hf_x11_struct_xkb_KeyType_mods_vmods_mask_7,
21974 &hf_x11_struct_xkb_KeyType_mods_vmods_mask_8,
21975 &hf_x11_struct_xkb_KeyType_mods_vmods_mask_9,
21976 &hf_x11_struct_xkb_KeyType_mods_vmods_mask_10,
21977 &hf_x11_struct_xkb_KeyType_mods_vmods_mask_11,
21978 &hf_x11_struct_xkb_KeyType_mods_vmods_mask_12,
21979 &hf_x11_struct_xkb_KeyType_mods_vmods_mask_13,
21980 &hf_x11_struct_xkb_KeyType_mods_vmods_mask_14,
21981 &hf_x11_struct_xkb_KeyType_mods_vmods_mask_15,
21982 NULL
21983 };
21984 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_struct_xkb_KeyType_mods_vmods, ett_x11_rectangle, mods_vmods_bits, byte_order);
21985 }
21986 *offsetp += 2;
21987 proto_tree_add_item(t, hf_x11_struct_xkb_KeyType_numLevels, tvb, *offsetp, 1, byte_order);
21988 *offsetp += 1;
21989 f_nMapEntries = tvb_get_uint8(tvb, *offsetp);
21990 proto_tree_add_item(t, hf_x11_struct_xkb_KeyType_nMapEntries, tvb, *offsetp, 1, byte_order);
21991 *offsetp += 1;
21992 f_hasPreserve = tvb_get_uint8(tvb, *offsetp);
21993 proto_tree_add_item(t, hf_x11_struct_xkb_KeyType_hasPreserve, tvb, *offsetp, 1, byte_order);
21994 *offsetp += 1;
21995 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
21996 *offsetp += 1;
21997 struct_xkb_KTMapEntry(tvb, offsetp, t, byte_order, f_nMapEntries);
21998 struct_xkb_ModDef(tvb, offsetp, t, byte_order, (f_hasPreserve * f_nMapEntries));
21999 }
22000}
22001
22002static int struct_size_xkb_KeySymMap(tvbuff_t *tvb _U_, int *offsetp _U_, unsigned byte_order _U_)
22003{
22004 int size = 0;
22005 int f_nSyms;
22006 f_nSyms = tvb_get_uint16(tvb, *offsetp + size + 6, byte_order);
22007 size += f_nSyms * 4;
22008 return size + 8;
22009}
22010
22011static void struct_xkb_KeySymMap(tvbuff_t *tvb, int *offsetp, proto_tree *root, unsigned byte_order _U_, int count)
22012{
22013 int i;
22014 for (i = 0; i < count; i++) {
22015 proto_item *item;
22016 proto_tree *t;
22017 int f_nSyms;
22018
22019 item = proto_tree_add_item(root, hf_x11_struct_xkb_KeySymMap, tvb, *offsetp, struct_size_xkb_KeySymMap(tvb, offsetp, byte_order), ENC_NA);
22020 t = proto_item_add_subtree(item, ett_x11_rectangle);
22021 listOfByte(tvb, offsetp, t, hf_x11_struct_xkb_KeySymMap_kt_index, 4, byte_order);
22022 proto_tree_add_item(t, hf_x11_struct_xkb_KeySymMap_groupInfo, tvb, *offsetp, 1, byte_order);
22023 *offsetp += 1;
22024 proto_tree_add_item(t, hf_x11_struct_xkb_KeySymMap_width, tvb, *offsetp, 1, byte_order);
22025 *offsetp += 1;
22026 f_nSyms = tvb_get_uint16(tvb, *offsetp, byte_order);
22027 proto_tree_add_item(t, hf_x11_struct_xkb_KeySymMap_nSyms, tvb, *offsetp, 2, byte_order);
22028 *offsetp += 2;
22029 listOfCard32(tvb, offsetp, t, hf_x11_struct_xkb_KeySymMap_syms, hf_x11_struct_xkb_KeySymMap_syms_item, f_nSyms, byte_order);
22030 }
22031}
22032
22033static void struct_xkb_CommonBehavior(tvbuff_t *tvb, int *offsetp, proto_tree *root, unsigned byte_order _U_, int count)
22034{
22035 int i;
22036 for (i = 0; i < count; i++) {
22037 proto_item *item;
22038 proto_tree *t;
22039
22040 item = proto_tree_add_item(root, hf_x11_struct_xkb_CommonBehavior, tvb, *offsetp, 2, ENC_NA);
22041 t = proto_item_add_subtree(item, ett_x11_rectangle);
22042 proto_tree_add_item(t, hf_x11_struct_xkb_CommonBehavior_type, tvb, *offsetp, 1, byte_order);
22043 *offsetp += 1;
22044 proto_tree_add_item(t, hf_x11_struct_xkb_CommonBehavior_data, tvb, *offsetp, 1, byte_order);
22045 *offsetp += 1;
22046 }
22047}
22048
22049static void struct_xkb_DefaultBehavior(tvbuff_t *tvb, int *offsetp, proto_tree *root, unsigned byte_order _U_, int count)
22050{
22051 int i;
22052 for (i = 0; i < count; i++) {
22053 proto_item *item;
22054 proto_tree *t;
22055
22056 item = proto_tree_add_item(root, hf_x11_struct_xkb_DefaultBehavior, tvb, *offsetp, 2, ENC_NA);
22057 t = proto_item_add_subtree(item, ett_x11_rectangle);
22058 proto_tree_add_item(t, hf_x11_struct_xkb_DefaultBehavior_type, tvb, *offsetp, 1, byte_order);
22059 *offsetp += 1;
22060 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
22061 *offsetp += 1;
22062 }
22063}
22064
22065static void struct_xkb_RadioGroupBehavior(tvbuff_t *tvb, int *offsetp, proto_tree *root, unsigned byte_order _U_, int count)
22066{
22067 int i;
22068 for (i = 0; i < count; i++) {
22069 proto_item *item;
22070 proto_tree *t;
22071
22072 item = proto_tree_add_item(root, hf_x11_struct_xkb_RadioGroupBehavior, tvb, *offsetp, 2, ENC_NA);
22073 t = proto_item_add_subtree(item, ett_x11_rectangle);
22074 proto_tree_add_item(t, hf_x11_struct_xkb_RadioGroupBehavior_type, tvb, *offsetp, 1, byte_order);
22075 *offsetp += 1;
22076 proto_tree_add_item(t, hf_x11_struct_xkb_RadioGroupBehavior_group, tvb, *offsetp, 1, byte_order);
22077 *offsetp += 1;
22078 }
22079}
22080
22081static void struct_xkb_OverlayBehavior(tvbuff_t *tvb, int *offsetp, proto_tree *root, unsigned byte_order _U_, int count)
22082{
22083 int i;
22084 for (i = 0; i < count; i++) {
22085 proto_item *item;
22086 proto_tree *t;
22087
22088 item = proto_tree_add_item(root, hf_x11_struct_xkb_OverlayBehavior, tvb, *offsetp, 2, ENC_NA);
22089 t = proto_item_add_subtree(item, ett_x11_rectangle);
22090 proto_tree_add_item(t, hf_x11_struct_xkb_OverlayBehavior_type, tvb, *offsetp, 1, byte_order);
22091 *offsetp += 1;
22092 proto_tree_add_item(t, hf_x11_struct_xkb_OverlayBehavior_key, tvb, *offsetp, 1, byte_order);
22093 *offsetp += 1;
22094 }
22095}
22096
22097static void struct_xkb_Behavior(tvbuff_t *tvb, int *offsetp, proto_tree *root, unsigned byte_order, int count)
22098{
22099 int i;
22100 int base = *offsetp;
22101 for (i = 0; i < count; i++) {
22102 proto_item *item;
22103 proto_tree *t;
22104 item = proto_tree_add_item(root, hf_x11_union_xkb_Behavior, tvb, base, 2, ENC_NA);
22105 t = proto_item_add_subtree(item, ett_x11_rectangle);
22106
22107 *offsetp = base;
22108 struct_xkb_CommonBehavior(tvb, offsetp, t, byte_order, 1);
22109 *offsetp = base;
22110 struct_xkb_DefaultBehavior(tvb, offsetp, t, byte_order, 1);
22111 *offsetp = base;
22112 struct_xkb_DefaultBehavior(tvb, offsetp, t, byte_order, 1);
22113 *offsetp = base;
22114 struct_xkb_RadioGroupBehavior(tvb, offsetp, t, byte_order, 1);
22115 *offsetp = base;
22116 struct_xkb_OverlayBehavior(tvb, offsetp, t, byte_order, 1);
22117 *offsetp = base;
22118 struct_xkb_OverlayBehavior(tvb, offsetp, t, byte_order, 1);
22119 *offsetp = base;
22120 struct_xkb_DefaultBehavior(tvb, offsetp, t, byte_order, 1);
22121 *offsetp = base;
22122 struct_xkb_RadioGroupBehavior(tvb, offsetp, t, byte_order, 1);
22123 *offsetp = base;
22124 struct_xkb_OverlayBehavior(tvb, offsetp, t, byte_order, 1);
22125 *offsetp = base;
22126 struct_xkb_OverlayBehavior(tvb, offsetp, t, byte_order, 1);
22127 *offsetp = base;
22128 proto_tree_add_item(t, hf_x11_union_xkb_Behavior_type, tvb, *offsetp, 1, byte_order);
22129 *offsetp += 1;
22130 base += 2;
22131 }
22132 *offsetp = base;
22133}
22134
22135static void struct_xkb_SetBehavior(tvbuff_t *tvb, int *offsetp, proto_tree *root, unsigned byte_order _U_, int count)
22136{
22137 int i;
22138 for (i = 0; i < count; i++) {
22139 proto_item *item;
22140 proto_tree *t;
22141
22142 item = proto_tree_add_item(root, hf_x11_struct_xkb_SetBehavior, tvb, *offsetp, 4, ENC_NA);
22143 t = proto_item_add_subtree(item, ett_x11_rectangle);
22144 proto_tree_add_item(t, hf_x11_struct_xkb_SetBehavior_keycode, tvb, *offsetp, 1, byte_order);
22145 *offsetp += 1;
22146 struct_xkb_Behavior(tvb, offsetp, t, byte_order, 1);
22147 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
22148 *offsetp += 1;
22149 }
22150}
22151
22152static void struct_xkb_SetExplicit(tvbuff_t *tvb, int *offsetp, proto_tree *root, unsigned byte_order _U_, int count)
22153{
22154 int i;
22155 for (i = 0; i < count; i++) {
22156 proto_item *item;
22157 proto_tree *t;
22158
22159 item = proto_tree_add_item(root, hf_x11_struct_xkb_SetExplicit, tvb, *offsetp, 2, ENC_NA);
22160 t = proto_item_add_subtree(item, ett_x11_rectangle);
22161 proto_tree_add_item(t, hf_x11_struct_xkb_SetExplicit_keycode, tvb, *offsetp, 1, byte_order);
22162 *offsetp += 1;
22163 {
22164 static int* const explicit_bits [] = {
22165 &hf_x11_struct_xkb_SetExplicit_explicit_mask_KeyType1,
22166 &hf_x11_struct_xkb_SetExplicit_explicit_mask_KeyType2,
22167 &hf_x11_struct_xkb_SetExplicit_explicit_mask_KeyType3,
22168 &hf_x11_struct_xkb_SetExplicit_explicit_mask_KeyType4,
22169 &hf_x11_struct_xkb_SetExplicit_explicit_mask_Interpret,
22170 &hf_x11_struct_xkb_SetExplicit_explicit_mask_AutoRepeat,
22171 &hf_x11_struct_xkb_SetExplicit_explicit_mask_Behavior,
22172 &hf_x11_struct_xkb_SetExplicit_explicit_mask_VModMap,
22173 NULL
22174 };
22175 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_struct_xkb_SetExplicit_explicit, ett_x11_rectangle, explicit_bits, byte_order);
22176 }
22177 *offsetp += 1;
22178 }
22179}
22180
22181static void struct_xkb_KeyModMap(tvbuff_t *tvb, int *offsetp, proto_tree *root, unsigned byte_order _U_, int count)
22182{
22183 int i;
22184 for (i = 0; i < count; i++) {
22185 proto_item *item;
22186 proto_tree *t;
22187
22188 item = proto_tree_add_item(root, hf_x11_struct_xkb_KeyModMap, tvb, *offsetp, 2, ENC_NA);
22189 t = proto_item_add_subtree(item, ett_x11_rectangle);
22190 proto_tree_add_item(t, hf_x11_struct_xkb_KeyModMap_keycode, tvb, *offsetp, 1, byte_order);
22191 *offsetp += 1;
22192 {
22193 static int* const mods_bits [] = {
22194 &hf_x11_struct_xkb_KeyModMap_mods_mask_Shift,
22195 &hf_x11_struct_xkb_KeyModMap_mods_mask_Lock,
22196 &hf_x11_struct_xkb_KeyModMap_mods_mask_Control,
22197 &hf_x11_struct_xkb_KeyModMap_mods_mask_1,
22198 &hf_x11_struct_xkb_KeyModMap_mods_mask_2,
22199 &hf_x11_struct_xkb_KeyModMap_mods_mask_3,
22200 &hf_x11_struct_xkb_KeyModMap_mods_mask_4,
22201 &hf_x11_struct_xkb_KeyModMap_mods_mask_5,
22202 &hf_x11_struct_xkb_KeyModMap_mods_mask_Any,
22203 NULL
22204 };
22205 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_struct_xkb_KeyModMap_mods, ett_x11_rectangle, mods_bits, byte_order);
22206 }
22207 *offsetp += 1;
22208 }
22209}
22210
22211static void struct_xkb_KeyVModMap(tvbuff_t *tvb, int *offsetp, proto_tree *root, unsigned byte_order _U_, int count)
22212{
22213 int i;
22214 for (i = 0; i < count; i++) {
22215 proto_item *item;
22216 proto_tree *t;
22217
22218 item = proto_tree_add_item(root, hf_x11_struct_xkb_KeyVModMap, tvb, *offsetp, 4, ENC_NA);
22219 t = proto_item_add_subtree(item, ett_x11_rectangle);
22220 proto_tree_add_item(t, hf_x11_struct_xkb_KeyVModMap_keycode, tvb, *offsetp, 1, byte_order);
22221 *offsetp += 1;
22222 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
22223 *offsetp += 1;
22224 {
22225 static int* const vmods_bits [] = {
22226 &hf_x11_struct_xkb_KeyVModMap_vmods_mask_0,
22227 &hf_x11_struct_xkb_KeyVModMap_vmods_mask_1,
22228 &hf_x11_struct_xkb_KeyVModMap_vmods_mask_2,
22229 &hf_x11_struct_xkb_KeyVModMap_vmods_mask_3,
22230 &hf_x11_struct_xkb_KeyVModMap_vmods_mask_4,
22231 &hf_x11_struct_xkb_KeyVModMap_vmods_mask_5,
22232 &hf_x11_struct_xkb_KeyVModMap_vmods_mask_6,
22233 &hf_x11_struct_xkb_KeyVModMap_vmods_mask_7,
22234 &hf_x11_struct_xkb_KeyVModMap_vmods_mask_8,
22235 &hf_x11_struct_xkb_KeyVModMap_vmods_mask_9,
22236 &hf_x11_struct_xkb_KeyVModMap_vmods_mask_10,
22237 &hf_x11_struct_xkb_KeyVModMap_vmods_mask_11,
22238 &hf_x11_struct_xkb_KeyVModMap_vmods_mask_12,
22239 &hf_x11_struct_xkb_KeyVModMap_vmods_mask_13,
22240 &hf_x11_struct_xkb_KeyVModMap_vmods_mask_14,
22241 &hf_x11_struct_xkb_KeyVModMap_vmods_mask_15,
22242 NULL
22243 };
22244 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_struct_xkb_KeyVModMap_vmods, ett_x11_rectangle, vmods_bits, byte_order);
22245 }
22246 *offsetp += 2;
22247 }
22248}
22249
22250static void struct_xkb_KTSetMapEntry(tvbuff_t *tvb, int *offsetp, proto_tree *root, unsigned byte_order _U_, int count)
22251{
22252 int i;
22253 for (i = 0; i < count; i++) {
22254 proto_item *item;
22255 proto_tree *t;
22256
22257 item = proto_tree_add_item(root, hf_x11_struct_xkb_KTSetMapEntry, tvb, *offsetp, 4, ENC_NA);
22258 t = proto_item_add_subtree(item, ett_x11_rectangle);
22259 proto_tree_add_item(t, hf_x11_struct_xkb_KTSetMapEntry_level, tvb, *offsetp, 1, byte_order);
22260 *offsetp += 1;
22261 {
22262 static int* const realMods_bits [] = {
22263 &hf_x11_struct_xkb_KTSetMapEntry_realMods_mask_Shift,
22264 &hf_x11_struct_xkb_KTSetMapEntry_realMods_mask_Lock,
22265 &hf_x11_struct_xkb_KTSetMapEntry_realMods_mask_Control,
22266 &hf_x11_struct_xkb_KTSetMapEntry_realMods_mask_1,
22267 &hf_x11_struct_xkb_KTSetMapEntry_realMods_mask_2,
22268 &hf_x11_struct_xkb_KTSetMapEntry_realMods_mask_3,
22269 &hf_x11_struct_xkb_KTSetMapEntry_realMods_mask_4,
22270 &hf_x11_struct_xkb_KTSetMapEntry_realMods_mask_5,
22271 &hf_x11_struct_xkb_KTSetMapEntry_realMods_mask_Any,
22272 NULL
22273 };
22274 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_struct_xkb_KTSetMapEntry_realMods, ett_x11_rectangle, realMods_bits, byte_order);
22275 }
22276 *offsetp += 1;
22277 {
22278 static int* const virtualMods_bits [] = {
22279 &hf_x11_struct_xkb_KTSetMapEntry_virtualMods_mask_0,
22280 &hf_x11_struct_xkb_KTSetMapEntry_virtualMods_mask_1,
22281 &hf_x11_struct_xkb_KTSetMapEntry_virtualMods_mask_2,
22282 &hf_x11_struct_xkb_KTSetMapEntry_virtualMods_mask_3,
22283 &hf_x11_struct_xkb_KTSetMapEntry_virtualMods_mask_4,
22284 &hf_x11_struct_xkb_KTSetMapEntry_virtualMods_mask_5,
22285 &hf_x11_struct_xkb_KTSetMapEntry_virtualMods_mask_6,
22286 &hf_x11_struct_xkb_KTSetMapEntry_virtualMods_mask_7,
22287 &hf_x11_struct_xkb_KTSetMapEntry_virtualMods_mask_8,
22288 &hf_x11_struct_xkb_KTSetMapEntry_virtualMods_mask_9,
22289 &hf_x11_struct_xkb_KTSetMapEntry_virtualMods_mask_10,
22290 &hf_x11_struct_xkb_KTSetMapEntry_virtualMods_mask_11,
22291 &hf_x11_struct_xkb_KTSetMapEntry_virtualMods_mask_12,
22292 &hf_x11_struct_xkb_KTSetMapEntry_virtualMods_mask_13,
22293 &hf_x11_struct_xkb_KTSetMapEntry_virtualMods_mask_14,
22294 &hf_x11_struct_xkb_KTSetMapEntry_virtualMods_mask_15,
22295 NULL
22296 };
22297 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_struct_xkb_KTSetMapEntry_virtualMods, ett_x11_rectangle, virtualMods_bits, byte_order);
22298 }
22299 *offsetp += 2;
22300 }
22301}
22302
22303static int struct_size_xkb_SetKeyType(tvbuff_t *tvb _U_, int *offsetp _U_, unsigned byte_order _U_)
22304{
22305 int size = 0;
22306 int f_nMapEntries;
22307 int f_preserve;
22308 f_nMapEntries = tvb_get_uint8(tvb, *offsetp + size + 5);
22309 f_preserve = tvb_get_uint8(tvb, *offsetp + size + 6);
22310 size += f_nMapEntries * 4;
22311 size += (f_preserve * f_nMapEntries) * 4;
22312 return size + 8;
22313}
22314
22315static void struct_xkb_SetKeyType(tvbuff_t *tvb, int *offsetp, proto_tree *root, unsigned byte_order _U_, int count)
22316{
22317 int i;
22318 for (i = 0; i < count; i++) {
22319 proto_item *item;
22320 proto_tree *t;
22321 int f_nMapEntries;
22322 int f_preserve;
22323
22324 item = proto_tree_add_item(root, hf_x11_struct_xkb_SetKeyType, tvb, *offsetp, struct_size_xkb_SetKeyType(tvb, offsetp, byte_order), ENC_NA);
22325 t = proto_item_add_subtree(item, ett_x11_rectangle);
22326 {
22327 static int* const mask_bits [] = {
22328 &hf_x11_struct_xkb_SetKeyType_mask_mask_Shift,
22329 &hf_x11_struct_xkb_SetKeyType_mask_mask_Lock,
22330 &hf_x11_struct_xkb_SetKeyType_mask_mask_Control,
22331 &hf_x11_struct_xkb_SetKeyType_mask_mask_1,
22332 &hf_x11_struct_xkb_SetKeyType_mask_mask_2,
22333 &hf_x11_struct_xkb_SetKeyType_mask_mask_3,
22334 &hf_x11_struct_xkb_SetKeyType_mask_mask_4,
22335 &hf_x11_struct_xkb_SetKeyType_mask_mask_5,
22336 &hf_x11_struct_xkb_SetKeyType_mask_mask_Any,
22337 NULL
22338 };
22339 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_struct_xkb_SetKeyType_mask, ett_x11_rectangle, mask_bits, byte_order);
22340 }
22341 *offsetp += 1;
22342 {
22343 static int* const realMods_bits [] = {
22344 &hf_x11_struct_xkb_SetKeyType_realMods_mask_Shift,
22345 &hf_x11_struct_xkb_SetKeyType_realMods_mask_Lock,
22346 &hf_x11_struct_xkb_SetKeyType_realMods_mask_Control,
22347 &hf_x11_struct_xkb_SetKeyType_realMods_mask_1,
22348 &hf_x11_struct_xkb_SetKeyType_realMods_mask_2,
22349 &hf_x11_struct_xkb_SetKeyType_realMods_mask_3,
22350 &hf_x11_struct_xkb_SetKeyType_realMods_mask_4,
22351 &hf_x11_struct_xkb_SetKeyType_realMods_mask_5,
22352 &hf_x11_struct_xkb_SetKeyType_realMods_mask_Any,
22353 NULL
22354 };
22355 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_struct_xkb_SetKeyType_realMods, ett_x11_rectangle, realMods_bits, byte_order);
22356 }
22357 *offsetp += 1;
22358 {
22359 static int* const virtualMods_bits [] = {
22360 &hf_x11_struct_xkb_SetKeyType_virtualMods_mask_0,
22361 &hf_x11_struct_xkb_SetKeyType_virtualMods_mask_1,
22362 &hf_x11_struct_xkb_SetKeyType_virtualMods_mask_2,
22363 &hf_x11_struct_xkb_SetKeyType_virtualMods_mask_3,
22364 &hf_x11_struct_xkb_SetKeyType_virtualMods_mask_4,
22365 &hf_x11_struct_xkb_SetKeyType_virtualMods_mask_5,
22366 &hf_x11_struct_xkb_SetKeyType_virtualMods_mask_6,
22367 &hf_x11_struct_xkb_SetKeyType_virtualMods_mask_7,
22368 &hf_x11_struct_xkb_SetKeyType_virtualMods_mask_8,
22369 &hf_x11_struct_xkb_SetKeyType_virtualMods_mask_9,
22370 &hf_x11_struct_xkb_SetKeyType_virtualMods_mask_10,
22371 &hf_x11_struct_xkb_SetKeyType_virtualMods_mask_11,
22372 &hf_x11_struct_xkb_SetKeyType_virtualMods_mask_12,
22373 &hf_x11_struct_xkb_SetKeyType_virtualMods_mask_13,
22374 &hf_x11_struct_xkb_SetKeyType_virtualMods_mask_14,
22375 &hf_x11_struct_xkb_SetKeyType_virtualMods_mask_15,
22376 NULL
22377 };
22378 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_struct_xkb_SetKeyType_virtualMods, ett_x11_rectangle, virtualMods_bits, byte_order);
22379 }
22380 *offsetp += 2;
22381 proto_tree_add_item(t, hf_x11_struct_xkb_SetKeyType_numLevels, tvb, *offsetp, 1, byte_order);
22382 *offsetp += 1;
22383 f_nMapEntries = tvb_get_uint8(tvb, *offsetp);
22384 proto_tree_add_item(t, hf_x11_struct_xkb_SetKeyType_nMapEntries, tvb, *offsetp, 1, byte_order);
22385 *offsetp += 1;
22386 f_preserve = tvb_get_uint8(tvb, *offsetp);
22387 proto_tree_add_item(t, hf_x11_struct_xkb_SetKeyType_preserve, tvb, *offsetp, 1, byte_order);
22388 *offsetp += 1;
22389 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
22390 *offsetp += 1;
22391 struct_xkb_KTSetMapEntry(tvb, offsetp, t, byte_order, f_nMapEntries);
22392 struct_xkb_KTSetMapEntry(tvb, offsetp, t, byte_order, (f_preserve * f_nMapEntries));
22393 }
22394}
22395
22396static int struct_size_xkb_Listing(tvbuff_t *tvb _U_, int *offsetp _U_, unsigned byte_order _U_)
22397{
22398 int size = 0;
22399 int f_length;
22400 f_length = tvb_get_uint16(tvb, *offsetp + size + 2, byte_order);
22401 size += f_length * 1;
22402 size = (size + 1) & ~1;
22403 return size + 4;
22404}
22405
22406static void struct_xkb_Listing(tvbuff_t *tvb, int *offsetp, proto_tree *root, unsigned byte_order _U_, int count)
22407{
22408 int i;
22409 for (i = 0; i < count; i++) {
22410 proto_item *item;
22411 proto_tree *t;
22412 int f_length;
22413
22414 item = proto_tree_add_item(root, hf_x11_struct_xkb_Listing, tvb, *offsetp, struct_size_xkb_Listing(tvb, offsetp, byte_order), ENC_NA);
22415 t = proto_item_add_subtree(item, ett_x11_rectangle);
22416 proto_tree_add_item(t, hf_x11_struct_xkb_Listing_flags, tvb, *offsetp, 2, byte_order);
22417 *offsetp += 2;
22418 f_length = tvb_get_uint16(tvb, *offsetp, byte_order);
22419 proto_tree_add_item(t, hf_x11_struct_xkb_Listing_length, tvb, *offsetp, 2, byte_order);
22420 *offsetp += 2;
22421 listOfByte(tvb, offsetp, t, hf_x11_struct_xkb_Listing_string, f_length, byte_order);
22422 if (*offsetp % 2) {
22423 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, (2 - *offsetp % 2), ENC_NA);
22424 *offsetp += (2 - *offsetp % 2);
22425 }
22426 }
22427}
22428
22429static int struct_size_xkb_DeviceLedInfo(tvbuff_t *tvb _U_, int *offsetp _U_, unsigned byte_order _U_)
22430{
22431 int size = 0;
22432 int f_mapsPresent;
22433 int f_namesPresent;
22434 f_namesPresent = tvb_get_uint32(tvb, *offsetp + size + 4, byte_order);
22435 f_mapsPresent = tvb_get_uint32(tvb, *offsetp + size + 8, byte_order);
22436 size += ws_count_ones(f_namesPresent) * 4;
22437 size += ws_count_ones(f_mapsPresent) * 12;
22438 return size + 20;
22439}
22440
22441static void struct_xkb_DeviceLedInfo(tvbuff_t *tvb, int *offsetp, proto_tree *root, unsigned byte_order _U_, int count)
22442{
22443 int i;
22444 for (i = 0; i < count; i++) {
22445 proto_item *item;
22446 proto_tree *t;
22447 int f_namesPresent;
22448 int f_mapsPresent;
22449
22450 item = proto_tree_add_item(root, hf_x11_struct_xkb_DeviceLedInfo, tvb, *offsetp, struct_size_xkb_DeviceLedInfo(tvb, offsetp, byte_order), ENC_NA);
22451 t = proto_item_add_subtree(item, ett_x11_rectangle);
22452 field16(tvb, offsetp, t, hf_x11_struct_xkb_DeviceLedInfo_ledClass, byte_order);
22453 field16(tvb, offsetp, t, hf_x11_struct_xkb_DeviceLedInfo_ledID, byte_order);
22454 f_namesPresent = tvb_get_uint32(tvb, *offsetp, byte_order);
22455 proto_tree_add_item(t, hf_x11_struct_xkb_DeviceLedInfo_namesPresent, tvb, *offsetp, 4, byte_order);
22456 *offsetp += 4;
22457 f_mapsPresent = tvb_get_uint32(tvb, *offsetp, byte_order);
22458 proto_tree_add_item(t, hf_x11_struct_xkb_DeviceLedInfo_mapsPresent, tvb, *offsetp, 4, byte_order);
22459 *offsetp += 4;
22460 proto_tree_add_item(t, hf_x11_struct_xkb_DeviceLedInfo_physIndicators, tvb, *offsetp, 4, byte_order);
22461 *offsetp += 4;
22462 proto_tree_add_item(t, hf_x11_struct_xkb_DeviceLedInfo_state, tvb, *offsetp, 4, byte_order);
22463 *offsetp += 4;
22464 listOfCard32(tvb, offsetp, t, hf_x11_struct_xkb_DeviceLedInfo_names, hf_x11_struct_xkb_DeviceLedInfo_names_item, ws_count_ones(f_namesPresent), byte_order);
22465 struct_xkb_IndicatorMap(tvb, offsetp, t, byte_order, ws_count_ones(f_mapsPresent));
22466 }
22467}
22468
22469static void struct_xkb_SANoAction(tvbuff_t *tvb, int *offsetp, proto_tree *root, unsigned byte_order _U_, int count)
22470{
22471 int i;
22472 for (i = 0; i < count; i++) {
22473 proto_item *item;
22474 proto_tree *t;
22475
22476 item = proto_tree_add_item(root, hf_x11_struct_xkb_SANoAction, tvb, *offsetp, 8, ENC_NA);
22477 t = proto_item_add_subtree(item, ett_x11_rectangle);
22478 field8(tvb, offsetp, t, hf_x11_struct_xkb_SANoAction_type, byte_order);
22479 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 7, ENC_NA);
22480 *offsetp += 7;
22481 }
22482}
22483
22484static void struct_xkb_SASetMods(tvbuff_t *tvb, int *offsetp, proto_tree *root, unsigned byte_order _U_, int count)
22485{
22486 int i;
22487 for (i = 0; i < count; i++) {
22488 proto_item *item;
22489 proto_tree *t;
22490
22491 item = proto_tree_add_item(root, hf_x11_struct_xkb_SASetMods, tvb, *offsetp, 8, ENC_NA);
22492 t = proto_item_add_subtree(item, ett_x11_rectangle);
22493 field8(tvb, offsetp, t, hf_x11_struct_xkb_SASetMods_type, byte_order);
22494 {
22495 static int* const flags_bits [] = {
22496 &hf_x11_struct_xkb_SASetMods_flags_mask_ClearLocks,
22497 &hf_x11_struct_xkb_SASetMods_flags_mask_LatchToLock,
22498 &hf_x11_struct_xkb_SASetMods_flags_mask_GroupAbsolute,
22499 NULL
22500 };
22501 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_struct_xkb_SASetMods_flags, ett_x11_rectangle, flags_bits, byte_order);
22502 }
22503 *offsetp += 1;
22504 {
22505 static int* const mask_bits [] = {
22506 &hf_x11_struct_xkb_SASetMods_mask_mask_Shift,
22507 &hf_x11_struct_xkb_SASetMods_mask_mask_Lock,
22508 &hf_x11_struct_xkb_SASetMods_mask_mask_Control,
22509 &hf_x11_struct_xkb_SASetMods_mask_mask_1,
22510 &hf_x11_struct_xkb_SASetMods_mask_mask_2,
22511 &hf_x11_struct_xkb_SASetMods_mask_mask_3,
22512 &hf_x11_struct_xkb_SASetMods_mask_mask_4,
22513 &hf_x11_struct_xkb_SASetMods_mask_mask_5,
22514 &hf_x11_struct_xkb_SASetMods_mask_mask_Any,
22515 NULL
22516 };
22517 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_struct_xkb_SASetMods_mask, ett_x11_rectangle, mask_bits, byte_order);
22518 }
22519 *offsetp += 1;
22520 {
22521 static int* const realMods_bits [] = {
22522 &hf_x11_struct_xkb_SASetMods_realMods_mask_Shift,
22523 &hf_x11_struct_xkb_SASetMods_realMods_mask_Lock,
22524 &hf_x11_struct_xkb_SASetMods_realMods_mask_Control,
22525 &hf_x11_struct_xkb_SASetMods_realMods_mask_1,
22526 &hf_x11_struct_xkb_SASetMods_realMods_mask_2,
22527 &hf_x11_struct_xkb_SASetMods_realMods_mask_3,
22528 &hf_x11_struct_xkb_SASetMods_realMods_mask_4,
22529 &hf_x11_struct_xkb_SASetMods_realMods_mask_5,
22530 &hf_x11_struct_xkb_SASetMods_realMods_mask_Any,
22531 NULL
22532 };
22533 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_struct_xkb_SASetMods_realMods, ett_x11_rectangle, realMods_bits, byte_order);
22534 }
22535 *offsetp += 1;
22536 {
22537 static int* const vmodsHigh_bits [] = {
22538 &hf_x11_struct_xkb_SASetMods_vmodsHigh_mask_8,
22539 &hf_x11_struct_xkb_SASetMods_vmodsHigh_mask_9,
22540 &hf_x11_struct_xkb_SASetMods_vmodsHigh_mask_10,
22541 &hf_x11_struct_xkb_SASetMods_vmodsHigh_mask_11,
22542 &hf_x11_struct_xkb_SASetMods_vmodsHigh_mask_12,
22543 &hf_x11_struct_xkb_SASetMods_vmodsHigh_mask_13,
22544 &hf_x11_struct_xkb_SASetMods_vmodsHigh_mask_14,
22545 &hf_x11_struct_xkb_SASetMods_vmodsHigh_mask_15,
22546 NULL
22547 };
22548 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_struct_xkb_SASetMods_vmodsHigh, ett_x11_rectangle, vmodsHigh_bits, byte_order);
22549 }
22550 *offsetp += 1;
22551 {
22552 static int* const vmodsLow_bits [] = {
22553 &hf_x11_struct_xkb_SASetMods_vmodsLow_mask_0,
22554 &hf_x11_struct_xkb_SASetMods_vmodsLow_mask_1,
22555 &hf_x11_struct_xkb_SASetMods_vmodsLow_mask_2,
22556 &hf_x11_struct_xkb_SASetMods_vmodsLow_mask_3,
22557 &hf_x11_struct_xkb_SASetMods_vmodsLow_mask_4,
22558 &hf_x11_struct_xkb_SASetMods_vmodsLow_mask_5,
22559 &hf_x11_struct_xkb_SASetMods_vmodsLow_mask_6,
22560 &hf_x11_struct_xkb_SASetMods_vmodsLow_mask_7,
22561 NULL
22562 };
22563 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_struct_xkb_SASetMods_vmodsLow, ett_x11_rectangle, vmodsLow_bits, byte_order);
22564 }
22565 *offsetp += 1;
22566 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 2, ENC_NA);
22567 *offsetp += 2;
22568 }
22569}
22570
22571static void struct_xkb_SASetGroup(tvbuff_t *tvb, int *offsetp, proto_tree *root, unsigned byte_order _U_, int count)
22572{
22573 int i;
22574 for (i = 0; i < count; i++) {
22575 proto_item *item;
22576 proto_tree *t;
22577
22578 item = proto_tree_add_item(root, hf_x11_struct_xkb_SASetGroup, tvb, *offsetp, 8, ENC_NA);
22579 t = proto_item_add_subtree(item, ett_x11_rectangle);
22580 field8(tvb, offsetp, t, hf_x11_struct_xkb_SASetGroup_type, byte_order);
22581 {
22582 static int* const flags_bits [] = {
22583 &hf_x11_struct_xkb_SASetGroup_flags_mask_ClearLocks,
22584 &hf_x11_struct_xkb_SASetGroup_flags_mask_LatchToLock,
22585 &hf_x11_struct_xkb_SASetGroup_flags_mask_GroupAbsolute,
22586 NULL
22587 };
22588 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_struct_xkb_SASetGroup_flags, ett_x11_rectangle, flags_bits, byte_order);
22589 }
22590 *offsetp += 1;
22591 proto_tree_add_item(t, hf_x11_struct_xkb_SASetGroup_group, tvb, *offsetp, 1, byte_order);
22592 *offsetp += 1;
22593 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 5, ENC_NA);
22594 *offsetp += 5;
22595 }
22596}
22597
22598static void struct_xkb_SAMovePtr(tvbuff_t *tvb, int *offsetp, proto_tree *root, unsigned byte_order _U_, int count)
22599{
22600 int i;
22601 for (i = 0; i < count; i++) {
22602 proto_item *item;
22603 proto_tree *t;
22604
22605 item = proto_tree_add_item(root, hf_x11_struct_xkb_SAMovePtr, tvb, *offsetp, 8, ENC_NA);
22606 t = proto_item_add_subtree(item, ett_x11_rectangle);
22607 field8(tvb, offsetp, t, hf_x11_struct_xkb_SAMovePtr_type, byte_order);
22608 {
22609 static int* const flags_bits [] = {
22610 &hf_x11_struct_xkb_SAMovePtr_flags_mask_NoAcceleration,
22611 &hf_x11_struct_xkb_SAMovePtr_flags_mask_MoveAbsoluteX,
22612 &hf_x11_struct_xkb_SAMovePtr_flags_mask_MoveAbsoluteY,
22613 NULL
22614 };
22615 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_struct_xkb_SAMovePtr_flags, ett_x11_rectangle, flags_bits, byte_order);
22616 }
22617 *offsetp += 1;
22618 proto_tree_add_item(t, hf_x11_struct_xkb_SAMovePtr_xHigh, tvb, *offsetp, 1, byte_order);
22619 *offsetp += 1;
22620 proto_tree_add_item(t, hf_x11_struct_xkb_SAMovePtr_xLow, tvb, *offsetp, 1, byte_order);
22621 *offsetp += 1;
22622 proto_tree_add_item(t, hf_x11_struct_xkb_SAMovePtr_yHigh, tvb, *offsetp, 1, byte_order);
22623 *offsetp += 1;
22624 proto_tree_add_item(t, hf_x11_struct_xkb_SAMovePtr_yLow, tvb, *offsetp, 1, byte_order);
22625 *offsetp += 1;
22626 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 2, ENC_NA);
22627 *offsetp += 2;
22628 }
22629}
22630
22631static void struct_xkb_SAPtrBtn(tvbuff_t *tvb, int *offsetp, proto_tree *root, unsigned byte_order _U_, int count)
22632{
22633 int i;
22634 for (i = 0; i < count; i++) {
22635 proto_item *item;
22636 proto_tree *t;
22637
22638 item = proto_tree_add_item(root, hf_x11_struct_xkb_SAPtrBtn, tvb, *offsetp, 8, ENC_NA);
22639 t = proto_item_add_subtree(item, ett_x11_rectangle);
22640 field8(tvb, offsetp, t, hf_x11_struct_xkb_SAPtrBtn_type, byte_order);
22641 proto_tree_add_item(t, hf_x11_struct_xkb_SAPtrBtn_flags, tvb, *offsetp, 1, byte_order);
22642 *offsetp += 1;
22643 proto_tree_add_item(t, hf_x11_struct_xkb_SAPtrBtn_count, tvb, *offsetp, 1, byte_order);
22644 *offsetp += 1;
22645 proto_tree_add_item(t, hf_x11_struct_xkb_SAPtrBtn_button, tvb, *offsetp, 1, byte_order);
22646 *offsetp += 1;
22647 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 4, ENC_NA);
22648 *offsetp += 4;
22649 }
22650}
22651
22652static void struct_xkb_SALockPtrBtn(tvbuff_t *tvb, int *offsetp, proto_tree *root, unsigned byte_order _U_, int count)
22653{
22654 int i;
22655 for (i = 0; i < count; i++) {
22656 proto_item *item;
22657 proto_tree *t;
22658
22659 item = proto_tree_add_item(root, hf_x11_struct_xkb_SALockPtrBtn, tvb, *offsetp, 8, ENC_NA);
22660 t = proto_item_add_subtree(item, ett_x11_rectangle);
22661 field8(tvb, offsetp, t, hf_x11_struct_xkb_SALockPtrBtn_type, byte_order);
22662 proto_tree_add_item(t, hf_x11_struct_xkb_SALockPtrBtn_flags, tvb, *offsetp, 1, byte_order);
22663 *offsetp += 1;
22664 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
22665 *offsetp += 1;
22666 proto_tree_add_item(t, hf_x11_struct_xkb_SALockPtrBtn_button, tvb, *offsetp, 1, byte_order);
22667 *offsetp += 1;
22668 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 4, ENC_NA);
22669 *offsetp += 4;
22670 }
22671}
22672
22673static void struct_xkb_SASetPtrDflt(tvbuff_t *tvb, int *offsetp, proto_tree *root, unsigned byte_order _U_, int count)
22674{
22675 int i;
22676 for (i = 0; i < count; i++) {
22677 proto_item *item;
22678 proto_tree *t;
22679
22680 item = proto_tree_add_item(root, hf_x11_struct_xkb_SASetPtrDflt, tvb, *offsetp, 8, ENC_NA);
22681 t = proto_item_add_subtree(item, ett_x11_rectangle);
22682 field8(tvb, offsetp, t, hf_x11_struct_xkb_SASetPtrDflt_type, byte_order);
22683 {
22684 static int* const flags_bits [] = {
22685 &hf_x11_struct_xkb_SASetPtrDflt_flags_mask_AffectDfltButton,
22686 &hf_x11_struct_xkb_SASetPtrDflt_flags_mask_DfltBtnAbsolute,
22687 NULL
22688 };
22689 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_struct_xkb_SASetPtrDflt_flags, ett_x11_rectangle, flags_bits, byte_order);
22690 }
22691 *offsetp += 1;
22692 {
22693 static int* const affect_bits [] = {
22694 &hf_x11_struct_xkb_SASetPtrDflt_affect_mask_AffectDfltButton,
22695 &hf_x11_struct_xkb_SASetPtrDflt_affect_mask_DfltBtnAbsolute,
22696 NULL
22697 };
22698 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_struct_xkb_SASetPtrDflt_affect, ett_x11_rectangle, affect_bits, byte_order);
22699 }
22700 *offsetp += 1;
22701 proto_tree_add_item(t, hf_x11_struct_xkb_SASetPtrDflt_value, tvb, *offsetp, 1, byte_order);
22702 *offsetp += 1;
22703 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 4, ENC_NA);
22704 *offsetp += 4;
22705 }
22706}
22707
22708static void struct_xkb_SAIsoLock(tvbuff_t *tvb, int *offsetp, proto_tree *root, unsigned byte_order _U_, int count)
22709{
22710 int i;
22711 for (i = 0; i < count; i++) {
22712 proto_item *item;
22713 proto_tree *t;
22714
22715 item = proto_tree_add_item(root, hf_x11_struct_xkb_SAIsoLock, tvb, *offsetp, 8, ENC_NA);
22716 t = proto_item_add_subtree(item, ett_x11_rectangle);
22717 field8(tvb, offsetp, t, hf_x11_struct_xkb_SAIsoLock_type, byte_order);
22718 {
22719 static int* const flags_bits [] = {
22720 &hf_x11_struct_xkb_SAIsoLock_flags_mask_NoLock,
22721 &hf_x11_struct_xkb_SAIsoLock_flags_mask_NoUnlock,
22722 &hf_x11_struct_xkb_SAIsoLock_flags_mask_GroupAbsolute,
22723 &hf_x11_struct_xkb_SAIsoLock_flags_mask_ISODfltIsGroup,
22724 NULL
22725 };
22726 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_struct_xkb_SAIsoLock_flags, ett_x11_rectangle, flags_bits, byte_order);
22727 }
22728 *offsetp += 1;
22729 {
22730 static int* const mask_bits [] = {
22731 &hf_x11_struct_xkb_SAIsoLock_mask_mask_Shift,
22732 &hf_x11_struct_xkb_SAIsoLock_mask_mask_Lock,
22733 &hf_x11_struct_xkb_SAIsoLock_mask_mask_Control,
22734 &hf_x11_struct_xkb_SAIsoLock_mask_mask_1,
22735 &hf_x11_struct_xkb_SAIsoLock_mask_mask_2,
22736 &hf_x11_struct_xkb_SAIsoLock_mask_mask_3,
22737 &hf_x11_struct_xkb_SAIsoLock_mask_mask_4,
22738 &hf_x11_struct_xkb_SAIsoLock_mask_mask_5,
22739 &hf_x11_struct_xkb_SAIsoLock_mask_mask_Any,
22740 NULL
22741 };
22742 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_struct_xkb_SAIsoLock_mask, ett_x11_rectangle, mask_bits, byte_order);
22743 }
22744 *offsetp += 1;
22745 {
22746 static int* const realMods_bits [] = {
22747 &hf_x11_struct_xkb_SAIsoLock_realMods_mask_Shift,
22748 &hf_x11_struct_xkb_SAIsoLock_realMods_mask_Lock,
22749 &hf_x11_struct_xkb_SAIsoLock_realMods_mask_Control,
22750 &hf_x11_struct_xkb_SAIsoLock_realMods_mask_1,
22751 &hf_x11_struct_xkb_SAIsoLock_realMods_mask_2,
22752 &hf_x11_struct_xkb_SAIsoLock_realMods_mask_3,
22753 &hf_x11_struct_xkb_SAIsoLock_realMods_mask_4,
22754 &hf_x11_struct_xkb_SAIsoLock_realMods_mask_5,
22755 &hf_x11_struct_xkb_SAIsoLock_realMods_mask_Any,
22756 NULL
22757 };
22758 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_struct_xkb_SAIsoLock_realMods, ett_x11_rectangle, realMods_bits, byte_order);
22759 }
22760 *offsetp += 1;
22761 proto_tree_add_item(t, hf_x11_struct_xkb_SAIsoLock_group, tvb, *offsetp, 1, byte_order);
22762 *offsetp += 1;
22763 {
22764 static int* const affect_bits [] = {
22765 &hf_x11_struct_xkb_SAIsoLock_affect_mask_Ctrls,
22766 &hf_x11_struct_xkb_SAIsoLock_affect_mask_Ptr,
22767 &hf_x11_struct_xkb_SAIsoLock_affect_mask_Group,
22768 &hf_x11_struct_xkb_SAIsoLock_affect_mask_Mods,
22769 NULL
22770 };
22771 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_struct_xkb_SAIsoLock_affect, ett_x11_rectangle, affect_bits, byte_order);
22772 }
22773 *offsetp += 1;
22774 {
22775 static int* const vmodsHigh_bits [] = {
22776 &hf_x11_struct_xkb_SAIsoLock_vmodsHigh_mask_8,
22777 &hf_x11_struct_xkb_SAIsoLock_vmodsHigh_mask_9,
22778 &hf_x11_struct_xkb_SAIsoLock_vmodsHigh_mask_10,
22779 &hf_x11_struct_xkb_SAIsoLock_vmodsHigh_mask_11,
22780 &hf_x11_struct_xkb_SAIsoLock_vmodsHigh_mask_12,
22781 &hf_x11_struct_xkb_SAIsoLock_vmodsHigh_mask_13,
22782 &hf_x11_struct_xkb_SAIsoLock_vmodsHigh_mask_14,
22783 &hf_x11_struct_xkb_SAIsoLock_vmodsHigh_mask_15,
22784 NULL
22785 };
22786 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_struct_xkb_SAIsoLock_vmodsHigh, ett_x11_rectangle, vmodsHigh_bits, byte_order);
22787 }
22788 *offsetp += 1;
22789 {
22790 static int* const vmodsLow_bits [] = {
22791 &hf_x11_struct_xkb_SAIsoLock_vmodsLow_mask_0,
22792 &hf_x11_struct_xkb_SAIsoLock_vmodsLow_mask_1,
22793 &hf_x11_struct_xkb_SAIsoLock_vmodsLow_mask_2,
22794 &hf_x11_struct_xkb_SAIsoLock_vmodsLow_mask_3,
22795 &hf_x11_struct_xkb_SAIsoLock_vmodsLow_mask_4,
22796 &hf_x11_struct_xkb_SAIsoLock_vmodsLow_mask_5,
22797 &hf_x11_struct_xkb_SAIsoLock_vmodsLow_mask_6,
22798 &hf_x11_struct_xkb_SAIsoLock_vmodsLow_mask_7,
22799 NULL
22800 };
22801 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_struct_xkb_SAIsoLock_vmodsLow, ett_x11_rectangle, vmodsLow_bits, byte_order);
22802 }
22803 *offsetp += 1;
22804 }
22805}
22806
22807static void struct_xkb_SATerminate(tvbuff_t *tvb, int *offsetp, proto_tree *root, unsigned byte_order _U_, int count)
22808{
22809 int i;
22810 for (i = 0; i < count; i++) {
22811 proto_item *item;
22812 proto_tree *t;
22813
22814 item = proto_tree_add_item(root, hf_x11_struct_xkb_SATerminate, tvb, *offsetp, 8, ENC_NA);
22815 t = proto_item_add_subtree(item, ett_x11_rectangle);
22816 field8(tvb, offsetp, t, hf_x11_struct_xkb_SATerminate_type, byte_order);
22817 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 7, ENC_NA);
22818 *offsetp += 7;
22819 }
22820}
22821
22822static void struct_xkb_SASwitchScreen(tvbuff_t *tvb, int *offsetp, proto_tree *root, unsigned byte_order _U_, int count)
22823{
22824 int i;
22825 for (i = 0; i < count; i++) {
22826 proto_item *item;
22827 proto_tree *t;
22828
22829 item = proto_tree_add_item(root, hf_x11_struct_xkb_SASwitchScreen, tvb, *offsetp, 8, ENC_NA);
22830 t = proto_item_add_subtree(item, ett_x11_rectangle);
22831 field8(tvb, offsetp, t, hf_x11_struct_xkb_SASwitchScreen_type, byte_order);
22832 proto_tree_add_item(t, hf_x11_struct_xkb_SASwitchScreen_flags, tvb, *offsetp, 1, byte_order);
22833 *offsetp += 1;
22834 proto_tree_add_item(t, hf_x11_struct_xkb_SASwitchScreen_newScreen, tvb, *offsetp, 1, byte_order);
22835 *offsetp += 1;
22836 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 5, ENC_NA);
22837 *offsetp += 5;
22838 }
22839}
22840
22841static void struct_xkb_SASetControls(tvbuff_t *tvb, int *offsetp, proto_tree *root, unsigned byte_order _U_, int count)
22842{
22843 int i;
22844 for (i = 0; i < count; i++) {
22845 proto_item *item;
22846 proto_tree *t;
22847
22848 item = proto_tree_add_item(root, hf_x11_struct_xkb_SASetControls, tvb, *offsetp, 8, ENC_NA);
22849 t = proto_item_add_subtree(item, ett_x11_rectangle);
22850 field8(tvb, offsetp, t, hf_x11_struct_xkb_SASetControls_type, byte_order);
22851 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 3, ENC_NA);
22852 *offsetp += 3;
22853 {
22854 static int* const boolCtrlsHigh_bits [] = {
22855 &hf_x11_struct_xkb_SASetControls_boolCtrlsHigh_mask_AccessXFeedback,
22856 &hf_x11_struct_xkb_SASetControls_boolCtrlsHigh_mask_AudibleBell,
22857 &hf_x11_struct_xkb_SASetControls_boolCtrlsHigh_mask_Overlay1,
22858 &hf_x11_struct_xkb_SASetControls_boolCtrlsHigh_mask_Overlay2,
22859 &hf_x11_struct_xkb_SASetControls_boolCtrlsHigh_mask_IgnoreGroupLock,
22860 NULL
22861 };
22862 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_struct_xkb_SASetControls_boolCtrlsHigh, ett_x11_rectangle, boolCtrlsHigh_bits, byte_order);
22863 }
22864 *offsetp += 1;
22865 {
22866 static int* const boolCtrlsLow_bits [] = {
22867 &hf_x11_struct_xkb_SASetControls_boolCtrlsLow_mask_RepeatKeys,
22868 &hf_x11_struct_xkb_SASetControls_boolCtrlsLow_mask_SlowKeys,
22869 &hf_x11_struct_xkb_SASetControls_boolCtrlsLow_mask_BounceKeys,
22870 &hf_x11_struct_xkb_SASetControls_boolCtrlsLow_mask_StickyKeys,
22871 &hf_x11_struct_xkb_SASetControls_boolCtrlsLow_mask_MouseKeys,
22872 &hf_x11_struct_xkb_SASetControls_boolCtrlsLow_mask_MouseKeysAccel,
22873 &hf_x11_struct_xkb_SASetControls_boolCtrlsLow_mask_AccessXKeys,
22874 &hf_x11_struct_xkb_SASetControls_boolCtrlsLow_mask_AccessXTimeout,
22875 NULL
22876 };
22877 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_struct_xkb_SASetControls_boolCtrlsLow, ett_x11_rectangle, boolCtrlsLow_bits, byte_order);
22878 }
22879 *offsetp += 1;
22880 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 2, ENC_NA);
22881 *offsetp += 2;
22882 }
22883}
22884
22885static void struct_xkb_SAActionMessage(tvbuff_t *tvb, int *offsetp, proto_tree *root, unsigned byte_order _U_, int count)
22886{
22887 int i;
22888 for (i = 0; i < count; i++) {
22889 proto_item *item;
22890 proto_tree *t;
22891
22892 item = proto_tree_add_item(root, hf_x11_struct_xkb_SAActionMessage, tvb, *offsetp, 8, ENC_NA);
22893 t = proto_item_add_subtree(item, ett_x11_rectangle);
22894 field8(tvb, offsetp, t, hf_x11_struct_xkb_SAActionMessage_type, byte_order);
22895 {
22896 static int* const flags_bits [] = {
22897 &hf_x11_struct_xkb_SAActionMessage_flags_mask_OnPress,
22898 &hf_x11_struct_xkb_SAActionMessage_flags_mask_OnRelease,
22899 &hf_x11_struct_xkb_SAActionMessage_flags_mask_GenKeyEvent,
22900 NULL
22901 };
22902 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_struct_xkb_SAActionMessage_flags, ett_x11_rectangle, flags_bits, byte_order);
22903 }
22904 *offsetp += 1;
22905 listOfByte(tvb, offsetp, t, hf_x11_struct_xkb_SAActionMessage_message, 6, byte_order);
22906 }
22907}
22908
22909static void struct_xkb_SARedirectKey(tvbuff_t *tvb, int *offsetp, proto_tree *root, unsigned byte_order _U_, int count)
22910{
22911 int i;
22912 for (i = 0; i < count; i++) {
22913 proto_item *item;
22914 proto_tree *t;
22915
22916 item = proto_tree_add_item(root, hf_x11_struct_xkb_SARedirectKey, tvb, *offsetp, 8, ENC_NA);
22917 t = proto_item_add_subtree(item, ett_x11_rectangle);
22918 field8(tvb, offsetp, t, hf_x11_struct_xkb_SARedirectKey_type, byte_order);
22919 proto_tree_add_item(t, hf_x11_struct_xkb_SARedirectKey_newkey, tvb, *offsetp, 1, byte_order);
22920 *offsetp += 1;
22921 {
22922 static int* const mask_bits [] = {
22923 &hf_x11_struct_xkb_SARedirectKey_mask_mask_Shift,
22924 &hf_x11_struct_xkb_SARedirectKey_mask_mask_Lock,
22925 &hf_x11_struct_xkb_SARedirectKey_mask_mask_Control,
22926 &hf_x11_struct_xkb_SARedirectKey_mask_mask_1,
22927 &hf_x11_struct_xkb_SARedirectKey_mask_mask_2,
22928 &hf_x11_struct_xkb_SARedirectKey_mask_mask_3,
22929 &hf_x11_struct_xkb_SARedirectKey_mask_mask_4,
22930 &hf_x11_struct_xkb_SARedirectKey_mask_mask_5,
22931 &hf_x11_struct_xkb_SARedirectKey_mask_mask_Any,
22932 NULL
22933 };
22934 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_struct_xkb_SARedirectKey_mask, ett_x11_rectangle, mask_bits, byte_order);
22935 }
22936 *offsetp += 1;
22937 {
22938 static int* const realModifiers_bits [] = {
22939 &hf_x11_struct_xkb_SARedirectKey_realModifiers_mask_Shift,
22940 &hf_x11_struct_xkb_SARedirectKey_realModifiers_mask_Lock,
22941 &hf_x11_struct_xkb_SARedirectKey_realModifiers_mask_Control,
22942 &hf_x11_struct_xkb_SARedirectKey_realModifiers_mask_1,
22943 &hf_x11_struct_xkb_SARedirectKey_realModifiers_mask_2,
22944 &hf_x11_struct_xkb_SARedirectKey_realModifiers_mask_3,
22945 &hf_x11_struct_xkb_SARedirectKey_realModifiers_mask_4,
22946 &hf_x11_struct_xkb_SARedirectKey_realModifiers_mask_5,
22947 &hf_x11_struct_xkb_SARedirectKey_realModifiers_mask_Any,
22948 NULL
22949 };
22950 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_struct_xkb_SARedirectKey_realModifiers, ett_x11_rectangle, realModifiers_bits, byte_order);
22951 }
22952 *offsetp += 1;
22953 {
22954 static int* const vmodsMaskHigh_bits [] = {
22955 &hf_x11_struct_xkb_SARedirectKey_vmodsMaskHigh_mask_8,
22956 &hf_x11_struct_xkb_SARedirectKey_vmodsMaskHigh_mask_9,
22957 &hf_x11_struct_xkb_SARedirectKey_vmodsMaskHigh_mask_10,
22958 &hf_x11_struct_xkb_SARedirectKey_vmodsMaskHigh_mask_11,
22959 &hf_x11_struct_xkb_SARedirectKey_vmodsMaskHigh_mask_12,
22960 &hf_x11_struct_xkb_SARedirectKey_vmodsMaskHigh_mask_13,
22961 &hf_x11_struct_xkb_SARedirectKey_vmodsMaskHigh_mask_14,
22962 &hf_x11_struct_xkb_SARedirectKey_vmodsMaskHigh_mask_15,
22963 NULL
22964 };
22965 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_struct_xkb_SARedirectKey_vmodsMaskHigh, ett_x11_rectangle, vmodsMaskHigh_bits, byte_order);
22966 }
22967 *offsetp += 1;
22968 {
22969 static int* const vmodsMaskLow_bits [] = {
22970 &hf_x11_struct_xkb_SARedirectKey_vmodsMaskLow_mask_0,
22971 &hf_x11_struct_xkb_SARedirectKey_vmodsMaskLow_mask_1,
22972 &hf_x11_struct_xkb_SARedirectKey_vmodsMaskLow_mask_2,
22973 &hf_x11_struct_xkb_SARedirectKey_vmodsMaskLow_mask_3,
22974 &hf_x11_struct_xkb_SARedirectKey_vmodsMaskLow_mask_4,
22975 &hf_x11_struct_xkb_SARedirectKey_vmodsMaskLow_mask_5,
22976 &hf_x11_struct_xkb_SARedirectKey_vmodsMaskLow_mask_6,
22977 &hf_x11_struct_xkb_SARedirectKey_vmodsMaskLow_mask_7,
22978 NULL
22979 };
22980 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_struct_xkb_SARedirectKey_vmodsMaskLow, ett_x11_rectangle, vmodsMaskLow_bits, byte_order);
22981 }
22982 *offsetp += 1;
22983 {
22984 static int* const vmodsHigh_bits [] = {
22985 &hf_x11_struct_xkb_SARedirectKey_vmodsHigh_mask_8,
22986 &hf_x11_struct_xkb_SARedirectKey_vmodsHigh_mask_9,
22987 &hf_x11_struct_xkb_SARedirectKey_vmodsHigh_mask_10,
22988 &hf_x11_struct_xkb_SARedirectKey_vmodsHigh_mask_11,
22989 &hf_x11_struct_xkb_SARedirectKey_vmodsHigh_mask_12,
22990 &hf_x11_struct_xkb_SARedirectKey_vmodsHigh_mask_13,
22991 &hf_x11_struct_xkb_SARedirectKey_vmodsHigh_mask_14,
22992 &hf_x11_struct_xkb_SARedirectKey_vmodsHigh_mask_15,
22993 NULL
22994 };
22995 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_struct_xkb_SARedirectKey_vmodsHigh, ett_x11_rectangle, vmodsHigh_bits, byte_order);
22996 }
22997 *offsetp += 1;
22998 {
22999 static int* const vmodsLow_bits [] = {
23000 &hf_x11_struct_xkb_SARedirectKey_vmodsLow_mask_0,
23001 &hf_x11_struct_xkb_SARedirectKey_vmodsLow_mask_1,
23002 &hf_x11_struct_xkb_SARedirectKey_vmodsLow_mask_2,
23003 &hf_x11_struct_xkb_SARedirectKey_vmodsLow_mask_3,
23004 &hf_x11_struct_xkb_SARedirectKey_vmodsLow_mask_4,
23005 &hf_x11_struct_xkb_SARedirectKey_vmodsLow_mask_5,
23006 &hf_x11_struct_xkb_SARedirectKey_vmodsLow_mask_6,
23007 &hf_x11_struct_xkb_SARedirectKey_vmodsLow_mask_7,
23008 NULL
23009 };
23010 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_struct_xkb_SARedirectKey_vmodsLow, ett_x11_rectangle, vmodsLow_bits, byte_order);
23011 }
23012 *offsetp += 1;
23013 }
23014}
23015
23016static void struct_xkb_SADeviceBtn(tvbuff_t *tvb, int *offsetp, proto_tree *root, unsigned byte_order _U_, int count)
23017{
23018 int i;
23019 for (i = 0; i < count; i++) {
23020 proto_item *item;
23021 proto_tree *t;
23022
23023 item = proto_tree_add_item(root, hf_x11_struct_xkb_SADeviceBtn, tvb, *offsetp, 8, ENC_NA);
23024 t = proto_item_add_subtree(item, ett_x11_rectangle);
23025 field8(tvb, offsetp, t, hf_x11_struct_xkb_SADeviceBtn_type, byte_order);
23026 proto_tree_add_item(t, hf_x11_struct_xkb_SADeviceBtn_flags, tvb, *offsetp, 1, byte_order);
23027 *offsetp += 1;
23028 proto_tree_add_item(t, hf_x11_struct_xkb_SADeviceBtn_count, tvb, *offsetp, 1, byte_order);
23029 *offsetp += 1;
23030 proto_tree_add_item(t, hf_x11_struct_xkb_SADeviceBtn_button, tvb, *offsetp, 1, byte_order);
23031 *offsetp += 1;
23032 proto_tree_add_item(t, hf_x11_struct_xkb_SADeviceBtn_device, tvb, *offsetp, 1, byte_order);
23033 *offsetp += 1;
23034 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 3, ENC_NA);
23035 *offsetp += 3;
23036 }
23037}
23038
23039static void struct_xkb_SALockDeviceBtn(tvbuff_t *tvb, int *offsetp, proto_tree *root, unsigned byte_order _U_, int count)
23040{
23041 int i;
23042 for (i = 0; i < count; i++) {
23043 proto_item *item;
23044 proto_tree *t;
23045
23046 item = proto_tree_add_item(root, hf_x11_struct_xkb_SALockDeviceBtn, tvb, *offsetp, 8, ENC_NA);
23047 t = proto_item_add_subtree(item, ett_x11_rectangle);
23048 field8(tvb, offsetp, t, hf_x11_struct_xkb_SALockDeviceBtn_type, byte_order);
23049 {
23050 static int* const flags_bits [] = {
23051 &hf_x11_struct_xkb_SALockDeviceBtn_flags_mask_NoLock,
23052 &hf_x11_struct_xkb_SALockDeviceBtn_flags_mask_NoUnlock,
23053 NULL
23054 };
23055 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_struct_xkb_SALockDeviceBtn_flags, ett_x11_rectangle, flags_bits, byte_order);
23056 }
23057 *offsetp += 1;
23058 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
23059 *offsetp += 1;
23060 proto_tree_add_item(t, hf_x11_struct_xkb_SALockDeviceBtn_button, tvb, *offsetp, 1, byte_order);
23061 *offsetp += 1;
23062 proto_tree_add_item(t, hf_x11_struct_xkb_SALockDeviceBtn_device, tvb, *offsetp, 1, byte_order);
23063 *offsetp += 1;
23064 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 3, ENC_NA);
23065 *offsetp += 3;
23066 }
23067}
23068
23069static void struct_xkb_SADeviceValuator(tvbuff_t *tvb, int *offsetp, proto_tree *root, unsigned byte_order _U_, int count)
23070{
23071 int i;
23072 for (i = 0; i < count; i++) {
23073 proto_item *item;
23074 proto_tree *t;
23075
23076 item = proto_tree_add_item(root, hf_x11_struct_xkb_SADeviceValuator, tvb, *offsetp, 8, ENC_NA);
23077 t = proto_item_add_subtree(item, ett_x11_rectangle);
23078 field8(tvb, offsetp, t, hf_x11_struct_xkb_SADeviceValuator_type, byte_order);
23079 proto_tree_add_item(t, hf_x11_struct_xkb_SADeviceValuator_device, tvb, *offsetp, 1, byte_order);
23080 *offsetp += 1;
23081 field8(tvb, offsetp, t, hf_x11_struct_xkb_SADeviceValuator_val1what, byte_order);
23082 proto_tree_add_item(t, hf_x11_struct_xkb_SADeviceValuator_val1index, tvb, *offsetp, 1, byte_order);
23083 *offsetp += 1;
23084 proto_tree_add_item(t, hf_x11_struct_xkb_SADeviceValuator_val1value, tvb, *offsetp, 1, byte_order);
23085 *offsetp += 1;
23086 field8(tvb, offsetp, t, hf_x11_struct_xkb_SADeviceValuator_val2what, byte_order);
23087 proto_tree_add_item(t, hf_x11_struct_xkb_SADeviceValuator_val2index, tvb, *offsetp, 1, byte_order);
23088 *offsetp += 1;
23089 proto_tree_add_item(t, hf_x11_struct_xkb_SADeviceValuator_val2value, tvb, *offsetp, 1, byte_order);
23090 *offsetp += 1;
23091 }
23092}
23093
23094static void struct_xkb_SIAction(tvbuff_t *tvb, int *offsetp, proto_tree *root, unsigned byte_order _U_, int count)
23095{
23096 int i;
23097 for (i = 0; i < count; i++) {
23098 proto_item *item;
23099 proto_tree *t;
23100
23101 item = proto_tree_add_item(root, hf_x11_struct_xkb_SIAction, tvb, *offsetp, 8, ENC_NA);
23102 t = proto_item_add_subtree(item, ett_x11_rectangle);
23103 field8(tvb, offsetp, t, hf_x11_struct_xkb_SIAction_type, byte_order);
23104 listOfByte(tvb, offsetp, t, hf_x11_struct_xkb_SIAction_data, 7, byte_order);
23105 }
23106}
23107
23108static void struct_xkb_SymInterpret(tvbuff_t *tvb, int *offsetp, proto_tree *root, unsigned byte_order _U_, int count)
23109{
23110 int i;
23111 for (i = 0; i < count; i++) {
23112 proto_item *item;
23113 proto_tree *t;
23114
23115 item = proto_tree_add_item(root, hf_x11_struct_xkb_SymInterpret, tvb, *offsetp, 16, ENC_NA);
23116 t = proto_item_add_subtree(item, ett_x11_rectangle);
23117 proto_tree_add_item(t, hf_x11_struct_xkb_SymInterpret_sym, tvb, *offsetp, 4, byte_order);
23118 *offsetp += 4;
23119 {
23120 static int* const mods_bits [] = {
23121 &hf_x11_struct_xkb_SymInterpret_mods_mask_Shift,
23122 &hf_x11_struct_xkb_SymInterpret_mods_mask_Lock,
23123 &hf_x11_struct_xkb_SymInterpret_mods_mask_Control,
23124 &hf_x11_struct_xkb_SymInterpret_mods_mask_1,
23125 &hf_x11_struct_xkb_SymInterpret_mods_mask_2,
23126 &hf_x11_struct_xkb_SymInterpret_mods_mask_3,
23127 &hf_x11_struct_xkb_SymInterpret_mods_mask_4,
23128 &hf_x11_struct_xkb_SymInterpret_mods_mask_5,
23129 &hf_x11_struct_xkb_SymInterpret_mods_mask_Any,
23130 NULL
23131 };
23132 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_struct_xkb_SymInterpret_mods, ett_x11_rectangle, mods_bits, byte_order);
23133 }
23134 *offsetp += 1;
23135 field8(tvb, offsetp, t, hf_x11_struct_xkb_SymInterpret_match, byte_order);
23136 {
23137 static int* const virtualMod_bits [] = {
23138 &hf_x11_struct_xkb_SymInterpret_virtualMod_mask_0,
23139 &hf_x11_struct_xkb_SymInterpret_virtualMod_mask_1,
23140 &hf_x11_struct_xkb_SymInterpret_virtualMod_mask_2,
23141 &hf_x11_struct_xkb_SymInterpret_virtualMod_mask_3,
23142 &hf_x11_struct_xkb_SymInterpret_virtualMod_mask_4,
23143 &hf_x11_struct_xkb_SymInterpret_virtualMod_mask_5,
23144 &hf_x11_struct_xkb_SymInterpret_virtualMod_mask_6,
23145 &hf_x11_struct_xkb_SymInterpret_virtualMod_mask_7,
23146 NULL
23147 };
23148 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_struct_xkb_SymInterpret_virtualMod, ett_x11_rectangle, virtualMod_bits, byte_order);
23149 }
23150 *offsetp += 1;
23151 proto_tree_add_item(t, hf_x11_struct_xkb_SymInterpret_flags, tvb, *offsetp, 1, byte_order);
23152 *offsetp += 1;
23153 struct_xkb_SIAction(tvb, offsetp, t, byte_order, 1);
23154 }
23155}
23156
23157static void struct_xkb_Action(tvbuff_t *tvb, int *offsetp, proto_tree *root, unsigned byte_order, int count)
23158{
23159 int i;
23160 int base = *offsetp;
23161 for (i = 0; i < count; i++) {
23162 proto_item *item;
23163 proto_tree *t;
23164 item = proto_tree_add_item(root, hf_x11_union_xkb_Action, tvb, base, 8, ENC_NA);
23165 t = proto_item_add_subtree(item, ett_x11_rectangle);
23166
23167 *offsetp = base;
23168 struct_xkb_SANoAction(tvb, offsetp, t, byte_order, 1);
23169 *offsetp = base;
23170 struct_xkb_SASetMods(tvb, offsetp, t, byte_order, 1);
23171 *offsetp = base;
23172 struct_xkb_SASetMods(tvb, offsetp, t, byte_order, 1);
23173 *offsetp = base;
23174 struct_xkb_SASetMods(tvb, offsetp, t, byte_order, 1);
23175 *offsetp = base;
23176 struct_xkb_SASetGroup(tvb, offsetp, t, byte_order, 1);
23177 *offsetp = base;
23178 struct_xkb_SASetGroup(tvb, offsetp, t, byte_order, 1);
23179 *offsetp = base;
23180 struct_xkb_SASetGroup(tvb, offsetp, t, byte_order, 1);
23181 *offsetp = base;
23182 struct_xkb_SAMovePtr(tvb, offsetp, t, byte_order, 1);
23183 *offsetp = base;
23184 struct_xkb_SAPtrBtn(tvb, offsetp, t, byte_order, 1);
23185 *offsetp = base;
23186 struct_xkb_SALockPtrBtn(tvb, offsetp, t, byte_order, 1);
23187 *offsetp = base;
23188 struct_xkb_SASetPtrDflt(tvb, offsetp, t, byte_order, 1);
23189 *offsetp = base;
23190 struct_xkb_SAIsoLock(tvb, offsetp, t, byte_order, 1);
23191 *offsetp = base;
23192 struct_xkb_SATerminate(tvb, offsetp, t, byte_order, 1);
23193 *offsetp = base;
23194 struct_xkb_SASwitchScreen(tvb, offsetp, t, byte_order, 1);
23195 *offsetp = base;
23196 struct_xkb_SASetControls(tvb, offsetp, t, byte_order, 1);
23197 *offsetp = base;
23198 struct_xkb_SASetControls(tvb, offsetp, t, byte_order, 1);
23199 *offsetp = base;
23200 struct_xkb_SAActionMessage(tvb, offsetp, t, byte_order, 1);
23201 *offsetp = base;
23202 struct_xkb_SARedirectKey(tvb, offsetp, t, byte_order, 1);
23203 *offsetp = base;
23204 struct_xkb_SADeviceBtn(tvb, offsetp, t, byte_order, 1);
23205 *offsetp = base;
23206 struct_xkb_SALockDeviceBtn(tvb, offsetp, t, byte_order, 1);
23207 *offsetp = base;
23208 struct_xkb_SADeviceValuator(tvb, offsetp, t, byte_order, 1);
23209 *offsetp = base;
23210 field8(tvb, offsetp, t, hf_x11_union_xkb_Action_type, byte_order);
23211 base += 8;
23212 }
23213 *offsetp = base;
23214}
23215
23216static void xkbUseExtension(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
23217{
23218 proto_tree_add_item(t, hf_x11_xkb_UseExtension_wantedMajor, tvb, *offsetp, 2, byte_order);
23219 *offsetp += 2;
23220 proto_tree_add_item(t, hf_x11_xkb_UseExtension_wantedMinor, tvb, *offsetp, 2, byte_order);
23221 *offsetp += 2;
23222}
23223static void xkbUseExtension_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
23224{
23225 int sequence_number;
23226
23227 col_append_fstr(pinfo->cinfo, COL_INFO, "-UseExtension");
23228
23229 REPLY(reply);
23230 proto_tree_add_item(t, hf_x11_xkb_UseExtension_reply_supported, tvb, *offsetp, 1, byte_order);
23231 *offsetp += 1;
23232 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
23233 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
23234 "%d (xkb-UseExtension)", sequence_number);
23235 *offsetp += 2;
23236 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
23237 *offsetp += 4;
23238 proto_tree_add_item(t, hf_x11_xkb_UseExtension_reply_serverMajor, tvb, *offsetp, 2, byte_order);
23239 *offsetp += 2;
23240 proto_tree_add_item(t, hf_x11_xkb_UseExtension_reply_serverMinor, tvb, *offsetp, 2, byte_order);
23241 *offsetp += 2;
23242 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 20, ENC_NA);
23243 *offsetp += 20;
23244}
23245
23246static void xkbSelectEvents(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
23247{
23248 int f_affectWhich;
23249 int f_clear;
23250 int f_selectAll;
23251 proto_tree_add_item(t, hf_x11_xkb_SelectEvents_deviceSpec, tvb, *offsetp, 2, byte_order);
23252 *offsetp += 2;
23253 f_affectWhich = tvb_get_uint16(tvb, *offsetp, byte_order);
23254 {
23255 static int* const affectWhich_bits [] = {
23256 &hf_x11_xkb_SelectEvents_affectWhich_mask_NewKeyboardNotify,
23257 &hf_x11_xkb_SelectEvents_affectWhich_mask_MapNotify,
23258 &hf_x11_xkb_SelectEvents_affectWhich_mask_StateNotify,
23259 &hf_x11_xkb_SelectEvents_affectWhich_mask_ControlsNotify,
23260 &hf_x11_xkb_SelectEvents_affectWhich_mask_IndicatorStateNotify,
23261 &hf_x11_xkb_SelectEvents_affectWhich_mask_IndicatorMapNotify,
23262 &hf_x11_xkb_SelectEvents_affectWhich_mask_NamesNotify,
23263 &hf_x11_xkb_SelectEvents_affectWhich_mask_CompatMapNotify,
23264 &hf_x11_xkb_SelectEvents_affectWhich_mask_BellNotify,
23265 &hf_x11_xkb_SelectEvents_affectWhich_mask_ActionMessage,
23266 &hf_x11_xkb_SelectEvents_affectWhich_mask_AccessXNotify,
23267 &hf_x11_xkb_SelectEvents_affectWhich_mask_ExtensionDeviceNotify,
23268 NULL
23269 };
23270 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xkb_SelectEvents_affectWhich, ett_x11_rectangle, affectWhich_bits, byte_order);
23271 }
23272 *offsetp += 2;
23273 f_clear = tvb_get_uint16(tvb, *offsetp, byte_order);
23274 {
23275 static int* const clear_bits [] = {
23276 &hf_x11_xkb_SelectEvents_clear_mask_NewKeyboardNotify,
23277 &hf_x11_xkb_SelectEvents_clear_mask_MapNotify,
23278 &hf_x11_xkb_SelectEvents_clear_mask_StateNotify,
23279 &hf_x11_xkb_SelectEvents_clear_mask_ControlsNotify,
23280 &hf_x11_xkb_SelectEvents_clear_mask_IndicatorStateNotify,
23281 &hf_x11_xkb_SelectEvents_clear_mask_IndicatorMapNotify,
23282 &hf_x11_xkb_SelectEvents_clear_mask_NamesNotify,
23283 &hf_x11_xkb_SelectEvents_clear_mask_CompatMapNotify,
23284 &hf_x11_xkb_SelectEvents_clear_mask_BellNotify,
23285 &hf_x11_xkb_SelectEvents_clear_mask_ActionMessage,
23286 &hf_x11_xkb_SelectEvents_clear_mask_AccessXNotify,
23287 &hf_x11_xkb_SelectEvents_clear_mask_ExtensionDeviceNotify,
23288 NULL
23289 };
23290 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xkb_SelectEvents_clear, ett_x11_rectangle, clear_bits, byte_order);
23291 }
23292 *offsetp += 2;
23293 f_selectAll = tvb_get_uint16(tvb, *offsetp, byte_order);
23294 {
23295 static int* const selectAll_bits [] = {
23296 &hf_x11_xkb_SelectEvents_selectAll_mask_NewKeyboardNotify,
23297 &hf_x11_xkb_SelectEvents_selectAll_mask_MapNotify,
23298 &hf_x11_xkb_SelectEvents_selectAll_mask_StateNotify,
23299 &hf_x11_xkb_SelectEvents_selectAll_mask_ControlsNotify,
23300 &hf_x11_xkb_SelectEvents_selectAll_mask_IndicatorStateNotify,
23301 &hf_x11_xkb_SelectEvents_selectAll_mask_IndicatorMapNotify,
23302 &hf_x11_xkb_SelectEvents_selectAll_mask_NamesNotify,
23303 &hf_x11_xkb_SelectEvents_selectAll_mask_CompatMapNotify,
23304 &hf_x11_xkb_SelectEvents_selectAll_mask_BellNotify,
23305 &hf_x11_xkb_SelectEvents_selectAll_mask_ActionMessage,
23306 &hf_x11_xkb_SelectEvents_selectAll_mask_AccessXNotify,
23307 &hf_x11_xkb_SelectEvents_selectAll_mask_ExtensionDeviceNotify,
23308 NULL
23309 };
23310 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xkb_SelectEvents_selectAll, ett_x11_rectangle, selectAll_bits, byte_order);
23311 }
23312 *offsetp += 2;
23313 {
23314 static int* const affectMap_bits [] = {
23315 &hf_x11_xkb_SelectEvents_affectMap_mask_KeyTypes,
23316 &hf_x11_xkb_SelectEvents_affectMap_mask_KeySyms,
23317 &hf_x11_xkb_SelectEvents_affectMap_mask_ModifierMap,
23318 &hf_x11_xkb_SelectEvents_affectMap_mask_ExplicitComponents,
23319 &hf_x11_xkb_SelectEvents_affectMap_mask_KeyActions,
23320 &hf_x11_xkb_SelectEvents_affectMap_mask_KeyBehaviors,
23321 &hf_x11_xkb_SelectEvents_affectMap_mask_VirtualMods,
23322 &hf_x11_xkb_SelectEvents_affectMap_mask_VirtualModMap,
23323 NULL
23324 };
23325 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xkb_SelectEvents_affectMap, ett_x11_rectangle, affectMap_bits, byte_order);
23326 }
23327 *offsetp += 2;
23328 {
23329 static int* const map_bits [] = {
23330 &hf_x11_xkb_SelectEvents_map_mask_KeyTypes,
23331 &hf_x11_xkb_SelectEvents_map_mask_KeySyms,
23332 &hf_x11_xkb_SelectEvents_map_mask_ModifierMap,
23333 &hf_x11_xkb_SelectEvents_map_mask_ExplicitComponents,
23334 &hf_x11_xkb_SelectEvents_map_mask_KeyActions,
23335 &hf_x11_xkb_SelectEvents_map_mask_KeyBehaviors,
23336 &hf_x11_xkb_SelectEvents_map_mask_VirtualMods,
23337 &hf_x11_xkb_SelectEvents_map_mask_VirtualModMap,
23338 NULL
23339 };
23340 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xkb_SelectEvents_map, ett_x11_rectangle, map_bits, byte_order);
23341 }
23342 *offsetp += 2;
23343 if ((f_affectWhich & ((~f_clear) & (~f_selectAll))) & (1U << 0)) {
23344 {
23345 static int* const affectNewKeyboard_bits [] = {
23346 &hf_x11_xkb_SelectEvents_NewKeyboardNotify_affectNewKeyboard_mask_Keycodes,
23347 &hf_x11_xkb_SelectEvents_NewKeyboardNotify_affectNewKeyboard_mask_Geometry,
23348 &hf_x11_xkb_SelectEvents_NewKeyboardNotify_affectNewKeyboard_mask_DeviceID,
23349 NULL
23350 };
23351 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xkb_SelectEvents_NewKeyboardNotify_affectNewKeyboard, ett_x11_rectangle, affectNewKeyboard_bits, byte_order);
23352 }
23353 *offsetp += 2;
23354 {
23355 static int* const newKeyboardDetails_bits [] = {
23356 &hf_x11_xkb_SelectEvents_NewKeyboardNotify_newKeyboardDetails_mask_Keycodes,
23357 &hf_x11_xkb_SelectEvents_NewKeyboardNotify_newKeyboardDetails_mask_Geometry,
23358 &hf_x11_xkb_SelectEvents_NewKeyboardNotify_newKeyboardDetails_mask_DeviceID,
23359 NULL
23360 };
23361 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xkb_SelectEvents_NewKeyboardNotify_newKeyboardDetails, ett_x11_rectangle, newKeyboardDetails_bits, byte_order);
23362 }
23363 *offsetp += 2;
23364 }
23365 if ((f_affectWhich & ((~f_clear) & (~f_selectAll))) & (1U << 2)) {
23366 {
23367 static int* const affectState_bits [] = {
23368 &hf_x11_xkb_SelectEvents_StateNotify_affectState_mask_ModifierState,
23369 &hf_x11_xkb_SelectEvents_StateNotify_affectState_mask_ModifierBase,
23370 &hf_x11_xkb_SelectEvents_StateNotify_affectState_mask_ModifierLatch,
23371 &hf_x11_xkb_SelectEvents_StateNotify_affectState_mask_ModifierLock,
23372 &hf_x11_xkb_SelectEvents_StateNotify_affectState_mask_GroupState,
23373 &hf_x11_xkb_SelectEvents_StateNotify_affectState_mask_GroupBase,
23374 &hf_x11_xkb_SelectEvents_StateNotify_affectState_mask_GroupLatch,
23375 &hf_x11_xkb_SelectEvents_StateNotify_affectState_mask_GroupLock,
23376 &hf_x11_xkb_SelectEvents_StateNotify_affectState_mask_CompatState,
23377 &hf_x11_xkb_SelectEvents_StateNotify_affectState_mask_GrabMods,
23378 &hf_x11_xkb_SelectEvents_StateNotify_affectState_mask_CompatGrabMods,
23379 &hf_x11_xkb_SelectEvents_StateNotify_affectState_mask_LookupMods,
23380 &hf_x11_xkb_SelectEvents_StateNotify_affectState_mask_CompatLookupMods,
23381 &hf_x11_xkb_SelectEvents_StateNotify_affectState_mask_PointerButtons,
23382 NULL
23383 };
23384 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xkb_SelectEvents_StateNotify_affectState, ett_x11_rectangle, affectState_bits, byte_order);
23385 }
23386 *offsetp += 2;
23387 {
23388 static int* const stateDetails_bits [] = {
23389 &hf_x11_xkb_SelectEvents_StateNotify_stateDetails_mask_ModifierState,
23390 &hf_x11_xkb_SelectEvents_StateNotify_stateDetails_mask_ModifierBase,
23391 &hf_x11_xkb_SelectEvents_StateNotify_stateDetails_mask_ModifierLatch,
23392 &hf_x11_xkb_SelectEvents_StateNotify_stateDetails_mask_ModifierLock,
23393 &hf_x11_xkb_SelectEvents_StateNotify_stateDetails_mask_GroupState,
23394 &hf_x11_xkb_SelectEvents_StateNotify_stateDetails_mask_GroupBase,
23395 &hf_x11_xkb_SelectEvents_StateNotify_stateDetails_mask_GroupLatch,
23396 &hf_x11_xkb_SelectEvents_StateNotify_stateDetails_mask_GroupLock,
23397 &hf_x11_xkb_SelectEvents_StateNotify_stateDetails_mask_CompatState,
23398 &hf_x11_xkb_SelectEvents_StateNotify_stateDetails_mask_GrabMods,
23399 &hf_x11_xkb_SelectEvents_StateNotify_stateDetails_mask_CompatGrabMods,
23400 &hf_x11_xkb_SelectEvents_StateNotify_stateDetails_mask_LookupMods,
23401 &hf_x11_xkb_SelectEvents_StateNotify_stateDetails_mask_CompatLookupMods,
23402 &hf_x11_xkb_SelectEvents_StateNotify_stateDetails_mask_PointerButtons,
23403 NULL
23404 };
23405 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xkb_SelectEvents_StateNotify_stateDetails, ett_x11_rectangle, stateDetails_bits, byte_order);
23406 }
23407 *offsetp += 2;
23408 }
23409 if ((f_affectWhich & ((~f_clear) & (~f_selectAll))) & (1U << 3)) {
23410 {
23411 static int* const affectCtrls_bits [] = {
23412 &hf_x11_xkb_SelectEvents_ControlsNotify_affectCtrls_mask_GroupsWrap,
23413 &hf_x11_xkb_SelectEvents_ControlsNotify_affectCtrls_mask_InternalMods,
23414 &hf_x11_xkb_SelectEvents_ControlsNotify_affectCtrls_mask_IgnoreLockMods,
23415 &hf_x11_xkb_SelectEvents_ControlsNotify_affectCtrls_mask_PerKeyRepeat,
23416 &hf_x11_xkb_SelectEvents_ControlsNotify_affectCtrls_mask_ControlsEnabled,
23417 NULL
23418 };
23419 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xkb_SelectEvents_ControlsNotify_affectCtrls, ett_x11_rectangle, affectCtrls_bits, byte_order);
23420 }
23421 *offsetp += 4;
23422 {
23423 static int* const ctrlDetails_bits [] = {
23424 &hf_x11_xkb_SelectEvents_ControlsNotify_ctrlDetails_mask_GroupsWrap,
23425 &hf_x11_xkb_SelectEvents_ControlsNotify_ctrlDetails_mask_InternalMods,
23426 &hf_x11_xkb_SelectEvents_ControlsNotify_ctrlDetails_mask_IgnoreLockMods,
23427 &hf_x11_xkb_SelectEvents_ControlsNotify_ctrlDetails_mask_PerKeyRepeat,
23428 &hf_x11_xkb_SelectEvents_ControlsNotify_ctrlDetails_mask_ControlsEnabled,
23429 NULL
23430 };
23431 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xkb_SelectEvents_ControlsNotify_ctrlDetails, ett_x11_rectangle, ctrlDetails_bits, byte_order);
23432 }
23433 *offsetp += 4;
23434 }
23435 if ((f_affectWhich & ((~f_clear) & (~f_selectAll))) & (1U << 4)) {
23436 proto_tree_add_item(t, hf_x11_xkb_SelectEvents_IndicatorStateNotify_affectIndicatorState, tvb, *offsetp, 4, byte_order);
23437 *offsetp += 4;
23438 proto_tree_add_item(t, hf_x11_xkb_SelectEvents_IndicatorStateNotify_indicatorStateDetails, tvb, *offsetp, 4, byte_order);
23439 *offsetp += 4;
23440 }
23441 if ((f_affectWhich & ((~f_clear) & (~f_selectAll))) & (1U << 5)) {
23442 proto_tree_add_item(t, hf_x11_xkb_SelectEvents_IndicatorMapNotify_affectIndicatorMap, tvb, *offsetp, 4, byte_order);
23443 *offsetp += 4;
23444 proto_tree_add_item(t, hf_x11_xkb_SelectEvents_IndicatorMapNotify_indicatorMapDetails, tvb, *offsetp, 4, byte_order);
23445 *offsetp += 4;
23446 }
23447 if ((f_affectWhich & ((~f_clear) & (~f_selectAll))) & (1U << 6)) {
23448 {
23449 static int* const affectNames_bits [] = {
23450 &hf_x11_xkb_SelectEvents_NamesNotify_affectNames_mask_Keycodes,
23451 &hf_x11_xkb_SelectEvents_NamesNotify_affectNames_mask_Geometry,
23452 &hf_x11_xkb_SelectEvents_NamesNotify_affectNames_mask_Symbols,
23453 &hf_x11_xkb_SelectEvents_NamesNotify_affectNames_mask_PhysSymbols,
23454 &hf_x11_xkb_SelectEvents_NamesNotify_affectNames_mask_Types,
23455 &hf_x11_xkb_SelectEvents_NamesNotify_affectNames_mask_Compat,
23456 &hf_x11_xkb_SelectEvents_NamesNotify_affectNames_mask_KeyTypeNames,
23457 &hf_x11_xkb_SelectEvents_NamesNotify_affectNames_mask_KTLevelNames,
23458 &hf_x11_xkb_SelectEvents_NamesNotify_affectNames_mask_IndicatorNames,
23459 &hf_x11_xkb_SelectEvents_NamesNotify_affectNames_mask_KeyNames,
23460 &hf_x11_xkb_SelectEvents_NamesNotify_affectNames_mask_KeyAliases,
23461 &hf_x11_xkb_SelectEvents_NamesNotify_affectNames_mask_VirtualModNames,
23462 &hf_x11_xkb_SelectEvents_NamesNotify_affectNames_mask_GroupNames,
23463 &hf_x11_xkb_SelectEvents_NamesNotify_affectNames_mask_RGNames,
23464 NULL
23465 };
23466 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xkb_SelectEvents_NamesNotify_affectNames, ett_x11_rectangle, affectNames_bits, byte_order);
23467 }
23468 *offsetp += 2;
23469 {
23470 static int* const namesDetails_bits [] = {
23471 &hf_x11_xkb_SelectEvents_NamesNotify_namesDetails_mask_Keycodes,
23472 &hf_x11_xkb_SelectEvents_NamesNotify_namesDetails_mask_Geometry,
23473 &hf_x11_xkb_SelectEvents_NamesNotify_namesDetails_mask_Symbols,
23474 &hf_x11_xkb_SelectEvents_NamesNotify_namesDetails_mask_PhysSymbols,
23475 &hf_x11_xkb_SelectEvents_NamesNotify_namesDetails_mask_Types,
23476 &hf_x11_xkb_SelectEvents_NamesNotify_namesDetails_mask_Compat,
23477 &hf_x11_xkb_SelectEvents_NamesNotify_namesDetails_mask_KeyTypeNames,
23478 &hf_x11_xkb_SelectEvents_NamesNotify_namesDetails_mask_KTLevelNames,
23479 &hf_x11_xkb_SelectEvents_NamesNotify_namesDetails_mask_IndicatorNames,
23480 &hf_x11_xkb_SelectEvents_NamesNotify_namesDetails_mask_KeyNames,
23481 &hf_x11_xkb_SelectEvents_NamesNotify_namesDetails_mask_KeyAliases,
23482 &hf_x11_xkb_SelectEvents_NamesNotify_namesDetails_mask_VirtualModNames,
23483 &hf_x11_xkb_SelectEvents_NamesNotify_namesDetails_mask_GroupNames,
23484 &hf_x11_xkb_SelectEvents_NamesNotify_namesDetails_mask_RGNames,
23485 NULL
23486 };
23487 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xkb_SelectEvents_NamesNotify_namesDetails, ett_x11_rectangle, namesDetails_bits, byte_order);
23488 }
23489 *offsetp += 2;
23490 }
23491 if ((f_affectWhich & ((~f_clear) & (~f_selectAll))) & (1U << 7)) {
23492 {
23493 static int* const affectCompat_bits [] = {
23494 &hf_x11_xkb_SelectEvents_CompatMapNotify_affectCompat_mask_SymInterp,
23495 &hf_x11_xkb_SelectEvents_CompatMapNotify_affectCompat_mask_GroupCompat,
23496 NULL
23497 };
23498 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xkb_SelectEvents_CompatMapNotify_affectCompat, ett_x11_rectangle, affectCompat_bits, byte_order);
23499 }
23500 *offsetp += 1;
23501 {
23502 static int* const compatDetails_bits [] = {
23503 &hf_x11_xkb_SelectEvents_CompatMapNotify_compatDetails_mask_SymInterp,
23504 &hf_x11_xkb_SelectEvents_CompatMapNotify_compatDetails_mask_GroupCompat,
23505 NULL
23506 };
23507 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xkb_SelectEvents_CompatMapNotify_compatDetails, ett_x11_rectangle, compatDetails_bits, byte_order);
23508 }
23509 *offsetp += 1;
23510 }
23511 if ((f_affectWhich & ((~f_clear) & (~f_selectAll))) & (1U << 8)) {
23512 proto_tree_add_item(t, hf_x11_xkb_SelectEvents_BellNotify_affectBell, tvb, *offsetp, 1, byte_order);
23513 *offsetp += 1;
23514 proto_tree_add_item(t, hf_x11_xkb_SelectEvents_BellNotify_bellDetails, tvb, *offsetp, 1, byte_order);
23515 *offsetp += 1;
23516 }
23517 if ((f_affectWhich & ((~f_clear) & (~f_selectAll))) & (1U << 9)) {
23518 proto_tree_add_item(t, hf_x11_xkb_SelectEvents_ActionMessage_affectMsgDetails, tvb, *offsetp, 1, byte_order);
23519 *offsetp += 1;
23520 proto_tree_add_item(t, hf_x11_xkb_SelectEvents_ActionMessage_msgDetails, tvb, *offsetp, 1, byte_order);
23521 *offsetp += 1;
23522 }
23523 if ((f_affectWhich & ((~f_clear) & (~f_selectAll))) & (1U << 10)) {
23524 {
23525 static int* const affectAccessX_bits [] = {
23526 &hf_x11_xkb_SelectEvents_AccessXNotify_affectAccessX_mask_SKPress,
23527 &hf_x11_xkb_SelectEvents_AccessXNotify_affectAccessX_mask_SKAccept,
23528 &hf_x11_xkb_SelectEvents_AccessXNotify_affectAccessX_mask_SKReject,
23529 &hf_x11_xkb_SelectEvents_AccessXNotify_affectAccessX_mask_SKRelease,
23530 &hf_x11_xkb_SelectEvents_AccessXNotify_affectAccessX_mask_BKAccept,
23531 &hf_x11_xkb_SelectEvents_AccessXNotify_affectAccessX_mask_BKReject,
23532 &hf_x11_xkb_SelectEvents_AccessXNotify_affectAccessX_mask_AXKWarning,
23533 NULL
23534 };
23535 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xkb_SelectEvents_AccessXNotify_affectAccessX, ett_x11_rectangle, affectAccessX_bits, byte_order);
23536 }
23537 *offsetp += 2;
23538 {
23539 static int* const accessXDetails_bits [] = {
23540 &hf_x11_xkb_SelectEvents_AccessXNotify_accessXDetails_mask_SKPress,
23541 &hf_x11_xkb_SelectEvents_AccessXNotify_accessXDetails_mask_SKAccept,
23542 &hf_x11_xkb_SelectEvents_AccessXNotify_accessXDetails_mask_SKReject,
23543 &hf_x11_xkb_SelectEvents_AccessXNotify_accessXDetails_mask_SKRelease,
23544 &hf_x11_xkb_SelectEvents_AccessXNotify_accessXDetails_mask_BKAccept,
23545 &hf_x11_xkb_SelectEvents_AccessXNotify_accessXDetails_mask_BKReject,
23546 &hf_x11_xkb_SelectEvents_AccessXNotify_accessXDetails_mask_AXKWarning,
23547 NULL
23548 };
23549 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xkb_SelectEvents_AccessXNotify_accessXDetails, ett_x11_rectangle, accessXDetails_bits, byte_order);
23550 }
23551 *offsetp += 2;
23552 }
23553 if ((f_affectWhich & ((~f_clear) & (~f_selectAll))) & (1U << 11)) {
23554 {
23555 static int* const affectExtDev_bits [] = {
23556 &hf_x11_xkb_SelectEvents_ExtensionDeviceNotify_affectExtDev_mask_Keyboards,
23557 &hf_x11_xkb_SelectEvents_ExtensionDeviceNotify_affectExtDev_mask_ButtonActions,
23558 &hf_x11_xkb_SelectEvents_ExtensionDeviceNotify_affectExtDev_mask_IndicatorNames,
23559 &hf_x11_xkb_SelectEvents_ExtensionDeviceNotify_affectExtDev_mask_IndicatorMaps,
23560 &hf_x11_xkb_SelectEvents_ExtensionDeviceNotify_affectExtDev_mask_IndicatorState,
23561 NULL
23562 };
23563 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xkb_SelectEvents_ExtensionDeviceNotify_affectExtDev, ett_x11_rectangle, affectExtDev_bits, byte_order);
23564 }
23565 *offsetp += 2;
23566 {
23567 static int* const extdevDetails_bits [] = {
23568 &hf_x11_xkb_SelectEvents_ExtensionDeviceNotify_extdevDetails_mask_Keyboards,
23569 &hf_x11_xkb_SelectEvents_ExtensionDeviceNotify_extdevDetails_mask_ButtonActions,
23570 &hf_x11_xkb_SelectEvents_ExtensionDeviceNotify_extdevDetails_mask_IndicatorNames,
23571 &hf_x11_xkb_SelectEvents_ExtensionDeviceNotify_extdevDetails_mask_IndicatorMaps,
23572 &hf_x11_xkb_SelectEvents_ExtensionDeviceNotify_extdevDetails_mask_IndicatorState,
23573 NULL
23574 };
23575 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xkb_SelectEvents_ExtensionDeviceNotify_extdevDetails, ett_x11_rectangle, extdevDetails_bits, byte_order);
23576 }
23577 *offsetp += 2;
23578 }
23579}
23580
23581static void xkbBell(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
23582{
23583 proto_tree_add_item(t, hf_x11_xkb_Bell_deviceSpec, tvb, *offsetp, 2, byte_order);
23584 *offsetp += 2;
23585 proto_tree_add_item(t, hf_x11_xkb_Bell_bellClass, tvb, *offsetp, 2, byte_order);
23586 *offsetp += 2;
23587 proto_tree_add_item(t, hf_x11_xkb_Bell_bellID, tvb, *offsetp, 2, byte_order);
23588 *offsetp += 2;
23589 proto_tree_add_item(t, hf_x11_xkb_Bell_percent, tvb, *offsetp, 1, byte_order);
23590 *offsetp += 1;
23591 proto_tree_add_item(t, hf_x11_xkb_Bell_forceSound, tvb, *offsetp, 1, byte_order);
23592 *offsetp += 1;
23593 proto_tree_add_item(t, hf_x11_xkb_Bell_eventOnly, tvb, *offsetp, 1, byte_order);
23594 *offsetp += 1;
23595 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
23596 *offsetp += 1;
23597 proto_tree_add_item(t, hf_x11_xkb_Bell_pitch, tvb, *offsetp, 2, byte_order);
23598 *offsetp += 2;
23599 proto_tree_add_item(t, hf_x11_xkb_Bell_duration, tvb, *offsetp, 2, byte_order);
23600 *offsetp += 2;
23601 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 2, ENC_NA);
23602 *offsetp += 2;
23603 proto_tree_add_item(t, hf_x11_xkb_Bell_name, tvb, *offsetp, 4, byte_order);
23604 *offsetp += 4;
23605 proto_tree_add_item(t, hf_x11_xkb_Bell_window, tvb, *offsetp, 4, byte_order);
23606 *offsetp += 4;
23607}
23608
23609static void xkbGetState(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
23610{
23611 proto_tree_add_item(t, hf_x11_xkb_GetState_deviceSpec, tvb, *offsetp, 2, byte_order);
23612 *offsetp += 2;
23613 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 2, ENC_NA);
23614 *offsetp += 2;
23615}
23616static void xkbGetState_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
23617{
23618 int sequence_number;
23619
23620 col_append_fstr(pinfo->cinfo, COL_INFO, "-GetState");
23621
23622 REPLY(reply);
23623 proto_tree_add_item(t, hf_x11_xkb_GetState_reply_deviceID, tvb, *offsetp, 1, byte_order);
23624 *offsetp += 1;
23625 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
23626 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
23627 "%d (xkb-GetState)", sequence_number);
23628 *offsetp += 2;
23629 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
23630 *offsetp += 4;
23631 {
23632 static int* const mods_bits [] = {
23633 &hf_x11_xkb_GetState_reply_mods_mask_Shift,
23634 &hf_x11_xkb_GetState_reply_mods_mask_Lock,
23635 &hf_x11_xkb_GetState_reply_mods_mask_Control,
23636 &hf_x11_xkb_GetState_reply_mods_mask_1,
23637 &hf_x11_xkb_GetState_reply_mods_mask_2,
23638 &hf_x11_xkb_GetState_reply_mods_mask_3,
23639 &hf_x11_xkb_GetState_reply_mods_mask_4,
23640 &hf_x11_xkb_GetState_reply_mods_mask_5,
23641 &hf_x11_xkb_GetState_reply_mods_mask_Any,
23642 NULL
23643 };
23644 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xkb_GetState_reply_mods, ett_x11_rectangle, mods_bits, byte_order);
23645 }
23646 *offsetp += 1;
23647 {
23648 static int* const baseMods_bits [] = {
23649 &hf_x11_xkb_GetState_reply_baseMods_mask_Shift,
23650 &hf_x11_xkb_GetState_reply_baseMods_mask_Lock,
23651 &hf_x11_xkb_GetState_reply_baseMods_mask_Control,
23652 &hf_x11_xkb_GetState_reply_baseMods_mask_1,
23653 &hf_x11_xkb_GetState_reply_baseMods_mask_2,
23654 &hf_x11_xkb_GetState_reply_baseMods_mask_3,
23655 &hf_x11_xkb_GetState_reply_baseMods_mask_4,
23656 &hf_x11_xkb_GetState_reply_baseMods_mask_5,
23657 &hf_x11_xkb_GetState_reply_baseMods_mask_Any,
23658 NULL
23659 };
23660 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xkb_GetState_reply_baseMods, ett_x11_rectangle, baseMods_bits, byte_order);
23661 }
23662 *offsetp += 1;
23663 {
23664 static int* const latchedMods_bits [] = {
23665 &hf_x11_xkb_GetState_reply_latchedMods_mask_Shift,
23666 &hf_x11_xkb_GetState_reply_latchedMods_mask_Lock,
23667 &hf_x11_xkb_GetState_reply_latchedMods_mask_Control,
23668 &hf_x11_xkb_GetState_reply_latchedMods_mask_1,
23669 &hf_x11_xkb_GetState_reply_latchedMods_mask_2,
23670 &hf_x11_xkb_GetState_reply_latchedMods_mask_3,
23671 &hf_x11_xkb_GetState_reply_latchedMods_mask_4,
23672 &hf_x11_xkb_GetState_reply_latchedMods_mask_5,
23673 &hf_x11_xkb_GetState_reply_latchedMods_mask_Any,
23674 NULL
23675 };
23676 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xkb_GetState_reply_latchedMods, ett_x11_rectangle, latchedMods_bits, byte_order);
23677 }
23678 *offsetp += 1;
23679 {
23680 static int* const lockedMods_bits [] = {
23681 &hf_x11_xkb_GetState_reply_lockedMods_mask_Shift,
23682 &hf_x11_xkb_GetState_reply_lockedMods_mask_Lock,
23683 &hf_x11_xkb_GetState_reply_lockedMods_mask_Control,
23684 &hf_x11_xkb_GetState_reply_lockedMods_mask_1,
23685 &hf_x11_xkb_GetState_reply_lockedMods_mask_2,
23686 &hf_x11_xkb_GetState_reply_lockedMods_mask_3,
23687 &hf_x11_xkb_GetState_reply_lockedMods_mask_4,
23688 &hf_x11_xkb_GetState_reply_lockedMods_mask_5,
23689 &hf_x11_xkb_GetState_reply_lockedMods_mask_Any,
23690 NULL
23691 };
23692 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xkb_GetState_reply_lockedMods, ett_x11_rectangle, lockedMods_bits, byte_order);
23693 }
23694 *offsetp += 1;
23695 field8(tvb, offsetp, t, hf_x11_xkb_GetState_reply_group, byte_order);
23696 field8(tvb, offsetp, t, hf_x11_xkb_GetState_reply_lockedGroup, byte_order);
23697 proto_tree_add_item(t, hf_x11_xkb_GetState_reply_baseGroup, tvb, *offsetp, 2, byte_order);
23698 *offsetp += 2;
23699 proto_tree_add_item(t, hf_x11_xkb_GetState_reply_latchedGroup, tvb, *offsetp, 2, byte_order);
23700 *offsetp += 2;
23701 {
23702 static int* const compatState_bits [] = {
23703 &hf_x11_xkb_GetState_reply_compatState_mask_Shift,
23704 &hf_x11_xkb_GetState_reply_compatState_mask_Lock,
23705 &hf_x11_xkb_GetState_reply_compatState_mask_Control,
23706 &hf_x11_xkb_GetState_reply_compatState_mask_1,
23707 &hf_x11_xkb_GetState_reply_compatState_mask_2,
23708 &hf_x11_xkb_GetState_reply_compatState_mask_3,
23709 &hf_x11_xkb_GetState_reply_compatState_mask_4,
23710 &hf_x11_xkb_GetState_reply_compatState_mask_5,
23711 &hf_x11_xkb_GetState_reply_compatState_mask_Any,
23712 NULL
23713 };
23714 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xkb_GetState_reply_compatState, ett_x11_rectangle, compatState_bits, byte_order);
23715 }
23716 *offsetp += 1;
23717 {
23718 static int* const grabMods_bits [] = {
23719 &hf_x11_xkb_GetState_reply_grabMods_mask_Shift,
23720 &hf_x11_xkb_GetState_reply_grabMods_mask_Lock,
23721 &hf_x11_xkb_GetState_reply_grabMods_mask_Control,
23722 &hf_x11_xkb_GetState_reply_grabMods_mask_1,
23723 &hf_x11_xkb_GetState_reply_grabMods_mask_2,
23724 &hf_x11_xkb_GetState_reply_grabMods_mask_3,
23725 &hf_x11_xkb_GetState_reply_grabMods_mask_4,
23726 &hf_x11_xkb_GetState_reply_grabMods_mask_5,
23727 &hf_x11_xkb_GetState_reply_grabMods_mask_Any,
23728 NULL
23729 };
23730 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xkb_GetState_reply_grabMods, ett_x11_rectangle, grabMods_bits, byte_order);
23731 }
23732 *offsetp += 1;
23733 {
23734 static int* const compatGrabMods_bits [] = {
23735 &hf_x11_xkb_GetState_reply_compatGrabMods_mask_Shift,
23736 &hf_x11_xkb_GetState_reply_compatGrabMods_mask_Lock,
23737 &hf_x11_xkb_GetState_reply_compatGrabMods_mask_Control,
23738 &hf_x11_xkb_GetState_reply_compatGrabMods_mask_1,
23739 &hf_x11_xkb_GetState_reply_compatGrabMods_mask_2,
23740 &hf_x11_xkb_GetState_reply_compatGrabMods_mask_3,
23741 &hf_x11_xkb_GetState_reply_compatGrabMods_mask_4,
23742 &hf_x11_xkb_GetState_reply_compatGrabMods_mask_5,
23743 &hf_x11_xkb_GetState_reply_compatGrabMods_mask_Any,
23744 NULL
23745 };
23746 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xkb_GetState_reply_compatGrabMods, ett_x11_rectangle, compatGrabMods_bits, byte_order);
23747 }
23748 *offsetp += 1;
23749 {
23750 static int* const lookupMods_bits [] = {
23751 &hf_x11_xkb_GetState_reply_lookupMods_mask_Shift,
23752 &hf_x11_xkb_GetState_reply_lookupMods_mask_Lock,
23753 &hf_x11_xkb_GetState_reply_lookupMods_mask_Control,
23754 &hf_x11_xkb_GetState_reply_lookupMods_mask_1,
23755 &hf_x11_xkb_GetState_reply_lookupMods_mask_2,
23756 &hf_x11_xkb_GetState_reply_lookupMods_mask_3,
23757 &hf_x11_xkb_GetState_reply_lookupMods_mask_4,
23758 &hf_x11_xkb_GetState_reply_lookupMods_mask_5,
23759 &hf_x11_xkb_GetState_reply_lookupMods_mask_Any,
23760 NULL
23761 };
23762 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xkb_GetState_reply_lookupMods, ett_x11_rectangle, lookupMods_bits, byte_order);
23763 }
23764 *offsetp += 1;
23765 {
23766 static int* const compatLookupMods_bits [] = {
23767 &hf_x11_xkb_GetState_reply_compatLookupMods_mask_Shift,
23768 &hf_x11_xkb_GetState_reply_compatLookupMods_mask_Lock,
23769 &hf_x11_xkb_GetState_reply_compatLookupMods_mask_Control,
23770 &hf_x11_xkb_GetState_reply_compatLookupMods_mask_1,
23771 &hf_x11_xkb_GetState_reply_compatLookupMods_mask_2,
23772 &hf_x11_xkb_GetState_reply_compatLookupMods_mask_3,
23773 &hf_x11_xkb_GetState_reply_compatLookupMods_mask_4,
23774 &hf_x11_xkb_GetState_reply_compatLookupMods_mask_5,
23775 &hf_x11_xkb_GetState_reply_compatLookupMods_mask_Any,
23776 NULL
23777 };
23778 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xkb_GetState_reply_compatLookupMods, ett_x11_rectangle, compatLookupMods_bits, byte_order);
23779 }
23780 *offsetp += 1;
23781 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
23782 *offsetp += 1;
23783 {
23784 static int* const ptrBtnState_bits [] = {
23785 &hf_x11_xkb_GetState_reply_ptrBtnState_mask_Shift,
23786 &hf_x11_xkb_GetState_reply_ptrBtnState_mask_Lock,
23787 &hf_x11_xkb_GetState_reply_ptrBtnState_mask_Control,
23788 &hf_x11_xkb_GetState_reply_ptrBtnState_mask_Mod1,
23789 &hf_x11_xkb_GetState_reply_ptrBtnState_mask_Mod2,
23790 &hf_x11_xkb_GetState_reply_ptrBtnState_mask_Mod3,
23791 &hf_x11_xkb_GetState_reply_ptrBtnState_mask_Mod4,
23792 &hf_x11_xkb_GetState_reply_ptrBtnState_mask_Mod5,
23793 &hf_x11_xkb_GetState_reply_ptrBtnState_mask_Button1,
23794 &hf_x11_xkb_GetState_reply_ptrBtnState_mask_Button2,
23795 &hf_x11_xkb_GetState_reply_ptrBtnState_mask_Button3,
23796 &hf_x11_xkb_GetState_reply_ptrBtnState_mask_Button4,
23797 &hf_x11_xkb_GetState_reply_ptrBtnState_mask_Button5,
23798 NULL
23799 };
23800 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xkb_GetState_reply_ptrBtnState, ett_x11_rectangle, ptrBtnState_bits, byte_order);
23801 }
23802 *offsetp += 2;
23803 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 6, ENC_NA);
23804 *offsetp += 6;
23805}
23806
23807static void xkbLatchLockState(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
23808{
23809 proto_tree_add_item(t, hf_x11_xkb_LatchLockState_deviceSpec, tvb, *offsetp, 2, byte_order);
23810 *offsetp += 2;
23811 {
23812 static int* const affectModLocks_bits [] = {
23813 &hf_x11_xkb_LatchLockState_affectModLocks_mask_Shift,
23814 &hf_x11_xkb_LatchLockState_affectModLocks_mask_Lock,
23815 &hf_x11_xkb_LatchLockState_affectModLocks_mask_Control,
23816 &hf_x11_xkb_LatchLockState_affectModLocks_mask_1,
23817 &hf_x11_xkb_LatchLockState_affectModLocks_mask_2,
23818 &hf_x11_xkb_LatchLockState_affectModLocks_mask_3,
23819 &hf_x11_xkb_LatchLockState_affectModLocks_mask_4,
23820 &hf_x11_xkb_LatchLockState_affectModLocks_mask_5,
23821 &hf_x11_xkb_LatchLockState_affectModLocks_mask_Any,
23822 NULL
23823 };
23824 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xkb_LatchLockState_affectModLocks, ett_x11_rectangle, affectModLocks_bits, byte_order);
23825 }
23826 *offsetp += 1;
23827 {
23828 static int* const modLocks_bits [] = {
23829 &hf_x11_xkb_LatchLockState_modLocks_mask_Shift,
23830 &hf_x11_xkb_LatchLockState_modLocks_mask_Lock,
23831 &hf_x11_xkb_LatchLockState_modLocks_mask_Control,
23832 &hf_x11_xkb_LatchLockState_modLocks_mask_1,
23833 &hf_x11_xkb_LatchLockState_modLocks_mask_2,
23834 &hf_x11_xkb_LatchLockState_modLocks_mask_3,
23835 &hf_x11_xkb_LatchLockState_modLocks_mask_4,
23836 &hf_x11_xkb_LatchLockState_modLocks_mask_5,
23837 &hf_x11_xkb_LatchLockState_modLocks_mask_Any,
23838 NULL
23839 };
23840 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xkb_LatchLockState_modLocks, ett_x11_rectangle, modLocks_bits, byte_order);
23841 }
23842 *offsetp += 1;
23843 proto_tree_add_item(t, hf_x11_xkb_LatchLockState_lockGroup, tvb, *offsetp, 1, byte_order);
23844 *offsetp += 1;
23845 field8(tvb, offsetp, t, hf_x11_xkb_LatchLockState_groupLock, byte_order);
23846 {
23847 static int* const affectModLatches_bits [] = {
23848 &hf_x11_xkb_LatchLockState_affectModLatches_mask_Shift,
23849 &hf_x11_xkb_LatchLockState_affectModLatches_mask_Lock,
23850 &hf_x11_xkb_LatchLockState_affectModLatches_mask_Control,
23851 &hf_x11_xkb_LatchLockState_affectModLatches_mask_1,
23852 &hf_x11_xkb_LatchLockState_affectModLatches_mask_2,
23853 &hf_x11_xkb_LatchLockState_affectModLatches_mask_3,
23854 &hf_x11_xkb_LatchLockState_affectModLatches_mask_4,
23855 &hf_x11_xkb_LatchLockState_affectModLatches_mask_5,
23856 &hf_x11_xkb_LatchLockState_affectModLatches_mask_Any,
23857 NULL
23858 };
23859 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xkb_LatchLockState_affectModLatches, ett_x11_rectangle, affectModLatches_bits, byte_order);
23860 }
23861 *offsetp += 1;
23862 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
23863 *offsetp += 1;
23864 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
23865 *offsetp += 1;
23866 proto_tree_add_item(t, hf_x11_xkb_LatchLockState_latchGroup, tvb, *offsetp, 1, byte_order);
23867 *offsetp += 1;
23868 proto_tree_add_item(t, hf_x11_xkb_LatchLockState_groupLatch, tvb, *offsetp, 2, byte_order);
23869 *offsetp += 2;
23870}
23871
23872static void xkbGetControls(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
23873{
23874 proto_tree_add_item(t, hf_x11_xkb_GetControls_deviceSpec, tvb, *offsetp, 2, byte_order);
23875 *offsetp += 2;
23876 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 2, ENC_NA);
23877 *offsetp += 2;
23878}
23879static void xkbGetControls_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
23880{
23881 int sequence_number;
23882
23883 col_append_fstr(pinfo->cinfo, COL_INFO, "-GetControls");
23884
23885 REPLY(reply);
23886 proto_tree_add_item(t, hf_x11_xkb_GetControls_reply_deviceID, tvb, *offsetp, 1, byte_order);
23887 *offsetp += 1;
23888 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
23889 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
23890 "%d (xkb-GetControls)", sequence_number);
23891 *offsetp += 2;
23892 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
23893 *offsetp += 4;
23894 proto_tree_add_item(t, hf_x11_xkb_GetControls_reply_mouseKeysDfltBtn, tvb, *offsetp, 1, byte_order);
23895 *offsetp += 1;
23896 proto_tree_add_item(t, hf_x11_xkb_GetControls_reply_numGroups, tvb, *offsetp, 1, byte_order);
23897 *offsetp += 1;
23898 proto_tree_add_item(t, hf_x11_xkb_GetControls_reply_groupsWrap, tvb, *offsetp, 1, byte_order);
23899 *offsetp += 1;
23900 {
23901 static int* const internalModsMask_bits [] = {
23902 &hf_x11_xkb_GetControls_reply_internalModsMask_mask_Shift,
23903 &hf_x11_xkb_GetControls_reply_internalModsMask_mask_Lock,
23904 &hf_x11_xkb_GetControls_reply_internalModsMask_mask_Control,
23905 &hf_x11_xkb_GetControls_reply_internalModsMask_mask_1,
23906 &hf_x11_xkb_GetControls_reply_internalModsMask_mask_2,
23907 &hf_x11_xkb_GetControls_reply_internalModsMask_mask_3,
23908 &hf_x11_xkb_GetControls_reply_internalModsMask_mask_4,
23909 &hf_x11_xkb_GetControls_reply_internalModsMask_mask_5,
23910 &hf_x11_xkb_GetControls_reply_internalModsMask_mask_Any,
23911 NULL
23912 };
23913 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xkb_GetControls_reply_internalModsMask, ett_x11_rectangle, internalModsMask_bits, byte_order);
23914 }
23915 *offsetp += 1;
23916 {
23917 static int* const ignoreLockModsMask_bits [] = {
23918 &hf_x11_xkb_GetControls_reply_ignoreLockModsMask_mask_Shift,
23919 &hf_x11_xkb_GetControls_reply_ignoreLockModsMask_mask_Lock,
23920 &hf_x11_xkb_GetControls_reply_ignoreLockModsMask_mask_Control,
23921 &hf_x11_xkb_GetControls_reply_ignoreLockModsMask_mask_1,
23922 &hf_x11_xkb_GetControls_reply_ignoreLockModsMask_mask_2,
23923 &hf_x11_xkb_GetControls_reply_ignoreLockModsMask_mask_3,
23924 &hf_x11_xkb_GetControls_reply_ignoreLockModsMask_mask_4,
23925 &hf_x11_xkb_GetControls_reply_ignoreLockModsMask_mask_5,
23926 &hf_x11_xkb_GetControls_reply_ignoreLockModsMask_mask_Any,
23927 NULL
23928 };
23929 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xkb_GetControls_reply_ignoreLockModsMask, ett_x11_rectangle, ignoreLockModsMask_bits, byte_order);
23930 }
23931 *offsetp += 1;
23932 {
23933 static int* const internalModsRealMods_bits [] = {
23934 &hf_x11_xkb_GetControls_reply_internalModsRealMods_mask_Shift,
23935 &hf_x11_xkb_GetControls_reply_internalModsRealMods_mask_Lock,
23936 &hf_x11_xkb_GetControls_reply_internalModsRealMods_mask_Control,
23937 &hf_x11_xkb_GetControls_reply_internalModsRealMods_mask_1,
23938 &hf_x11_xkb_GetControls_reply_internalModsRealMods_mask_2,
23939 &hf_x11_xkb_GetControls_reply_internalModsRealMods_mask_3,
23940 &hf_x11_xkb_GetControls_reply_internalModsRealMods_mask_4,
23941 &hf_x11_xkb_GetControls_reply_internalModsRealMods_mask_5,
23942 &hf_x11_xkb_GetControls_reply_internalModsRealMods_mask_Any,
23943 NULL
23944 };
23945 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xkb_GetControls_reply_internalModsRealMods, ett_x11_rectangle, internalModsRealMods_bits, byte_order);
23946 }
23947 *offsetp += 1;
23948 {
23949 static int* const ignoreLockModsRealMods_bits [] = {
23950 &hf_x11_xkb_GetControls_reply_ignoreLockModsRealMods_mask_Shift,
23951 &hf_x11_xkb_GetControls_reply_ignoreLockModsRealMods_mask_Lock,
23952 &hf_x11_xkb_GetControls_reply_ignoreLockModsRealMods_mask_Control,
23953 &hf_x11_xkb_GetControls_reply_ignoreLockModsRealMods_mask_1,
23954 &hf_x11_xkb_GetControls_reply_ignoreLockModsRealMods_mask_2,
23955 &hf_x11_xkb_GetControls_reply_ignoreLockModsRealMods_mask_3,
23956 &hf_x11_xkb_GetControls_reply_ignoreLockModsRealMods_mask_4,
23957 &hf_x11_xkb_GetControls_reply_ignoreLockModsRealMods_mask_5,
23958 &hf_x11_xkb_GetControls_reply_ignoreLockModsRealMods_mask_Any,
23959 NULL
23960 };
23961 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xkb_GetControls_reply_ignoreLockModsRealMods, ett_x11_rectangle, ignoreLockModsRealMods_bits, byte_order);
23962 }
23963 *offsetp += 1;
23964 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
23965 *offsetp += 1;
23966 {
23967 static int* const internalModsVmods_bits [] = {
23968 &hf_x11_xkb_GetControls_reply_internalModsVmods_mask_0,
23969 &hf_x11_xkb_GetControls_reply_internalModsVmods_mask_1,
23970 &hf_x11_xkb_GetControls_reply_internalModsVmods_mask_2,
23971 &hf_x11_xkb_GetControls_reply_internalModsVmods_mask_3,
23972 &hf_x11_xkb_GetControls_reply_internalModsVmods_mask_4,
23973 &hf_x11_xkb_GetControls_reply_internalModsVmods_mask_5,
23974 &hf_x11_xkb_GetControls_reply_internalModsVmods_mask_6,
23975 &hf_x11_xkb_GetControls_reply_internalModsVmods_mask_7,
23976 &hf_x11_xkb_GetControls_reply_internalModsVmods_mask_8,
23977 &hf_x11_xkb_GetControls_reply_internalModsVmods_mask_9,
23978 &hf_x11_xkb_GetControls_reply_internalModsVmods_mask_10,
23979 &hf_x11_xkb_GetControls_reply_internalModsVmods_mask_11,
23980 &hf_x11_xkb_GetControls_reply_internalModsVmods_mask_12,
23981 &hf_x11_xkb_GetControls_reply_internalModsVmods_mask_13,
23982 &hf_x11_xkb_GetControls_reply_internalModsVmods_mask_14,
23983 &hf_x11_xkb_GetControls_reply_internalModsVmods_mask_15,
23984 NULL
23985 };
23986 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xkb_GetControls_reply_internalModsVmods, ett_x11_rectangle, internalModsVmods_bits, byte_order);
23987 }
23988 *offsetp += 2;
23989 {
23990 static int* const ignoreLockModsVmods_bits [] = {
23991 &hf_x11_xkb_GetControls_reply_ignoreLockModsVmods_mask_0,
23992 &hf_x11_xkb_GetControls_reply_ignoreLockModsVmods_mask_1,
23993 &hf_x11_xkb_GetControls_reply_ignoreLockModsVmods_mask_2,
23994 &hf_x11_xkb_GetControls_reply_ignoreLockModsVmods_mask_3,
23995 &hf_x11_xkb_GetControls_reply_ignoreLockModsVmods_mask_4,
23996 &hf_x11_xkb_GetControls_reply_ignoreLockModsVmods_mask_5,
23997 &hf_x11_xkb_GetControls_reply_ignoreLockModsVmods_mask_6,
23998 &hf_x11_xkb_GetControls_reply_ignoreLockModsVmods_mask_7,
23999 &hf_x11_xkb_GetControls_reply_ignoreLockModsVmods_mask_8,
24000 &hf_x11_xkb_GetControls_reply_ignoreLockModsVmods_mask_9,
24001 &hf_x11_xkb_GetControls_reply_ignoreLockModsVmods_mask_10,
24002 &hf_x11_xkb_GetControls_reply_ignoreLockModsVmods_mask_11,
24003 &hf_x11_xkb_GetControls_reply_ignoreLockModsVmods_mask_12,
24004 &hf_x11_xkb_GetControls_reply_ignoreLockModsVmods_mask_13,
24005 &hf_x11_xkb_GetControls_reply_ignoreLockModsVmods_mask_14,
24006 &hf_x11_xkb_GetControls_reply_ignoreLockModsVmods_mask_15,
24007 NULL
24008 };
24009 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xkb_GetControls_reply_ignoreLockModsVmods, ett_x11_rectangle, ignoreLockModsVmods_bits, byte_order);
24010 }
24011 *offsetp += 2;
24012 proto_tree_add_item(t, hf_x11_xkb_GetControls_reply_repeatDelay, tvb, *offsetp, 2, byte_order);
24013 *offsetp += 2;
24014 proto_tree_add_item(t, hf_x11_xkb_GetControls_reply_repeatInterval, tvb, *offsetp, 2, byte_order);
24015 *offsetp += 2;
24016 proto_tree_add_item(t, hf_x11_xkb_GetControls_reply_slowKeysDelay, tvb, *offsetp, 2, byte_order);
24017 *offsetp += 2;
24018 proto_tree_add_item(t, hf_x11_xkb_GetControls_reply_debounceDelay, tvb, *offsetp, 2, byte_order);
24019 *offsetp += 2;
24020 proto_tree_add_item(t, hf_x11_xkb_GetControls_reply_mouseKeysDelay, tvb, *offsetp, 2, byte_order);
24021 *offsetp += 2;
24022 proto_tree_add_item(t, hf_x11_xkb_GetControls_reply_mouseKeysInterval, tvb, *offsetp, 2, byte_order);
24023 *offsetp += 2;
24024 proto_tree_add_item(t, hf_x11_xkb_GetControls_reply_mouseKeysTimeToMax, tvb, *offsetp, 2, byte_order);
24025 *offsetp += 2;
24026 proto_tree_add_item(t, hf_x11_xkb_GetControls_reply_mouseKeysMaxSpeed, tvb, *offsetp, 2, byte_order);
24027 *offsetp += 2;
24028 proto_tree_add_item(t, hf_x11_xkb_GetControls_reply_mouseKeysCurve, tvb, *offsetp, 2, byte_order);
24029 *offsetp += 2;
24030 {
24031 static int* const accessXOption_bits [] = {
24032 &hf_x11_xkb_GetControls_reply_accessXOption_mask_SKPressFB,
24033 &hf_x11_xkb_GetControls_reply_accessXOption_mask_SKAcceptFB,
24034 &hf_x11_xkb_GetControls_reply_accessXOption_mask_FeatureFB,
24035 &hf_x11_xkb_GetControls_reply_accessXOption_mask_SlowWarnFB,
24036 &hf_x11_xkb_GetControls_reply_accessXOption_mask_IndicatorFB,
24037 &hf_x11_xkb_GetControls_reply_accessXOption_mask_StickyKeysFB,
24038 &hf_x11_xkb_GetControls_reply_accessXOption_mask_TwoKeys,
24039 &hf_x11_xkb_GetControls_reply_accessXOption_mask_LatchToLock,
24040 &hf_x11_xkb_GetControls_reply_accessXOption_mask_SKReleaseFB,
24041 &hf_x11_xkb_GetControls_reply_accessXOption_mask_SKRejectFB,
24042 &hf_x11_xkb_GetControls_reply_accessXOption_mask_BKRejectFB,
24043 &hf_x11_xkb_GetControls_reply_accessXOption_mask_DumbBell,
24044 NULL
24045 };
24046 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xkb_GetControls_reply_accessXOption, ett_x11_rectangle, accessXOption_bits, byte_order);
24047 }
24048 *offsetp += 2;
24049 proto_tree_add_item(t, hf_x11_xkb_GetControls_reply_accessXTimeout, tvb, *offsetp, 2, byte_order);
24050 *offsetp += 2;
24051 {
24052 static int* const accessXTimeoutOptionsMask_bits [] = {
24053 &hf_x11_xkb_GetControls_reply_accessXTimeoutOptionsMask_mask_SKPressFB,
24054 &hf_x11_xkb_GetControls_reply_accessXTimeoutOptionsMask_mask_SKAcceptFB,
24055 &hf_x11_xkb_GetControls_reply_accessXTimeoutOptionsMask_mask_FeatureFB,
24056 &hf_x11_xkb_GetControls_reply_accessXTimeoutOptionsMask_mask_SlowWarnFB,
24057 &hf_x11_xkb_GetControls_reply_accessXTimeoutOptionsMask_mask_IndicatorFB,
24058 &hf_x11_xkb_GetControls_reply_accessXTimeoutOptionsMask_mask_StickyKeysFB,
24059 &hf_x11_xkb_GetControls_reply_accessXTimeoutOptionsMask_mask_TwoKeys,
24060 &hf_x11_xkb_GetControls_reply_accessXTimeoutOptionsMask_mask_LatchToLock,
24061 &hf_x11_xkb_GetControls_reply_accessXTimeoutOptionsMask_mask_SKReleaseFB,
24062 &hf_x11_xkb_GetControls_reply_accessXTimeoutOptionsMask_mask_SKRejectFB,
24063 &hf_x11_xkb_GetControls_reply_accessXTimeoutOptionsMask_mask_BKRejectFB,
24064 &hf_x11_xkb_GetControls_reply_accessXTimeoutOptionsMask_mask_DumbBell,
24065 NULL
24066 };
24067 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xkb_GetControls_reply_accessXTimeoutOptionsMask, ett_x11_rectangle, accessXTimeoutOptionsMask_bits, byte_order);
24068 }
24069 *offsetp += 2;
24070 {
24071 static int* const accessXTimeoutOptionsValues_bits [] = {
24072 &hf_x11_xkb_GetControls_reply_accessXTimeoutOptionsValues_mask_SKPressFB,
24073 &hf_x11_xkb_GetControls_reply_accessXTimeoutOptionsValues_mask_SKAcceptFB,
24074 &hf_x11_xkb_GetControls_reply_accessXTimeoutOptionsValues_mask_FeatureFB,
24075 &hf_x11_xkb_GetControls_reply_accessXTimeoutOptionsValues_mask_SlowWarnFB,
24076 &hf_x11_xkb_GetControls_reply_accessXTimeoutOptionsValues_mask_IndicatorFB,
24077 &hf_x11_xkb_GetControls_reply_accessXTimeoutOptionsValues_mask_StickyKeysFB,
24078 &hf_x11_xkb_GetControls_reply_accessXTimeoutOptionsValues_mask_TwoKeys,
24079 &hf_x11_xkb_GetControls_reply_accessXTimeoutOptionsValues_mask_LatchToLock,
24080 &hf_x11_xkb_GetControls_reply_accessXTimeoutOptionsValues_mask_SKReleaseFB,
24081 &hf_x11_xkb_GetControls_reply_accessXTimeoutOptionsValues_mask_SKRejectFB,
24082 &hf_x11_xkb_GetControls_reply_accessXTimeoutOptionsValues_mask_BKRejectFB,
24083 &hf_x11_xkb_GetControls_reply_accessXTimeoutOptionsValues_mask_DumbBell,
24084 NULL
24085 };
24086 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xkb_GetControls_reply_accessXTimeoutOptionsValues, ett_x11_rectangle, accessXTimeoutOptionsValues_bits, byte_order);
24087 }
24088 *offsetp += 2;
24089 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 2, ENC_NA);
24090 *offsetp += 2;
24091 {
24092 static int* const accessXTimeoutMask_bits [] = {
24093 &hf_x11_xkb_GetControls_reply_accessXTimeoutMask_mask_RepeatKeys,
24094 &hf_x11_xkb_GetControls_reply_accessXTimeoutMask_mask_SlowKeys,
24095 &hf_x11_xkb_GetControls_reply_accessXTimeoutMask_mask_BounceKeys,
24096 &hf_x11_xkb_GetControls_reply_accessXTimeoutMask_mask_StickyKeys,
24097 &hf_x11_xkb_GetControls_reply_accessXTimeoutMask_mask_MouseKeys,
24098 &hf_x11_xkb_GetControls_reply_accessXTimeoutMask_mask_MouseKeysAccel,
24099 &hf_x11_xkb_GetControls_reply_accessXTimeoutMask_mask_AccessXKeys,
24100 &hf_x11_xkb_GetControls_reply_accessXTimeoutMask_mask_AccessXTimeoutMask,
24101 &hf_x11_xkb_GetControls_reply_accessXTimeoutMask_mask_AccessXFeedbackMask,
24102 &hf_x11_xkb_GetControls_reply_accessXTimeoutMask_mask_AudibleBellMask,
24103 &hf_x11_xkb_GetControls_reply_accessXTimeoutMask_mask_Overlay1Mask,
24104 &hf_x11_xkb_GetControls_reply_accessXTimeoutMask_mask_Overlay2Mask,
24105 &hf_x11_xkb_GetControls_reply_accessXTimeoutMask_mask_IgnoreGroupLockMask,
24106 NULL
24107 };
24108 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xkb_GetControls_reply_accessXTimeoutMask, ett_x11_rectangle, accessXTimeoutMask_bits, byte_order);
24109 }
24110 *offsetp += 4;
24111 {
24112 static int* const accessXTimeoutValues_bits [] = {
24113 &hf_x11_xkb_GetControls_reply_accessXTimeoutValues_mask_RepeatKeys,
24114 &hf_x11_xkb_GetControls_reply_accessXTimeoutValues_mask_SlowKeys,
24115 &hf_x11_xkb_GetControls_reply_accessXTimeoutValues_mask_BounceKeys,
24116 &hf_x11_xkb_GetControls_reply_accessXTimeoutValues_mask_StickyKeys,
24117 &hf_x11_xkb_GetControls_reply_accessXTimeoutValues_mask_MouseKeys,
24118 &hf_x11_xkb_GetControls_reply_accessXTimeoutValues_mask_MouseKeysAccel,
24119 &hf_x11_xkb_GetControls_reply_accessXTimeoutValues_mask_AccessXKeys,
24120 &hf_x11_xkb_GetControls_reply_accessXTimeoutValues_mask_AccessXTimeoutMask,
24121 &hf_x11_xkb_GetControls_reply_accessXTimeoutValues_mask_AccessXFeedbackMask,
24122 &hf_x11_xkb_GetControls_reply_accessXTimeoutValues_mask_AudibleBellMask,
24123 &hf_x11_xkb_GetControls_reply_accessXTimeoutValues_mask_Overlay1Mask,
24124 &hf_x11_xkb_GetControls_reply_accessXTimeoutValues_mask_Overlay2Mask,
24125 &hf_x11_xkb_GetControls_reply_accessXTimeoutValues_mask_IgnoreGroupLockMask,
24126 NULL
24127 };
24128 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xkb_GetControls_reply_accessXTimeoutValues, ett_x11_rectangle, accessXTimeoutValues_bits, byte_order);
24129 }
24130 *offsetp += 4;
24131 {
24132 static int* const enabledControls_bits [] = {
24133 &hf_x11_xkb_GetControls_reply_enabledControls_mask_RepeatKeys,
24134 &hf_x11_xkb_GetControls_reply_enabledControls_mask_SlowKeys,
24135 &hf_x11_xkb_GetControls_reply_enabledControls_mask_BounceKeys,
24136 &hf_x11_xkb_GetControls_reply_enabledControls_mask_StickyKeys,
24137 &hf_x11_xkb_GetControls_reply_enabledControls_mask_MouseKeys,
24138 &hf_x11_xkb_GetControls_reply_enabledControls_mask_MouseKeysAccel,
24139 &hf_x11_xkb_GetControls_reply_enabledControls_mask_AccessXKeys,
24140 &hf_x11_xkb_GetControls_reply_enabledControls_mask_AccessXTimeoutMask,
24141 &hf_x11_xkb_GetControls_reply_enabledControls_mask_AccessXFeedbackMask,
24142 &hf_x11_xkb_GetControls_reply_enabledControls_mask_AudibleBellMask,
24143 &hf_x11_xkb_GetControls_reply_enabledControls_mask_Overlay1Mask,
24144 &hf_x11_xkb_GetControls_reply_enabledControls_mask_Overlay2Mask,
24145 &hf_x11_xkb_GetControls_reply_enabledControls_mask_IgnoreGroupLockMask,
24146 NULL
24147 };
24148 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xkb_GetControls_reply_enabledControls, ett_x11_rectangle, enabledControls_bits, byte_order);
24149 }
24150 *offsetp += 4;
24151 listOfByte(tvb, offsetp, t, hf_x11_xkb_GetControls_reply_perKeyRepeat, 32, byte_order);
24152}
24153
24154static void xkbSetControls(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
24155{
24156 proto_tree_add_item(t, hf_x11_xkb_SetControls_deviceSpec, tvb, *offsetp, 2, byte_order);
24157 *offsetp += 2;
24158 {
24159 static int* const affectInternalRealMods_bits [] = {
24160 &hf_x11_xkb_SetControls_affectInternalRealMods_mask_Shift,
24161 &hf_x11_xkb_SetControls_affectInternalRealMods_mask_Lock,
24162 &hf_x11_xkb_SetControls_affectInternalRealMods_mask_Control,
24163 &hf_x11_xkb_SetControls_affectInternalRealMods_mask_1,
24164 &hf_x11_xkb_SetControls_affectInternalRealMods_mask_2,
24165 &hf_x11_xkb_SetControls_affectInternalRealMods_mask_3,
24166 &hf_x11_xkb_SetControls_affectInternalRealMods_mask_4,
24167 &hf_x11_xkb_SetControls_affectInternalRealMods_mask_5,
24168 &hf_x11_xkb_SetControls_affectInternalRealMods_mask_Any,
24169 NULL
24170 };
24171 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xkb_SetControls_affectInternalRealMods, ett_x11_rectangle, affectInternalRealMods_bits, byte_order);
24172 }
24173 *offsetp += 1;
24174 {
24175 static int* const internalRealMods_bits [] = {
24176 &hf_x11_xkb_SetControls_internalRealMods_mask_Shift,
24177 &hf_x11_xkb_SetControls_internalRealMods_mask_Lock,
24178 &hf_x11_xkb_SetControls_internalRealMods_mask_Control,
24179 &hf_x11_xkb_SetControls_internalRealMods_mask_1,
24180 &hf_x11_xkb_SetControls_internalRealMods_mask_2,
24181 &hf_x11_xkb_SetControls_internalRealMods_mask_3,
24182 &hf_x11_xkb_SetControls_internalRealMods_mask_4,
24183 &hf_x11_xkb_SetControls_internalRealMods_mask_5,
24184 &hf_x11_xkb_SetControls_internalRealMods_mask_Any,
24185 NULL
24186 };
24187 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xkb_SetControls_internalRealMods, ett_x11_rectangle, internalRealMods_bits, byte_order);
24188 }
24189 *offsetp += 1;
24190 {
24191 static int* const affectIgnoreLockRealMods_bits [] = {
24192 &hf_x11_xkb_SetControls_affectIgnoreLockRealMods_mask_Shift,
24193 &hf_x11_xkb_SetControls_affectIgnoreLockRealMods_mask_Lock,
24194 &hf_x11_xkb_SetControls_affectIgnoreLockRealMods_mask_Control,
24195 &hf_x11_xkb_SetControls_affectIgnoreLockRealMods_mask_1,
24196 &hf_x11_xkb_SetControls_affectIgnoreLockRealMods_mask_2,
24197 &hf_x11_xkb_SetControls_affectIgnoreLockRealMods_mask_3,
24198 &hf_x11_xkb_SetControls_affectIgnoreLockRealMods_mask_4,
24199 &hf_x11_xkb_SetControls_affectIgnoreLockRealMods_mask_5,
24200 &hf_x11_xkb_SetControls_affectIgnoreLockRealMods_mask_Any,
24201 NULL
24202 };
24203 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xkb_SetControls_affectIgnoreLockRealMods, ett_x11_rectangle, affectIgnoreLockRealMods_bits, byte_order);
24204 }
24205 *offsetp += 1;
24206 {
24207 static int* const ignoreLockRealMods_bits [] = {
24208 &hf_x11_xkb_SetControls_ignoreLockRealMods_mask_Shift,
24209 &hf_x11_xkb_SetControls_ignoreLockRealMods_mask_Lock,
24210 &hf_x11_xkb_SetControls_ignoreLockRealMods_mask_Control,
24211 &hf_x11_xkb_SetControls_ignoreLockRealMods_mask_1,
24212 &hf_x11_xkb_SetControls_ignoreLockRealMods_mask_2,
24213 &hf_x11_xkb_SetControls_ignoreLockRealMods_mask_3,
24214 &hf_x11_xkb_SetControls_ignoreLockRealMods_mask_4,
24215 &hf_x11_xkb_SetControls_ignoreLockRealMods_mask_5,
24216 &hf_x11_xkb_SetControls_ignoreLockRealMods_mask_Any,
24217 NULL
24218 };
24219 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xkb_SetControls_ignoreLockRealMods, ett_x11_rectangle, ignoreLockRealMods_bits, byte_order);
24220 }
24221 *offsetp += 1;
24222 {
24223 static int* const affectInternalVirtualMods_bits [] = {
24224 &hf_x11_xkb_SetControls_affectInternalVirtualMods_mask_0,
24225 &hf_x11_xkb_SetControls_affectInternalVirtualMods_mask_1,
24226 &hf_x11_xkb_SetControls_affectInternalVirtualMods_mask_2,
24227 &hf_x11_xkb_SetControls_affectInternalVirtualMods_mask_3,
24228 &hf_x11_xkb_SetControls_affectInternalVirtualMods_mask_4,
24229 &hf_x11_xkb_SetControls_affectInternalVirtualMods_mask_5,
24230 &hf_x11_xkb_SetControls_affectInternalVirtualMods_mask_6,
24231 &hf_x11_xkb_SetControls_affectInternalVirtualMods_mask_7,
24232 &hf_x11_xkb_SetControls_affectInternalVirtualMods_mask_8,
24233 &hf_x11_xkb_SetControls_affectInternalVirtualMods_mask_9,
24234 &hf_x11_xkb_SetControls_affectInternalVirtualMods_mask_10,
24235 &hf_x11_xkb_SetControls_affectInternalVirtualMods_mask_11,
24236 &hf_x11_xkb_SetControls_affectInternalVirtualMods_mask_12,
24237 &hf_x11_xkb_SetControls_affectInternalVirtualMods_mask_13,
24238 &hf_x11_xkb_SetControls_affectInternalVirtualMods_mask_14,
24239 &hf_x11_xkb_SetControls_affectInternalVirtualMods_mask_15,
24240 NULL
24241 };
24242 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xkb_SetControls_affectInternalVirtualMods, ett_x11_rectangle, affectInternalVirtualMods_bits, byte_order);
24243 }
24244 *offsetp += 2;
24245 {
24246 static int* const internalVirtualMods_bits [] = {
24247 &hf_x11_xkb_SetControls_internalVirtualMods_mask_0,
24248 &hf_x11_xkb_SetControls_internalVirtualMods_mask_1,
24249 &hf_x11_xkb_SetControls_internalVirtualMods_mask_2,
24250 &hf_x11_xkb_SetControls_internalVirtualMods_mask_3,
24251 &hf_x11_xkb_SetControls_internalVirtualMods_mask_4,
24252 &hf_x11_xkb_SetControls_internalVirtualMods_mask_5,
24253 &hf_x11_xkb_SetControls_internalVirtualMods_mask_6,
24254 &hf_x11_xkb_SetControls_internalVirtualMods_mask_7,
24255 &hf_x11_xkb_SetControls_internalVirtualMods_mask_8,
24256 &hf_x11_xkb_SetControls_internalVirtualMods_mask_9,
24257 &hf_x11_xkb_SetControls_internalVirtualMods_mask_10,
24258 &hf_x11_xkb_SetControls_internalVirtualMods_mask_11,
24259 &hf_x11_xkb_SetControls_internalVirtualMods_mask_12,
24260 &hf_x11_xkb_SetControls_internalVirtualMods_mask_13,
24261 &hf_x11_xkb_SetControls_internalVirtualMods_mask_14,
24262 &hf_x11_xkb_SetControls_internalVirtualMods_mask_15,
24263 NULL
24264 };
24265 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xkb_SetControls_internalVirtualMods, ett_x11_rectangle, internalVirtualMods_bits, byte_order);
24266 }
24267 *offsetp += 2;
24268 {
24269 static int* const affectIgnoreLockVirtualMods_bits [] = {
24270 &hf_x11_xkb_SetControls_affectIgnoreLockVirtualMods_mask_0,
24271 &hf_x11_xkb_SetControls_affectIgnoreLockVirtualMods_mask_1,
24272 &hf_x11_xkb_SetControls_affectIgnoreLockVirtualMods_mask_2,
24273 &hf_x11_xkb_SetControls_affectIgnoreLockVirtualMods_mask_3,
24274 &hf_x11_xkb_SetControls_affectIgnoreLockVirtualMods_mask_4,
24275 &hf_x11_xkb_SetControls_affectIgnoreLockVirtualMods_mask_5,
24276 &hf_x11_xkb_SetControls_affectIgnoreLockVirtualMods_mask_6,
24277 &hf_x11_xkb_SetControls_affectIgnoreLockVirtualMods_mask_7,
24278 &hf_x11_xkb_SetControls_affectIgnoreLockVirtualMods_mask_8,
24279 &hf_x11_xkb_SetControls_affectIgnoreLockVirtualMods_mask_9,
24280 &hf_x11_xkb_SetControls_affectIgnoreLockVirtualMods_mask_10,
24281 &hf_x11_xkb_SetControls_affectIgnoreLockVirtualMods_mask_11,
24282 &hf_x11_xkb_SetControls_affectIgnoreLockVirtualMods_mask_12,
24283 &hf_x11_xkb_SetControls_affectIgnoreLockVirtualMods_mask_13,
24284 &hf_x11_xkb_SetControls_affectIgnoreLockVirtualMods_mask_14,
24285 &hf_x11_xkb_SetControls_affectIgnoreLockVirtualMods_mask_15,
24286 NULL
24287 };
24288 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xkb_SetControls_affectIgnoreLockVirtualMods, ett_x11_rectangle, affectIgnoreLockVirtualMods_bits, byte_order);
24289 }
24290 *offsetp += 2;
24291 {
24292 static int* const ignoreLockVirtualMods_bits [] = {
24293 &hf_x11_xkb_SetControls_ignoreLockVirtualMods_mask_0,
24294 &hf_x11_xkb_SetControls_ignoreLockVirtualMods_mask_1,
24295 &hf_x11_xkb_SetControls_ignoreLockVirtualMods_mask_2,
24296 &hf_x11_xkb_SetControls_ignoreLockVirtualMods_mask_3,
24297 &hf_x11_xkb_SetControls_ignoreLockVirtualMods_mask_4,
24298 &hf_x11_xkb_SetControls_ignoreLockVirtualMods_mask_5,
24299 &hf_x11_xkb_SetControls_ignoreLockVirtualMods_mask_6,
24300 &hf_x11_xkb_SetControls_ignoreLockVirtualMods_mask_7,
24301 &hf_x11_xkb_SetControls_ignoreLockVirtualMods_mask_8,
24302 &hf_x11_xkb_SetControls_ignoreLockVirtualMods_mask_9,
24303 &hf_x11_xkb_SetControls_ignoreLockVirtualMods_mask_10,
24304 &hf_x11_xkb_SetControls_ignoreLockVirtualMods_mask_11,
24305 &hf_x11_xkb_SetControls_ignoreLockVirtualMods_mask_12,
24306 &hf_x11_xkb_SetControls_ignoreLockVirtualMods_mask_13,
24307 &hf_x11_xkb_SetControls_ignoreLockVirtualMods_mask_14,
24308 &hf_x11_xkb_SetControls_ignoreLockVirtualMods_mask_15,
24309 NULL
24310 };
24311 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xkb_SetControls_ignoreLockVirtualMods, ett_x11_rectangle, ignoreLockVirtualMods_bits, byte_order);
24312 }
24313 *offsetp += 2;
24314 proto_tree_add_item(t, hf_x11_xkb_SetControls_mouseKeysDfltBtn, tvb, *offsetp, 1, byte_order);
24315 *offsetp += 1;
24316 proto_tree_add_item(t, hf_x11_xkb_SetControls_groupsWrap, tvb, *offsetp, 1, byte_order);
24317 *offsetp += 1;
24318 {
24319 static int* const accessXOptions_bits [] = {
24320 &hf_x11_xkb_SetControls_accessXOptions_mask_SKPressFB,
24321 &hf_x11_xkb_SetControls_accessXOptions_mask_SKAcceptFB,
24322 &hf_x11_xkb_SetControls_accessXOptions_mask_FeatureFB,
24323 &hf_x11_xkb_SetControls_accessXOptions_mask_SlowWarnFB,
24324 &hf_x11_xkb_SetControls_accessXOptions_mask_IndicatorFB,
24325 &hf_x11_xkb_SetControls_accessXOptions_mask_StickyKeysFB,
24326 &hf_x11_xkb_SetControls_accessXOptions_mask_TwoKeys,
24327 &hf_x11_xkb_SetControls_accessXOptions_mask_LatchToLock,
24328 &hf_x11_xkb_SetControls_accessXOptions_mask_SKReleaseFB,
24329 &hf_x11_xkb_SetControls_accessXOptions_mask_SKRejectFB,
24330 &hf_x11_xkb_SetControls_accessXOptions_mask_BKRejectFB,
24331 &hf_x11_xkb_SetControls_accessXOptions_mask_DumbBell,
24332 NULL
24333 };
24334 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xkb_SetControls_accessXOptions, ett_x11_rectangle, accessXOptions_bits, byte_order);
24335 }
24336 *offsetp += 2;
24337 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 2, ENC_NA);
24338 *offsetp += 2;
24339 {
24340 static int* const affectEnabledControls_bits [] = {
24341 &hf_x11_xkb_SetControls_affectEnabledControls_mask_RepeatKeys,
24342 &hf_x11_xkb_SetControls_affectEnabledControls_mask_SlowKeys,
24343 &hf_x11_xkb_SetControls_affectEnabledControls_mask_BounceKeys,
24344 &hf_x11_xkb_SetControls_affectEnabledControls_mask_StickyKeys,
24345 &hf_x11_xkb_SetControls_affectEnabledControls_mask_MouseKeys,
24346 &hf_x11_xkb_SetControls_affectEnabledControls_mask_MouseKeysAccel,
24347 &hf_x11_xkb_SetControls_affectEnabledControls_mask_AccessXKeys,
24348 &hf_x11_xkb_SetControls_affectEnabledControls_mask_AccessXTimeoutMask,
24349 &hf_x11_xkb_SetControls_affectEnabledControls_mask_AccessXFeedbackMask,
24350 &hf_x11_xkb_SetControls_affectEnabledControls_mask_AudibleBellMask,
24351 &hf_x11_xkb_SetControls_affectEnabledControls_mask_Overlay1Mask,
24352 &hf_x11_xkb_SetControls_affectEnabledControls_mask_Overlay2Mask,
24353 &hf_x11_xkb_SetControls_affectEnabledControls_mask_IgnoreGroupLockMask,
24354 NULL
24355 };
24356 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xkb_SetControls_affectEnabledControls, ett_x11_rectangle, affectEnabledControls_bits, byte_order);
24357 }
24358 *offsetp += 4;
24359 {
24360 static int* const enabledControls_bits [] = {
24361 &hf_x11_xkb_SetControls_enabledControls_mask_RepeatKeys,
24362 &hf_x11_xkb_SetControls_enabledControls_mask_SlowKeys,
24363 &hf_x11_xkb_SetControls_enabledControls_mask_BounceKeys,
24364 &hf_x11_xkb_SetControls_enabledControls_mask_StickyKeys,
24365 &hf_x11_xkb_SetControls_enabledControls_mask_MouseKeys,
24366 &hf_x11_xkb_SetControls_enabledControls_mask_MouseKeysAccel,
24367 &hf_x11_xkb_SetControls_enabledControls_mask_AccessXKeys,
24368 &hf_x11_xkb_SetControls_enabledControls_mask_AccessXTimeoutMask,
24369 &hf_x11_xkb_SetControls_enabledControls_mask_AccessXFeedbackMask,
24370 &hf_x11_xkb_SetControls_enabledControls_mask_AudibleBellMask,
24371 &hf_x11_xkb_SetControls_enabledControls_mask_Overlay1Mask,
24372 &hf_x11_xkb_SetControls_enabledControls_mask_Overlay2Mask,
24373 &hf_x11_xkb_SetControls_enabledControls_mask_IgnoreGroupLockMask,
24374 NULL
24375 };
24376 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xkb_SetControls_enabledControls, ett_x11_rectangle, enabledControls_bits, byte_order);
24377 }
24378 *offsetp += 4;
24379 {
24380 static int* const changeControls_bits [] = {
24381 &hf_x11_xkb_SetControls_changeControls_mask_GroupsWrap,
24382 &hf_x11_xkb_SetControls_changeControls_mask_InternalMods,
24383 &hf_x11_xkb_SetControls_changeControls_mask_IgnoreLockMods,
24384 &hf_x11_xkb_SetControls_changeControls_mask_PerKeyRepeat,
24385 &hf_x11_xkb_SetControls_changeControls_mask_ControlsEnabled,
24386 NULL
24387 };
24388 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xkb_SetControls_changeControls, ett_x11_rectangle, changeControls_bits, byte_order);
24389 }
24390 *offsetp += 4;
24391 proto_tree_add_item(t, hf_x11_xkb_SetControls_repeatDelay, tvb, *offsetp, 2, byte_order);
24392 *offsetp += 2;
24393 proto_tree_add_item(t, hf_x11_xkb_SetControls_repeatInterval, tvb, *offsetp, 2, byte_order);
24394 *offsetp += 2;
24395 proto_tree_add_item(t, hf_x11_xkb_SetControls_slowKeysDelay, tvb, *offsetp, 2, byte_order);
24396 *offsetp += 2;
24397 proto_tree_add_item(t, hf_x11_xkb_SetControls_debounceDelay, tvb, *offsetp, 2, byte_order);
24398 *offsetp += 2;
24399 proto_tree_add_item(t, hf_x11_xkb_SetControls_mouseKeysDelay, tvb, *offsetp, 2, byte_order);
24400 *offsetp += 2;
24401 proto_tree_add_item(t, hf_x11_xkb_SetControls_mouseKeysInterval, tvb, *offsetp, 2, byte_order);
24402 *offsetp += 2;
24403 proto_tree_add_item(t, hf_x11_xkb_SetControls_mouseKeysTimeToMax, tvb, *offsetp, 2, byte_order);
24404 *offsetp += 2;
24405 proto_tree_add_item(t, hf_x11_xkb_SetControls_mouseKeysMaxSpeed, tvb, *offsetp, 2, byte_order);
24406 *offsetp += 2;
24407 proto_tree_add_item(t, hf_x11_xkb_SetControls_mouseKeysCurve, tvb, *offsetp, 2, byte_order);
24408 *offsetp += 2;
24409 proto_tree_add_item(t, hf_x11_xkb_SetControls_accessXTimeout, tvb, *offsetp, 2, byte_order);
24410 *offsetp += 2;
24411 {
24412 static int* const accessXTimeoutMask_bits [] = {
24413 &hf_x11_xkb_SetControls_accessXTimeoutMask_mask_RepeatKeys,
24414 &hf_x11_xkb_SetControls_accessXTimeoutMask_mask_SlowKeys,
24415 &hf_x11_xkb_SetControls_accessXTimeoutMask_mask_BounceKeys,
24416 &hf_x11_xkb_SetControls_accessXTimeoutMask_mask_StickyKeys,
24417 &hf_x11_xkb_SetControls_accessXTimeoutMask_mask_MouseKeys,
24418 &hf_x11_xkb_SetControls_accessXTimeoutMask_mask_MouseKeysAccel,
24419 &hf_x11_xkb_SetControls_accessXTimeoutMask_mask_AccessXKeys,
24420 &hf_x11_xkb_SetControls_accessXTimeoutMask_mask_AccessXTimeoutMask,
24421 &hf_x11_xkb_SetControls_accessXTimeoutMask_mask_AccessXFeedbackMask,
24422 &hf_x11_xkb_SetControls_accessXTimeoutMask_mask_AudibleBellMask,
24423 &hf_x11_xkb_SetControls_accessXTimeoutMask_mask_Overlay1Mask,
24424 &hf_x11_xkb_SetControls_accessXTimeoutMask_mask_Overlay2Mask,
24425 &hf_x11_xkb_SetControls_accessXTimeoutMask_mask_IgnoreGroupLockMask,
24426 NULL
24427 };
24428 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xkb_SetControls_accessXTimeoutMask, ett_x11_rectangle, accessXTimeoutMask_bits, byte_order);
24429 }
24430 *offsetp += 4;
24431 {
24432 static int* const accessXTimeoutValues_bits [] = {
24433 &hf_x11_xkb_SetControls_accessXTimeoutValues_mask_RepeatKeys,
24434 &hf_x11_xkb_SetControls_accessXTimeoutValues_mask_SlowKeys,
24435 &hf_x11_xkb_SetControls_accessXTimeoutValues_mask_BounceKeys,
24436 &hf_x11_xkb_SetControls_accessXTimeoutValues_mask_StickyKeys,
24437 &hf_x11_xkb_SetControls_accessXTimeoutValues_mask_MouseKeys,
24438 &hf_x11_xkb_SetControls_accessXTimeoutValues_mask_MouseKeysAccel,
24439 &hf_x11_xkb_SetControls_accessXTimeoutValues_mask_AccessXKeys,
24440 &hf_x11_xkb_SetControls_accessXTimeoutValues_mask_AccessXTimeoutMask,
24441 &hf_x11_xkb_SetControls_accessXTimeoutValues_mask_AccessXFeedbackMask,
24442 &hf_x11_xkb_SetControls_accessXTimeoutValues_mask_AudibleBellMask,
24443 &hf_x11_xkb_SetControls_accessXTimeoutValues_mask_Overlay1Mask,
24444 &hf_x11_xkb_SetControls_accessXTimeoutValues_mask_Overlay2Mask,
24445 &hf_x11_xkb_SetControls_accessXTimeoutValues_mask_IgnoreGroupLockMask,
24446 NULL
24447 };
24448 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xkb_SetControls_accessXTimeoutValues, ett_x11_rectangle, accessXTimeoutValues_bits, byte_order);
24449 }
24450 *offsetp += 4;
24451 {
24452 static int* const accessXTimeoutOptionsMask_bits [] = {
24453 &hf_x11_xkb_SetControls_accessXTimeoutOptionsMask_mask_SKPressFB,
24454 &hf_x11_xkb_SetControls_accessXTimeoutOptionsMask_mask_SKAcceptFB,
24455 &hf_x11_xkb_SetControls_accessXTimeoutOptionsMask_mask_FeatureFB,
24456 &hf_x11_xkb_SetControls_accessXTimeoutOptionsMask_mask_SlowWarnFB,
24457 &hf_x11_xkb_SetControls_accessXTimeoutOptionsMask_mask_IndicatorFB,
24458 &hf_x11_xkb_SetControls_accessXTimeoutOptionsMask_mask_StickyKeysFB,
24459 &hf_x11_xkb_SetControls_accessXTimeoutOptionsMask_mask_TwoKeys,
24460 &hf_x11_xkb_SetControls_accessXTimeoutOptionsMask_mask_LatchToLock,
24461 &hf_x11_xkb_SetControls_accessXTimeoutOptionsMask_mask_SKReleaseFB,
24462 &hf_x11_xkb_SetControls_accessXTimeoutOptionsMask_mask_SKRejectFB,
24463 &hf_x11_xkb_SetControls_accessXTimeoutOptionsMask_mask_BKRejectFB,
24464 &hf_x11_xkb_SetControls_accessXTimeoutOptionsMask_mask_DumbBell,
24465 NULL
24466 };
24467 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xkb_SetControls_accessXTimeoutOptionsMask, ett_x11_rectangle, accessXTimeoutOptionsMask_bits, byte_order);
24468 }
24469 *offsetp += 2;
24470 {
24471 static int* const accessXTimeoutOptionsValues_bits [] = {
24472 &hf_x11_xkb_SetControls_accessXTimeoutOptionsValues_mask_SKPressFB,
24473 &hf_x11_xkb_SetControls_accessXTimeoutOptionsValues_mask_SKAcceptFB,
24474 &hf_x11_xkb_SetControls_accessXTimeoutOptionsValues_mask_FeatureFB,
24475 &hf_x11_xkb_SetControls_accessXTimeoutOptionsValues_mask_SlowWarnFB,
24476 &hf_x11_xkb_SetControls_accessXTimeoutOptionsValues_mask_IndicatorFB,
24477 &hf_x11_xkb_SetControls_accessXTimeoutOptionsValues_mask_StickyKeysFB,
24478 &hf_x11_xkb_SetControls_accessXTimeoutOptionsValues_mask_TwoKeys,
24479 &hf_x11_xkb_SetControls_accessXTimeoutOptionsValues_mask_LatchToLock,
24480 &hf_x11_xkb_SetControls_accessXTimeoutOptionsValues_mask_SKReleaseFB,
24481 &hf_x11_xkb_SetControls_accessXTimeoutOptionsValues_mask_SKRejectFB,
24482 &hf_x11_xkb_SetControls_accessXTimeoutOptionsValues_mask_BKRejectFB,
24483 &hf_x11_xkb_SetControls_accessXTimeoutOptionsValues_mask_DumbBell,
24484 NULL
24485 };
24486 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xkb_SetControls_accessXTimeoutOptionsValues, ett_x11_rectangle, accessXTimeoutOptionsValues_bits, byte_order);
24487 }
24488 *offsetp += 2;
24489 listOfByte(tvb, offsetp, t, hf_x11_xkb_SetControls_perKeyRepeat, 32, byte_order);
24490 length -= 32 * 1;
24491}
24492
24493static void xkbGetMap(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
24494{
24495 proto_tree_add_item(t, hf_x11_xkb_GetMap_deviceSpec, tvb, *offsetp, 2, byte_order);
24496 *offsetp += 2;
24497 {
24498 static int* const full_bits [] = {
24499 &hf_x11_xkb_GetMap_full_mask_KeyTypes,
24500 &hf_x11_xkb_GetMap_full_mask_KeySyms,
24501 &hf_x11_xkb_GetMap_full_mask_ModifierMap,
24502 &hf_x11_xkb_GetMap_full_mask_ExplicitComponents,
24503 &hf_x11_xkb_GetMap_full_mask_KeyActions,
24504 &hf_x11_xkb_GetMap_full_mask_KeyBehaviors,
24505 &hf_x11_xkb_GetMap_full_mask_VirtualMods,
24506 &hf_x11_xkb_GetMap_full_mask_VirtualModMap,
24507 NULL
24508 };
24509 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xkb_GetMap_full, ett_x11_rectangle, full_bits, byte_order);
24510 }
24511 *offsetp += 2;
24512 {
24513 static int* const partial_bits [] = {
24514 &hf_x11_xkb_GetMap_partial_mask_KeyTypes,
24515 &hf_x11_xkb_GetMap_partial_mask_KeySyms,
24516 &hf_x11_xkb_GetMap_partial_mask_ModifierMap,
24517 &hf_x11_xkb_GetMap_partial_mask_ExplicitComponents,
24518 &hf_x11_xkb_GetMap_partial_mask_KeyActions,
24519 &hf_x11_xkb_GetMap_partial_mask_KeyBehaviors,
24520 &hf_x11_xkb_GetMap_partial_mask_VirtualMods,
24521 &hf_x11_xkb_GetMap_partial_mask_VirtualModMap,
24522 NULL
24523 };
24524 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xkb_GetMap_partial, ett_x11_rectangle, partial_bits, byte_order);
24525 }
24526 *offsetp += 2;
24527 proto_tree_add_item(t, hf_x11_xkb_GetMap_firstType, tvb, *offsetp, 1, byte_order);
24528 *offsetp += 1;
24529 proto_tree_add_item(t, hf_x11_xkb_GetMap_nTypes, tvb, *offsetp, 1, byte_order);
24530 *offsetp += 1;
24531 proto_tree_add_item(t, hf_x11_xkb_GetMap_firstKeySym, tvb, *offsetp, 1, byte_order);
24532 *offsetp += 1;
24533 proto_tree_add_item(t, hf_x11_xkb_GetMap_nKeySyms, tvb, *offsetp, 1, byte_order);
24534 *offsetp += 1;
24535 proto_tree_add_item(t, hf_x11_xkb_GetMap_firstKeyAction, tvb, *offsetp, 1, byte_order);
24536 *offsetp += 1;
24537 proto_tree_add_item(t, hf_x11_xkb_GetMap_nKeyActions, tvb, *offsetp, 1, byte_order);
24538 *offsetp += 1;
24539 proto_tree_add_item(t, hf_x11_xkb_GetMap_firstKeyBehavior, tvb, *offsetp, 1, byte_order);
24540 *offsetp += 1;
24541 proto_tree_add_item(t, hf_x11_xkb_GetMap_nKeyBehaviors, tvb, *offsetp, 1, byte_order);
24542 *offsetp += 1;
24543 {
24544 static int* const virtualMods_bits [] = {
24545 &hf_x11_xkb_GetMap_virtualMods_mask_0,
24546 &hf_x11_xkb_GetMap_virtualMods_mask_1,
24547 &hf_x11_xkb_GetMap_virtualMods_mask_2,
24548 &hf_x11_xkb_GetMap_virtualMods_mask_3,
24549 &hf_x11_xkb_GetMap_virtualMods_mask_4,
24550 &hf_x11_xkb_GetMap_virtualMods_mask_5,
24551 &hf_x11_xkb_GetMap_virtualMods_mask_6,
24552 &hf_x11_xkb_GetMap_virtualMods_mask_7,
24553 &hf_x11_xkb_GetMap_virtualMods_mask_8,
24554 &hf_x11_xkb_GetMap_virtualMods_mask_9,
24555 &hf_x11_xkb_GetMap_virtualMods_mask_10,
24556 &hf_x11_xkb_GetMap_virtualMods_mask_11,
24557 &hf_x11_xkb_GetMap_virtualMods_mask_12,
24558 &hf_x11_xkb_GetMap_virtualMods_mask_13,
24559 &hf_x11_xkb_GetMap_virtualMods_mask_14,
24560 &hf_x11_xkb_GetMap_virtualMods_mask_15,
24561 NULL
24562 };
24563 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xkb_GetMap_virtualMods, ett_x11_rectangle, virtualMods_bits, byte_order);
24564 }
24565 *offsetp += 2;
24566 proto_tree_add_item(t, hf_x11_xkb_GetMap_firstKeyExplicit, tvb, *offsetp, 1, byte_order);
24567 *offsetp += 1;
24568 proto_tree_add_item(t, hf_x11_xkb_GetMap_nKeyExplicit, tvb, *offsetp, 1, byte_order);
24569 *offsetp += 1;
24570 proto_tree_add_item(t, hf_x11_xkb_GetMap_firstModMapKey, tvb, *offsetp, 1, byte_order);
24571 *offsetp += 1;
24572 proto_tree_add_item(t, hf_x11_xkb_GetMap_nModMapKeys, tvb, *offsetp, 1, byte_order);
24573 *offsetp += 1;
24574 proto_tree_add_item(t, hf_x11_xkb_GetMap_firstVModMapKey, tvb, *offsetp, 1, byte_order);
24575 *offsetp += 1;
24576 proto_tree_add_item(t, hf_x11_xkb_GetMap_nVModMapKeys, tvb, *offsetp, 1, byte_order);
24577 *offsetp += 1;
24578 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 2, ENC_NA);
24579 *offsetp += 2;
24580}
24581static void xkbGetMap_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
24582{
24583 int sequence_number;
24584 int f_present;
24585 int f_nTypes;
24586 int f_nKeySyms;
24587 int f_totalActions;
24588 int f_nKeyActions;
24589 int f_totalKeyBehaviors;
24590 int f_totalKeyExplicit;
24591 int f_totalModMapKeys;
24592 int f_totalVModMapKeys;
24593 int f_virtualMods;
24594
24595 col_append_fstr(pinfo->cinfo, COL_INFO, "-GetMap");
24596
24597 REPLY(reply);
24598 proto_tree_add_item(t, hf_x11_xkb_GetMap_reply_deviceID, tvb, *offsetp, 1, byte_order);
24599 *offsetp += 1;
24600 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
24601 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
24602 "%d (xkb-GetMap)", sequence_number);
24603 *offsetp += 2;
24604 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
24605 *offsetp += 4;
24606 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 2, ENC_NA);
24607 *offsetp += 2;
24608 proto_tree_add_item(t, hf_x11_xkb_GetMap_reply_minKeyCode, tvb, *offsetp, 1, byte_order);
24609 *offsetp += 1;
24610 proto_tree_add_item(t, hf_x11_xkb_GetMap_reply_maxKeyCode, tvb, *offsetp, 1, byte_order);
24611 *offsetp += 1;
24612 f_present = tvb_get_uint16(tvb, *offsetp, byte_order);
24613 {
24614 static int* const present_bits [] = {
24615 &hf_x11_xkb_GetMap_reply_present_mask_KeyTypes,
24616 &hf_x11_xkb_GetMap_reply_present_mask_KeySyms,
24617 &hf_x11_xkb_GetMap_reply_present_mask_ModifierMap,
24618 &hf_x11_xkb_GetMap_reply_present_mask_ExplicitComponents,
24619 &hf_x11_xkb_GetMap_reply_present_mask_KeyActions,
24620 &hf_x11_xkb_GetMap_reply_present_mask_KeyBehaviors,
24621 &hf_x11_xkb_GetMap_reply_present_mask_VirtualMods,
24622 &hf_x11_xkb_GetMap_reply_present_mask_VirtualModMap,
24623 NULL
24624 };
24625 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xkb_GetMap_reply_present, ett_x11_rectangle, present_bits, byte_order);
24626 }
24627 *offsetp += 2;
24628 proto_tree_add_item(t, hf_x11_xkb_GetMap_reply_firstType, tvb, *offsetp, 1, byte_order);
24629 *offsetp += 1;
24630 f_nTypes = tvb_get_uint8(tvb, *offsetp);
24631 proto_tree_add_item(t, hf_x11_xkb_GetMap_reply_nTypes, tvb, *offsetp, 1, byte_order);
24632 *offsetp += 1;
24633 proto_tree_add_item(t, hf_x11_xkb_GetMap_reply_totalTypes, tvb, *offsetp, 1, byte_order);
24634 *offsetp += 1;
24635 proto_tree_add_item(t, hf_x11_xkb_GetMap_reply_firstKeySym, tvb, *offsetp, 1, byte_order);
24636 *offsetp += 1;
24637 proto_tree_add_item(t, hf_x11_xkb_GetMap_reply_totalSyms, tvb, *offsetp, 2, byte_order);
24638 *offsetp += 2;
24639 f_nKeySyms = tvb_get_uint8(tvb, *offsetp);
24640 proto_tree_add_item(t, hf_x11_xkb_GetMap_reply_nKeySyms, tvb, *offsetp, 1, byte_order);
24641 *offsetp += 1;
24642 proto_tree_add_item(t, hf_x11_xkb_GetMap_reply_firstKeyAction, tvb, *offsetp, 1, byte_order);
24643 *offsetp += 1;
24644 f_totalActions = tvb_get_uint16(tvb, *offsetp, byte_order);
24645 proto_tree_add_item(t, hf_x11_xkb_GetMap_reply_totalActions, tvb, *offsetp, 2, byte_order);
24646 *offsetp += 2;
24647 f_nKeyActions = tvb_get_uint8(tvb, *offsetp);
24648 proto_tree_add_item(t, hf_x11_xkb_GetMap_reply_nKeyActions, tvb, *offsetp, 1, byte_order);
24649 *offsetp += 1;
24650 proto_tree_add_item(t, hf_x11_xkb_GetMap_reply_firstKeyBehavior, tvb, *offsetp, 1, byte_order);
24651 *offsetp += 1;
24652 proto_tree_add_item(t, hf_x11_xkb_GetMap_reply_nKeyBehaviors, tvb, *offsetp, 1, byte_order);
24653 *offsetp += 1;
24654 f_totalKeyBehaviors = tvb_get_uint8(tvb, *offsetp);
24655 proto_tree_add_item(t, hf_x11_xkb_GetMap_reply_totalKeyBehaviors, tvb, *offsetp, 1, byte_order);
24656 *offsetp += 1;
24657 proto_tree_add_item(t, hf_x11_xkb_GetMap_reply_firstKeyExplicit, tvb, *offsetp, 1, byte_order);
24658 *offsetp += 1;
24659 proto_tree_add_item(t, hf_x11_xkb_GetMap_reply_nKeyExplicit, tvb, *offsetp, 1, byte_order);
24660 *offsetp += 1;
24661 f_totalKeyExplicit = tvb_get_uint8(tvb, *offsetp);
24662 proto_tree_add_item(t, hf_x11_xkb_GetMap_reply_totalKeyExplicit, tvb, *offsetp, 1, byte_order);
24663 *offsetp += 1;
24664 proto_tree_add_item(t, hf_x11_xkb_GetMap_reply_firstModMapKey, tvb, *offsetp, 1, byte_order);
24665 *offsetp += 1;
24666 proto_tree_add_item(t, hf_x11_xkb_GetMap_reply_nModMapKeys, tvb, *offsetp, 1, byte_order);
24667 *offsetp += 1;
24668 f_totalModMapKeys = tvb_get_uint8(tvb, *offsetp);
24669 proto_tree_add_item(t, hf_x11_xkb_GetMap_reply_totalModMapKeys, tvb, *offsetp, 1, byte_order);
24670 *offsetp += 1;
24671 proto_tree_add_item(t, hf_x11_xkb_GetMap_reply_firstVModMapKey, tvb, *offsetp, 1, byte_order);
24672 *offsetp += 1;
24673 proto_tree_add_item(t, hf_x11_xkb_GetMap_reply_nVModMapKeys, tvb, *offsetp, 1, byte_order);
24674 *offsetp += 1;
24675 f_totalVModMapKeys = tvb_get_uint8(tvb, *offsetp);
24676 proto_tree_add_item(t, hf_x11_xkb_GetMap_reply_totalVModMapKeys, tvb, *offsetp, 1, byte_order);
24677 *offsetp += 1;
24678 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
24679 *offsetp += 1;
24680 f_virtualMods = tvb_get_uint16(tvb, *offsetp, byte_order);
24681 {
24682 static int* const virtualMods_bits [] = {
24683 &hf_x11_xkb_GetMap_reply_virtualMods_mask_0,
24684 &hf_x11_xkb_GetMap_reply_virtualMods_mask_1,
24685 &hf_x11_xkb_GetMap_reply_virtualMods_mask_2,
24686 &hf_x11_xkb_GetMap_reply_virtualMods_mask_3,
24687 &hf_x11_xkb_GetMap_reply_virtualMods_mask_4,
24688 &hf_x11_xkb_GetMap_reply_virtualMods_mask_5,
24689 &hf_x11_xkb_GetMap_reply_virtualMods_mask_6,
24690 &hf_x11_xkb_GetMap_reply_virtualMods_mask_7,
24691 &hf_x11_xkb_GetMap_reply_virtualMods_mask_8,
24692 &hf_x11_xkb_GetMap_reply_virtualMods_mask_9,
24693 &hf_x11_xkb_GetMap_reply_virtualMods_mask_10,
24694 &hf_x11_xkb_GetMap_reply_virtualMods_mask_11,
24695 &hf_x11_xkb_GetMap_reply_virtualMods_mask_12,
24696 &hf_x11_xkb_GetMap_reply_virtualMods_mask_13,
24697 &hf_x11_xkb_GetMap_reply_virtualMods_mask_14,
24698 &hf_x11_xkb_GetMap_reply_virtualMods_mask_15,
24699 NULL
24700 };
24701 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xkb_GetMap_reply_virtualMods, ett_x11_rectangle, virtualMods_bits, byte_order);
24702 }
24703 *offsetp += 2;
24704 if (f_present & (1U << 0)) {
24705 struct_xkb_KeyType(tvb, offsetp, t, byte_order, f_nTypes);
24706 }
24707 if (f_present & (1U << 1)) {
24708 struct_xkb_KeySymMap(tvb, offsetp, t, byte_order, f_nKeySyms);
24709 }
24710 if (f_present & (1U << 4)) {
24711 listOfByte(tvb, offsetp, t, hf_x11_xkb_GetMap_reply_KeyActions_acts_rtrn_count, f_nKeyActions, byte_order);
24712 if (*offsetp % 4) {
24713 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, (4 - *offsetp % 4), ENC_NA);
24714 *offsetp += (4 - *offsetp % 4);
24715 }
24716 struct_xkb_Action(tvb, offsetp, t, byte_order, f_totalActions);
24717 }
24718 if (f_present & (1U << 5)) {
24719 struct_xkb_SetBehavior(tvb, offsetp, t, byte_order, f_totalKeyBehaviors);
24720 }
24721 if (f_present & (1U << 6)) {
24722 listOfByte(tvb, offsetp, t, hf_x11_xkb_GetMap_reply_VirtualMods_vmods_rtrn, ws_count_ones(f_virtualMods), byte_order);
24723 if (*offsetp % 4) {
24724 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, (4 - *offsetp % 4), ENC_NA);
24725 *offsetp += (4 - *offsetp % 4);
24726 }
24727 }
24728 if (f_present & (1U << 3)) {
24729 struct_xkb_SetExplicit(tvb, offsetp, t, byte_order, f_totalKeyExplicit);
24730 if (*offsetp % 4) {
24731 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, (4 - *offsetp % 4), ENC_NA);
24732 *offsetp += (4 - *offsetp % 4);
24733 }
24734 }
24735 if (f_present & (1U << 2)) {
24736 struct_xkb_KeyModMap(tvb, offsetp, t, byte_order, f_totalModMapKeys);
24737 if (*offsetp % 4) {
24738 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, (4 - *offsetp % 4), ENC_NA);
24739 *offsetp += (4 - *offsetp % 4);
24740 }
24741 }
24742 if (f_present & (1U << 7)) {
24743 struct_xkb_KeyVModMap(tvb, offsetp, t, byte_order, f_totalVModMapKeys);
24744 }
24745}
24746
24747static void xkbSetMap(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
24748{
24749 int f_present;
24750 int f_nTypes;
24751 int f_nKeySyms;
24752 int f_nKeyActions;
24753 int f_totalActions;
24754 int f_totalKeyBehaviors;
24755 int f_totalKeyExplicit;
24756 int f_totalModMapKeys;
24757 int f_totalVModMapKeys;
24758 int f_virtualMods;
24759 proto_tree_add_item(t, hf_x11_xkb_SetMap_deviceSpec, tvb, *offsetp, 2, byte_order);
24760 *offsetp += 2;
24761 f_present = tvb_get_uint16(tvb, *offsetp, byte_order);
24762 {
24763 static int* const present_bits [] = {
24764 &hf_x11_xkb_SetMap_present_mask_KeyTypes,
24765 &hf_x11_xkb_SetMap_present_mask_KeySyms,
24766 &hf_x11_xkb_SetMap_present_mask_ModifierMap,
24767 &hf_x11_xkb_SetMap_present_mask_ExplicitComponents,
24768 &hf_x11_xkb_SetMap_present_mask_KeyActions,
24769 &hf_x11_xkb_SetMap_present_mask_KeyBehaviors,
24770 &hf_x11_xkb_SetMap_present_mask_VirtualMods,
24771 &hf_x11_xkb_SetMap_present_mask_VirtualModMap,
24772 NULL
24773 };
24774 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xkb_SetMap_present, ett_x11_rectangle, present_bits, byte_order);
24775 }
24776 *offsetp += 2;
24777 {
24778 static int* const flags_bits [] = {
24779 &hf_x11_xkb_SetMap_flags_mask_ResizeTypes,
24780 &hf_x11_xkb_SetMap_flags_mask_RecomputeActions,
24781 NULL
24782 };
24783 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xkb_SetMap_flags, ett_x11_rectangle, flags_bits, byte_order);
24784 }
24785 *offsetp += 2;
24786 proto_tree_add_item(t, hf_x11_xkb_SetMap_minKeyCode, tvb, *offsetp, 1, byte_order);
24787 *offsetp += 1;
24788 proto_tree_add_item(t, hf_x11_xkb_SetMap_maxKeyCode, tvb, *offsetp, 1, byte_order);
24789 *offsetp += 1;
24790 proto_tree_add_item(t, hf_x11_xkb_SetMap_firstType, tvb, *offsetp, 1, byte_order);
24791 *offsetp += 1;
24792 f_nTypes = tvb_get_uint8(tvb, *offsetp);
24793 proto_tree_add_item(t, hf_x11_xkb_SetMap_nTypes, tvb, *offsetp, 1, byte_order);
24794 *offsetp += 1;
24795 proto_tree_add_item(t, hf_x11_xkb_SetMap_firstKeySym, tvb, *offsetp, 1, byte_order);
24796 *offsetp += 1;
24797 f_nKeySyms = tvb_get_uint8(tvb, *offsetp);
24798 proto_tree_add_item(t, hf_x11_xkb_SetMap_nKeySyms, tvb, *offsetp, 1, byte_order);
24799 *offsetp += 1;
24800 proto_tree_add_item(t, hf_x11_xkb_SetMap_totalSyms, tvb, *offsetp, 2, byte_order);
24801 *offsetp += 2;
24802 proto_tree_add_item(t, hf_x11_xkb_SetMap_firstKeyAction, tvb, *offsetp, 1, byte_order);
24803 *offsetp += 1;
24804 f_nKeyActions = tvb_get_uint8(tvb, *offsetp);
24805 proto_tree_add_item(t, hf_x11_xkb_SetMap_nKeyActions, tvb, *offsetp, 1, byte_order);
24806 *offsetp += 1;
24807 f_totalActions = tvb_get_uint16(tvb, *offsetp, byte_order);
24808 proto_tree_add_item(t, hf_x11_xkb_SetMap_totalActions, tvb, *offsetp, 2, byte_order);
24809 *offsetp += 2;
24810 proto_tree_add_item(t, hf_x11_xkb_SetMap_firstKeyBehavior, tvb, *offsetp, 1, byte_order);
24811 *offsetp += 1;
24812 proto_tree_add_item(t, hf_x11_xkb_SetMap_nKeyBehaviors, tvb, *offsetp, 1, byte_order);
24813 *offsetp += 1;
24814 f_totalKeyBehaviors = tvb_get_uint8(tvb, *offsetp);
24815 proto_tree_add_item(t, hf_x11_xkb_SetMap_totalKeyBehaviors, tvb, *offsetp, 1, byte_order);
24816 *offsetp += 1;
24817 proto_tree_add_item(t, hf_x11_xkb_SetMap_firstKeyExplicit, tvb, *offsetp, 1, byte_order);
24818 *offsetp += 1;
24819 proto_tree_add_item(t, hf_x11_xkb_SetMap_nKeyExplicit, tvb, *offsetp, 1, byte_order);
24820 *offsetp += 1;
24821 f_totalKeyExplicit = tvb_get_uint8(tvb, *offsetp);
24822 proto_tree_add_item(t, hf_x11_xkb_SetMap_totalKeyExplicit, tvb, *offsetp, 1, byte_order);
24823 *offsetp += 1;
24824 proto_tree_add_item(t, hf_x11_xkb_SetMap_firstModMapKey, tvb, *offsetp, 1, byte_order);
24825 *offsetp += 1;
24826 proto_tree_add_item(t, hf_x11_xkb_SetMap_nModMapKeys, tvb, *offsetp, 1, byte_order);
24827 *offsetp += 1;
24828 f_totalModMapKeys = tvb_get_uint8(tvb, *offsetp);
24829 proto_tree_add_item(t, hf_x11_xkb_SetMap_totalModMapKeys, tvb, *offsetp, 1, byte_order);
24830 *offsetp += 1;
24831 proto_tree_add_item(t, hf_x11_xkb_SetMap_firstVModMapKey, tvb, *offsetp, 1, byte_order);
24832 *offsetp += 1;
24833 proto_tree_add_item(t, hf_x11_xkb_SetMap_nVModMapKeys, tvb, *offsetp, 1, byte_order);
24834 *offsetp += 1;
24835 f_totalVModMapKeys = tvb_get_uint8(tvb, *offsetp);
24836 proto_tree_add_item(t, hf_x11_xkb_SetMap_totalVModMapKeys, tvb, *offsetp, 1, byte_order);
24837 *offsetp += 1;
24838 f_virtualMods = tvb_get_uint16(tvb, *offsetp, byte_order);
24839 {
24840 static int* const virtualMods_bits [] = {
24841 &hf_x11_xkb_SetMap_virtualMods_mask_0,
24842 &hf_x11_xkb_SetMap_virtualMods_mask_1,
24843 &hf_x11_xkb_SetMap_virtualMods_mask_2,
24844 &hf_x11_xkb_SetMap_virtualMods_mask_3,
24845 &hf_x11_xkb_SetMap_virtualMods_mask_4,
24846 &hf_x11_xkb_SetMap_virtualMods_mask_5,
24847 &hf_x11_xkb_SetMap_virtualMods_mask_6,
24848 &hf_x11_xkb_SetMap_virtualMods_mask_7,
24849 &hf_x11_xkb_SetMap_virtualMods_mask_8,
24850 &hf_x11_xkb_SetMap_virtualMods_mask_9,
24851 &hf_x11_xkb_SetMap_virtualMods_mask_10,
24852 &hf_x11_xkb_SetMap_virtualMods_mask_11,
24853 &hf_x11_xkb_SetMap_virtualMods_mask_12,
24854 &hf_x11_xkb_SetMap_virtualMods_mask_13,
24855 &hf_x11_xkb_SetMap_virtualMods_mask_14,
24856 &hf_x11_xkb_SetMap_virtualMods_mask_15,
24857 NULL
24858 };
24859 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xkb_SetMap_virtualMods, ett_x11_rectangle, virtualMods_bits, byte_order);
24860 }
24861 *offsetp += 2;
24862 if (f_present & (1U << 0)) {
24863 struct_xkb_SetKeyType(tvb, offsetp, t, byte_order, f_nTypes);
24864 length -= f_nTypes * 0;
24865 }
24866 if (f_present & (1U << 1)) {
24867 struct_xkb_KeySymMap(tvb, offsetp, t, byte_order, f_nKeySyms);
24868 length -= f_nKeySyms * 0;
24869 }
24870 if (f_present & (1U << 4)) {
24871 listOfByte(tvb, offsetp, t, hf_x11_xkb_SetMap_KeyActions_actionsCount, f_nKeyActions, byte_order);
24872 length -= f_nKeyActions * 1;
24873 if (*offsetp % 4) {
24874 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, (4 - *offsetp % 4), ENC_NA);
24875 *offsetp += (4 - *offsetp % 4);
24876 }
24877 length = ((length + 3) & ~3);
24878 struct_xkb_Action(tvb, offsetp, t, byte_order, f_totalActions);
24879 length -= f_totalActions * 8;
24880 }
24881 if (f_present & (1U << 5)) {
24882 struct_xkb_SetBehavior(tvb, offsetp, t, byte_order, f_totalKeyBehaviors);
24883 length -= f_totalKeyBehaviors * 4;
24884 }
24885 if (f_present & (1U << 6)) {
24886 listOfByte(tvb, offsetp, t, hf_x11_xkb_SetMap_VirtualMods_vmods, ws_count_ones(f_virtualMods), byte_order);
24887 length -= ws_count_ones(f_virtualMods) * 1;
24888 if (*offsetp % 4) {
24889 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, (4 - *offsetp % 4), ENC_NA);
24890 *offsetp += (4 - *offsetp % 4);
24891 }
24892 length = ((length + 3) & ~3);
24893 }
24894 if (f_present & (1U << 3)) {
24895 struct_xkb_SetExplicit(tvb, offsetp, t, byte_order, f_totalKeyExplicit);
24896 length -= f_totalKeyExplicit * 2;
24897 }
24898 if (f_present & (1U << 2)) {
24899 struct_xkb_KeyModMap(tvb, offsetp, t, byte_order, f_totalModMapKeys);
24900 length -= f_totalModMapKeys * 2;
24901 }
24902 if (f_present & (1U << 7)) {
24903 struct_xkb_KeyVModMap(tvb, offsetp, t, byte_order, f_totalVModMapKeys);
24904 length -= f_totalVModMapKeys * 4;
24905 }
24906}
24907
24908static void xkbGetCompatMap(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
24909{
24910 proto_tree_add_item(t, hf_x11_xkb_GetCompatMap_deviceSpec, tvb, *offsetp, 2, byte_order);
24911 *offsetp += 2;
24912 {
24913 static int* const groups_bits [] = {
24914 &hf_x11_xkb_GetCompatMap_groups_mask_Group1,
24915 &hf_x11_xkb_GetCompatMap_groups_mask_Group2,
24916 &hf_x11_xkb_GetCompatMap_groups_mask_Group3,
24917 &hf_x11_xkb_GetCompatMap_groups_mask_Group4,
24918 NULL
24919 };
24920 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xkb_GetCompatMap_groups, ett_x11_rectangle, groups_bits, byte_order);
24921 }
24922 *offsetp += 1;
24923 proto_tree_add_item(t, hf_x11_xkb_GetCompatMap_getAllSI, tvb, *offsetp, 1, byte_order);
24924 *offsetp += 1;
24925 proto_tree_add_item(t, hf_x11_xkb_GetCompatMap_firstSI, tvb, *offsetp, 2, byte_order);
24926 *offsetp += 2;
24927 proto_tree_add_item(t, hf_x11_xkb_GetCompatMap_nSI, tvb, *offsetp, 2, byte_order);
24928 *offsetp += 2;
24929}
24930static void xkbGetCompatMap_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
24931{
24932 int sequence_number;
24933 int f_groupsRtrn;
24934 int f_nSIRtrn;
24935
24936 col_append_fstr(pinfo->cinfo, COL_INFO, "-GetCompatMap");
24937
24938 REPLY(reply);
24939 proto_tree_add_item(t, hf_x11_xkb_GetCompatMap_reply_deviceID, tvb, *offsetp, 1, byte_order);
24940 *offsetp += 1;
24941 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
24942 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
24943 "%d (xkb-GetCompatMap)", sequence_number);
24944 *offsetp += 2;
24945 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
24946 *offsetp += 4;
24947 f_groupsRtrn = tvb_get_uint8(tvb, *offsetp);
24948 {
24949 static int* const groupsRtrn_bits [] = {
24950 &hf_x11_xkb_GetCompatMap_reply_groupsRtrn_mask_Group1,
24951 &hf_x11_xkb_GetCompatMap_reply_groupsRtrn_mask_Group2,
24952 &hf_x11_xkb_GetCompatMap_reply_groupsRtrn_mask_Group3,
24953 &hf_x11_xkb_GetCompatMap_reply_groupsRtrn_mask_Group4,
24954 NULL
24955 };
24956 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xkb_GetCompatMap_reply_groupsRtrn, ett_x11_rectangle, groupsRtrn_bits, byte_order);
24957 }
24958 *offsetp += 1;
24959 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
24960 *offsetp += 1;
24961 proto_tree_add_item(t, hf_x11_xkb_GetCompatMap_reply_firstSIRtrn, tvb, *offsetp, 2, byte_order);
24962 *offsetp += 2;
24963 f_nSIRtrn = tvb_get_uint16(tvb, *offsetp, byte_order);
24964 proto_tree_add_item(t, hf_x11_xkb_GetCompatMap_reply_nSIRtrn, tvb, *offsetp, 2, byte_order);
24965 *offsetp += 2;
24966 proto_tree_add_item(t, hf_x11_xkb_GetCompatMap_reply_nTotalSI, tvb, *offsetp, 2, byte_order);
24967 *offsetp += 2;
24968 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 16, ENC_NA);
24969 *offsetp += 16;
24970 struct_xkb_SymInterpret(tvb, offsetp, t, byte_order, f_nSIRtrn);
24971 struct_xkb_ModDef(tvb, offsetp, t, byte_order, ws_count_ones(f_groupsRtrn));
24972}
24973
24974static void xkbSetCompatMap(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
24975{
24976 int f_groups;
24977 int f_nSI;
24978 proto_tree_add_item(t, hf_x11_xkb_SetCompatMap_deviceSpec, tvb, *offsetp, 2, byte_order);
24979 *offsetp += 2;
24980 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
24981 *offsetp += 1;
24982 proto_tree_add_item(t, hf_x11_xkb_SetCompatMap_recomputeActions, tvb, *offsetp, 1, byte_order);
24983 *offsetp += 1;
24984 proto_tree_add_item(t, hf_x11_xkb_SetCompatMap_truncateSI, tvb, *offsetp, 1, byte_order);
24985 *offsetp += 1;
24986 f_groups = tvb_get_uint8(tvb, *offsetp);
24987 {
24988 static int* const groups_bits [] = {
24989 &hf_x11_xkb_SetCompatMap_groups_mask_Group1,
24990 &hf_x11_xkb_SetCompatMap_groups_mask_Group2,
24991 &hf_x11_xkb_SetCompatMap_groups_mask_Group3,
24992 &hf_x11_xkb_SetCompatMap_groups_mask_Group4,
24993 NULL
24994 };
24995 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xkb_SetCompatMap_groups, ett_x11_rectangle, groups_bits, byte_order);
24996 }
24997 *offsetp += 1;
24998 proto_tree_add_item(t, hf_x11_xkb_SetCompatMap_firstSI, tvb, *offsetp, 2, byte_order);
24999 *offsetp += 2;
25000 f_nSI = tvb_get_uint16(tvb, *offsetp, byte_order);
25001 proto_tree_add_item(t, hf_x11_xkb_SetCompatMap_nSI, tvb, *offsetp, 2, byte_order);
25002 *offsetp += 2;
25003 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 2, ENC_NA);
25004 *offsetp += 2;
25005 struct_xkb_SymInterpret(tvb, offsetp, t, byte_order, f_nSI);
25006 length -= f_nSI * 16;
25007 struct_xkb_ModDef(tvb, offsetp, t, byte_order, ws_count_ones(f_groups));
25008 length -= ws_count_ones(f_groups) * 4;
25009}
25010
25011static void xkbGetIndicatorState(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
25012{
25013 proto_tree_add_item(t, hf_x11_xkb_GetIndicatorState_deviceSpec, tvb, *offsetp, 2, byte_order);
25014 *offsetp += 2;
25015 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 2, ENC_NA);
25016 *offsetp += 2;
25017}
25018static void xkbGetIndicatorState_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
25019{
25020 int sequence_number;
25021
25022 col_append_fstr(pinfo->cinfo, COL_INFO, "-GetIndicatorState");
25023
25024 REPLY(reply);
25025 proto_tree_add_item(t, hf_x11_xkb_GetIndicatorState_reply_deviceID, tvb, *offsetp, 1, byte_order);
25026 *offsetp += 1;
25027 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
25028 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
25029 "%d (xkb-GetIndicatorState)", sequence_number);
25030 *offsetp += 2;
25031 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
25032 *offsetp += 4;
25033 proto_tree_add_item(t, hf_x11_xkb_GetIndicatorState_reply_state, tvb, *offsetp, 4, byte_order);
25034 *offsetp += 4;
25035 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 20, ENC_NA);
25036 *offsetp += 20;
25037}
25038
25039static void xkbGetIndicatorMap(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
25040{
25041 proto_tree_add_item(t, hf_x11_xkb_GetIndicatorMap_deviceSpec, tvb, *offsetp, 2, byte_order);
25042 *offsetp += 2;
25043 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 2, ENC_NA);
25044 *offsetp += 2;
25045 proto_tree_add_item(t, hf_x11_xkb_GetIndicatorMap_which, tvb, *offsetp, 4, byte_order);
25046 *offsetp += 4;
25047}
25048static void xkbGetIndicatorMap_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
25049{
25050 int sequence_number;
25051 int f_which;
25052
25053 col_append_fstr(pinfo->cinfo, COL_INFO, "-GetIndicatorMap");
25054
25055 REPLY(reply);
25056 proto_tree_add_item(t, hf_x11_xkb_GetIndicatorMap_reply_deviceID, tvb, *offsetp, 1, byte_order);
25057 *offsetp += 1;
25058 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
25059 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
25060 "%d (xkb-GetIndicatorMap)", sequence_number);
25061 *offsetp += 2;
25062 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
25063 *offsetp += 4;
25064 f_which = tvb_get_uint32(tvb, *offsetp, byte_order);
25065 proto_tree_add_item(t, hf_x11_xkb_GetIndicatorMap_reply_which, tvb, *offsetp, 4, byte_order);
25066 *offsetp += 4;
25067 proto_tree_add_item(t, hf_x11_xkb_GetIndicatorMap_reply_realIndicators, tvb, *offsetp, 4, byte_order);
25068 *offsetp += 4;
25069 proto_tree_add_item(t, hf_x11_xkb_GetIndicatorMap_reply_nIndicators, tvb, *offsetp, 1, byte_order);
25070 *offsetp += 1;
25071 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 15, ENC_NA);
25072 *offsetp += 15;
25073 struct_xkb_IndicatorMap(tvb, offsetp, t, byte_order, ws_count_ones(f_which));
25074}
25075
25076static void xkbSetIndicatorMap(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
25077{
25078 int f_which;
25079 proto_tree_add_item(t, hf_x11_xkb_SetIndicatorMap_deviceSpec, tvb, *offsetp, 2, byte_order);
25080 *offsetp += 2;
25081 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 2, ENC_NA);
25082 *offsetp += 2;
25083 f_which = tvb_get_uint32(tvb, *offsetp, byte_order);
25084 proto_tree_add_item(t, hf_x11_xkb_SetIndicatorMap_which, tvb, *offsetp, 4, byte_order);
25085 *offsetp += 4;
25086 struct_xkb_IndicatorMap(tvb, offsetp, t, byte_order, ws_count_ones(f_which));
25087 length -= ws_count_ones(f_which) * 12;
25088}
25089
25090static void xkbGetNamedIndicator(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
25091{
25092 proto_tree_add_item(t, hf_x11_xkb_GetNamedIndicator_deviceSpec, tvb, *offsetp, 2, byte_order);
25093 *offsetp += 2;
25094 field16(tvb, offsetp, t, hf_x11_xkb_GetNamedIndicator_ledClass, byte_order);
25095 field16(tvb, offsetp, t, hf_x11_xkb_GetNamedIndicator_ledID, byte_order);
25096 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 2, ENC_NA);
25097 *offsetp += 2;
25098 proto_tree_add_item(t, hf_x11_xkb_GetNamedIndicator_indicator, tvb, *offsetp, 4, byte_order);
25099 *offsetp += 4;
25100}
25101static void xkbGetNamedIndicator_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
25102{
25103 int sequence_number;
25104
25105 col_append_fstr(pinfo->cinfo, COL_INFO, "-GetNamedIndicator");
25106
25107 REPLY(reply);
25108 proto_tree_add_item(t, hf_x11_xkb_GetNamedIndicator_reply_deviceID, tvb, *offsetp, 1, byte_order);
25109 *offsetp += 1;
25110 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
25111 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
25112 "%d (xkb-GetNamedIndicator)", sequence_number);
25113 *offsetp += 2;
25114 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
25115 *offsetp += 4;
25116 proto_tree_add_item(t, hf_x11_xkb_GetNamedIndicator_reply_indicator, tvb, *offsetp, 4, byte_order);
25117 *offsetp += 4;
25118 proto_tree_add_item(t, hf_x11_xkb_GetNamedIndicator_reply_found, tvb, *offsetp, 1, byte_order);
25119 *offsetp += 1;
25120 proto_tree_add_item(t, hf_x11_xkb_GetNamedIndicator_reply_on, tvb, *offsetp, 1, byte_order);
25121 *offsetp += 1;
25122 proto_tree_add_item(t, hf_x11_xkb_GetNamedIndicator_reply_realIndicator, tvb, *offsetp, 1, byte_order);
25123 *offsetp += 1;
25124 proto_tree_add_item(t, hf_x11_xkb_GetNamedIndicator_reply_ndx, tvb, *offsetp, 1, byte_order);
25125 *offsetp += 1;
25126 {
25127 static int* const map_flags_bits [] = {
25128 &hf_x11_xkb_GetNamedIndicator_reply_map_flags_mask_LEDDrivesKB,
25129 &hf_x11_xkb_GetNamedIndicator_reply_map_flags_mask_NoAutomatic,
25130 &hf_x11_xkb_GetNamedIndicator_reply_map_flags_mask_NoExplicit,
25131 NULL
25132 };
25133 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xkb_GetNamedIndicator_reply_map_flags, ett_x11_rectangle, map_flags_bits, byte_order);
25134 }
25135 *offsetp += 1;
25136 {
25137 static int* const map_whichGroups_bits [] = {
25138 &hf_x11_xkb_GetNamedIndicator_reply_map_whichGroups_mask_UseBase,
25139 &hf_x11_xkb_GetNamedIndicator_reply_map_whichGroups_mask_UseLatched,
25140 &hf_x11_xkb_GetNamedIndicator_reply_map_whichGroups_mask_UseLocked,
25141 &hf_x11_xkb_GetNamedIndicator_reply_map_whichGroups_mask_UseEffective,
25142 &hf_x11_xkb_GetNamedIndicator_reply_map_whichGroups_mask_UseCompat,
25143 NULL
25144 };
25145 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xkb_GetNamedIndicator_reply_map_whichGroups, ett_x11_rectangle, map_whichGroups_bits, byte_order);
25146 }
25147 *offsetp += 1;
25148 {
25149 static int* const map_groups_bits [] = {
25150 &hf_x11_xkb_GetNamedIndicator_reply_map_groups_mask_Any,
25151 NULL
25152 };
25153 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xkb_GetNamedIndicator_reply_map_groups, ett_x11_rectangle, map_groups_bits, byte_order);
25154 }
25155 *offsetp += 1;
25156 {
25157 static int* const map_whichMods_bits [] = {
25158 &hf_x11_xkb_GetNamedIndicator_reply_map_whichMods_mask_UseBase,
25159 &hf_x11_xkb_GetNamedIndicator_reply_map_whichMods_mask_UseLatched,
25160 &hf_x11_xkb_GetNamedIndicator_reply_map_whichMods_mask_UseLocked,
25161 &hf_x11_xkb_GetNamedIndicator_reply_map_whichMods_mask_UseEffective,
25162 &hf_x11_xkb_GetNamedIndicator_reply_map_whichMods_mask_UseCompat,
25163 NULL
25164 };
25165 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xkb_GetNamedIndicator_reply_map_whichMods, ett_x11_rectangle, map_whichMods_bits, byte_order);
25166 }
25167 *offsetp += 1;
25168 {
25169 static int* const map_mods_bits [] = {
25170 &hf_x11_xkb_GetNamedIndicator_reply_map_mods_mask_Shift,
25171 &hf_x11_xkb_GetNamedIndicator_reply_map_mods_mask_Lock,
25172 &hf_x11_xkb_GetNamedIndicator_reply_map_mods_mask_Control,
25173 &hf_x11_xkb_GetNamedIndicator_reply_map_mods_mask_1,
25174 &hf_x11_xkb_GetNamedIndicator_reply_map_mods_mask_2,
25175 &hf_x11_xkb_GetNamedIndicator_reply_map_mods_mask_3,
25176 &hf_x11_xkb_GetNamedIndicator_reply_map_mods_mask_4,
25177 &hf_x11_xkb_GetNamedIndicator_reply_map_mods_mask_5,
25178 &hf_x11_xkb_GetNamedIndicator_reply_map_mods_mask_Any,
25179 NULL
25180 };
25181 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xkb_GetNamedIndicator_reply_map_mods, ett_x11_rectangle, map_mods_bits, byte_order);
25182 }
25183 *offsetp += 1;
25184 {
25185 static int* const map_realMods_bits [] = {
25186 &hf_x11_xkb_GetNamedIndicator_reply_map_realMods_mask_Shift,
25187 &hf_x11_xkb_GetNamedIndicator_reply_map_realMods_mask_Lock,
25188 &hf_x11_xkb_GetNamedIndicator_reply_map_realMods_mask_Control,
25189 &hf_x11_xkb_GetNamedIndicator_reply_map_realMods_mask_1,
25190 &hf_x11_xkb_GetNamedIndicator_reply_map_realMods_mask_2,
25191 &hf_x11_xkb_GetNamedIndicator_reply_map_realMods_mask_3,
25192 &hf_x11_xkb_GetNamedIndicator_reply_map_realMods_mask_4,
25193 &hf_x11_xkb_GetNamedIndicator_reply_map_realMods_mask_5,
25194 &hf_x11_xkb_GetNamedIndicator_reply_map_realMods_mask_Any,
25195 NULL
25196 };
25197 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xkb_GetNamedIndicator_reply_map_realMods, ett_x11_rectangle, map_realMods_bits, byte_order);
25198 }
25199 *offsetp += 1;
25200 {
25201 static int* const map_vmod_bits [] = {
25202 &hf_x11_xkb_GetNamedIndicator_reply_map_vmod_mask_0,
25203 &hf_x11_xkb_GetNamedIndicator_reply_map_vmod_mask_1,
25204 &hf_x11_xkb_GetNamedIndicator_reply_map_vmod_mask_2,
25205 &hf_x11_xkb_GetNamedIndicator_reply_map_vmod_mask_3,
25206 &hf_x11_xkb_GetNamedIndicator_reply_map_vmod_mask_4,
25207 &hf_x11_xkb_GetNamedIndicator_reply_map_vmod_mask_5,
25208 &hf_x11_xkb_GetNamedIndicator_reply_map_vmod_mask_6,
25209 &hf_x11_xkb_GetNamedIndicator_reply_map_vmod_mask_7,
25210 &hf_x11_xkb_GetNamedIndicator_reply_map_vmod_mask_8,
25211 &hf_x11_xkb_GetNamedIndicator_reply_map_vmod_mask_9,
25212 &hf_x11_xkb_GetNamedIndicator_reply_map_vmod_mask_10,
25213 &hf_x11_xkb_GetNamedIndicator_reply_map_vmod_mask_11,
25214 &hf_x11_xkb_GetNamedIndicator_reply_map_vmod_mask_12,
25215 &hf_x11_xkb_GetNamedIndicator_reply_map_vmod_mask_13,
25216 &hf_x11_xkb_GetNamedIndicator_reply_map_vmod_mask_14,
25217 &hf_x11_xkb_GetNamedIndicator_reply_map_vmod_mask_15,
25218 NULL
25219 };
25220 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xkb_GetNamedIndicator_reply_map_vmod, ett_x11_rectangle, map_vmod_bits, byte_order);
25221 }
25222 *offsetp += 2;
25223 {
25224 static int* const map_ctrls_bits [] = {
25225 &hf_x11_xkb_GetNamedIndicator_reply_map_ctrls_mask_RepeatKeys,
25226 &hf_x11_xkb_GetNamedIndicator_reply_map_ctrls_mask_SlowKeys,
25227 &hf_x11_xkb_GetNamedIndicator_reply_map_ctrls_mask_BounceKeys,
25228 &hf_x11_xkb_GetNamedIndicator_reply_map_ctrls_mask_StickyKeys,
25229 &hf_x11_xkb_GetNamedIndicator_reply_map_ctrls_mask_MouseKeys,
25230 &hf_x11_xkb_GetNamedIndicator_reply_map_ctrls_mask_MouseKeysAccel,
25231 &hf_x11_xkb_GetNamedIndicator_reply_map_ctrls_mask_AccessXKeys,
25232 &hf_x11_xkb_GetNamedIndicator_reply_map_ctrls_mask_AccessXTimeoutMask,
25233 &hf_x11_xkb_GetNamedIndicator_reply_map_ctrls_mask_AccessXFeedbackMask,
25234 &hf_x11_xkb_GetNamedIndicator_reply_map_ctrls_mask_AudibleBellMask,
25235 &hf_x11_xkb_GetNamedIndicator_reply_map_ctrls_mask_Overlay1Mask,
25236 &hf_x11_xkb_GetNamedIndicator_reply_map_ctrls_mask_Overlay2Mask,
25237 &hf_x11_xkb_GetNamedIndicator_reply_map_ctrls_mask_IgnoreGroupLockMask,
25238 NULL
25239 };
25240 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xkb_GetNamedIndicator_reply_map_ctrls, ett_x11_rectangle, map_ctrls_bits, byte_order);
25241 }
25242 *offsetp += 4;
25243 proto_tree_add_item(t, hf_x11_xkb_GetNamedIndicator_reply_supported, tvb, *offsetp, 1, byte_order);
25244 *offsetp += 1;
25245 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 3, ENC_NA);
25246 *offsetp += 3;
25247}
25248
25249static void xkbSetNamedIndicator(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
25250{
25251 proto_tree_add_item(t, hf_x11_xkb_SetNamedIndicator_deviceSpec, tvb, *offsetp, 2, byte_order);
25252 *offsetp += 2;
25253 field16(tvb, offsetp, t, hf_x11_xkb_SetNamedIndicator_ledClass, byte_order);
25254 field16(tvb, offsetp, t, hf_x11_xkb_SetNamedIndicator_ledID, byte_order);
25255 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 2, ENC_NA);
25256 *offsetp += 2;
25257 proto_tree_add_item(t, hf_x11_xkb_SetNamedIndicator_indicator, tvb, *offsetp, 4, byte_order);
25258 *offsetp += 4;
25259 proto_tree_add_item(t, hf_x11_xkb_SetNamedIndicator_setState, tvb, *offsetp, 1, byte_order);
25260 *offsetp += 1;
25261 proto_tree_add_item(t, hf_x11_xkb_SetNamedIndicator_on, tvb, *offsetp, 1, byte_order);
25262 *offsetp += 1;
25263 proto_tree_add_item(t, hf_x11_xkb_SetNamedIndicator_setMap, tvb, *offsetp, 1, byte_order);
25264 *offsetp += 1;
25265 proto_tree_add_item(t, hf_x11_xkb_SetNamedIndicator_createMap, tvb, *offsetp, 1, byte_order);
25266 *offsetp += 1;
25267 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
25268 *offsetp += 1;
25269 {
25270 static int* const map_flags_bits [] = {
25271 &hf_x11_xkb_SetNamedIndicator_map_flags_mask_LEDDrivesKB,
25272 &hf_x11_xkb_SetNamedIndicator_map_flags_mask_NoAutomatic,
25273 &hf_x11_xkb_SetNamedIndicator_map_flags_mask_NoExplicit,
25274 NULL
25275 };
25276 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xkb_SetNamedIndicator_map_flags, ett_x11_rectangle, map_flags_bits, byte_order);
25277 }
25278 *offsetp += 1;
25279 {
25280 static int* const map_whichGroups_bits [] = {
25281 &hf_x11_xkb_SetNamedIndicator_map_whichGroups_mask_UseBase,
25282 &hf_x11_xkb_SetNamedIndicator_map_whichGroups_mask_UseLatched,
25283 &hf_x11_xkb_SetNamedIndicator_map_whichGroups_mask_UseLocked,
25284 &hf_x11_xkb_SetNamedIndicator_map_whichGroups_mask_UseEffective,
25285 &hf_x11_xkb_SetNamedIndicator_map_whichGroups_mask_UseCompat,
25286 NULL
25287 };
25288 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xkb_SetNamedIndicator_map_whichGroups, ett_x11_rectangle, map_whichGroups_bits, byte_order);
25289 }
25290 *offsetp += 1;
25291 {
25292 static int* const map_groups_bits [] = {
25293 &hf_x11_xkb_SetNamedIndicator_map_groups_mask_Any,
25294 NULL
25295 };
25296 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xkb_SetNamedIndicator_map_groups, ett_x11_rectangle, map_groups_bits, byte_order);
25297 }
25298 *offsetp += 1;
25299 {
25300 static int* const map_whichMods_bits [] = {
25301 &hf_x11_xkb_SetNamedIndicator_map_whichMods_mask_UseBase,
25302 &hf_x11_xkb_SetNamedIndicator_map_whichMods_mask_UseLatched,
25303 &hf_x11_xkb_SetNamedIndicator_map_whichMods_mask_UseLocked,
25304 &hf_x11_xkb_SetNamedIndicator_map_whichMods_mask_UseEffective,
25305 &hf_x11_xkb_SetNamedIndicator_map_whichMods_mask_UseCompat,
25306 NULL
25307 };
25308 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xkb_SetNamedIndicator_map_whichMods, ett_x11_rectangle, map_whichMods_bits, byte_order);
25309 }
25310 *offsetp += 1;
25311 {
25312 static int* const map_realMods_bits [] = {
25313 &hf_x11_xkb_SetNamedIndicator_map_realMods_mask_Shift,
25314 &hf_x11_xkb_SetNamedIndicator_map_realMods_mask_Lock,
25315 &hf_x11_xkb_SetNamedIndicator_map_realMods_mask_Control,
25316 &hf_x11_xkb_SetNamedIndicator_map_realMods_mask_1,
25317 &hf_x11_xkb_SetNamedIndicator_map_realMods_mask_2,
25318 &hf_x11_xkb_SetNamedIndicator_map_realMods_mask_3,
25319 &hf_x11_xkb_SetNamedIndicator_map_realMods_mask_4,
25320 &hf_x11_xkb_SetNamedIndicator_map_realMods_mask_5,
25321 &hf_x11_xkb_SetNamedIndicator_map_realMods_mask_Any,
25322 NULL
25323 };
25324 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xkb_SetNamedIndicator_map_realMods, ett_x11_rectangle, map_realMods_bits, byte_order);
25325 }
25326 *offsetp += 1;
25327 {
25328 static int* const map_vmods_bits [] = {
25329 &hf_x11_xkb_SetNamedIndicator_map_vmods_mask_0,
25330 &hf_x11_xkb_SetNamedIndicator_map_vmods_mask_1,
25331 &hf_x11_xkb_SetNamedIndicator_map_vmods_mask_2,
25332 &hf_x11_xkb_SetNamedIndicator_map_vmods_mask_3,
25333 &hf_x11_xkb_SetNamedIndicator_map_vmods_mask_4,
25334 &hf_x11_xkb_SetNamedIndicator_map_vmods_mask_5,
25335 &hf_x11_xkb_SetNamedIndicator_map_vmods_mask_6,
25336 &hf_x11_xkb_SetNamedIndicator_map_vmods_mask_7,
25337 &hf_x11_xkb_SetNamedIndicator_map_vmods_mask_8,
25338 &hf_x11_xkb_SetNamedIndicator_map_vmods_mask_9,
25339 &hf_x11_xkb_SetNamedIndicator_map_vmods_mask_10,
25340 &hf_x11_xkb_SetNamedIndicator_map_vmods_mask_11,
25341 &hf_x11_xkb_SetNamedIndicator_map_vmods_mask_12,
25342 &hf_x11_xkb_SetNamedIndicator_map_vmods_mask_13,
25343 &hf_x11_xkb_SetNamedIndicator_map_vmods_mask_14,
25344 &hf_x11_xkb_SetNamedIndicator_map_vmods_mask_15,
25345 NULL
25346 };
25347 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xkb_SetNamedIndicator_map_vmods, ett_x11_rectangle, map_vmods_bits, byte_order);
25348 }
25349 *offsetp += 2;
25350 {
25351 static int* const map_ctrls_bits [] = {
25352 &hf_x11_xkb_SetNamedIndicator_map_ctrls_mask_RepeatKeys,
25353 &hf_x11_xkb_SetNamedIndicator_map_ctrls_mask_SlowKeys,
25354 &hf_x11_xkb_SetNamedIndicator_map_ctrls_mask_BounceKeys,
25355 &hf_x11_xkb_SetNamedIndicator_map_ctrls_mask_StickyKeys,
25356 &hf_x11_xkb_SetNamedIndicator_map_ctrls_mask_MouseKeys,
25357 &hf_x11_xkb_SetNamedIndicator_map_ctrls_mask_MouseKeysAccel,
25358 &hf_x11_xkb_SetNamedIndicator_map_ctrls_mask_AccessXKeys,
25359 &hf_x11_xkb_SetNamedIndicator_map_ctrls_mask_AccessXTimeoutMask,
25360 &hf_x11_xkb_SetNamedIndicator_map_ctrls_mask_AccessXFeedbackMask,
25361 &hf_x11_xkb_SetNamedIndicator_map_ctrls_mask_AudibleBellMask,
25362 &hf_x11_xkb_SetNamedIndicator_map_ctrls_mask_Overlay1Mask,
25363 &hf_x11_xkb_SetNamedIndicator_map_ctrls_mask_Overlay2Mask,
25364 &hf_x11_xkb_SetNamedIndicator_map_ctrls_mask_IgnoreGroupLockMask,
25365 NULL
25366 };
25367 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xkb_SetNamedIndicator_map_ctrls, ett_x11_rectangle, map_ctrls_bits, byte_order);
25368 }
25369 *offsetp += 4;
25370}
25371
25372static void xkbGetNames(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
25373{
25374 proto_tree_add_item(t, hf_x11_xkb_GetNames_deviceSpec, tvb, *offsetp, 2, byte_order);
25375 *offsetp += 2;
25376 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 2, ENC_NA);
25377 *offsetp += 2;
25378 {
25379 static int* const which_bits [] = {
25380 &hf_x11_xkb_GetNames_which_mask_Keycodes,
25381 &hf_x11_xkb_GetNames_which_mask_Geometry,
25382 &hf_x11_xkb_GetNames_which_mask_Symbols,
25383 &hf_x11_xkb_GetNames_which_mask_PhysSymbols,
25384 &hf_x11_xkb_GetNames_which_mask_Types,
25385 &hf_x11_xkb_GetNames_which_mask_Compat,
25386 &hf_x11_xkb_GetNames_which_mask_KeyTypeNames,
25387 &hf_x11_xkb_GetNames_which_mask_KTLevelNames,
25388 &hf_x11_xkb_GetNames_which_mask_IndicatorNames,
25389 &hf_x11_xkb_GetNames_which_mask_KeyNames,
25390 &hf_x11_xkb_GetNames_which_mask_KeyAliases,
25391 &hf_x11_xkb_GetNames_which_mask_VirtualModNames,
25392 &hf_x11_xkb_GetNames_which_mask_GroupNames,
25393 &hf_x11_xkb_GetNames_which_mask_RGNames,
25394 NULL
25395 };
25396 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xkb_GetNames_which, ett_x11_rectangle, which_bits, byte_order);
25397 }
25398 *offsetp += 4;
25399}
25400static void xkbGetNames_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
25401{
25402 int sequence_number;
25403 int f_which;
25404 int f_nTypes;
25405 int f_groupNames;
25406 int f_virtualMods;
25407 int f_nKeys;
25408 int f_indicators;
25409 int f_nRadioGroups;
25410 int f_nKeyAliases;
25411
25412 col_append_fstr(pinfo->cinfo, COL_INFO, "-GetNames");
25413
25414 REPLY(reply);
25415 proto_tree_add_item(t, hf_x11_xkb_GetNames_reply_deviceID, tvb, *offsetp, 1, byte_order);
25416 *offsetp += 1;
25417 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
25418 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
25419 "%d (xkb-GetNames)", sequence_number);
25420 *offsetp += 2;
25421 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
25422 *offsetp += 4;
25423 f_which = tvb_get_uint32(tvb, *offsetp, byte_order);
25424 {
25425 static int* const which_bits [] = {
25426 &hf_x11_xkb_GetNames_reply_which_mask_Keycodes,
25427 &hf_x11_xkb_GetNames_reply_which_mask_Geometry,
25428 &hf_x11_xkb_GetNames_reply_which_mask_Symbols,
25429 &hf_x11_xkb_GetNames_reply_which_mask_PhysSymbols,
25430 &hf_x11_xkb_GetNames_reply_which_mask_Types,
25431 &hf_x11_xkb_GetNames_reply_which_mask_Compat,
25432 &hf_x11_xkb_GetNames_reply_which_mask_KeyTypeNames,
25433 &hf_x11_xkb_GetNames_reply_which_mask_KTLevelNames,
25434 &hf_x11_xkb_GetNames_reply_which_mask_IndicatorNames,
25435 &hf_x11_xkb_GetNames_reply_which_mask_KeyNames,
25436 &hf_x11_xkb_GetNames_reply_which_mask_KeyAliases,
25437 &hf_x11_xkb_GetNames_reply_which_mask_VirtualModNames,
25438 &hf_x11_xkb_GetNames_reply_which_mask_GroupNames,
25439 &hf_x11_xkb_GetNames_reply_which_mask_RGNames,
25440 NULL
25441 };
25442 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xkb_GetNames_reply_which, ett_x11_rectangle, which_bits, byte_order);
25443 }
25444 *offsetp += 4;
25445 proto_tree_add_item(t, hf_x11_xkb_GetNames_reply_minKeyCode, tvb, *offsetp, 1, byte_order);
25446 *offsetp += 1;
25447 proto_tree_add_item(t, hf_x11_xkb_GetNames_reply_maxKeyCode, tvb, *offsetp, 1, byte_order);
25448 *offsetp += 1;
25449 f_nTypes = tvb_get_uint8(tvb, *offsetp);
25450 proto_tree_add_item(t, hf_x11_xkb_GetNames_reply_nTypes, tvb, *offsetp, 1, byte_order);
25451 *offsetp += 1;
25452 f_groupNames = tvb_get_uint8(tvb, *offsetp);
25453 {
25454 static int* const groupNames_bits [] = {
25455 &hf_x11_xkb_GetNames_reply_groupNames_mask_Group1,
25456 &hf_x11_xkb_GetNames_reply_groupNames_mask_Group2,
25457 &hf_x11_xkb_GetNames_reply_groupNames_mask_Group3,
25458 &hf_x11_xkb_GetNames_reply_groupNames_mask_Group4,
25459 NULL
25460 };
25461 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xkb_GetNames_reply_groupNames, ett_x11_rectangle, groupNames_bits, byte_order);
25462 }
25463 *offsetp += 1;
25464 f_virtualMods = tvb_get_uint16(tvb, *offsetp, byte_order);
25465 {
25466 static int* const virtualMods_bits [] = {
25467 &hf_x11_xkb_GetNames_reply_virtualMods_mask_0,
25468 &hf_x11_xkb_GetNames_reply_virtualMods_mask_1,
25469 &hf_x11_xkb_GetNames_reply_virtualMods_mask_2,
25470 &hf_x11_xkb_GetNames_reply_virtualMods_mask_3,
25471 &hf_x11_xkb_GetNames_reply_virtualMods_mask_4,
25472 &hf_x11_xkb_GetNames_reply_virtualMods_mask_5,
25473 &hf_x11_xkb_GetNames_reply_virtualMods_mask_6,
25474 &hf_x11_xkb_GetNames_reply_virtualMods_mask_7,
25475 &hf_x11_xkb_GetNames_reply_virtualMods_mask_8,
25476 &hf_x11_xkb_GetNames_reply_virtualMods_mask_9,
25477 &hf_x11_xkb_GetNames_reply_virtualMods_mask_10,
25478 &hf_x11_xkb_GetNames_reply_virtualMods_mask_11,
25479 &hf_x11_xkb_GetNames_reply_virtualMods_mask_12,
25480 &hf_x11_xkb_GetNames_reply_virtualMods_mask_13,
25481 &hf_x11_xkb_GetNames_reply_virtualMods_mask_14,
25482 &hf_x11_xkb_GetNames_reply_virtualMods_mask_15,
25483 NULL
25484 };
25485 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xkb_GetNames_reply_virtualMods, ett_x11_rectangle, virtualMods_bits, byte_order);
25486 }
25487 *offsetp += 2;
25488 proto_tree_add_item(t, hf_x11_xkb_GetNames_reply_firstKey, tvb, *offsetp, 1, byte_order);
25489 *offsetp += 1;
25490 f_nKeys = tvb_get_uint8(tvb, *offsetp);
25491 proto_tree_add_item(t, hf_x11_xkb_GetNames_reply_nKeys, tvb, *offsetp, 1, byte_order);
25492 *offsetp += 1;
25493 f_indicators = tvb_get_uint32(tvb, *offsetp, byte_order);
25494 proto_tree_add_item(t, hf_x11_xkb_GetNames_reply_indicators, tvb, *offsetp, 4, byte_order);
25495 *offsetp += 4;
25496 f_nRadioGroups = tvb_get_uint8(tvb, *offsetp);
25497 proto_tree_add_item(t, hf_x11_xkb_GetNames_reply_nRadioGroups, tvb, *offsetp, 1, byte_order);
25498 *offsetp += 1;
25499 f_nKeyAliases = tvb_get_uint8(tvb, *offsetp);
25500 proto_tree_add_item(t, hf_x11_xkb_GetNames_reply_nKeyAliases, tvb, *offsetp, 1, byte_order);
25501 *offsetp += 1;
25502 proto_tree_add_item(t, hf_x11_xkb_GetNames_reply_nKTLevels, tvb, *offsetp, 2, byte_order);
25503 *offsetp += 2;
25504 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 4, ENC_NA);
25505 *offsetp += 4;
25506 if (f_which & (1U << 0)) {
25507 proto_tree_add_item(t, hf_x11_xkb_GetNames_reply_Keycodes_keycodesName, tvb, *offsetp, 4, byte_order);
25508 *offsetp += 4;
25509 }
25510 if (f_which & (1U << 1)) {
25511 proto_tree_add_item(t, hf_x11_xkb_GetNames_reply_Geometry_geometryName, tvb, *offsetp, 4, byte_order);
25512 *offsetp += 4;
25513 }
25514 if (f_which & (1U << 2)) {
25515 proto_tree_add_item(t, hf_x11_xkb_GetNames_reply_Symbols_symbolsName, tvb, *offsetp, 4, byte_order);
25516 *offsetp += 4;
25517 }
25518 if (f_which & (1U << 3)) {
25519 proto_tree_add_item(t, hf_x11_xkb_GetNames_reply_PhysSymbols_physSymbolsName, tvb, *offsetp, 4, byte_order);
25520 *offsetp += 4;
25521 }
25522 if (f_which & (1U << 4)) {
25523 proto_tree_add_item(t, hf_x11_xkb_GetNames_reply_Types_typesName, tvb, *offsetp, 4, byte_order);
25524 *offsetp += 4;
25525 }
25526 if (f_which & (1U << 5)) {
25527 proto_tree_add_item(t, hf_x11_xkb_GetNames_reply_Compat_compatName, tvb, *offsetp, 4, byte_order);
25528 *offsetp += 4;
25529 }
25530 if (f_which & (1U << 6)) {
25531 listOfCard32(tvb, offsetp, t, hf_x11_xkb_GetNames_reply_KeyTypeNames_typeNames, hf_x11_xkb_GetNames_reply_KeyTypeNames_typeNames_item, f_nTypes, byte_order);
25532 }
25533 if (f_which & (1U << 7)) {
25534 int sumof_nLevelsPerType = 0;
25535 {
25536 int i;
25537 for (i = 0; i < f_nTypes; i++) {
25538 sumof_nLevelsPerType += tvb_get_uint8(tvb, *offsetp + i * 1);
25539 }
25540 }
25541 listOfByte(tvb, offsetp, t, hf_x11_xkb_GetNames_reply_KTLevelNames_nLevelsPerType, f_nTypes, byte_order);
25542 if (*offsetp % 4) {
25543 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, (4 - *offsetp % 4), ENC_NA);
25544 *offsetp += (4 - *offsetp % 4);
25545 }
25546 listOfCard32(tvb, offsetp, t, hf_x11_xkb_GetNames_reply_KTLevelNames_ktLevelNames, hf_x11_xkb_GetNames_reply_KTLevelNames_ktLevelNames_item, sumof_nLevelsPerType, byte_order);
25547 }
25548 if (f_which & (1U << 8)) {
25549 listOfCard32(tvb, offsetp, t, hf_x11_xkb_GetNames_reply_IndicatorNames_indicatorNames, hf_x11_xkb_GetNames_reply_IndicatorNames_indicatorNames_item, ws_count_ones(f_indicators), byte_order);
25550 }
25551 if (f_which & (1U << 11)) {
25552 listOfCard32(tvb, offsetp, t, hf_x11_xkb_GetNames_reply_VirtualModNames_virtualModNames, hf_x11_xkb_GetNames_reply_VirtualModNames_virtualModNames_item, ws_count_ones(f_virtualMods), byte_order);
25553 }
25554 if (f_which & (1U << 12)) {
25555 listOfCard32(tvb, offsetp, t, hf_x11_xkb_GetNames_reply_GroupNames_groups, hf_x11_xkb_GetNames_reply_GroupNames_groups_item, ws_count_ones(f_groupNames), byte_order);
25556 }
25557 if (f_which & (1U << 9)) {
25558 struct_xkb_KeyName(tvb, offsetp, t, byte_order, f_nKeys);
25559 }
25560 if (f_which & (1U << 10)) {
25561 struct_xkb_KeyAlias(tvb, offsetp, t, byte_order, f_nKeyAliases);
25562 }
25563 if (f_which & (1U << 13)) {
25564 listOfCard32(tvb, offsetp, t, hf_x11_xkb_GetNames_reply_RGNames_radioGroupNames, hf_x11_xkb_GetNames_reply_RGNames_radioGroupNames_item, f_nRadioGroups, byte_order);
25565 }
25566}
25567
25568static void xkbSetNames(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
25569{
25570 int f_virtualMods;
25571 int f_which;
25572 int f_nTypes;
25573 int f_indicators;
25574 int f_groupNames;
25575 int f_nRadioGroups;
25576 int f_nKeys;
25577 int f_nKeyAliases;
25578 proto_tree_add_item(t, hf_x11_xkb_SetNames_deviceSpec, tvb, *offsetp, 2, byte_order);
25579 *offsetp += 2;
25580 f_virtualMods = tvb_get_uint16(tvb, *offsetp, byte_order);
25581 {
25582 static int* const virtualMods_bits [] = {
25583 &hf_x11_xkb_SetNames_virtualMods_mask_0,
25584 &hf_x11_xkb_SetNames_virtualMods_mask_1,
25585 &hf_x11_xkb_SetNames_virtualMods_mask_2,
25586 &hf_x11_xkb_SetNames_virtualMods_mask_3,
25587 &hf_x11_xkb_SetNames_virtualMods_mask_4,
25588 &hf_x11_xkb_SetNames_virtualMods_mask_5,
25589 &hf_x11_xkb_SetNames_virtualMods_mask_6,
25590 &hf_x11_xkb_SetNames_virtualMods_mask_7,
25591 &hf_x11_xkb_SetNames_virtualMods_mask_8,
25592 &hf_x11_xkb_SetNames_virtualMods_mask_9,
25593 &hf_x11_xkb_SetNames_virtualMods_mask_10,
25594 &hf_x11_xkb_SetNames_virtualMods_mask_11,
25595 &hf_x11_xkb_SetNames_virtualMods_mask_12,
25596 &hf_x11_xkb_SetNames_virtualMods_mask_13,
25597 &hf_x11_xkb_SetNames_virtualMods_mask_14,
25598 &hf_x11_xkb_SetNames_virtualMods_mask_15,
25599 NULL
25600 };
25601 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xkb_SetNames_virtualMods, ett_x11_rectangle, virtualMods_bits, byte_order);
25602 }
25603 *offsetp += 2;
25604 f_which = tvb_get_uint32(tvb, *offsetp, byte_order);
25605 {
25606 static int* const which_bits [] = {
25607 &hf_x11_xkb_SetNames_which_mask_Keycodes,
25608 &hf_x11_xkb_SetNames_which_mask_Geometry,
25609 &hf_x11_xkb_SetNames_which_mask_Symbols,
25610 &hf_x11_xkb_SetNames_which_mask_PhysSymbols,
25611 &hf_x11_xkb_SetNames_which_mask_Types,
25612 &hf_x11_xkb_SetNames_which_mask_Compat,
25613 &hf_x11_xkb_SetNames_which_mask_KeyTypeNames,
25614 &hf_x11_xkb_SetNames_which_mask_KTLevelNames,
25615 &hf_x11_xkb_SetNames_which_mask_IndicatorNames,
25616 &hf_x11_xkb_SetNames_which_mask_KeyNames,
25617 &hf_x11_xkb_SetNames_which_mask_KeyAliases,
25618 &hf_x11_xkb_SetNames_which_mask_VirtualModNames,
25619 &hf_x11_xkb_SetNames_which_mask_GroupNames,
25620 &hf_x11_xkb_SetNames_which_mask_RGNames,
25621 NULL
25622 };
25623 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xkb_SetNames_which, ett_x11_rectangle, which_bits, byte_order);
25624 }
25625 *offsetp += 4;
25626 proto_tree_add_item(t, hf_x11_xkb_SetNames_firstType, tvb, *offsetp, 1, byte_order);
25627 *offsetp += 1;
25628 f_nTypes = tvb_get_uint8(tvb, *offsetp);
25629 proto_tree_add_item(t, hf_x11_xkb_SetNames_nTypes, tvb, *offsetp, 1, byte_order);
25630 *offsetp += 1;
25631 proto_tree_add_item(t, hf_x11_xkb_SetNames_firstKTLevelt, tvb, *offsetp, 1, byte_order);
25632 *offsetp += 1;
25633 proto_tree_add_item(t, hf_x11_xkb_SetNames_nKTLevels, tvb, *offsetp, 1, byte_order);
25634 *offsetp += 1;
25635 f_indicators = tvb_get_uint32(tvb, *offsetp, byte_order);
25636 proto_tree_add_item(t, hf_x11_xkb_SetNames_indicators, tvb, *offsetp, 4, byte_order);
25637 *offsetp += 4;
25638 f_groupNames = tvb_get_uint8(tvb, *offsetp);
25639 {
25640 static int* const groupNames_bits [] = {
25641 &hf_x11_xkb_SetNames_groupNames_mask_Group1,
25642 &hf_x11_xkb_SetNames_groupNames_mask_Group2,
25643 &hf_x11_xkb_SetNames_groupNames_mask_Group3,
25644 &hf_x11_xkb_SetNames_groupNames_mask_Group4,
25645 NULL
25646 };
25647 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xkb_SetNames_groupNames, ett_x11_rectangle, groupNames_bits, byte_order);
25648 }
25649 *offsetp += 1;
25650 f_nRadioGroups = tvb_get_uint8(tvb, *offsetp);
25651 proto_tree_add_item(t, hf_x11_xkb_SetNames_nRadioGroups, tvb, *offsetp, 1, byte_order);
25652 *offsetp += 1;
25653 proto_tree_add_item(t, hf_x11_xkb_SetNames_firstKey, tvb, *offsetp, 1, byte_order);
25654 *offsetp += 1;
25655 f_nKeys = tvb_get_uint8(tvb, *offsetp);
25656 proto_tree_add_item(t, hf_x11_xkb_SetNames_nKeys, tvb, *offsetp, 1, byte_order);
25657 *offsetp += 1;
25658 f_nKeyAliases = tvb_get_uint8(tvb, *offsetp);
25659 proto_tree_add_item(t, hf_x11_xkb_SetNames_nKeyAliases, tvb, *offsetp, 1, byte_order);
25660 *offsetp += 1;
25661 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
25662 *offsetp += 1;
25663 proto_tree_add_item(t, hf_x11_xkb_SetNames_totalKTLevelNames, tvb, *offsetp, 2, byte_order);
25664 *offsetp += 2;
25665 if (f_which & (1U << 0)) {
25666 proto_tree_add_item(t, hf_x11_xkb_SetNames_Keycodes_keycodesName, tvb, *offsetp, 4, byte_order);
25667 *offsetp += 4;
25668 }
25669 if (f_which & (1U << 1)) {
25670 proto_tree_add_item(t, hf_x11_xkb_SetNames_Geometry_geometryName, tvb, *offsetp, 4, byte_order);
25671 *offsetp += 4;
25672 }
25673 if (f_which & (1U << 2)) {
25674 proto_tree_add_item(t, hf_x11_xkb_SetNames_Symbols_symbolsName, tvb, *offsetp, 4, byte_order);
25675 *offsetp += 4;
25676 }
25677 if (f_which & (1U << 3)) {
25678 proto_tree_add_item(t, hf_x11_xkb_SetNames_PhysSymbols_physSymbolsName, tvb, *offsetp, 4, byte_order);
25679 *offsetp += 4;
25680 }
25681 if (f_which & (1U << 4)) {
25682 proto_tree_add_item(t, hf_x11_xkb_SetNames_Types_typesName, tvb, *offsetp, 4, byte_order);
25683 *offsetp += 4;
25684 }
25685 if (f_which & (1U << 5)) {
25686 proto_tree_add_item(t, hf_x11_xkb_SetNames_Compat_compatName, tvb, *offsetp, 4, byte_order);
25687 *offsetp += 4;
25688 }
25689 if (f_which & (1U << 6)) {
25690 listOfCard32(tvb, offsetp, t, hf_x11_xkb_SetNames_KeyTypeNames_typeNames, hf_x11_xkb_SetNames_KeyTypeNames_typeNames_item, f_nTypes, byte_order);
25691 length -= f_nTypes * 4;
25692 }
25693 if (f_which & (1U << 7)) {
25694 int sumof_nLevelsPerType = 0;
25695 {
25696 int i;
25697 for (i = 0; i < f_nTypes; i++) {
25698 sumof_nLevelsPerType += tvb_get_uint8(tvb, *offsetp + i * 1);
25699 }
25700 }
25701 listOfByte(tvb, offsetp, t, hf_x11_xkb_SetNames_KTLevelNames_nLevelsPerType, f_nTypes, byte_order);
25702 length -= f_nTypes * 1;
25703 if (*offsetp % 4) {
25704 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, (4 - *offsetp % 4), ENC_NA);
25705 *offsetp += (4 - *offsetp % 4);
25706 }
25707 length = ((length + 3) & ~3);
25708 listOfCard32(tvb, offsetp, t, hf_x11_xkb_SetNames_KTLevelNames_ktLevelNames, hf_x11_xkb_SetNames_KTLevelNames_ktLevelNames_item, sumof_nLevelsPerType, byte_order);
25709 length -= sumof_nLevelsPerType * 4;
25710 }
25711 if (f_which & (1U << 8)) {
25712 listOfCard32(tvb, offsetp, t, hf_x11_xkb_SetNames_IndicatorNames_indicatorNames, hf_x11_xkb_SetNames_IndicatorNames_indicatorNames_item, ws_count_ones(f_indicators), byte_order);
25713 length -= ws_count_ones(f_indicators) * 4;
25714 }
25715 if (f_which & (1U << 11)) {
25716 listOfCard32(tvb, offsetp, t, hf_x11_xkb_SetNames_VirtualModNames_virtualModNames, hf_x11_xkb_SetNames_VirtualModNames_virtualModNames_item, ws_count_ones(f_virtualMods), byte_order);
25717 length -= ws_count_ones(f_virtualMods) * 4;
25718 }
25719 if (f_which & (1U << 12)) {
25720 listOfCard32(tvb, offsetp, t, hf_x11_xkb_SetNames_GroupNames_groups, hf_x11_xkb_SetNames_GroupNames_groups_item, ws_count_ones(f_groupNames), byte_order);
25721 length -= ws_count_ones(f_groupNames) * 4;
25722 }
25723 if (f_which & (1U << 9)) {
25724 struct_xkb_KeyName(tvb, offsetp, t, byte_order, f_nKeys);
25725 length -= f_nKeys * 4;
25726 }
25727 if (f_which & (1U << 10)) {
25728 struct_xkb_KeyAlias(tvb, offsetp, t, byte_order, f_nKeyAliases);
25729 length -= f_nKeyAliases * 8;
25730 }
25731 if (f_which & (1U << 13)) {
25732 listOfCard32(tvb, offsetp, t, hf_x11_xkb_SetNames_RGNames_radioGroupNames, hf_x11_xkb_SetNames_RGNames_radioGroupNames_item, f_nRadioGroups, byte_order);
25733 length -= f_nRadioGroups * 4;
25734 }
25735}
25736
25737static void xkbPerClientFlags(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
25738{
25739 proto_tree_add_item(t, hf_x11_xkb_PerClientFlags_deviceSpec, tvb, *offsetp, 2, byte_order);
25740 *offsetp += 2;
25741 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 2, ENC_NA);
25742 *offsetp += 2;
25743 {
25744 static int* const change_bits [] = {
25745 &hf_x11_xkb_PerClientFlags_change_mask_DetectableAutoRepeat,
25746 &hf_x11_xkb_PerClientFlags_change_mask_GrabsUseXKBState,
25747 &hf_x11_xkb_PerClientFlags_change_mask_AutoResetControls,
25748 &hf_x11_xkb_PerClientFlags_change_mask_LookupStateWhenGrabbed,
25749 &hf_x11_xkb_PerClientFlags_change_mask_SendEventUsesXKBState,
25750 NULL
25751 };
25752 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xkb_PerClientFlags_change, ett_x11_rectangle, change_bits, byte_order);
25753 }
25754 *offsetp += 4;
25755 {
25756 static int* const value_bits [] = {
25757 &hf_x11_xkb_PerClientFlags_value_mask_DetectableAutoRepeat,
25758 &hf_x11_xkb_PerClientFlags_value_mask_GrabsUseXKBState,
25759 &hf_x11_xkb_PerClientFlags_value_mask_AutoResetControls,
25760 &hf_x11_xkb_PerClientFlags_value_mask_LookupStateWhenGrabbed,
25761 &hf_x11_xkb_PerClientFlags_value_mask_SendEventUsesXKBState,
25762 NULL
25763 };
25764 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xkb_PerClientFlags_value, ett_x11_rectangle, value_bits, byte_order);
25765 }
25766 *offsetp += 4;
25767 {
25768 static int* const ctrlsToChange_bits [] = {
25769 &hf_x11_xkb_PerClientFlags_ctrlsToChange_mask_RepeatKeys,
25770 &hf_x11_xkb_PerClientFlags_ctrlsToChange_mask_SlowKeys,
25771 &hf_x11_xkb_PerClientFlags_ctrlsToChange_mask_BounceKeys,
25772 &hf_x11_xkb_PerClientFlags_ctrlsToChange_mask_StickyKeys,
25773 &hf_x11_xkb_PerClientFlags_ctrlsToChange_mask_MouseKeys,
25774 &hf_x11_xkb_PerClientFlags_ctrlsToChange_mask_MouseKeysAccel,
25775 &hf_x11_xkb_PerClientFlags_ctrlsToChange_mask_AccessXKeys,
25776 &hf_x11_xkb_PerClientFlags_ctrlsToChange_mask_AccessXTimeoutMask,
25777 &hf_x11_xkb_PerClientFlags_ctrlsToChange_mask_AccessXFeedbackMask,
25778 &hf_x11_xkb_PerClientFlags_ctrlsToChange_mask_AudibleBellMask,
25779 &hf_x11_xkb_PerClientFlags_ctrlsToChange_mask_Overlay1Mask,
25780 &hf_x11_xkb_PerClientFlags_ctrlsToChange_mask_Overlay2Mask,
25781 &hf_x11_xkb_PerClientFlags_ctrlsToChange_mask_IgnoreGroupLockMask,
25782 NULL
25783 };
25784 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xkb_PerClientFlags_ctrlsToChange, ett_x11_rectangle, ctrlsToChange_bits, byte_order);
25785 }
25786 *offsetp += 4;
25787 {
25788 static int* const autoCtrls_bits [] = {
25789 &hf_x11_xkb_PerClientFlags_autoCtrls_mask_RepeatKeys,
25790 &hf_x11_xkb_PerClientFlags_autoCtrls_mask_SlowKeys,
25791 &hf_x11_xkb_PerClientFlags_autoCtrls_mask_BounceKeys,
25792 &hf_x11_xkb_PerClientFlags_autoCtrls_mask_StickyKeys,
25793 &hf_x11_xkb_PerClientFlags_autoCtrls_mask_MouseKeys,
25794 &hf_x11_xkb_PerClientFlags_autoCtrls_mask_MouseKeysAccel,
25795 &hf_x11_xkb_PerClientFlags_autoCtrls_mask_AccessXKeys,
25796 &hf_x11_xkb_PerClientFlags_autoCtrls_mask_AccessXTimeoutMask,
25797 &hf_x11_xkb_PerClientFlags_autoCtrls_mask_AccessXFeedbackMask,
25798 &hf_x11_xkb_PerClientFlags_autoCtrls_mask_AudibleBellMask,
25799 &hf_x11_xkb_PerClientFlags_autoCtrls_mask_Overlay1Mask,
25800 &hf_x11_xkb_PerClientFlags_autoCtrls_mask_Overlay2Mask,
25801 &hf_x11_xkb_PerClientFlags_autoCtrls_mask_IgnoreGroupLockMask,
25802 NULL
25803 };
25804 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xkb_PerClientFlags_autoCtrls, ett_x11_rectangle, autoCtrls_bits, byte_order);
25805 }
25806 *offsetp += 4;
25807 {
25808 static int* const autoCtrlsValues_bits [] = {
25809 &hf_x11_xkb_PerClientFlags_autoCtrlsValues_mask_RepeatKeys,
25810 &hf_x11_xkb_PerClientFlags_autoCtrlsValues_mask_SlowKeys,
25811 &hf_x11_xkb_PerClientFlags_autoCtrlsValues_mask_BounceKeys,
25812 &hf_x11_xkb_PerClientFlags_autoCtrlsValues_mask_StickyKeys,
25813 &hf_x11_xkb_PerClientFlags_autoCtrlsValues_mask_MouseKeys,
25814 &hf_x11_xkb_PerClientFlags_autoCtrlsValues_mask_MouseKeysAccel,
25815 &hf_x11_xkb_PerClientFlags_autoCtrlsValues_mask_AccessXKeys,
25816 &hf_x11_xkb_PerClientFlags_autoCtrlsValues_mask_AccessXTimeoutMask,
25817 &hf_x11_xkb_PerClientFlags_autoCtrlsValues_mask_AccessXFeedbackMask,
25818 &hf_x11_xkb_PerClientFlags_autoCtrlsValues_mask_AudibleBellMask,
25819 &hf_x11_xkb_PerClientFlags_autoCtrlsValues_mask_Overlay1Mask,
25820 &hf_x11_xkb_PerClientFlags_autoCtrlsValues_mask_Overlay2Mask,
25821 &hf_x11_xkb_PerClientFlags_autoCtrlsValues_mask_IgnoreGroupLockMask,
25822 NULL
25823 };
25824 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xkb_PerClientFlags_autoCtrlsValues, ett_x11_rectangle, autoCtrlsValues_bits, byte_order);
25825 }
25826 *offsetp += 4;
25827}
25828static void xkbPerClientFlags_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
25829{
25830 int sequence_number;
25831
25832 col_append_fstr(pinfo->cinfo, COL_INFO, "-PerClientFlags");
25833
25834 REPLY(reply);
25835 proto_tree_add_item(t, hf_x11_xkb_PerClientFlags_reply_deviceID, tvb, *offsetp, 1, byte_order);
25836 *offsetp += 1;
25837 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
25838 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
25839 "%d (xkb-PerClientFlags)", sequence_number);
25840 *offsetp += 2;
25841 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
25842 *offsetp += 4;
25843 {
25844 static int* const supported_bits [] = {
25845 &hf_x11_xkb_PerClientFlags_reply_supported_mask_DetectableAutoRepeat,
25846 &hf_x11_xkb_PerClientFlags_reply_supported_mask_GrabsUseXKBState,
25847 &hf_x11_xkb_PerClientFlags_reply_supported_mask_AutoResetControls,
25848 &hf_x11_xkb_PerClientFlags_reply_supported_mask_LookupStateWhenGrabbed,
25849 &hf_x11_xkb_PerClientFlags_reply_supported_mask_SendEventUsesXKBState,
25850 NULL
25851 };
25852 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xkb_PerClientFlags_reply_supported, ett_x11_rectangle, supported_bits, byte_order);
25853 }
25854 *offsetp += 4;
25855 {
25856 static int* const value_bits [] = {
25857 &hf_x11_xkb_PerClientFlags_reply_value_mask_DetectableAutoRepeat,
25858 &hf_x11_xkb_PerClientFlags_reply_value_mask_GrabsUseXKBState,
25859 &hf_x11_xkb_PerClientFlags_reply_value_mask_AutoResetControls,
25860 &hf_x11_xkb_PerClientFlags_reply_value_mask_LookupStateWhenGrabbed,
25861 &hf_x11_xkb_PerClientFlags_reply_value_mask_SendEventUsesXKBState,
25862 NULL
25863 };
25864 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xkb_PerClientFlags_reply_value, ett_x11_rectangle, value_bits, byte_order);
25865 }
25866 *offsetp += 4;
25867 {
25868 static int* const autoCtrls_bits [] = {
25869 &hf_x11_xkb_PerClientFlags_reply_autoCtrls_mask_RepeatKeys,
25870 &hf_x11_xkb_PerClientFlags_reply_autoCtrls_mask_SlowKeys,
25871 &hf_x11_xkb_PerClientFlags_reply_autoCtrls_mask_BounceKeys,
25872 &hf_x11_xkb_PerClientFlags_reply_autoCtrls_mask_StickyKeys,
25873 &hf_x11_xkb_PerClientFlags_reply_autoCtrls_mask_MouseKeys,
25874 &hf_x11_xkb_PerClientFlags_reply_autoCtrls_mask_MouseKeysAccel,
25875 &hf_x11_xkb_PerClientFlags_reply_autoCtrls_mask_AccessXKeys,
25876 &hf_x11_xkb_PerClientFlags_reply_autoCtrls_mask_AccessXTimeoutMask,
25877 &hf_x11_xkb_PerClientFlags_reply_autoCtrls_mask_AccessXFeedbackMask,
25878 &hf_x11_xkb_PerClientFlags_reply_autoCtrls_mask_AudibleBellMask,
25879 &hf_x11_xkb_PerClientFlags_reply_autoCtrls_mask_Overlay1Mask,
25880 &hf_x11_xkb_PerClientFlags_reply_autoCtrls_mask_Overlay2Mask,
25881 &hf_x11_xkb_PerClientFlags_reply_autoCtrls_mask_IgnoreGroupLockMask,
25882 NULL
25883 };
25884 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xkb_PerClientFlags_reply_autoCtrls, ett_x11_rectangle, autoCtrls_bits, byte_order);
25885 }
25886 *offsetp += 4;
25887 {
25888 static int* const autoCtrlsValues_bits [] = {
25889 &hf_x11_xkb_PerClientFlags_reply_autoCtrlsValues_mask_RepeatKeys,
25890 &hf_x11_xkb_PerClientFlags_reply_autoCtrlsValues_mask_SlowKeys,
25891 &hf_x11_xkb_PerClientFlags_reply_autoCtrlsValues_mask_BounceKeys,
25892 &hf_x11_xkb_PerClientFlags_reply_autoCtrlsValues_mask_StickyKeys,
25893 &hf_x11_xkb_PerClientFlags_reply_autoCtrlsValues_mask_MouseKeys,
25894 &hf_x11_xkb_PerClientFlags_reply_autoCtrlsValues_mask_MouseKeysAccel,
25895 &hf_x11_xkb_PerClientFlags_reply_autoCtrlsValues_mask_AccessXKeys,
25896 &hf_x11_xkb_PerClientFlags_reply_autoCtrlsValues_mask_AccessXTimeoutMask,
25897 &hf_x11_xkb_PerClientFlags_reply_autoCtrlsValues_mask_AccessXFeedbackMask,
25898 &hf_x11_xkb_PerClientFlags_reply_autoCtrlsValues_mask_AudibleBellMask,
25899 &hf_x11_xkb_PerClientFlags_reply_autoCtrlsValues_mask_Overlay1Mask,
25900 &hf_x11_xkb_PerClientFlags_reply_autoCtrlsValues_mask_Overlay2Mask,
25901 &hf_x11_xkb_PerClientFlags_reply_autoCtrlsValues_mask_IgnoreGroupLockMask,
25902 NULL
25903 };
25904 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xkb_PerClientFlags_reply_autoCtrlsValues, ett_x11_rectangle, autoCtrlsValues_bits, byte_order);
25905 }
25906 *offsetp += 4;
25907 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 8, ENC_NA);
25908 *offsetp += 8;
25909}
25910
25911static void xkbListComponents(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
25912{
25913 proto_tree_add_item(t, hf_x11_xkb_ListComponents_deviceSpec, tvb, *offsetp, 2, byte_order);
25914 *offsetp += 2;
25915 proto_tree_add_item(t, hf_x11_xkb_ListComponents_maxNames, tvb, *offsetp, 2, byte_order);
25916 *offsetp += 2;
25917}
25918static void xkbListComponents_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
25919{
25920 int sequence_number;
25921 int f_nKeymaps;
25922 int f_nKeycodes;
25923 int f_nTypes;
25924 int f_nCompatMaps;
25925 int f_nSymbols;
25926 int f_nGeometries;
25927
25928 col_append_fstr(pinfo->cinfo, COL_INFO, "-ListComponents");
25929
25930 REPLY(reply);
25931 proto_tree_add_item(t, hf_x11_xkb_ListComponents_reply_deviceID, tvb, *offsetp, 1, byte_order);
25932 *offsetp += 1;
25933 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
25934 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
25935 "%d (xkb-ListComponents)", sequence_number);
25936 *offsetp += 2;
25937 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
25938 *offsetp += 4;
25939 f_nKeymaps = tvb_get_uint16(tvb, *offsetp, byte_order);
25940 proto_tree_add_item(t, hf_x11_xkb_ListComponents_reply_nKeymaps, tvb, *offsetp, 2, byte_order);
25941 *offsetp += 2;
25942 f_nKeycodes = tvb_get_uint16(tvb, *offsetp, byte_order);
25943 proto_tree_add_item(t, hf_x11_xkb_ListComponents_reply_nKeycodes, tvb, *offsetp, 2, byte_order);
25944 *offsetp += 2;
25945 f_nTypes = tvb_get_uint16(tvb, *offsetp, byte_order);
25946 proto_tree_add_item(t, hf_x11_xkb_ListComponents_reply_nTypes, tvb, *offsetp, 2, byte_order);
25947 *offsetp += 2;
25948 f_nCompatMaps = tvb_get_uint16(tvb, *offsetp, byte_order);
25949 proto_tree_add_item(t, hf_x11_xkb_ListComponents_reply_nCompatMaps, tvb, *offsetp, 2, byte_order);
25950 *offsetp += 2;
25951 f_nSymbols = tvb_get_uint16(tvb, *offsetp, byte_order);
25952 proto_tree_add_item(t, hf_x11_xkb_ListComponents_reply_nSymbols, tvb, *offsetp, 2, byte_order);
25953 *offsetp += 2;
25954 f_nGeometries = tvb_get_uint16(tvb, *offsetp, byte_order);
25955 proto_tree_add_item(t, hf_x11_xkb_ListComponents_reply_nGeometries, tvb, *offsetp, 2, byte_order);
25956 *offsetp += 2;
25957 proto_tree_add_item(t, hf_x11_xkb_ListComponents_reply_extra, tvb, *offsetp, 2, byte_order);
25958 *offsetp += 2;
25959 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 10, ENC_NA);
25960 *offsetp += 10;
25961 struct_xkb_Listing(tvb, offsetp, t, byte_order, f_nKeymaps);
25962 struct_xkb_Listing(tvb, offsetp, t, byte_order, f_nKeycodes);
25963 struct_xkb_Listing(tvb, offsetp, t, byte_order, f_nTypes);
25964 struct_xkb_Listing(tvb, offsetp, t, byte_order, f_nCompatMaps);
25965 struct_xkb_Listing(tvb, offsetp, t, byte_order, f_nSymbols);
25966 struct_xkb_Listing(tvb, offsetp, t, byte_order, f_nGeometries);
25967}
25968
25969static void xkbGetKbdByName(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
25970{
25971 proto_tree_add_item(t, hf_x11_xkb_GetKbdByName_deviceSpec, tvb, *offsetp, 2, byte_order);
25972 *offsetp += 2;
25973 {
25974 static int* const need_bits [] = {
25975 &hf_x11_xkb_GetKbdByName_need_mask_Types,
25976 &hf_x11_xkb_GetKbdByName_need_mask_CompatMap,
25977 &hf_x11_xkb_GetKbdByName_need_mask_ClientSymbols,
25978 &hf_x11_xkb_GetKbdByName_need_mask_ServerSymbols,
25979 &hf_x11_xkb_GetKbdByName_need_mask_IndicatorMaps,
25980 &hf_x11_xkb_GetKbdByName_need_mask_KeyNames,
25981 &hf_x11_xkb_GetKbdByName_need_mask_Geometry,
25982 &hf_x11_xkb_GetKbdByName_need_mask_OtherNames,
25983 NULL
25984 };
25985 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xkb_GetKbdByName_need, ett_x11_rectangle, need_bits, byte_order);
25986 }
25987 *offsetp += 2;
25988 {
25989 static int* const want_bits [] = {
25990 &hf_x11_xkb_GetKbdByName_want_mask_Types,
25991 &hf_x11_xkb_GetKbdByName_want_mask_CompatMap,
25992 &hf_x11_xkb_GetKbdByName_want_mask_ClientSymbols,
25993 &hf_x11_xkb_GetKbdByName_want_mask_ServerSymbols,
25994 &hf_x11_xkb_GetKbdByName_want_mask_IndicatorMaps,
25995 &hf_x11_xkb_GetKbdByName_want_mask_KeyNames,
25996 &hf_x11_xkb_GetKbdByName_want_mask_Geometry,
25997 &hf_x11_xkb_GetKbdByName_want_mask_OtherNames,
25998 NULL
25999 };
26000 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xkb_GetKbdByName_want, ett_x11_rectangle, want_bits, byte_order);
26001 }
26002 *offsetp += 2;
26003 proto_tree_add_item(t, hf_x11_xkb_GetKbdByName_load, tvb, *offsetp, 1, byte_order);
26004 *offsetp += 1;
26005 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
26006 *offsetp += 1;
26007}
26008static void xkbGetKbdByName_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
26009{
26010 int sequence_number;
26011 int f_reported;
26012
26013 col_append_fstr(pinfo->cinfo, COL_INFO, "-GetKbdByName");
26014
26015 REPLY(reply);
26016 proto_tree_add_item(t, hf_x11_xkb_GetKbdByName_reply_deviceID, tvb, *offsetp, 1, byte_order);
26017 *offsetp += 1;
26018 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
26019 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
26020 "%d (xkb-GetKbdByName)", sequence_number);
26021 *offsetp += 2;
26022 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
26023 *offsetp += 4;
26024 proto_tree_add_item(t, hf_x11_xkb_GetKbdByName_reply_minKeyCode, tvb, *offsetp, 1, byte_order);
26025 *offsetp += 1;
26026 proto_tree_add_item(t, hf_x11_xkb_GetKbdByName_reply_maxKeyCode, tvb, *offsetp, 1, byte_order);
26027 *offsetp += 1;
26028 proto_tree_add_item(t, hf_x11_xkb_GetKbdByName_reply_loaded, tvb, *offsetp, 1, byte_order);
26029 *offsetp += 1;
26030 proto_tree_add_item(t, hf_x11_xkb_GetKbdByName_reply_newKeyboard, tvb, *offsetp, 1, byte_order);
26031 *offsetp += 1;
26032 {
26033 static int* const found_bits [] = {
26034 &hf_x11_xkb_GetKbdByName_reply_found_mask_Types,
26035 &hf_x11_xkb_GetKbdByName_reply_found_mask_CompatMap,
26036 &hf_x11_xkb_GetKbdByName_reply_found_mask_ClientSymbols,
26037 &hf_x11_xkb_GetKbdByName_reply_found_mask_ServerSymbols,
26038 &hf_x11_xkb_GetKbdByName_reply_found_mask_IndicatorMaps,
26039 &hf_x11_xkb_GetKbdByName_reply_found_mask_KeyNames,
26040 &hf_x11_xkb_GetKbdByName_reply_found_mask_Geometry,
26041 &hf_x11_xkb_GetKbdByName_reply_found_mask_OtherNames,
26042 NULL
26043 };
26044 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xkb_GetKbdByName_reply_found, ett_x11_rectangle, found_bits, byte_order);
26045 }
26046 *offsetp += 2;
26047 f_reported = tvb_get_uint16(tvb, *offsetp, byte_order);
26048 {
26049 static int* const reported_bits [] = {
26050 &hf_x11_xkb_GetKbdByName_reply_reported_mask_Types,
26051 &hf_x11_xkb_GetKbdByName_reply_reported_mask_CompatMap,
26052 &hf_x11_xkb_GetKbdByName_reply_reported_mask_ClientSymbols,
26053 &hf_x11_xkb_GetKbdByName_reply_reported_mask_ServerSymbols,
26054 &hf_x11_xkb_GetKbdByName_reply_reported_mask_IndicatorMaps,
26055 &hf_x11_xkb_GetKbdByName_reply_reported_mask_KeyNames,
26056 &hf_x11_xkb_GetKbdByName_reply_reported_mask_Geometry,
26057 &hf_x11_xkb_GetKbdByName_reply_reported_mask_OtherNames,
26058 NULL
26059 };
26060 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xkb_GetKbdByName_reply_reported, ett_x11_rectangle, reported_bits, byte_order);
26061 }
26062 *offsetp += 2;
26063 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 16, ENC_NA);
26064 *offsetp += 16;
26065 if ((f_reported & (1U << 0)) || (f_reported & (1U << 2)) || (f_reported & (1U << 3))) {
26066 int f_present;
26067 int f_nTypes;
26068 int f_nKeySyms;
26069 int f_totalActions;
26070 int f_nKeyActions;
26071 int f_totalKeyBehaviors;
26072 int f_totalKeyExplicit;
26073 int f_totalModMapKeys;
26074 int f_totalVModMapKeys;
26075 int f_virtualMods;
26076 proto_tree_add_item(t, hf_x11_xkb_GetKbdByName_reply_Types_getmap_type, tvb, *offsetp, 1, byte_order);
26077 *offsetp += 1;
26078 proto_tree_add_item(t, hf_x11_xkb_GetKbdByName_reply_Types_typeDeviceID, tvb, *offsetp, 1, byte_order);
26079 *offsetp += 1;
26080 proto_tree_add_item(t, hf_x11_xkb_GetKbdByName_reply_Types_getmap_sequence, tvb, *offsetp, 2, byte_order);
26081 *offsetp += 2;
26082 proto_tree_add_item(t, hf_x11_xkb_GetKbdByName_reply_Types_getmap_length, tvb, *offsetp, 4, byte_order);
26083 *offsetp += 4;
26084 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 2, ENC_NA);
26085 *offsetp += 2;
26086 proto_tree_add_item(t, hf_x11_xkb_GetKbdByName_reply_Types_typeMinKeyCode, tvb, *offsetp, 1, byte_order);
26087 *offsetp += 1;
26088 proto_tree_add_item(t, hf_x11_xkb_GetKbdByName_reply_Types_typeMaxKeyCode, tvb, *offsetp, 1, byte_order);
26089 *offsetp += 1;
26090 f_present = tvb_get_uint16(tvb, *offsetp, byte_order);
26091 {
26092 static int* const present_bits [] = {
26093 &hf_x11_xkb_GetKbdByName_reply_Types_present_mask_KeyTypes,
26094 &hf_x11_xkb_GetKbdByName_reply_Types_present_mask_KeySyms,
26095 &hf_x11_xkb_GetKbdByName_reply_Types_present_mask_ModifierMap,
26096 &hf_x11_xkb_GetKbdByName_reply_Types_present_mask_ExplicitComponents,
26097 &hf_x11_xkb_GetKbdByName_reply_Types_present_mask_KeyActions,
26098 &hf_x11_xkb_GetKbdByName_reply_Types_present_mask_KeyBehaviors,
26099 &hf_x11_xkb_GetKbdByName_reply_Types_present_mask_VirtualMods,
26100 &hf_x11_xkb_GetKbdByName_reply_Types_present_mask_VirtualModMap,
26101 NULL
26102 };
26103 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xkb_GetKbdByName_reply_Types_present, ett_x11_rectangle, present_bits, byte_order);
26104 }
26105 *offsetp += 2;
26106 proto_tree_add_item(t, hf_x11_xkb_GetKbdByName_reply_Types_firstType, tvb, *offsetp, 1, byte_order);
26107 *offsetp += 1;
26108 f_nTypes = tvb_get_uint8(tvb, *offsetp);
26109 proto_tree_add_item(t, hf_x11_xkb_GetKbdByName_reply_Types_nTypes, tvb, *offsetp, 1, byte_order);
26110 *offsetp += 1;
26111 proto_tree_add_item(t, hf_x11_xkb_GetKbdByName_reply_Types_totalTypes, tvb, *offsetp, 1, byte_order);
26112 *offsetp += 1;
26113 proto_tree_add_item(t, hf_x11_xkb_GetKbdByName_reply_Types_firstKeySym, tvb, *offsetp, 1, byte_order);
26114 *offsetp += 1;
26115 proto_tree_add_item(t, hf_x11_xkb_GetKbdByName_reply_Types_totalSyms, tvb, *offsetp, 2, byte_order);
26116 *offsetp += 2;
26117 f_nKeySyms = tvb_get_uint8(tvb, *offsetp);
26118 proto_tree_add_item(t, hf_x11_xkb_GetKbdByName_reply_Types_nKeySyms, tvb, *offsetp, 1, byte_order);
26119 *offsetp += 1;
26120 proto_tree_add_item(t, hf_x11_xkb_GetKbdByName_reply_Types_firstKeyAction, tvb, *offsetp, 1, byte_order);
26121 *offsetp += 1;
26122 f_totalActions = tvb_get_uint16(tvb, *offsetp, byte_order);
26123 proto_tree_add_item(t, hf_x11_xkb_GetKbdByName_reply_Types_totalActions, tvb, *offsetp, 2, byte_order);
26124 *offsetp += 2;
26125 f_nKeyActions = tvb_get_uint8(tvb, *offsetp);
26126 proto_tree_add_item(t, hf_x11_xkb_GetKbdByName_reply_Types_nKeyActions, tvb, *offsetp, 1, byte_order);
26127 *offsetp += 1;
26128 proto_tree_add_item(t, hf_x11_xkb_GetKbdByName_reply_Types_firstKeyBehavior, tvb, *offsetp, 1, byte_order);
26129 *offsetp += 1;
26130 proto_tree_add_item(t, hf_x11_xkb_GetKbdByName_reply_Types_nKeyBehaviors, tvb, *offsetp, 1, byte_order);
26131 *offsetp += 1;
26132 f_totalKeyBehaviors = tvb_get_uint8(tvb, *offsetp);
26133 proto_tree_add_item(t, hf_x11_xkb_GetKbdByName_reply_Types_totalKeyBehaviors, tvb, *offsetp, 1, byte_order);
26134 *offsetp += 1;
26135 proto_tree_add_item(t, hf_x11_xkb_GetKbdByName_reply_Types_firstKeyExplicit, tvb, *offsetp, 1, byte_order);
26136 *offsetp += 1;
26137 proto_tree_add_item(t, hf_x11_xkb_GetKbdByName_reply_Types_nKeyExplicit, tvb, *offsetp, 1, byte_order);
26138 *offsetp += 1;
26139 f_totalKeyExplicit = tvb_get_uint8(tvb, *offsetp);
26140 proto_tree_add_item(t, hf_x11_xkb_GetKbdByName_reply_Types_totalKeyExplicit, tvb, *offsetp, 1, byte_order);
26141 *offsetp += 1;
26142 proto_tree_add_item(t, hf_x11_xkb_GetKbdByName_reply_Types_firstModMapKey, tvb, *offsetp, 1, byte_order);
26143 *offsetp += 1;
26144 proto_tree_add_item(t, hf_x11_xkb_GetKbdByName_reply_Types_nModMapKeys, tvb, *offsetp, 1, byte_order);
26145 *offsetp += 1;
26146 f_totalModMapKeys = tvb_get_uint8(tvb, *offsetp);
26147 proto_tree_add_item(t, hf_x11_xkb_GetKbdByName_reply_Types_totalModMapKeys, tvb, *offsetp, 1, byte_order);
26148 *offsetp += 1;
26149 proto_tree_add_item(t, hf_x11_xkb_GetKbdByName_reply_Types_firstVModMapKey, tvb, *offsetp, 1, byte_order);
26150 *offsetp += 1;
26151 proto_tree_add_item(t, hf_x11_xkb_GetKbdByName_reply_Types_nVModMapKeys, tvb, *offsetp, 1, byte_order);
26152 *offsetp += 1;
26153 f_totalVModMapKeys = tvb_get_uint8(tvb, *offsetp);
26154 proto_tree_add_item(t, hf_x11_xkb_GetKbdByName_reply_Types_totalVModMapKeys, tvb, *offsetp, 1, byte_order);
26155 *offsetp += 1;
26156 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
26157 *offsetp += 1;
26158 f_virtualMods = tvb_get_uint16(tvb, *offsetp, byte_order);
26159 {
26160 static int* const virtualMods_bits [] = {
26161 &hf_x11_xkb_GetKbdByName_reply_Types_virtualMods_mask_0,
26162 &hf_x11_xkb_GetKbdByName_reply_Types_virtualMods_mask_1,
26163 &hf_x11_xkb_GetKbdByName_reply_Types_virtualMods_mask_2,
26164 &hf_x11_xkb_GetKbdByName_reply_Types_virtualMods_mask_3,
26165 &hf_x11_xkb_GetKbdByName_reply_Types_virtualMods_mask_4,
26166 &hf_x11_xkb_GetKbdByName_reply_Types_virtualMods_mask_5,
26167 &hf_x11_xkb_GetKbdByName_reply_Types_virtualMods_mask_6,
26168 &hf_x11_xkb_GetKbdByName_reply_Types_virtualMods_mask_7,
26169 &hf_x11_xkb_GetKbdByName_reply_Types_virtualMods_mask_8,
26170 &hf_x11_xkb_GetKbdByName_reply_Types_virtualMods_mask_9,
26171 &hf_x11_xkb_GetKbdByName_reply_Types_virtualMods_mask_10,
26172 &hf_x11_xkb_GetKbdByName_reply_Types_virtualMods_mask_11,
26173 &hf_x11_xkb_GetKbdByName_reply_Types_virtualMods_mask_12,
26174 &hf_x11_xkb_GetKbdByName_reply_Types_virtualMods_mask_13,
26175 &hf_x11_xkb_GetKbdByName_reply_Types_virtualMods_mask_14,
26176 &hf_x11_xkb_GetKbdByName_reply_Types_virtualMods_mask_15,
26177 NULL
26178 };
26179 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xkb_GetKbdByName_reply_Types_virtualMods, ett_x11_rectangle, virtualMods_bits, byte_order);
26180 }
26181 *offsetp += 2;
26182 if (f_present & (1U << 0)) {
26183 struct_xkb_KeyType(tvb, offsetp, t, byte_order, f_nTypes);
26184 }
26185 if (f_present & (1U << 1)) {
26186 struct_xkb_KeySymMap(tvb, offsetp, t, byte_order, f_nKeySyms);
26187 }
26188 if (f_present & (1U << 4)) {
26189 listOfByte(tvb, offsetp, t, hf_x11_xkb_GetKbdByName_reply_Types_KeyActions_acts_rtrn_count, f_nKeyActions, byte_order);
26190 if (*offsetp % 4) {
26191 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, (4 - *offsetp % 4), ENC_NA);
26192 *offsetp += (4 - *offsetp % 4);
26193 }
26194 struct_xkb_Action(tvb, offsetp, t, byte_order, f_totalActions);
26195 }
26196 if (f_present & (1U << 5)) {
26197 struct_xkb_SetBehavior(tvb, offsetp, t, byte_order, f_totalKeyBehaviors);
26198 }
26199 if (f_present & (1U << 6)) {
26200 listOfByte(tvb, offsetp, t, hf_x11_xkb_GetKbdByName_reply_Types_VirtualMods_vmods_rtrn, ws_count_ones(f_virtualMods), byte_order);
26201 if (*offsetp % 4) {
26202 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, (4 - *offsetp % 4), ENC_NA);
26203 *offsetp += (4 - *offsetp % 4);
26204 }
26205 }
26206 if (f_present & (1U << 3)) {
26207 struct_xkb_SetExplicit(tvb, offsetp, t, byte_order, f_totalKeyExplicit);
26208 if (*offsetp % 4) {
26209 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, (4 - *offsetp % 4), ENC_NA);
26210 *offsetp += (4 - *offsetp % 4);
26211 }
26212 }
26213 if (f_present & (1U << 2)) {
26214 struct_xkb_KeyModMap(tvb, offsetp, t, byte_order, f_totalModMapKeys);
26215 if (*offsetp % 4) {
26216 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, (4 - *offsetp % 4), ENC_NA);
26217 *offsetp += (4 - *offsetp % 4);
26218 }
26219 }
26220 if (f_present & (1U << 7)) {
26221 struct_xkb_KeyVModMap(tvb, offsetp, t, byte_order, f_totalVModMapKeys);
26222 }
26223 }
26224 if (f_reported & (1U << 1)) {
26225 int f_groupsRtrn;
26226 int f_nSIRtrn;
26227 proto_tree_add_item(t, hf_x11_xkb_GetKbdByName_reply_CompatMap_compatmap_type, tvb, *offsetp, 1, byte_order);
26228 *offsetp += 1;
26229 proto_tree_add_item(t, hf_x11_xkb_GetKbdByName_reply_CompatMap_compatDeviceID, tvb, *offsetp, 1, byte_order);
26230 *offsetp += 1;
26231 proto_tree_add_item(t, hf_x11_xkb_GetKbdByName_reply_CompatMap_compatmap_sequence, tvb, *offsetp, 2, byte_order);
26232 *offsetp += 2;
26233 proto_tree_add_item(t, hf_x11_xkb_GetKbdByName_reply_CompatMap_compatmap_length, tvb, *offsetp, 4, byte_order);
26234 *offsetp += 4;
26235 f_groupsRtrn = tvb_get_uint8(tvb, *offsetp);
26236 {
26237 static int* const groupsRtrn_bits [] = {
26238 &hf_x11_xkb_GetKbdByName_reply_CompatMap_groupsRtrn_mask_Group1,
26239 &hf_x11_xkb_GetKbdByName_reply_CompatMap_groupsRtrn_mask_Group2,
26240 &hf_x11_xkb_GetKbdByName_reply_CompatMap_groupsRtrn_mask_Group3,
26241 &hf_x11_xkb_GetKbdByName_reply_CompatMap_groupsRtrn_mask_Group4,
26242 NULL
26243 };
26244 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xkb_GetKbdByName_reply_CompatMap_groupsRtrn, ett_x11_rectangle, groupsRtrn_bits, byte_order);
26245 }
26246 *offsetp += 1;
26247 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
26248 *offsetp += 1;
26249 proto_tree_add_item(t, hf_x11_xkb_GetKbdByName_reply_CompatMap_firstSIRtrn, tvb, *offsetp, 2, byte_order);
26250 *offsetp += 2;
26251 f_nSIRtrn = tvb_get_uint16(tvb, *offsetp, byte_order);
26252 proto_tree_add_item(t, hf_x11_xkb_GetKbdByName_reply_CompatMap_nSIRtrn, tvb, *offsetp, 2, byte_order);
26253 *offsetp += 2;
26254 proto_tree_add_item(t, hf_x11_xkb_GetKbdByName_reply_CompatMap_nTotalSI, tvb, *offsetp, 2, byte_order);
26255 *offsetp += 2;
26256 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 16, ENC_NA);
26257 *offsetp += 16;
26258 struct_xkb_SymInterpret(tvb, offsetp, t, byte_order, f_nSIRtrn);
26259 struct_xkb_ModDef(tvb, offsetp, t, byte_order, ws_count_ones(f_groupsRtrn));
26260 }
26261 if (f_reported & (1U << 4)) {
26262 int f_nIndicators;
26263 proto_tree_add_item(t, hf_x11_xkb_GetKbdByName_reply_IndicatorMaps_indicatormap_type, tvb, *offsetp, 1, byte_order);
26264 *offsetp += 1;
26265 proto_tree_add_item(t, hf_x11_xkb_GetKbdByName_reply_IndicatorMaps_indicatorDeviceID, tvb, *offsetp, 1, byte_order);
26266 *offsetp += 1;
26267 proto_tree_add_item(t, hf_x11_xkb_GetKbdByName_reply_IndicatorMaps_indicatormap_sequence, tvb, *offsetp, 2, byte_order);
26268 *offsetp += 2;
26269 proto_tree_add_item(t, hf_x11_xkb_GetKbdByName_reply_IndicatorMaps_indicatormap_length, tvb, *offsetp, 4, byte_order);
26270 *offsetp += 4;
26271 proto_tree_add_item(t, hf_x11_xkb_GetKbdByName_reply_IndicatorMaps_which, tvb, *offsetp, 4, byte_order);
26272 *offsetp += 4;
26273 proto_tree_add_item(t, hf_x11_xkb_GetKbdByName_reply_IndicatorMaps_realIndicators, tvb, *offsetp, 4, byte_order);
26274 *offsetp += 4;
26275 f_nIndicators = tvb_get_uint8(tvb, *offsetp);
26276 proto_tree_add_item(t, hf_x11_xkb_GetKbdByName_reply_IndicatorMaps_nIndicators, tvb, *offsetp, 1, byte_order);
26277 *offsetp += 1;
26278 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 15, ENC_NA);
26279 *offsetp += 15;
26280 struct_xkb_IndicatorMap(tvb, offsetp, t, byte_order, f_nIndicators);
26281 }
26282 if ((f_reported & (1U << 5)) || (f_reported & (1U << 7))) {
26283 int f_which;
26284 int f_nTypes;
26285 int f_groupNames;
26286 int f_virtualMods;
26287 int f_nKeys;
26288 int f_indicators;
26289 int f_nRadioGroups;
26290 int f_nKeyAliases;
26291 proto_tree_add_item(t, hf_x11_xkb_GetKbdByName_reply_KeyNames_keyname_type, tvb, *offsetp, 1, byte_order);
26292 *offsetp += 1;
26293 proto_tree_add_item(t, hf_x11_xkb_GetKbdByName_reply_KeyNames_keyDeviceID, tvb, *offsetp, 1, byte_order);
26294 *offsetp += 1;
26295 proto_tree_add_item(t, hf_x11_xkb_GetKbdByName_reply_KeyNames_keyname_sequence, tvb, *offsetp, 2, byte_order);
26296 *offsetp += 2;
26297 proto_tree_add_item(t, hf_x11_xkb_GetKbdByName_reply_KeyNames_keyname_length, tvb, *offsetp, 4, byte_order);
26298 *offsetp += 4;
26299 f_which = tvb_get_uint32(tvb, *offsetp, byte_order);
26300 {
26301 static int* const which_bits [] = {
26302 &hf_x11_xkb_GetKbdByName_reply_KeyNames_which_mask_Keycodes,
26303 &hf_x11_xkb_GetKbdByName_reply_KeyNames_which_mask_Geometry,
26304 &hf_x11_xkb_GetKbdByName_reply_KeyNames_which_mask_Symbols,
26305 &hf_x11_xkb_GetKbdByName_reply_KeyNames_which_mask_PhysSymbols,
26306 &hf_x11_xkb_GetKbdByName_reply_KeyNames_which_mask_Types,
26307 &hf_x11_xkb_GetKbdByName_reply_KeyNames_which_mask_Compat,
26308 &hf_x11_xkb_GetKbdByName_reply_KeyNames_which_mask_KeyTypeNames,
26309 &hf_x11_xkb_GetKbdByName_reply_KeyNames_which_mask_KTLevelNames,
26310 &hf_x11_xkb_GetKbdByName_reply_KeyNames_which_mask_IndicatorNames,
26311 &hf_x11_xkb_GetKbdByName_reply_KeyNames_which_mask_KeyNames,
26312 &hf_x11_xkb_GetKbdByName_reply_KeyNames_which_mask_KeyAliases,
26313 &hf_x11_xkb_GetKbdByName_reply_KeyNames_which_mask_VirtualModNames,
26314 &hf_x11_xkb_GetKbdByName_reply_KeyNames_which_mask_GroupNames,
26315 &hf_x11_xkb_GetKbdByName_reply_KeyNames_which_mask_RGNames,
26316 NULL
26317 };
26318 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xkb_GetKbdByName_reply_KeyNames_which, ett_x11_rectangle, which_bits, byte_order);
26319 }
26320 *offsetp += 4;
26321 proto_tree_add_item(t, hf_x11_xkb_GetKbdByName_reply_KeyNames_keyMinKeyCode, tvb, *offsetp, 1, byte_order);
26322 *offsetp += 1;
26323 proto_tree_add_item(t, hf_x11_xkb_GetKbdByName_reply_KeyNames_keyMaxKeyCode, tvb, *offsetp, 1, byte_order);
26324 *offsetp += 1;
26325 f_nTypes = tvb_get_uint8(tvb, *offsetp);
26326 proto_tree_add_item(t, hf_x11_xkb_GetKbdByName_reply_KeyNames_nTypes, tvb, *offsetp, 1, byte_order);
26327 *offsetp += 1;
26328 f_groupNames = tvb_get_uint8(tvb, *offsetp);
26329 {
26330 static int* const groupNames_bits [] = {
26331 &hf_x11_xkb_GetKbdByName_reply_KeyNames_groupNames_mask_Group1,
26332 &hf_x11_xkb_GetKbdByName_reply_KeyNames_groupNames_mask_Group2,
26333 &hf_x11_xkb_GetKbdByName_reply_KeyNames_groupNames_mask_Group3,
26334 &hf_x11_xkb_GetKbdByName_reply_KeyNames_groupNames_mask_Group4,
26335 NULL
26336 };
26337 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xkb_GetKbdByName_reply_KeyNames_groupNames, ett_x11_rectangle, groupNames_bits, byte_order);
26338 }
26339 *offsetp += 1;
26340 f_virtualMods = tvb_get_uint16(tvb, *offsetp, byte_order);
26341 {
26342 static int* const virtualMods_bits [] = {
26343 &hf_x11_xkb_GetKbdByName_reply_KeyNames_virtualMods_mask_0,
26344 &hf_x11_xkb_GetKbdByName_reply_KeyNames_virtualMods_mask_1,
26345 &hf_x11_xkb_GetKbdByName_reply_KeyNames_virtualMods_mask_2,
26346 &hf_x11_xkb_GetKbdByName_reply_KeyNames_virtualMods_mask_3,
26347 &hf_x11_xkb_GetKbdByName_reply_KeyNames_virtualMods_mask_4,
26348 &hf_x11_xkb_GetKbdByName_reply_KeyNames_virtualMods_mask_5,
26349 &hf_x11_xkb_GetKbdByName_reply_KeyNames_virtualMods_mask_6,
26350 &hf_x11_xkb_GetKbdByName_reply_KeyNames_virtualMods_mask_7,
26351 &hf_x11_xkb_GetKbdByName_reply_KeyNames_virtualMods_mask_8,
26352 &hf_x11_xkb_GetKbdByName_reply_KeyNames_virtualMods_mask_9,
26353 &hf_x11_xkb_GetKbdByName_reply_KeyNames_virtualMods_mask_10,
26354 &hf_x11_xkb_GetKbdByName_reply_KeyNames_virtualMods_mask_11,
26355 &hf_x11_xkb_GetKbdByName_reply_KeyNames_virtualMods_mask_12,
26356 &hf_x11_xkb_GetKbdByName_reply_KeyNames_virtualMods_mask_13,
26357 &hf_x11_xkb_GetKbdByName_reply_KeyNames_virtualMods_mask_14,
26358 &hf_x11_xkb_GetKbdByName_reply_KeyNames_virtualMods_mask_15,
26359 NULL
26360 };
26361 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xkb_GetKbdByName_reply_KeyNames_virtualMods, ett_x11_rectangle, virtualMods_bits, byte_order);
26362 }
26363 *offsetp += 2;
26364 proto_tree_add_item(t, hf_x11_xkb_GetKbdByName_reply_KeyNames_firstKey, tvb, *offsetp, 1, byte_order);
26365 *offsetp += 1;
26366 f_nKeys = tvb_get_uint8(tvb, *offsetp);
26367 proto_tree_add_item(t, hf_x11_xkb_GetKbdByName_reply_KeyNames_nKeys, tvb, *offsetp, 1, byte_order);
26368 *offsetp += 1;
26369 f_indicators = tvb_get_uint32(tvb, *offsetp, byte_order);
26370 proto_tree_add_item(t, hf_x11_xkb_GetKbdByName_reply_KeyNames_indicators, tvb, *offsetp, 4, byte_order);
26371 *offsetp += 4;
26372 f_nRadioGroups = tvb_get_uint8(tvb, *offsetp);
26373 proto_tree_add_item(t, hf_x11_xkb_GetKbdByName_reply_KeyNames_nRadioGroups, tvb, *offsetp, 1, byte_order);
26374 *offsetp += 1;
26375 f_nKeyAliases = tvb_get_uint8(tvb, *offsetp);
26376 proto_tree_add_item(t, hf_x11_xkb_GetKbdByName_reply_KeyNames_nKeyAliases, tvb, *offsetp, 1, byte_order);
26377 *offsetp += 1;
26378 proto_tree_add_item(t, hf_x11_xkb_GetKbdByName_reply_KeyNames_nKTLevels, tvb, *offsetp, 2, byte_order);
26379 *offsetp += 2;
26380 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 4, ENC_NA);
26381 *offsetp += 4;
26382 if (f_which & (1U << 0)) {
26383 proto_tree_add_item(t, hf_x11_xkb_GetKbdByName_reply_KeyNames_Keycodes_keycodesName, tvb, *offsetp, 4, byte_order);
26384 *offsetp += 4;
26385 }
26386 if (f_which & (1U << 1)) {
26387 proto_tree_add_item(t, hf_x11_xkb_GetKbdByName_reply_KeyNames_Geometry_geometryName, tvb, *offsetp, 4, byte_order);
26388 *offsetp += 4;
26389 }
26390 if (f_which & (1U << 2)) {
26391 proto_tree_add_item(t, hf_x11_xkb_GetKbdByName_reply_KeyNames_Symbols_symbolsName, tvb, *offsetp, 4, byte_order);
26392 *offsetp += 4;
26393 }
26394 if (f_which & (1U << 3)) {
26395 proto_tree_add_item(t, hf_x11_xkb_GetKbdByName_reply_KeyNames_PhysSymbols_physSymbolsName, tvb, *offsetp, 4, byte_order);
26396 *offsetp += 4;
26397 }
26398 if (f_which & (1U << 4)) {
26399 proto_tree_add_item(t, hf_x11_xkb_GetKbdByName_reply_KeyNames_Types_typesName, tvb, *offsetp, 4, byte_order);
26400 *offsetp += 4;
26401 }
26402 if (f_which & (1U << 5)) {
26403 proto_tree_add_item(t, hf_x11_xkb_GetKbdByName_reply_KeyNames_Compat_compatName, tvb, *offsetp, 4, byte_order);
26404 *offsetp += 4;
26405 }
26406 if (f_which & (1U << 6)) {
26407 listOfCard32(tvb, offsetp, t, hf_x11_xkb_GetKbdByName_reply_KeyNames_KeyTypeNames_typeNames, hf_x11_xkb_GetKbdByName_reply_KeyNames_KeyTypeNames_typeNames_item, f_nTypes, byte_order);
26408 }
26409 if (f_which & (1U << 7)) {
26410 int sumof_nLevelsPerType = 0;
26411 {
26412 int i;
26413 for (i = 0; i < f_nTypes; i++) {
26414 sumof_nLevelsPerType += tvb_get_uint8(tvb, *offsetp + i * 1);
26415 }
26416 }
26417 listOfByte(tvb, offsetp, t, hf_x11_xkb_GetKbdByName_reply_KeyNames_KTLevelNames_nLevelsPerType, f_nTypes, byte_order);
26418 if (*offsetp % 4) {
26419 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, (4 - *offsetp % 4), ENC_NA);
26420 *offsetp += (4 - *offsetp % 4);
26421 }
26422 listOfCard32(tvb, offsetp, t, hf_x11_xkb_GetKbdByName_reply_KeyNames_KTLevelNames_ktLevelNames, hf_x11_xkb_GetKbdByName_reply_KeyNames_KTLevelNames_ktLevelNames_item, sumof_nLevelsPerType, byte_order);
26423 }
26424 if (f_which & (1U << 8)) {
26425 listOfCard32(tvb, offsetp, t, hf_x11_xkb_GetKbdByName_reply_KeyNames_IndicatorNames_indicatorNames, hf_x11_xkb_GetKbdByName_reply_KeyNames_IndicatorNames_indicatorNames_item, ws_count_ones(f_indicators), byte_order);
26426 }
26427 if (f_which & (1U << 11)) {
26428 listOfCard32(tvb, offsetp, t, hf_x11_xkb_GetKbdByName_reply_KeyNames_VirtualModNames_virtualModNames, hf_x11_xkb_GetKbdByName_reply_KeyNames_VirtualModNames_virtualModNames_item, ws_count_ones(f_virtualMods), byte_order);
26429 }
26430 if (f_which & (1U << 12)) {
26431 listOfCard32(tvb, offsetp, t, hf_x11_xkb_GetKbdByName_reply_KeyNames_GroupNames_groups, hf_x11_xkb_GetKbdByName_reply_KeyNames_GroupNames_groups_item, ws_count_ones(f_groupNames), byte_order);
26432 }
26433 if (f_which & (1U << 9)) {
26434 struct_xkb_KeyName(tvb, offsetp, t, byte_order, f_nKeys);
26435 }
26436 if (f_which & (1U << 10)) {
26437 struct_xkb_KeyAlias(tvb, offsetp, t, byte_order, f_nKeyAliases);
26438 }
26439 if (f_which & (1U << 13)) {
26440 listOfCard32(tvb, offsetp, t, hf_x11_xkb_GetKbdByName_reply_KeyNames_RGNames_radioGroupNames, hf_x11_xkb_GetKbdByName_reply_KeyNames_RGNames_radioGroupNames_item, f_nRadioGroups, byte_order);
26441 }
26442 }
26443 if (f_reported & (1U << 6)) {
26444 proto_tree_add_item(t, hf_x11_xkb_GetKbdByName_reply_Geometry_geometry_type, tvb, *offsetp, 1, byte_order);
26445 *offsetp += 1;
26446 proto_tree_add_item(t, hf_x11_xkb_GetKbdByName_reply_Geometry_geometryDeviceID, tvb, *offsetp, 1, byte_order);
26447 *offsetp += 1;
26448 proto_tree_add_item(t, hf_x11_xkb_GetKbdByName_reply_Geometry_geometry_sequence, tvb, *offsetp, 2, byte_order);
26449 *offsetp += 2;
26450 proto_tree_add_item(t, hf_x11_xkb_GetKbdByName_reply_Geometry_geometry_length, tvb, *offsetp, 4, byte_order);
26451 *offsetp += 4;
26452 proto_tree_add_item(t, hf_x11_xkb_GetKbdByName_reply_Geometry_name, tvb, *offsetp, 4, byte_order);
26453 *offsetp += 4;
26454 proto_tree_add_item(t, hf_x11_xkb_GetKbdByName_reply_Geometry_geometryFound, tvb, *offsetp, 1, byte_order);
26455 *offsetp += 1;
26456 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
26457 *offsetp += 1;
26458 proto_tree_add_item(t, hf_x11_xkb_GetKbdByName_reply_Geometry_widthMM, tvb, *offsetp, 2, byte_order);
26459 *offsetp += 2;
26460 proto_tree_add_item(t, hf_x11_xkb_GetKbdByName_reply_Geometry_heightMM, tvb, *offsetp, 2, byte_order);
26461 *offsetp += 2;
26462 proto_tree_add_item(t, hf_x11_xkb_GetKbdByName_reply_Geometry_nProperties, tvb, *offsetp, 2, byte_order);
26463 *offsetp += 2;
26464 proto_tree_add_item(t, hf_x11_xkb_GetKbdByName_reply_Geometry_nColors, tvb, *offsetp, 2, byte_order);
26465 *offsetp += 2;
26466 proto_tree_add_item(t, hf_x11_xkb_GetKbdByName_reply_Geometry_nShapes, tvb, *offsetp, 2, byte_order);
26467 *offsetp += 2;
26468 proto_tree_add_item(t, hf_x11_xkb_GetKbdByName_reply_Geometry_nSections, tvb, *offsetp, 2, byte_order);
26469 *offsetp += 2;
26470 proto_tree_add_item(t, hf_x11_xkb_GetKbdByName_reply_Geometry_nDoodads, tvb, *offsetp, 2, byte_order);
26471 *offsetp += 2;
26472 proto_tree_add_item(t, hf_x11_xkb_GetKbdByName_reply_Geometry_nKeyAliases, tvb, *offsetp, 2, byte_order);
26473 *offsetp += 2;
26474 proto_tree_add_item(t, hf_x11_xkb_GetKbdByName_reply_Geometry_baseColorNdx, tvb, *offsetp, 1, byte_order);
26475 *offsetp += 1;
26476 proto_tree_add_item(t, hf_x11_xkb_GetKbdByName_reply_Geometry_labelColorNdx, tvb, *offsetp, 1, byte_order);
26477 *offsetp += 1;
26478 struct_xkb_CountedString16(tvb, offsetp, t, byte_order, 1);
26479 }
26480}
26481
26482static void xkbGetDeviceInfo(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
26483{
26484 proto_tree_add_item(t, hf_x11_xkb_GetDeviceInfo_deviceSpec, tvb, *offsetp, 2, byte_order);
26485 *offsetp += 2;
26486 {
26487 static int* const wanted_bits [] = {
26488 &hf_x11_xkb_GetDeviceInfo_wanted_mask_Keyboards,
26489 &hf_x11_xkb_GetDeviceInfo_wanted_mask_ButtonActions,
26490 &hf_x11_xkb_GetDeviceInfo_wanted_mask_IndicatorNames,
26491 &hf_x11_xkb_GetDeviceInfo_wanted_mask_IndicatorMaps,
26492 &hf_x11_xkb_GetDeviceInfo_wanted_mask_IndicatorState,
26493 NULL
26494 };
26495 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xkb_GetDeviceInfo_wanted, ett_x11_rectangle, wanted_bits, byte_order);
26496 }
26497 *offsetp += 2;
26498 proto_tree_add_item(t, hf_x11_xkb_GetDeviceInfo_allButtons, tvb, *offsetp, 1, byte_order);
26499 *offsetp += 1;
26500 proto_tree_add_item(t, hf_x11_xkb_GetDeviceInfo_firstButton, tvb, *offsetp, 1, byte_order);
26501 *offsetp += 1;
26502 proto_tree_add_item(t, hf_x11_xkb_GetDeviceInfo_nButtons, tvb, *offsetp, 1, byte_order);
26503 *offsetp += 1;
26504 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
26505 *offsetp += 1;
26506 field16(tvb, offsetp, t, hf_x11_xkb_GetDeviceInfo_ledClass, byte_order);
26507 field16(tvb, offsetp, t, hf_x11_xkb_GetDeviceInfo_ledID, byte_order);
26508}
26509static void xkbGetDeviceInfo_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
26510{
26511 int sequence_number;
26512 int f_nDeviceLedFBs;
26513 int f_nBtnsRtrn;
26514 int f_nameLen;
26515
26516 col_append_fstr(pinfo->cinfo, COL_INFO, "-GetDeviceInfo");
26517
26518 REPLY(reply);
26519 proto_tree_add_item(t, hf_x11_xkb_GetDeviceInfo_reply_deviceID, tvb, *offsetp, 1, byte_order);
26520 *offsetp += 1;
26521 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
26522 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
26523 "%d (xkb-GetDeviceInfo)", sequence_number);
26524 *offsetp += 2;
26525 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
26526 *offsetp += 4;
26527 {
26528 static int* const present_bits [] = {
26529 &hf_x11_xkb_GetDeviceInfo_reply_present_mask_Keyboards,
26530 &hf_x11_xkb_GetDeviceInfo_reply_present_mask_ButtonActions,
26531 &hf_x11_xkb_GetDeviceInfo_reply_present_mask_IndicatorNames,
26532 &hf_x11_xkb_GetDeviceInfo_reply_present_mask_IndicatorMaps,
26533 &hf_x11_xkb_GetDeviceInfo_reply_present_mask_IndicatorState,
26534 NULL
26535 };
26536 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xkb_GetDeviceInfo_reply_present, ett_x11_rectangle, present_bits, byte_order);
26537 }
26538 *offsetp += 2;
26539 {
26540 static int* const supported_bits [] = {
26541 &hf_x11_xkb_GetDeviceInfo_reply_supported_mask_Keyboards,
26542 &hf_x11_xkb_GetDeviceInfo_reply_supported_mask_ButtonActions,
26543 &hf_x11_xkb_GetDeviceInfo_reply_supported_mask_IndicatorNames,
26544 &hf_x11_xkb_GetDeviceInfo_reply_supported_mask_IndicatorMaps,
26545 &hf_x11_xkb_GetDeviceInfo_reply_supported_mask_IndicatorState,
26546 NULL
26547 };
26548 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xkb_GetDeviceInfo_reply_supported, ett_x11_rectangle, supported_bits, byte_order);
26549 }
26550 *offsetp += 2;
26551 {
26552 static int* const unsupported_bits [] = {
26553 &hf_x11_xkb_GetDeviceInfo_reply_unsupported_mask_Keyboards,
26554 &hf_x11_xkb_GetDeviceInfo_reply_unsupported_mask_ButtonActions,
26555 &hf_x11_xkb_GetDeviceInfo_reply_unsupported_mask_IndicatorNames,
26556 &hf_x11_xkb_GetDeviceInfo_reply_unsupported_mask_IndicatorMaps,
26557 &hf_x11_xkb_GetDeviceInfo_reply_unsupported_mask_IndicatorState,
26558 NULL
26559 };
26560 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xkb_GetDeviceInfo_reply_unsupported, ett_x11_rectangle, unsupported_bits, byte_order);
26561 }
26562 *offsetp += 2;
26563 f_nDeviceLedFBs = tvb_get_uint16(tvb, *offsetp, byte_order);
26564 proto_tree_add_item(t, hf_x11_xkb_GetDeviceInfo_reply_nDeviceLedFBs, tvb, *offsetp, 2, byte_order);
26565 *offsetp += 2;
26566 proto_tree_add_item(t, hf_x11_xkb_GetDeviceInfo_reply_firstBtnWanted, tvb, *offsetp, 1, byte_order);
26567 *offsetp += 1;
26568 proto_tree_add_item(t, hf_x11_xkb_GetDeviceInfo_reply_nBtnsWanted, tvb, *offsetp, 1, byte_order);
26569 *offsetp += 1;
26570 proto_tree_add_item(t, hf_x11_xkb_GetDeviceInfo_reply_firstBtnRtrn, tvb, *offsetp, 1, byte_order);
26571 *offsetp += 1;
26572 f_nBtnsRtrn = tvb_get_uint8(tvb, *offsetp);
26573 proto_tree_add_item(t, hf_x11_xkb_GetDeviceInfo_reply_nBtnsRtrn, tvb, *offsetp, 1, byte_order);
26574 *offsetp += 1;
26575 proto_tree_add_item(t, hf_x11_xkb_GetDeviceInfo_reply_totalBtns, tvb, *offsetp, 1, byte_order);
26576 *offsetp += 1;
26577 proto_tree_add_item(t, hf_x11_xkb_GetDeviceInfo_reply_hasOwnState, tvb, *offsetp, 1, byte_order);
26578 *offsetp += 1;
26579 field16(tvb, offsetp, t, hf_x11_xkb_GetDeviceInfo_reply_dfltKbdFB, byte_order);
26580 field16(tvb, offsetp, t, hf_x11_xkb_GetDeviceInfo_reply_dfltLedFB, byte_order);
26581 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 2, ENC_NA);
26582 *offsetp += 2;
26583 proto_tree_add_item(t, hf_x11_xkb_GetDeviceInfo_reply_devType, tvb, *offsetp, 4, byte_order);
26584 *offsetp += 4;
26585 f_nameLen = tvb_get_uint16(tvb, *offsetp, byte_order);
26586 proto_tree_add_item(t, hf_x11_xkb_GetDeviceInfo_reply_nameLen, tvb, *offsetp, 2, byte_order);
26587 *offsetp += 2;
26588 listOfByte(tvb, offsetp, t, hf_x11_xkb_GetDeviceInfo_reply_name, f_nameLen, byte_order);
26589 if (*offsetp % 4) {
26590 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, (4 - *offsetp % 4), ENC_NA);
26591 *offsetp += (4 - *offsetp % 4);
26592 }
26593 struct_xkb_Action(tvb, offsetp, t, byte_order, f_nBtnsRtrn);
26594 struct_xkb_DeviceLedInfo(tvb, offsetp, t, byte_order, f_nDeviceLedFBs);
26595}
26596
26597static void xkbSetDeviceInfo(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
26598{
26599 int f_nBtns;
26600 int f_nDeviceLedFBs;
26601 proto_tree_add_item(t, hf_x11_xkb_SetDeviceInfo_deviceSpec, tvb, *offsetp, 2, byte_order);
26602 *offsetp += 2;
26603 proto_tree_add_item(t, hf_x11_xkb_SetDeviceInfo_firstBtn, tvb, *offsetp, 1, byte_order);
26604 *offsetp += 1;
26605 f_nBtns = tvb_get_uint8(tvb, *offsetp);
26606 proto_tree_add_item(t, hf_x11_xkb_SetDeviceInfo_nBtns, tvb, *offsetp, 1, byte_order);
26607 *offsetp += 1;
26608 {
26609 static int* const change_bits [] = {
26610 &hf_x11_xkb_SetDeviceInfo_change_mask_Keyboards,
26611 &hf_x11_xkb_SetDeviceInfo_change_mask_ButtonActions,
26612 &hf_x11_xkb_SetDeviceInfo_change_mask_IndicatorNames,
26613 &hf_x11_xkb_SetDeviceInfo_change_mask_IndicatorMaps,
26614 &hf_x11_xkb_SetDeviceInfo_change_mask_IndicatorState,
26615 NULL
26616 };
26617 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xkb_SetDeviceInfo_change, ett_x11_rectangle, change_bits, byte_order);
26618 }
26619 *offsetp += 2;
26620 f_nDeviceLedFBs = tvb_get_uint16(tvb, *offsetp, byte_order);
26621 proto_tree_add_item(t, hf_x11_xkb_SetDeviceInfo_nDeviceLedFBs, tvb, *offsetp, 2, byte_order);
26622 *offsetp += 2;
26623 struct_xkb_Action(tvb, offsetp, t, byte_order, f_nBtns);
26624 length -= f_nBtns * 8;
26625 struct_xkb_DeviceLedInfo(tvb, offsetp, t, byte_order, f_nDeviceLedFBs);
26626 length -= f_nDeviceLedFBs * 0;
26627}
26628
26629static void xkbSetDebuggingFlags(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
26630{
26631 int f_msgLength;
26632 f_msgLength = tvb_get_uint16(tvb, *offsetp, byte_order);
26633 proto_tree_add_item(t, hf_x11_xkb_SetDebuggingFlags_msgLength, tvb, *offsetp, 2, byte_order);
26634 *offsetp += 2;
26635 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 2, ENC_NA);
26636 *offsetp += 2;
26637 proto_tree_add_item(t, hf_x11_xkb_SetDebuggingFlags_affectFlags, tvb, *offsetp, 4, byte_order);
26638 *offsetp += 4;
26639 proto_tree_add_item(t, hf_x11_xkb_SetDebuggingFlags_flags, tvb, *offsetp, 4, byte_order);
26640 *offsetp += 4;
26641 proto_tree_add_item(t, hf_x11_xkb_SetDebuggingFlags_affectCtrls, tvb, *offsetp, 4, byte_order);
26642 *offsetp += 4;
26643 proto_tree_add_item(t, hf_x11_xkb_SetDebuggingFlags_ctrls, tvb, *offsetp, 4, byte_order);
26644 *offsetp += 4;
26645 listOfByte(tvb, offsetp, t, hf_x11_xkb_SetDebuggingFlags_message, f_msgLength, byte_order);
26646 length -= f_msgLength * 1;
26647}
26648static void xkbSetDebuggingFlags_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
26649{
26650 int sequence_number;
26651
26652 col_append_fstr(pinfo->cinfo, COL_INFO, "-SetDebuggingFlags");
26653
26654 REPLY(reply);
26655 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
26656 *offsetp += 1;
26657 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
26658 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
26659 "%d (xkb-SetDebuggingFlags)", sequence_number);
26660 *offsetp += 2;
26661 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
26662 *offsetp += 4;
26663 proto_tree_add_item(t, hf_x11_xkb_SetDebuggingFlags_reply_currentFlags, tvb, *offsetp, 4, byte_order);
26664 *offsetp += 4;
26665 proto_tree_add_item(t, hf_x11_xkb_SetDebuggingFlags_reply_currentCtrls, tvb, *offsetp, 4, byte_order);
26666 *offsetp += 4;
26667 proto_tree_add_item(t, hf_x11_xkb_SetDebuggingFlags_reply_supportedFlags, tvb, *offsetp, 4, byte_order);
26668 *offsetp += 4;
26669 proto_tree_add_item(t, hf_x11_xkb_SetDebuggingFlags_reply_supportedCtrls, tvb, *offsetp, 4, byte_order);
26670 *offsetp += 4;
26671 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 8, ENC_NA);
26672 *offsetp += 8;
26673}
26674
26675static void xkbMapNotify(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order)
26676{
26677 proto_tree_add_item(t, hf_x11_xkb_MapNotify_xkbType, tvb, *offsetp, 1, byte_order);
26678 *offsetp += 1;
26679 CARD16(event_sequencenumber);
26680 proto_tree_add_item(t, hf_x11_xkb_MapNotify_time, tvb, *offsetp, 4, byte_order);
26681 *offsetp += 4;
26682 proto_tree_add_item(t, hf_x11_xkb_MapNotify_deviceID, tvb, *offsetp, 1, byte_order);
26683 *offsetp += 1;
26684 proto_tree_add_item(t, hf_x11_xkb_MapNotify_ptrBtnActions, tvb, *offsetp, 1, byte_order);
26685 *offsetp += 1;
26686 {
26687 static int* const changed_bits [] = {
26688 &hf_x11_xkb_MapNotify_changed_mask_KeyTypes,
26689 &hf_x11_xkb_MapNotify_changed_mask_KeySyms,
26690 &hf_x11_xkb_MapNotify_changed_mask_ModifierMap,
26691 &hf_x11_xkb_MapNotify_changed_mask_ExplicitComponents,
26692 &hf_x11_xkb_MapNotify_changed_mask_KeyActions,
26693 &hf_x11_xkb_MapNotify_changed_mask_KeyBehaviors,
26694 &hf_x11_xkb_MapNotify_changed_mask_VirtualMods,
26695 &hf_x11_xkb_MapNotify_changed_mask_VirtualModMap,
26696 NULL
26697 };
26698 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xkb_MapNotify_changed, ett_x11_rectangle, changed_bits, byte_order);
26699 }
26700 *offsetp += 2;
26701 proto_tree_add_item(t, hf_x11_xkb_MapNotify_minKeyCode, tvb, *offsetp, 1, byte_order);
26702 *offsetp += 1;
26703 proto_tree_add_item(t, hf_x11_xkb_MapNotify_maxKeyCode, tvb, *offsetp, 1, byte_order);
26704 *offsetp += 1;
26705 proto_tree_add_item(t, hf_x11_xkb_MapNotify_firstType, tvb, *offsetp, 1, byte_order);
26706 *offsetp += 1;
26707 proto_tree_add_item(t, hf_x11_xkb_MapNotify_nTypes, tvb, *offsetp, 1, byte_order);
26708 *offsetp += 1;
26709 proto_tree_add_item(t, hf_x11_xkb_MapNotify_firstKeySym, tvb, *offsetp, 1, byte_order);
26710 *offsetp += 1;
26711 proto_tree_add_item(t, hf_x11_xkb_MapNotify_nKeySyms, tvb, *offsetp, 1, byte_order);
26712 *offsetp += 1;
26713 proto_tree_add_item(t, hf_x11_xkb_MapNotify_firstKeyAct, tvb, *offsetp, 1, byte_order);
26714 *offsetp += 1;
26715 proto_tree_add_item(t, hf_x11_xkb_MapNotify_nKeyActs, tvb, *offsetp, 1, byte_order);
26716 *offsetp += 1;
26717 proto_tree_add_item(t, hf_x11_xkb_MapNotify_firstKeyBehavior, tvb, *offsetp, 1, byte_order);
26718 *offsetp += 1;
26719 proto_tree_add_item(t, hf_x11_xkb_MapNotify_nKeyBehavior, tvb, *offsetp, 1, byte_order);
26720 *offsetp += 1;
26721 proto_tree_add_item(t, hf_x11_xkb_MapNotify_firstKeyExplicit, tvb, *offsetp, 1, byte_order);
26722 *offsetp += 1;
26723 proto_tree_add_item(t, hf_x11_xkb_MapNotify_nKeyExplicit, tvb, *offsetp, 1, byte_order);
26724 *offsetp += 1;
26725 proto_tree_add_item(t, hf_x11_xkb_MapNotify_firstModMapKey, tvb, *offsetp, 1, byte_order);
26726 *offsetp += 1;
26727 proto_tree_add_item(t, hf_x11_xkb_MapNotify_nModMapKeys, tvb, *offsetp, 1, byte_order);
26728 *offsetp += 1;
26729 proto_tree_add_item(t, hf_x11_xkb_MapNotify_firstVModMapKey, tvb, *offsetp, 1, byte_order);
26730 *offsetp += 1;
26731 proto_tree_add_item(t, hf_x11_xkb_MapNotify_nVModMapKeys, tvb, *offsetp, 1, byte_order);
26732 *offsetp += 1;
26733 {
26734 static int* const virtualMods_bits [] = {
26735 &hf_x11_xkb_MapNotify_virtualMods_mask_0,
26736 &hf_x11_xkb_MapNotify_virtualMods_mask_1,
26737 &hf_x11_xkb_MapNotify_virtualMods_mask_2,
26738 &hf_x11_xkb_MapNotify_virtualMods_mask_3,
26739 &hf_x11_xkb_MapNotify_virtualMods_mask_4,
26740 &hf_x11_xkb_MapNotify_virtualMods_mask_5,
26741 &hf_x11_xkb_MapNotify_virtualMods_mask_6,
26742 &hf_x11_xkb_MapNotify_virtualMods_mask_7,
26743 &hf_x11_xkb_MapNotify_virtualMods_mask_8,
26744 &hf_x11_xkb_MapNotify_virtualMods_mask_9,
26745 &hf_x11_xkb_MapNotify_virtualMods_mask_10,
26746 &hf_x11_xkb_MapNotify_virtualMods_mask_11,
26747 &hf_x11_xkb_MapNotify_virtualMods_mask_12,
26748 &hf_x11_xkb_MapNotify_virtualMods_mask_13,
26749 &hf_x11_xkb_MapNotify_virtualMods_mask_14,
26750 &hf_x11_xkb_MapNotify_virtualMods_mask_15,
26751 NULL
26752 };
26753 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xkb_MapNotify_virtualMods, ett_x11_rectangle, virtualMods_bits, byte_order);
26754 }
26755 *offsetp += 2;
26756 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 2, ENC_NA);
26757 *offsetp += 2;
26758}
26759
26760
26761static void xkbStateNotify(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order)
26762{
26763 proto_tree_add_item(t, hf_x11_xkb_StateNotify_xkbType, tvb, *offsetp, 1, byte_order);
26764 *offsetp += 1;
26765 CARD16(event_sequencenumber);
26766 proto_tree_add_item(t, hf_x11_xkb_StateNotify_time, tvb, *offsetp, 4, byte_order);
26767 *offsetp += 4;
26768 proto_tree_add_item(t, hf_x11_xkb_StateNotify_deviceID, tvb, *offsetp, 1, byte_order);
26769 *offsetp += 1;
26770 {
26771 static int* const mods_bits [] = {
26772 &hf_x11_xkb_StateNotify_mods_mask_Shift,
26773 &hf_x11_xkb_StateNotify_mods_mask_Lock,
26774 &hf_x11_xkb_StateNotify_mods_mask_Control,
26775 &hf_x11_xkb_StateNotify_mods_mask_1,
26776 &hf_x11_xkb_StateNotify_mods_mask_2,
26777 &hf_x11_xkb_StateNotify_mods_mask_3,
26778 &hf_x11_xkb_StateNotify_mods_mask_4,
26779 &hf_x11_xkb_StateNotify_mods_mask_5,
26780 &hf_x11_xkb_StateNotify_mods_mask_Any,
26781 NULL
26782 };
26783 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xkb_StateNotify_mods, ett_x11_rectangle, mods_bits, byte_order);
26784 }
26785 *offsetp += 1;
26786 {
26787 static int* const baseMods_bits [] = {
26788 &hf_x11_xkb_StateNotify_baseMods_mask_Shift,
26789 &hf_x11_xkb_StateNotify_baseMods_mask_Lock,
26790 &hf_x11_xkb_StateNotify_baseMods_mask_Control,
26791 &hf_x11_xkb_StateNotify_baseMods_mask_1,
26792 &hf_x11_xkb_StateNotify_baseMods_mask_2,
26793 &hf_x11_xkb_StateNotify_baseMods_mask_3,
26794 &hf_x11_xkb_StateNotify_baseMods_mask_4,
26795 &hf_x11_xkb_StateNotify_baseMods_mask_5,
26796 &hf_x11_xkb_StateNotify_baseMods_mask_Any,
26797 NULL
26798 };
26799 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xkb_StateNotify_baseMods, ett_x11_rectangle, baseMods_bits, byte_order);
26800 }
26801 *offsetp += 1;
26802 {
26803 static int* const latchedMods_bits [] = {
26804 &hf_x11_xkb_StateNotify_latchedMods_mask_Shift,
26805 &hf_x11_xkb_StateNotify_latchedMods_mask_Lock,
26806 &hf_x11_xkb_StateNotify_latchedMods_mask_Control,
26807 &hf_x11_xkb_StateNotify_latchedMods_mask_1,
26808 &hf_x11_xkb_StateNotify_latchedMods_mask_2,
26809 &hf_x11_xkb_StateNotify_latchedMods_mask_3,
26810 &hf_x11_xkb_StateNotify_latchedMods_mask_4,
26811 &hf_x11_xkb_StateNotify_latchedMods_mask_5,
26812 &hf_x11_xkb_StateNotify_latchedMods_mask_Any,
26813 NULL
26814 };
26815 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xkb_StateNotify_latchedMods, ett_x11_rectangle, latchedMods_bits, byte_order);
26816 }
26817 *offsetp += 1;
26818 {
26819 static int* const lockedMods_bits [] = {
26820 &hf_x11_xkb_StateNotify_lockedMods_mask_Shift,
26821 &hf_x11_xkb_StateNotify_lockedMods_mask_Lock,
26822 &hf_x11_xkb_StateNotify_lockedMods_mask_Control,
26823 &hf_x11_xkb_StateNotify_lockedMods_mask_1,
26824 &hf_x11_xkb_StateNotify_lockedMods_mask_2,
26825 &hf_x11_xkb_StateNotify_lockedMods_mask_3,
26826 &hf_x11_xkb_StateNotify_lockedMods_mask_4,
26827 &hf_x11_xkb_StateNotify_lockedMods_mask_5,
26828 &hf_x11_xkb_StateNotify_lockedMods_mask_Any,
26829 NULL
26830 };
26831 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xkb_StateNotify_lockedMods, ett_x11_rectangle, lockedMods_bits, byte_order);
26832 }
26833 *offsetp += 1;
26834 field8(tvb, offsetp, t, hf_x11_xkb_StateNotify_group, byte_order);
26835 proto_tree_add_item(t, hf_x11_xkb_StateNotify_baseGroup, tvb, *offsetp, 2, byte_order);
26836 *offsetp += 2;
26837 proto_tree_add_item(t, hf_x11_xkb_StateNotify_latchedGroup, tvb, *offsetp, 2, byte_order);
26838 *offsetp += 2;
26839 field8(tvb, offsetp, t, hf_x11_xkb_StateNotify_lockedGroup, byte_order);
26840 {
26841 static int* const compatState_bits [] = {
26842 &hf_x11_xkb_StateNotify_compatState_mask_Shift,
26843 &hf_x11_xkb_StateNotify_compatState_mask_Lock,
26844 &hf_x11_xkb_StateNotify_compatState_mask_Control,
26845 &hf_x11_xkb_StateNotify_compatState_mask_1,
26846 &hf_x11_xkb_StateNotify_compatState_mask_2,
26847 &hf_x11_xkb_StateNotify_compatState_mask_3,
26848 &hf_x11_xkb_StateNotify_compatState_mask_4,
26849 &hf_x11_xkb_StateNotify_compatState_mask_5,
26850 &hf_x11_xkb_StateNotify_compatState_mask_Any,
26851 NULL
26852 };
26853 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xkb_StateNotify_compatState, ett_x11_rectangle, compatState_bits, byte_order);
26854 }
26855 *offsetp += 1;
26856 {
26857 static int* const grabMods_bits [] = {
26858 &hf_x11_xkb_StateNotify_grabMods_mask_Shift,
26859 &hf_x11_xkb_StateNotify_grabMods_mask_Lock,
26860 &hf_x11_xkb_StateNotify_grabMods_mask_Control,
26861 &hf_x11_xkb_StateNotify_grabMods_mask_1,
26862 &hf_x11_xkb_StateNotify_grabMods_mask_2,
26863 &hf_x11_xkb_StateNotify_grabMods_mask_3,
26864 &hf_x11_xkb_StateNotify_grabMods_mask_4,
26865 &hf_x11_xkb_StateNotify_grabMods_mask_5,
26866 &hf_x11_xkb_StateNotify_grabMods_mask_Any,
26867 NULL
26868 };
26869 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xkb_StateNotify_grabMods, ett_x11_rectangle, grabMods_bits, byte_order);
26870 }
26871 *offsetp += 1;
26872 {
26873 static int* const compatGrabMods_bits [] = {
26874 &hf_x11_xkb_StateNotify_compatGrabMods_mask_Shift,
26875 &hf_x11_xkb_StateNotify_compatGrabMods_mask_Lock,
26876 &hf_x11_xkb_StateNotify_compatGrabMods_mask_Control,
26877 &hf_x11_xkb_StateNotify_compatGrabMods_mask_1,
26878 &hf_x11_xkb_StateNotify_compatGrabMods_mask_2,
26879 &hf_x11_xkb_StateNotify_compatGrabMods_mask_3,
26880 &hf_x11_xkb_StateNotify_compatGrabMods_mask_4,
26881 &hf_x11_xkb_StateNotify_compatGrabMods_mask_5,
26882 &hf_x11_xkb_StateNotify_compatGrabMods_mask_Any,
26883 NULL
26884 };
26885 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xkb_StateNotify_compatGrabMods, ett_x11_rectangle, compatGrabMods_bits, byte_order);
26886 }
26887 *offsetp += 1;
26888 {
26889 static int* const lookupMods_bits [] = {
26890 &hf_x11_xkb_StateNotify_lookupMods_mask_Shift,
26891 &hf_x11_xkb_StateNotify_lookupMods_mask_Lock,
26892 &hf_x11_xkb_StateNotify_lookupMods_mask_Control,
26893 &hf_x11_xkb_StateNotify_lookupMods_mask_1,
26894 &hf_x11_xkb_StateNotify_lookupMods_mask_2,
26895 &hf_x11_xkb_StateNotify_lookupMods_mask_3,
26896 &hf_x11_xkb_StateNotify_lookupMods_mask_4,
26897 &hf_x11_xkb_StateNotify_lookupMods_mask_5,
26898 &hf_x11_xkb_StateNotify_lookupMods_mask_Any,
26899 NULL
26900 };
26901 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xkb_StateNotify_lookupMods, ett_x11_rectangle, lookupMods_bits, byte_order);
26902 }
26903 *offsetp += 1;
26904 {
26905 static int* const compatLoockupMods_bits [] = {
26906 &hf_x11_xkb_StateNotify_compatLoockupMods_mask_Shift,
26907 &hf_x11_xkb_StateNotify_compatLoockupMods_mask_Lock,
26908 &hf_x11_xkb_StateNotify_compatLoockupMods_mask_Control,
26909 &hf_x11_xkb_StateNotify_compatLoockupMods_mask_1,
26910 &hf_x11_xkb_StateNotify_compatLoockupMods_mask_2,
26911 &hf_x11_xkb_StateNotify_compatLoockupMods_mask_3,
26912 &hf_x11_xkb_StateNotify_compatLoockupMods_mask_4,
26913 &hf_x11_xkb_StateNotify_compatLoockupMods_mask_5,
26914 &hf_x11_xkb_StateNotify_compatLoockupMods_mask_Any,
26915 NULL
26916 };
26917 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xkb_StateNotify_compatLoockupMods, ett_x11_rectangle, compatLoockupMods_bits, byte_order);
26918 }
26919 *offsetp += 1;
26920 {
26921 static int* const ptrBtnState_bits [] = {
26922 &hf_x11_xkb_StateNotify_ptrBtnState_mask_Shift,
26923 &hf_x11_xkb_StateNotify_ptrBtnState_mask_Lock,
26924 &hf_x11_xkb_StateNotify_ptrBtnState_mask_Control,
26925 &hf_x11_xkb_StateNotify_ptrBtnState_mask_Mod1,
26926 &hf_x11_xkb_StateNotify_ptrBtnState_mask_Mod2,
26927 &hf_x11_xkb_StateNotify_ptrBtnState_mask_Mod3,
26928 &hf_x11_xkb_StateNotify_ptrBtnState_mask_Mod4,
26929 &hf_x11_xkb_StateNotify_ptrBtnState_mask_Mod5,
26930 &hf_x11_xkb_StateNotify_ptrBtnState_mask_Button1,
26931 &hf_x11_xkb_StateNotify_ptrBtnState_mask_Button2,
26932 &hf_x11_xkb_StateNotify_ptrBtnState_mask_Button3,
26933 &hf_x11_xkb_StateNotify_ptrBtnState_mask_Button4,
26934 &hf_x11_xkb_StateNotify_ptrBtnState_mask_Button5,
26935 NULL
26936 };
26937 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xkb_StateNotify_ptrBtnState, ett_x11_rectangle, ptrBtnState_bits, byte_order);
26938 }
26939 *offsetp += 2;
26940 {
26941 static int* const changed_bits [] = {
26942 &hf_x11_xkb_StateNotify_changed_mask_ModifierState,
26943 &hf_x11_xkb_StateNotify_changed_mask_ModifierBase,
26944 &hf_x11_xkb_StateNotify_changed_mask_ModifierLatch,
26945 &hf_x11_xkb_StateNotify_changed_mask_ModifierLock,
26946 &hf_x11_xkb_StateNotify_changed_mask_GroupState,
26947 &hf_x11_xkb_StateNotify_changed_mask_GroupBase,
26948 &hf_x11_xkb_StateNotify_changed_mask_GroupLatch,
26949 &hf_x11_xkb_StateNotify_changed_mask_GroupLock,
26950 &hf_x11_xkb_StateNotify_changed_mask_CompatState,
26951 &hf_x11_xkb_StateNotify_changed_mask_GrabMods,
26952 &hf_x11_xkb_StateNotify_changed_mask_CompatGrabMods,
26953 &hf_x11_xkb_StateNotify_changed_mask_LookupMods,
26954 &hf_x11_xkb_StateNotify_changed_mask_CompatLookupMods,
26955 &hf_x11_xkb_StateNotify_changed_mask_PointerButtons,
26956 NULL
26957 };
26958 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xkb_StateNotify_changed, ett_x11_rectangle, changed_bits, byte_order);
26959 }
26960 *offsetp += 2;
26961 proto_tree_add_item(t, hf_x11_xkb_StateNotify_keycode, tvb, *offsetp, 1, byte_order);
26962 *offsetp += 1;
26963 proto_tree_add_item(t, hf_x11_xkb_StateNotify_eventType, tvb, *offsetp, 1, byte_order);
26964 *offsetp += 1;
26965 proto_tree_add_item(t, hf_x11_xkb_StateNotify_requestMajor, tvb, *offsetp, 1, byte_order);
26966 *offsetp += 1;
26967 proto_tree_add_item(t, hf_x11_xkb_StateNotify_requestMinor, tvb, *offsetp, 1, byte_order);
26968 *offsetp += 1;
26969}
26970
26971
26972static void xkbControlsNotify(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order)
26973{
26974 proto_tree_add_item(t, hf_x11_xkb_ControlsNotify_xkbType, tvb, *offsetp, 1, byte_order);
26975 *offsetp += 1;
26976 CARD16(event_sequencenumber);
26977 proto_tree_add_item(t, hf_x11_xkb_ControlsNotify_time, tvb, *offsetp, 4, byte_order);
26978 *offsetp += 4;
26979 proto_tree_add_item(t, hf_x11_xkb_ControlsNotify_deviceID, tvb, *offsetp, 1, byte_order);
26980 *offsetp += 1;
26981 proto_tree_add_item(t, hf_x11_xkb_ControlsNotify_numGroups, tvb, *offsetp, 1, byte_order);
26982 *offsetp += 1;
26983 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 2, ENC_NA);
26984 *offsetp += 2;
26985 {
26986 static int* const changedControls_bits [] = {
26987 &hf_x11_xkb_ControlsNotify_changedControls_mask_GroupsWrap,
26988 &hf_x11_xkb_ControlsNotify_changedControls_mask_InternalMods,
26989 &hf_x11_xkb_ControlsNotify_changedControls_mask_IgnoreLockMods,
26990 &hf_x11_xkb_ControlsNotify_changedControls_mask_PerKeyRepeat,
26991 &hf_x11_xkb_ControlsNotify_changedControls_mask_ControlsEnabled,
26992 NULL
26993 };
26994 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xkb_ControlsNotify_changedControls, ett_x11_rectangle, changedControls_bits, byte_order);
26995 }
26996 *offsetp += 4;
26997 {
26998 static int* const enabledControls_bits [] = {
26999 &hf_x11_xkb_ControlsNotify_enabledControls_mask_RepeatKeys,
27000 &hf_x11_xkb_ControlsNotify_enabledControls_mask_SlowKeys,
27001 &hf_x11_xkb_ControlsNotify_enabledControls_mask_BounceKeys,
27002 &hf_x11_xkb_ControlsNotify_enabledControls_mask_StickyKeys,
27003 &hf_x11_xkb_ControlsNotify_enabledControls_mask_MouseKeys,
27004 &hf_x11_xkb_ControlsNotify_enabledControls_mask_MouseKeysAccel,
27005 &hf_x11_xkb_ControlsNotify_enabledControls_mask_AccessXKeys,
27006 &hf_x11_xkb_ControlsNotify_enabledControls_mask_AccessXTimeoutMask,
27007 &hf_x11_xkb_ControlsNotify_enabledControls_mask_AccessXFeedbackMask,
27008 &hf_x11_xkb_ControlsNotify_enabledControls_mask_AudibleBellMask,
27009 &hf_x11_xkb_ControlsNotify_enabledControls_mask_Overlay1Mask,
27010 &hf_x11_xkb_ControlsNotify_enabledControls_mask_Overlay2Mask,
27011 &hf_x11_xkb_ControlsNotify_enabledControls_mask_IgnoreGroupLockMask,
27012 NULL
27013 };
27014 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xkb_ControlsNotify_enabledControls, ett_x11_rectangle, enabledControls_bits, byte_order);
27015 }
27016 *offsetp += 4;
27017 {
27018 static int* const enabledControlChanges_bits [] = {
27019 &hf_x11_xkb_ControlsNotify_enabledControlChanges_mask_RepeatKeys,
27020 &hf_x11_xkb_ControlsNotify_enabledControlChanges_mask_SlowKeys,
27021 &hf_x11_xkb_ControlsNotify_enabledControlChanges_mask_BounceKeys,
27022 &hf_x11_xkb_ControlsNotify_enabledControlChanges_mask_StickyKeys,
27023 &hf_x11_xkb_ControlsNotify_enabledControlChanges_mask_MouseKeys,
27024 &hf_x11_xkb_ControlsNotify_enabledControlChanges_mask_MouseKeysAccel,
27025 &hf_x11_xkb_ControlsNotify_enabledControlChanges_mask_AccessXKeys,
27026 &hf_x11_xkb_ControlsNotify_enabledControlChanges_mask_AccessXTimeoutMask,
27027 &hf_x11_xkb_ControlsNotify_enabledControlChanges_mask_AccessXFeedbackMask,
27028 &hf_x11_xkb_ControlsNotify_enabledControlChanges_mask_AudibleBellMask,
27029 &hf_x11_xkb_ControlsNotify_enabledControlChanges_mask_Overlay1Mask,
27030 &hf_x11_xkb_ControlsNotify_enabledControlChanges_mask_Overlay2Mask,
27031 &hf_x11_xkb_ControlsNotify_enabledControlChanges_mask_IgnoreGroupLockMask,
27032 NULL
27033 };
27034 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xkb_ControlsNotify_enabledControlChanges, ett_x11_rectangle, enabledControlChanges_bits, byte_order);
27035 }
27036 *offsetp += 4;
27037 proto_tree_add_item(t, hf_x11_xkb_ControlsNotify_keycode, tvb, *offsetp, 1, byte_order);
27038 *offsetp += 1;
27039 proto_tree_add_item(t, hf_x11_xkb_ControlsNotify_eventType, tvb, *offsetp, 1, byte_order);
27040 *offsetp += 1;
27041 proto_tree_add_item(t, hf_x11_xkb_ControlsNotify_requestMajor, tvb, *offsetp, 1, byte_order);
27042 *offsetp += 1;
27043 proto_tree_add_item(t, hf_x11_xkb_ControlsNotify_requestMinor, tvb, *offsetp, 1, byte_order);
27044 *offsetp += 1;
27045 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 4, ENC_NA);
27046 *offsetp += 4;
27047}
27048
27049
27050static void xkbIndicatorStateNotify(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order)
27051{
27052 proto_tree_add_item(t, hf_x11_xkb_IndicatorStateNotify_xkbType, tvb, *offsetp, 1, byte_order);
27053 *offsetp += 1;
27054 CARD16(event_sequencenumber);
27055 proto_tree_add_item(t, hf_x11_xkb_IndicatorStateNotify_time, tvb, *offsetp, 4, byte_order);
27056 *offsetp += 4;
27057 proto_tree_add_item(t, hf_x11_xkb_IndicatorStateNotify_deviceID, tvb, *offsetp, 1, byte_order);
27058 *offsetp += 1;
27059 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 3, ENC_NA);
27060 *offsetp += 3;
27061 proto_tree_add_item(t, hf_x11_xkb_IndicatorStateNotify_state, tvb, *offsetp, 4, byte_order);
27062 *offsetp += 4;
27063 proto_tree_add_item(t, hf_x11_xkb_IndicatorStateNotify_stateChanged, tvb, *offsetp, 4, byte_order);
27064 *offsetp += 4;
27065 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 12, ENC_NA);
27066 *offsetp += 12;
27067}
27068
27069
27070static void xkbIndicatorMapNotify(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order)
27071{
27072 proto_tree_add_item(t, hf_x11_xkb_IndicatorMapNotify_xkbType, tvb, *offsetp, 1, byte_order);
27073 *offsetp += 1;
27074 CARD16(event_sequencenumber);
27075 proto_tree_add_item(t, hf_x11_xkb_IndicatorMapNotify_time, tvb, *offsetp, 4, byte_order);
27076 *offsetp += 4;
27077 proto_tree_add_item(t, hf_x11_xkb_IndicatorMapNotify_deviceID, tvb, *offsetp, 1, byte_order);
27078 *offsetp += 1;
27079 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 3, ENC_NA);
27080 *offsetp += 3;
27081 proto_tree_add_item(t, hf_x11_xkb_IndicatorMapNotify_state, tvb, *offsetp, 4, byte_order);
27082 *offsetp += 4;
27083 proto_tree_add_item(t, hf_x11_xkb_IndicatorMapNotify_mapChanged, tvb, *offsetp, 4, byte_order);
27084 *offsetp += 4;
27085 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 12, ENC_NA);
27086 *offsetp += 12;
27087}
27088
27089
27090static void xkbNamesNotify(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order)
27091{
27092 proto_tree_add_item(t, hf_x11_xkb_NamesNotify_xkbType, tvb, *offsetp, 1, byte_order);
27093 *offsetp += 1;
27094 CARD16(event_sequencenumber);
27095 proto_tree_add_item(t, hf_x11_xkb_NamesNotify_time, tvb, *offsetp, 4, byte_order);
27096 *offsetp += 4;
27097 proto_tree_add_item(t, hf_x11_xkb_NamesNotify_deviceID, tvb, *offsetp, 1, byte_order);
27098 *offsetp += 1;
27099 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
27100 *offsetp += 1;
27101 {
27102 static int* const changed_bits [] = {
27103 &hf_x11_xkb_NamesNotify_changed_mask_Keycodes,
27104 &hf_x11_xkb_NamesNotify_changed_mask_Geometry,
27105 &hf_x11_xkb_NamesNotify_changed_mask_Symbols,
27106 &hf_x11_xkb_NamesNotify_changed_mask_PhysSymbols,
27107 &hf_x11_xkb_NamesNotify_changed_mask_Types,
27108 &hf_x11_xkb_NamesNotify_changed_mask_Compat,
27109 &hf_x11_xkb_NamesNotify_changed_mask_KeyTypeNames,
27110 &hf_x11_xkb_NamesNotify_changed_mask_KTLevelNames,
27111 &hf_x11_xkb_NamesNotify_changed_mask_IndicatorNames,
27112 &hf_x11_xkb_NamesNotify_changed_mask_KeyNames,
27113 &hf_x11_xkb_NamesNotify_changed_mask_KeyAliases,
27114 &hf_x11_xkb_NamesNotify_changed_mask_VirtualModNames,
27115 &hf_x11_xkb_NamesNotify_changed_mask_GroupNames,
27116 &hf_x11_xkb_NamesNotify_changed_mask_RGNames,
27117 NULL
27118 };
27119 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xkb_NamesNotify_changed, ett_x11_rectangle, changed_bits, byte_order);
27120 }
27121 *offsetp += 2;
27122 proto_tree_add_item(t, hf_x11_xkb_NamesNotify_firstType, tvb, *offsetp, 1, byte_order);
27123 *offsetp += 1;
27124 proto_tree_add_item(t, hf_x11_xkb_NamesNotify_nTypes, tvb, *offsetp, 1, byte_order);
27125 *offsetp += 1;
27126 proto_tree_add_item(t, hf_x11_xkb_NamesNotify_firstLevelName, tvb, *offsetp, 1, byte_order);
27127 *offsetp += 1;
27128 proto_tree_add_item(t, hf_x11_xkb_NamesNotify_nLevelNames, tvb, *offsetp, 1, byte_order);
27129 *offsetp += 1;
27130 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
27131 *offsetp += 1;
27132 proto_tree_add_item(t, hf_x11_xkb_NamesNotify_nRadioGroups, tvb, *offsetp, 1, byte_order);
27133 *offsetp += 1;
27134 proto_tree_add_item(t, hf_x11_xkb_NamesNotify_nKeyAliases, tvb, *offsetp, 1, byte_order);
27135 *offsetp += 1;
27136 {
27137 static int* const changedGroupNames_bits [] = {
27138 &hf_x11_xkb_NamesNotify_changedGroupNames_mask_Group1,
27139 &hf_x11_xkb_NamesNotify_changedGroupNames_mask_Group2,
27140 &hf_x11_xkb_NamesNotify_changedGroupNames_mask_Group3,
27141 &hf_x11_xkb_NamesNotify_changedGroupNames_mask_Group4,
27142 NULL
27143 };
27144 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xkb_NamesNotify_changedGroupNames, ett_x11_rectangle, changedGroupNames_bits, byte_order);
27145 }
27146 *offsetp += 1;
27147 {
27148 static int* const changedVirtualMods_bits [] = {
27149 &hf_x11_xkb_NamesNotify_changedVirtualMods_mask_0,
27150 &hf_x11_xkb_NamesNotify_changedVirtualMods_mask_1,
27151 &hf_x11_xkb_NamesNotify_changedVirtualMods_mask_2,
27152 &hf_x11_xkb_NamesNotify_changedVirtualMods_mask_3,
27153 &hf_x11_xkb_NamesNotify_changedVirtualMods_mask_4,
27154 &hf_x11_xkb_NamesNotify_changedVirtualMods_mask_5,
27155 &hf_x11_xkb_NamesNotify_changedVirtualMods_mask_6,
27156 &hf_x11_xkb_NamesNotify_changedVirtualMods_mask_7,
27157 &hf_x11_xkb_NamesNotify_changedVirtualMods_mask_8,
27158 &hf_x11_xkb_NamesNotify_changedVirtualMods_mask_9,
27159 &hf_x11_xkb_NamesNotify_changedVirtualMods_mask_10,
27160 &hf_x11_xkb_NamesNotify_changedVirtualMods_mask_11,
27161 &hf_x11_xkb_NamesNotify_changedVirtualMods_mask_12,
27162 &hf_x11_xkb_NamesNotify_changedVirtualMods_mask_13,
27163 &hf_x11_xkb_NamesNotify_changedVirtualMods_mask_14,
27164 &hf_x11_xkb_NamesNotify_changedVirtualMods_mask_15,
27165 NULL
27166 };
27167 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xkb_NamesNotify_changedVirtualMods, ett_x11_rectangle, changedVirtualMods_bits, byte_order);
27168 }
27169 *offsetp += 2;
27170 proto_tree_add_item(t, hf_x11_xkb_NamesNotify_firstKey, tvb, *offsetp, 1, byte_order);
27171 *offsetp += 1;
27172 proto_tree_add_item(t, hf_x11_xkb_NamesNotify_nKeys, tvb, *offsetp, 1, byte_order);
27173 *offsetp += 1;
27174 proto_tree_add_item(t, hf_x11_xkb_NamesNotify_changedIndicators, tvb, *offsetp, 4, byte_order);
27175 *offsetp += 4;
27176 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 4, ENC_NA);
27177 *offsetp += 4;
27178}
27179
27180
27181static void xkbCompatMapNotify(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order)
27182{
27183 proto_tree_add_item(t, hf_x11_xkb_CompatMapNotify_xkbType, tvb, *offsetp, 1, byte_order);
27184 *offsetp += 1;
27185 CARD16(event_sequencenumber);
27186 proto_tree_add_item(t, hf_x11_xkb_CompatMapNotify_time, tvb, *offsetp, 4, byte_order);
27187 *offsetp += 4;
27188 proto_tree_add_item(t, hf_x11_xkb_CompatMapNotify_deviceID, tvb, *offsetp, 1, byte_order);
27189 *offsetp += 1;
27190 {
27191 static int* const changedGroups_bits [] = {
27192 &hf_x11_xkb_CompatMapNotify_changedGroups_mask_Group1,
27193 &hf_x11_xkb_CompatMapNotify_changedGroups_mask_Group2,
27194 &hf_x11_xkb_CompatMapNotify_changedGroups_mask_Group3,
27195 &hf_x11_xkb_CompatMapNotify_changedGroups_mask_Group4,
27196 NULL
27197 };
27198 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xkb_CompatMapNotify_changedGroups, ett_x11_rectangle, changedGroups_bits, byte_order);
27199 }
27200 *offsetp += 1;
27201 proto_tree_add_item(t, hf_x11_xkb_CompatMapNotify_firstSI, tvb, *offsetp, 2, byte_order);
27202 *offsetp += 2;
27203 proto_tree_add_item(t, hf_x11_xkb_CompatMapNotify_nSI, tvb, *offsetp, 2, byte_order);
27204 *offsetp += 2;
27205 proto_tree_add_item(t, hf_x11_xkb_CompatMapNotify_nTotalSI, tvb, *offsetp, 2, byte_order);
27206 *offsetp += 2;
27207 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 16, ENC_NA);
27208 *offsetp += 16;
27209}
27210
27211
27212static void xkbBellNotify(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order)
27213{
27214 proto_tree_add_item(t, hf_x11_xkb_BellNotify_xkbType, tvb, *offsetp, 1, byte_order);
27215 *offsetp += 1;
27216 CARD16(event_sequencenumber);
27217 proto_tree_add_item(t, hf_x11_xkb_BellNotify_time, tvb, *offsetp, 4, byte_order);
27218 *offsetp += 4;
27219 proto_tree_add_item(t, hf_x11_xkb_BellNotify_deviceID, tvb, *offsetp, 1, byte_order);
27220 *offsetp += 1;
27221 field8(tvb, offsetp, t, hf_x11_xkb_BellNotify_bellClass, byte_order);
27222 proto_tree_add_item(t, hf_x11_xkb_BellNotify_bellID, tvb, *offsetp, 1, byte_order);
27223 *offsetp += 1;
27224 proto_tree_add_item(t, hf_x11_xkb_BellNotify_percent, tvb, *offsetp, 1, byte_order);
27225 *offsetp += 1;
27226 proto_tree_add_item(t, hf_x11_xkb_BellNotify_pitch, tvb, *offsetp, 2, byte_order);
27227 *offsetp += 2;
27228 proto_tree_add_item(t, hf_x11_xkb_BellNotify_duration, tvb, *offsetp, 2, byte_order);
27229 *offsetp += 2;
27230 proto_tree_add_item(t, hf_x11_xkb_BellNotify_name, tvb, *offsetp, 4, byte_order);
27231 *offsetp += 4;
27232 proto_tree_add_item(t, hf_x11_xkb_BellNotify_window, tvb, *offsetp, 4, byte_order);
27233 *offsetp += 4;
27234 proto_tree_add_item(t, hf_x11_xkb_BellNotify_eventOnly, tvb, *offsetp, 1, byte_order);
27235 *offsetp += 1;
27236 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 7, ENC_NA);
27237 *offsetp += 7;
27238}
27239
27240
27241static void xkbActionMessage(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order)
27242{
27243 proto_tree_add_item(t, hf_x11_xkb_ActionMessage_xkbType, tvb, *offsetp, 1, byte_order);
27244 *offsetp += 1;
27245 CARD16(event_sequencenumber);
27246 proto_tree_add_item(t, hf_x11_xkb_ActionMessage_time, tvb, *offsetp, 4, byte_order);
27247 *offsetp += 4;
27248 proto_tree_add_item(t, hf_x11_xkb_ActionMessage_deviceID, tvb, *offsetp, 1, byte_order);
27249 *offsetp += 1;
27250 proto_tree_add_item(t, hf_x11_xkb_ActionMessage_keycode, tvb, *offsetp, 1, byte_order);
27251 *offsetp += 1;
27252 proto_tree_add_item(t, hf_x11_xkb_ActionMessage_press, tvb, *offsetp, 1, byte_order);
27253 *offsetp += 1;
27254 proto_tree_add_item(t, hf_x11_xkb_ActionMessage_keyEventFollows, tvb, *offsetp, 1, byte_order);
27255 *offsetp += 1;
27256 {
27257 static int* const mods_bits [] = {
27258 &hf_x11_xkb_ActionMessage_mods_mask_Shift,
27259 &hf_x11_xkb_ActionMessage_mods_mask_Lock,
27260 &hf_x11_xkb_ActionMessage_mods_mask_Control,
27261 &hf_x11_xkb_ActionMessage_mods_mask_1,
27262 &hf_x11_xkb_ActionMessage_mods_mask_2,
27263 &hf_x11_xkb_ActionMessage_mods_mask_3,
27264 &hf_x11_xkb_ActionMessage_mods_mask_4,
27265 &hf_x11_xkb_ActionMessage_mods_mask_5,
27266 &hf_x11_xkb_ActionMessage_mods_mask_Any,
27267 NULL
27268 };
27269 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xkb_ActionMessage_mods, ett_x11_rectangle, mods_bits, byte_order);
27270 }
27271 *offsetp += 1;
27272 field8(tvb, offsetp, t, hf_x11_xkb_ActionMessage_group, byte_order);
27273 listOfByte(tvb, offsetp, t, hf_x11_xkb_ActionMessage_message, 8, byte_order);
27274 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 10, ENC_NA);
27275 *offsetp += 10;
27276}
27277
27278
27279static void xkbAccessXNotify(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order)
27280{
27281 proto_tree_add_item(t, hf_x11_xkb_AccessXNotify_xkbType, tvb, *offsetp, 1, byte_order);
27282 *offsetp += 1;
27283 CARD16(event_sequencenumber);
27284 proto_tree_add_item(t, hf_x11_xkb_AccessXNotify_time, tvb, *offsetp, 4, byte_order);
27285 *offsetp += 4;
27286 proto_tree_add_item(t, hf_x11_xkb_AccessXNotify_deviceID, tvb, *offsetp, 1, byte_order);
27287 *offsetp += 1;
27288 proto_tree_add_item(t, hf_x11_xkb_AccessXNotify_keycode, tvb, *offsetp, 1, byte_order);
27289 *offsetp += 1;
27290 {
27291 static int* const detailt_bits [] = {
27292 &hf_x11_xkb_AccessXNotify_detailt_mask_SKPress,
27293 &hf_x11_xkb_AccessXNotify_detailt_mask_SKAccept,
27294 &hf_x11_xkb_AccessXNotify_detailt_mask_SKReject,
27295 &hf_x11_xkb_AccessXNotify_detailt_mask_SKRelease,
27296 &hf_x11_xkb_AccessXNotify_detailt_mask_BKAccept,
27297 &hf_x11_xkb_AccessXNotify_detailt_mask_BKReject,
27298 &hf_x11_xkb_AccessXNotify_detailt_mask_AXKWarning,
27299 NULL
27300 };
27301 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xkb_AccessXNotify_detailt, ett_x11_rectangle, detailt_bits, byte_order);
27302 }
27303 *offsetp += 2;
27304 proto_tree_add_item(t, hf_x11_xkb_AccessXNotify_slowKeysDelay, tvb, *offsetp, 2, byte_order);
27305 *offsetp += 2;
27306 proto_tree_add_item(t, hf_x11_xkb_AccessXNotify_debounceDelay, tvb, *offsetp, 2, byte_order);
27307 *offsetp += 2;
27308 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 16, ENC_NA);
27309 *offsetp += 16;
27310}
27311
27312
27313static void xkbExtensionDeviceNotify(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order)
27314{
27315 proto_tree_add_item(t, hf_x11_xkb_ExtensionDeviceNotify_xkbType, tvb, *offsetp, 1, byte_order);
27316 *offsetp += 1;
27317 CARD16(event_sequencenumber);
27318 proto_tree_add_item(t, hf_x11_xkb_ExtensionDeviceNotify_time, tvb, *offsetp, 4, byte_order);
27319 *offsetp += 4;
27320 proto_tree_add_item(t, hf_x11_xkb_ExtensionDeviceNotify_deviceID, tvb, *offsetp, 1, byte_order);
27321 *offsetp += 1;
27322 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
27323 *offsetp += 1;
27324 {
27325 static int* const reason_bits [] = {
27326 &hf_x11_xkb_ExtensionDeviceNotify_reason_mask_Keyboards,
27327 &hf_x11_xkb_ExtensionDeviceNotify_reason_mask_ButtonActions,
27328 &hf_x11_xkb_ExtensionDeviceNotify_reason_mask_IndicatorNames,
27329 &hf_x11_xkb_ExtensionDeviceNotify_reason_mask_IndicatorMaps,
27330 &hf_x11_xkb_ExtensionDeviceNotify_reason_mask_IndicatorState,
27331 NULL
27332 };
27333 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xkb_ExtensionDeviceNotify_reason, ett_x11_rectangle, reason_bits, byte_order);
27334 }
27335 *offsetp += 2;
27336 field16(tvb, offsetp, t, hf_x11_xkb_ExtensionDeviceNotify_ledClass, byte_order);
27337 proto_tree_add_item(t, hf_x11_xkb_ExtensionDeviceNotify_ledID, tvb, *offsetp, 2, byte_order);
27338 *offsetp += 2;
27339 proto_tree_add_item(t, hf_x11_xkb_ExtensionDeviceNotify_ledsDefined, tvb, *offsetp, 4, byte_order);
27340 *offsetp += 4;
27341 proto_tree_add_item(t, hf_x11_xkb_ExtensionDeviceNotify_ledState, tvb, *offsetp, 4, byte_order);
27342 *offsetp += 4;
27343 proto_tree_add_item(t, hf_x11_xkb_ExtensionDeviceNotify_firstButton, tvb, *offsetp, 1, byte_order);
27344 *offsetp += 1;
27345 proto_tree_add_item(t, hf_x11_xkb_ExtensionDeviceNotify_nButtons, tvb, *offsetp, 1, byte_order);
27346 *offsetp += 1;
27347 {
27348 static int* const supported_bits [] = {
27349 &hf_x11_xkb_ExtensionDeviceNotify_supported_mask_Keyboards,
27350 &hf_x11_xkb_ExtensionDeviceNotify_supported_mask_ButtonActions,
27351 &hf_x11_xkb_ExtensionDeviceNotify_supported_mask_IndicatorNames,
27352 &hf_x11_xkb_ExtensionDeviceNotify_supported_mask_IndicatorMaps,
27353 &hf_x11_xkb_ExtensionDeviceNotify_supported_mask_IndicatorState,
27354 NULL
27355 };
27356 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xkb_ExtensionDeviceNotify_supported, ett_x11_rectangle, supported_bits, byte_order);
27357 }
27358 *offsetp += 2;
27359 {
27360 static int* const unsupported_bits [] = {
27361 &hf_x11_xkb_ExtensionDeviceNotify_unsupported_mask_Keyboards,
27362 &hf_x11_xkb_ExtensionDeviceNotify_unsupported_mask_ButtonActions,
27363 &hf_x11_xkb_ExtensionDeviceNotify_unsupported_mask_IndicatorNames,
27364 &hf_x11_xkb_ExtensionDeviceNotify_unsupported_mask_IndicatorMaps,
27365 &hf_x11_xkb_ExtensionDeviceNotify_unsupported_mask_IndicatorState,
27366 NULL
27367 };
27368 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_xkb_ExtensionDeviceNotify_unsupported, ett_x11_rectangle, unsupported_bits, byte_order);
27369 }
27370 *offsetp += 2;
27371 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 2, ENC_NA);
27372 *offsetp += 2;
27373}
27374
27375static const value_string xkb_extension_minor[] = {
27376 { 0, "UseExtension" },
27377 { 1, "SelectEvents" },
27378 { 3, "Bell" },
27379 { 4, "GetState" },
27380 { 5, "LatchLockState" },
27381 { 6, "GetControls" },
27382 { 7, "SetControls" },
27383 { 8, "GetMap" },
27384 { 9, "SetMap" },
27385 { 10, "GetCompatMap" },
27386 { 11, "SetCompatMap" },
27387 { 12, "GetIndicatorState" },
27388 { 13, "GetIndicatorMap" },
27389 { 14, "SetIndicatorMap" },
27390 { 15, "GetNamedIndicator" },
27391 { 16, "SetNamedIndicator" },
27392 { 17, "GetNames" },
27393 { 18, "SetNames" },
27394 { 21, "PerClientFlags" },
27395 { 22, "ListComponents" },
27396 { 23, "GetKbdByName" },
27397 { 24, "GetDeviceInfo" },
27398 { 25, "SetDeviceInfo" },
27399 { 101, "SetDebuggingFlags" },
27400 { 0, NULL }
27401};
27402static const x11_event_info xkb_events[] = {
27403 { "xkb-MapNotify", xkbMapNotify },
27404 { "xkb-StateNotify", xkbStateNotify },
27405 { "xkb-ControlsNotify", xkbControlsNotify },
27406 { "xkb-IndicatorStateNotify", xkbIndicatorStateNotify },
27407 { "xkb-IndicatorMapNotify", xkbIndicatorMapNotify },
27408 { "xkb-NamesNotify", xkbNamesNotify },
27409 { "xkb-CompatMapNotify", xkbCompatMapNotify },
27410 { "xkb-BellNotify", xkbBellNotify },
27411 { "xkb-ActionMessage", xkbActionMessage },
27412 { "xkb-AccessXNotify", xkbAccessXNotify },
27413 { "xkb-ExtensionDeviceNotify", xkbExtensionDeviceNotify },
27414 { NULL, NULL }
27415};
27416static const x11_reply_info xkb_replies[] = {
27417 { 0, xkbUseExtension_Reply },
27418 { 4, xkbGetState_Reply },
27419 { 6, xkbGetControls_Reply },
27420 { 8, xkbGetMap_Reply },
27421 { 10, xkbGetCompatMap_Reply },
27422 { 12, xkbGetIndicatorState_Reply },
27423 { 13, xkbGetIndicatorMap_Reply },
27424 { 15, xkbGetNamedIndicator_Reply },
27425 { 17, xkbGetNames_Reply },
27426 { 21, xkbPerClientFlags_Reply },
27427 { 22, xkbListComponents_Reply },
27428 { 23, xkbGetKbdByName_Reply },
27429 { 24, xkbGetDeviceInfo_Reply },
27430 { 101, xkbSetDebuggingFlags_Reply },
27431 { 0, NULL }
27432};
27433
27434static void dispatch_xkb(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
27435{
27436 int minor, length;
27437 minor = CARD8(xkb_extension_minor);
27438 length = REQUEST_LENGTH();
27439
27440 col_append_fstr(pinfo->cinfo, COL_INFO, "-%s",
27441 val_to_str(minor, xkb_extension_minor,
27442 "<Unknown opcode %d>"));
27443 switch (minor) {
27444 case 0:
27445 xkbUseExtension(tvb, pinfo, offsetp, t, byte_order, length);
27446 break;
27447 case 1:
27448 xkbSelectEvents(tvb, pinfo, offsetp, t, byte_order, length);
27449 break;
27450 case 3:
27451 xkbBell(tvb, pinfo, offsetp, t, byte_order, length);
27452 break;
27453 case 4:
27454 xkbGetState(tvb, pinfo, offsetp, t, byte_order, length);
27455 break;
27456 case 5:
27457 xkbLatchLockState(tvb, pinfo, offsetp, t, byte_order, length);
27458 break;
27459 case 6:
27460 xkbGetControls(tvb, pinfo, offsetp, t, byte_order, length);
27461 break;
27462 case 7:
27463 xkbSetControls(tvb, pinfo, offsetp, t, byte_order, length);
27464 break;
27465 case 8:
27466 xkbGetMap(tvb, pinfo, offsetp, t, byte_order, length);
27467 break;
27468 case 9:
27469 xkbSetMap(tvb, pinfo, offsetp, t, byte_order, length);
27470 break;
27471 case 10:
27472 xkbGetCompatMap(tvb, pinfo, offsetp, t, byte_order, length);
27473 break;
27474 case 11:
27475 xkbSetCompatMap(tvb, pinfo, offsetp, t, byte_order, length);
27476 break;
27477 case 12:
27478 xkbGetIndicatorState(tvb, pinfo, offsetp, t, byte_order, length);
27479 break;
27480 case 13:
27481 xkbGetIndicatorMap(tvb, pinfo, offsetp, t, byte_order, length);
27482 break;
27483 case 14:
27484 xkbSetIndicatorMap(tvb, pinfo, offsetp, t, byte_order, length);
27485 break;
27486 case 15:
27487 xkbGetNamedIndicator(tvb, pinfo, offsetp, t, byte_order, length);
27488 break;
27489 case 16:
27490 xkbSetNamedIndicator(tvb, pinfo, offsetp, t, byte_order, length);
27491 break;
27492 case 17:
27493 xkbGetNames(tvb, pinfo, offsetp, t, byte_order, length);
27494 break;
27495 case 18:
27496 xkbSetNames(tvb, pinfo, offsetp, t, byte_order, length);
27497 break;
27498 case 21:
27499 xkbPerClientFlags(tvb, pinfo, offsetp, t, byte_order, length);
27500 break;
27501 case 22:
27502 xkbListComponents(tvb, pinfo, offsetp, t, byte_order, length);
27503 break;
27504 case 23:
27505 xkbGetKbdByName(tvb, pinfo, offsetp, t, byte_order, length);
27506 break;
27507 case 24:
27508 xkbGetDeviceInfo(tvb, pinfo, offsetp, t, byte_order, length);
27509 break;
27510 case 25:
27511 xkbSetDeviceInfo(tvb, pinfo, offsetp, t, byte_order, length);
27512 break;
27513 case 101:
27514 xkbSetDebuggingFlags(tvb, pinfo, offsetp, t, byte_order, length);
27515 break;
27516 /* No need for a default case here, since Unknown is printed above,
27517 and UNDECODED() is taken care of by dissect_x11_request */
27518 }
27519}
27520
27521static void register_xkb(void)
27522{
27523 set_handler("XKEYBOARD", dispatch_xkb, xkb_errors, xkb_events, NULL, xkb_replies);
27524}
27525
27526static int struct_size_xprint_PRINTER(tvbuff_t *tvb _U_, int *offsetp _U_, unsigned byte_order _U_)
27527{
27528 int size = 0;
27529 int f_descLen;
27530 int f_nameLen;
27531 f_nameLen = tvb_get_uint32(tvb, *offsetp + size + 0, byte_order);
27532 size += f_nameLen * 1;
27533 size = (size + 3) & ~3;
27534 f_descLen = tvb_get_uint32(tvb, *offsetp + size + 4, byte_order);
27535 size += f_descLen * 1;
27536 size = (size + 3) & ~3;
27537 return size + 8;
27538}
27539
27540static void struct_xprint_PRINTER(tvbuff_t *tvb, int *offsetp, proto_tree *root, unsigned byte_order _U_, int count)
27541{
27542 int i;
27543 for (i = 0; i < count; i++) {
27544 proto_item *item;
27545 proto_tree *t;
27546 int f_nameLen;
27547 int f_descLen;
27548
27549 item = proto_tree_add_item(root, hf_x11_struct_xprint_PRINTER, tvb, *offsetp, struct_size_xprint_PRINTER(tvb, offsetp, byte_order), ENC_NA);
27550 t = proto_item_add_subtree(item, ett_x11_rectangle);
27551 f_nameLen = tvb_get_uint32(tvb, *offsetp, byte_order);
27552 proto_tree_add_item(t, hf_x11_struct_xprint_PRINTER_nameLen, tvb, *offsetp, 4, byte_order);
27553 *offsetp += 4;
27554 listOfByte(tvb, offsetp, t, hf_x11_struct_xprint_PRINTER_name, f_nameLen, byte_order);
27555 if (*offsetp % 4) {
27556 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, (4 - *offsetp % 4), ENC_NA);
27557 *offsetp += (4 - *offsetp % 4);
27558 }
27559 f_descLen = tvb_get_uint32(tvb, *offsetp, byte_order);
27560 proto_tree_add_item(t, hf_x11_struct_xprint_PRINTER_descLen, tvb, *offsetp, 4, byte_order);
27561 *offsetp += 4;
27562 listOfByte(tvb, offsetp, t, hf_x11_struct_xprint_PRINTER_description, f_descLen, byte_order);
27563 if (*offsetp % 4) {
27564 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, (4 - *offsetp % 4), ENC_NA);
27565 *offsetp += (4 - *offsetp % 4);
27566 }
27567 }
27568}
27569
27570static void xprintPrintQueryVersion(tvbuff_t *tvb _U_, packet_info *pinfo _U_, int *offsetp _U_, proto_tree *t _U_, unsigned byte_order _U_, int length _U_)
27571{
27572}
27573static void xprintPrintQueryVersion_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
27574{
27575 int sequence_number;
27576
27577 col_append_fstr(pinfo->cinfo, COL_INFO, "-PrintQueryVersion");
27578
27579 REPLY(reply);
27580 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
27581 *offsetp += 1;
27582 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
27583 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
27584 "%d (xprint-PrintQueryVersion)", sequence_number);
27585 *offsetp += 2;
27586 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
27587 *offsetp += 4;
27588 proto_tree_add_item(t, hf_x11_xprint_PrintQueryVersion_reply_major_version, tvb, *offsetp, 2, byte_order);
27589 *offsetp += 2;
27590 proto_tree_add_item(t, hf_x11_xprint_PrintQueryVersion_reply_minor_version, tvb, *offsetp, 2, byte_order);
27591 *offsetp += 2;
27592}
27593
27594static void xprintPrintGetPrinterList(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
27595{
27596 int f_printerNameLen;
27597 int f_localeLen;
27598 f_printerNameLen = tvb_get_uint32(tvb, *offsetp, byte_order);
27599 proto_tree_add_item(t, hf_x11_xprint_PrintGetPrinterList_printerNameLen, tvb, *offsetp, 4, byte_order);
27600 *offsetp += 4;
27601 f_localeLen = tvb_get_uint32(tvb, *offsetp, byte_order);
27602 proto_tree_add_item(t, hf_x11_xprint_PrintGetPrinterList_localeLen, tvb, *offsetp, 4, byte_order);
27603 *offsetp += 4;
27604 listOfByte(tvb, offsetp, t, hf_x11_xprint_PrintGetPrinterList_printer_name, f_printerNameLen, byte_order);
27605 length -= f_printerNameLen * 1;
27606 if (*offsetp % 4) {
27607 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, (4 - *offsetp % 4), ENC_NA);
27608 *offsetp += (4 - *offsetp % 4);
27609 }
27610 length = ((length + 3) & ~3);
27611 listOfByte(tvb, offsetp, t, hf_x11_xprint_PrintGetPrinterList_locale, f_localeLen, byte_order);
27612 length -= f_localeLen * 1;
27613}
27614static void xprintPrintGetPrinterList_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
27615{
27616 int sequence_number;
27617 int f_listCount;
27618
27619 col_append_fstr(pinfo->cinfo, COL_INFO, "-PrintGetPrinterList");
27620
27621 REPLY(reply);
27622 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
27623 *offsetp += 1;
27624 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
27625 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
27626 "%d (xprint-PrintGetPrinterList)", sequence_number);
27627 *offsetp += 2;
27628 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
27629 *offsetp += 4;
27630 f_listCount = tvb_get_uint32(tvb, *offsetp, byte_order);
27631 proto_tree_add_item(t, hf_x11_xprint_PrintGetPrinterList_reply_listCount, tvb, *offsetp, 4, byte_order);
27632 *offsetp += 4;
27633 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 20, ENC_NA);
27634 *offsetp += 20;
27635 struct_xprint_PRINTER(tvb, offsetp, t, byte_order, f_listCount);
27636}
27637
27638static void xprintPrintRehashPrinterList(tvbuff_t *tvb _U_, packet_info *pinfo _U_, int *offsetp _U_, proto_tree *t _U_, unsigned byte_order _U_, int length _U_)
27639{
27640}
27641
27642static void xprintCreateContext(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
27643{
27644 int f_printerNameLen;
27645 int f_localeLen;
27646 proto_tree_add_item(t, hf_x11_xprint_CreateContext_context_id, tvb, *offsetp, 4, byte_order);
27647 *offsetp += 4;
27648 f_printerNameLen = tvb_get_uint32(tvb, *offsetp, byte_order);
27649 proto_tree_add_item(t, hf_x11_xprint_CreateContext_printerNameLen, tvb, *offsetp, 4, byte_order);
27650 *offsetp += 4;
27651 f_localeLen = tvb_get_uint32(tvb, *offsetp, byte_order);
27652 proto_tree_add_item(t, hf_x11_xprint_CreateContext_localeLen, tvb, *offsetp, 4, byte_order);
27653 *offsetp += 4;
27654 listOfByte(tvb, offsetp, t, hf_x11_xprint_CreateContext_printerName, f_printerNameLen, byte_order);
27655 length -= f_printerNameLen * 1;
27656 if (*offsetp % 4) {
27657 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, (4 - *offsetp % 4), ENC_NA);
27658 *offsetp += (4 - *offsetp % 4);
27659 }
27660 length = ((length + 3) & ~3);
27661 listOfByte(tvb, offsetp, t, hf_x11_xprint_CreateContext_locale, f_localeLen, byte_order);
27662 length -= f_localeLen * 1;
27663}
27664
27665static void xprintPrintSetContext(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
27666{
27667 proto_tree_add_item(t, hf_x11_xprint_PrintSetContext_context, tvb, *offsetp, 4, byte_order);
27668 *offsetp += 4;
27669}
27670
27671static void xprintPrintGetContext(tvbuff_t *tvb _U_, packet_info *pinfo _U_, int *offsetp _U_, proto_tree *t _U_, unsigned byte_order _U_, int length _U_)
27672{
27673}
27674static void xprintPrintGetContext_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
27675{
27676 int sequence_number;
27677
27678 col_append_fstr(pinfo->cinfo, COL_INFO, "-PrintGetContext");
27679
27680 REPLY(reply);
27681 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
27682 *offsetp += 1;
27683 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
27684 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
27685 "%d (xprint-PrintGetContext)", sequence_number);
27686 *offsetp += 2;
27687 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
27688 *offsetp += 4;
27689 proto_tree_add_item(t, hf_x11_xprint_PrintGetContext_reply_context, tvb, *offsetp, 4, byte_order);
27690 *offsetp += 4;
27691}
27692
27693static void xprintPrintDestroyContext(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
27694{
27695 proto_tree_add_item(t, hf_x11_xprint_PrintDestroyContext_context, tvb, *offsetp, 4, byte_order);
27696 *offsetp += 4;
27697}
27698
27699static void xprintPrintGetScreenOfContext(tvbuff_t *tvb _U_, packet_info *pinfo _U_, int *offsetp _U_, proto_tree *t _U_, unsigned byte_order _U_, int length _U_)
27700{
27701}
27702static void xprintPrintGetScreenOfContext_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
27703{
27704 int sequence_number;
27705
27706 col_append_fstr(pinfo->cinfo, COL_INFO, "-PrintGetScreenOfContext");
27707
27708 REPLY(reply);
27709 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
27710 *offsetp += 1;
27711 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
27712 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
27713 "%d (xprint-PrintGetScreenOfContext)", sequence_number);
27714 *offsetp += 2;
27715 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
27716 *offsetp += 4;
27717 proto_tree_add_item(t, hf_x11_xprint_PrintGetScreenOfContext_reply_root, tvb, *offsetp, 4, byte_order);
27718 *offsetp += 4;
27719}
27720
27721static void xprintPrintStartJob(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
27722{
27723 proto_tree_add_item(t, hf_x11_xprint_PrintStartJob_output_mode, tvb, *offsetp, 1, byte_order);
27724 *offsetp += 1;
27725}
27726
27727static void xprintPrintEndJob(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
27728{
27729 proto_tree_add_item(t, hf_x11_xprint_PrintEndJob_cancel, tvb, *offsetp, 1, byte_order);
27730 *offsetp += 1;
27731}
27732
27733static void xprintPrintStartDoc(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
27734{
27735 proto_tree_add_item(t, hf_x11_xprint_PrintStartDoc_driver_mode, tvb, *offsetp, 1, byte_order);
27736 *offsetp += 1;
27737}
27738
27739static void xprintPrintEndDoc(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
27740{
27741 proto_tree_add_item(t, hf_x11_xprint_PrintEndDoc_cancel, tvb, *offsetp, 1, byte_order);
27742 *offsetp += 1;
27743}
27744
27745static void xprintPrintPutDocumentData(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
27746{
27747 int f_len_data;
27748 int f_len_fmt;
27749 int f_len_options;
27750 proto_tree_add_item(t, hf_x11_xprint_PrintPutDocumentData_drawable, tvb, *offsetp, 4, byte_order);
27751 *offsetp += 4;
27752 f_len_data = tvb_get_uint32(tvb, *offsetp, byte_order);
27753 proto_tree_add_item(t, hf_x11_xprint_PrintPutDocumentData_len_data, tvb, *offsetp, 4, byte_order);
27754 *offsetp += 4;
27755 f_len_fmt = tvb_get_uint16(tvb, *offsetp, byte_order);
27756 proto_tree_add_item(t, hf_x11_xprint_PrintPutDocumentData_len_fmt, tvb, *offsetp, 2, byte_order);
27757 *offsetp += 2;
27758 f_len_options = tvb_get_uint16(tvb, *offsetp, byte_order);
27759 proto_tree_add_item(t, hf_x11_xprint_PrintPutDocumentData_len_options, tvb, *offsetp, 2, byte_order);
27760 *offsetp += 2;
27761 listOfByte(tvb, offsetp, t, hf_x11_xprint_PrintPutDocumentData_data, f_len_data, byte_order);
27762 length -= f_len_data * 1;
27763 if (*offsetp % 4) {
27764 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, (4 - *offsetp % 4), ENC_NA);
27765 *offsetp += (4 - *offsetp % 4);
27766 }
27767 length = ((length + 3) & ~3);
27768 listOfByte(tvb, offsetp, t, hf_x11_xprint_PrintPutDocumentData_doc_format, f_len_fmt, byte_order);
27769 length -= f_len_fmt * 1;
27770 if (*offsetp % 4) {
27771 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, (4 - *offsetp % 4), ENC_NA);
27772 *offsetp += (4 - *offsetp % 4);
27773 }
27774 length = ((length + 3) & ~3);
27775 listOfByte(tvb, offsetp, t, hf_x11_xprint_PrintPutDocumentData_options, f_len_options, byte_order);
27776 length -= f_len_options * 1;
27777}
27778
27779static void xprintPrintGetDocumentData(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
27780{
27781 proto_tree_add_item(t, hf_x11_xprint_PrintGetDocumentData_context, tvb, *offsetp, 4, byte_order);
27782 *offsetp += 4;
27783 proto_tree_add_item(t, hf_x11_xprint_PrintGetDocumentData_max_bytes, tvb, *offsetp, 4, byte_order);
27784 *offsetp += 4;
27785}
27786static void xprintPrintGetDocumentData_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
27787{
27788 int sequence_number;
27789 int f_dataLen;
27790
27791 col_append_fstr(pinfo->cinfo, COL_INFO, "-PrintGetDocumentData");
27792
27793 REPLY(reply);
27794 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
27795 *offsetp += 1;
27796 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
27797 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
27798 "%d (xprint-PrintGetDocumentData)", sequence_number);
27799 *offsetp += 2;
27800 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
27801 *offsetp += 4;
27802 proto_tree_add_item(t, hf_x11_xprint_PrintGetDocumentData_reply_status_code, tvb, *offsetp, 4, byte_order);
27803 *offsetp += 4;
27804 proto_tree_add_item(t, hf_x11_xprint_PrintGetDocumentData_reply_finished_flag, tvb, *offsetp, 4, byte_order);
27805 *offsetp += 4;
27806 f_dataLen = tvb_get_uint32(tvb, *offsetp, byte_order);
27807 proto_tree_add_item(t, hf_x11_xprint_PrintGetDocumentData_reply_dataLen, tvb, *offsetp, 4, byte_order);
27808 *offsetp += 4;
27809 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 12, ENC_NA);
27810 *offsetp += 12;
27811 listOfByte(tvb, offsetp, t, hf_x11_xprint_PrintGetDocumentData_reply_data, f_dataLen, byte_order);
27812}
27813
27814static void xprintPrintStartPage(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
27815{
27816 proto_tree_add_item(t, hf_x11_xprint_PrintStartPage_window, tvb, *offsetp, 4, byte_order);
27817 *offsetp += 4;
27818}
27819
27820static void xprintPrintEndPage(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
27821{
27822 proto_tree_add_item(t, hf_x11_xprint_PrintEndPage_cancel, tvb, *offsetp, 1, byte_order);
27823 *offsetp += 1;
27824 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 3, ENC_NA);
27825 *offsetp += 3;
27826}
27827
27828static void xprintPrintSelectInput(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
27829{
27830 proto_tree_add_item(t, hf_x11_xprint_PrintSelectInput_context, tvb, *offsetp, 4, byte_order);
27831 *offsetp += 4;
27832 proto_tree_add_item(t, hf_x11_xprint_PrintSelectInput_event_mask, tvb, *offsetp, 4, byte_order);
27833 *offsetp += 4;
27834}
27835
27836static void xprintPrintInputSelected(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
27837{
27838 proto_tree_add_item(t, hf_x11_xprint_PrintInputSelected_context, tvb, *offsetp, 4, byte_order);
27839 *offsetp += 4;
27840}
27841static void xprintPrintInputSelected_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
27842{
27843 int sequence_number;
27844
27845 col_append_fstr(pinfo->cinfo, COL_INFO, "-PrintInputSelected");
27846
27847 REPLY(reply);
27848 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
27849 *offsetp += 1;
27850 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
27851 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
27852 "%d (xprint-PrintInputSelected)", sequence_number);
27853 *offsetp += 2;
27854 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
27855 *offsetp += 4;
27856 proto_tree_add_item(t, hf_x11_xprint_PrintInputSelected_reply_event_mask, tvb, *offsetp, 4, byte_order);
27857 *offsetp += 4;
27858 proto_tree_add_item(t, hf_x11_xprint_PrintInputSelected_reply_all_events_mask, tvb, *offsetp, 4, byte_order);
27859 *offsetp += 4;
27860}
27861
27862static void xprintPrintGetAttributes(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
27863{
27864 proto_tree_add_item(t, hf_x11_xprint_PrintGetAttributes_context, tvb, *offsetp, 4, byte_order);
27865 *offsetp += 4;
27866 proto_tree_add_item(t, hf_x11_xprint_PrintGetAttributes_pool, tvb, *offsetp, 1, byte_order);
27867 *offsetp += 1;
27868 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 3, ENC_NA);
27869 *offsetp += 3;
27870}
27871static void xprintPrintGetAttributes_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
27872{
27873 int sequence_number;
27874 int f_stringLen;
27875
27876 col_append_fstr(pinfo->cinfo, COL_INFO, "-PrintGetAttributes");
27877
27878 REPLY(reply);
27879 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
27880 *offsetp += 1;
27881 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
27882 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
27883 "%d (xprint-PrintGetAttributes)", sequence_number);
27884 *offsetp += 2;
27885 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
27886 *offsetp += 4;
27887 f_stringLen = tvb_get_uint32(tvb, *offsetp, byte_order);
27888 proto_tree_add_item(t, hf_x11_xprint_PrintGetAttributes_reply_stringLen, tvb, *offsetp, 4, byte_order);
27889 *offsetp += 4;
27890 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 20, ENC_NA);
27891 *offsetp += 20;
27892 listOfByte(tvb, offsetp, t, hf_x11_xprint_PrintGetAttributes_reply_attributes, f_stringLen, byte_order);
27893}
27894
27895static void xprintPrintGetOneAttributes(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
27896{
27897 int f_nameLen;
27898 proto_tree_add_item(t, hf_x11_xprint_PrintGetOneAttributes_context, tvb, *offsetp, 4, byte_order);
27899 *offsetp += 4;
27900 f_nameLen = tvb_get_uint32(tvb, *offsetp, byte_order);
27901 proto_tree_add_item(t, hf_x11_xprint_PrintGetOneAttributes_nameLen, tvb, *offsetp, 4, byte_order);
27902 *offsetp += 4;
27903 proto_tree_add_item(t, hf_x11_xprint_PrintGetOneAttributes_pool, tvb, *offsetp, 1, byte_order);
27904 *offsetp += 1;
27905 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 3, ENC_NA);
27906 *offsetp += 3;
27907 listOfByte(tvb, offsetp, t, hf_x11_xprint_PrintGetOneAttributes_name, f_nameLen, byte_order);
27908 length -= f_nameLen * 1;
27909}
27910static void xprintPrintGetOneAttributes_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
27911{
27912 int sequence_number;
27913 int f_valueLen;
27914
27915 col_append_fstr(pinfo->cinfo, COL_INFO, "-PrintGetOneAttributes");
27916
27917 REPLY(reply);
27918 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
27919 *offsetp += 1;
27920 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
27921 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
27922 "%d (xprint-PrintGetOneAttributes)", sequence_number);
27923 *offsetp += 2;
27924 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
27925 *offsetp += 4;
27926 f_valueLen = tvb_get_uint32(tvb, *offsetp, byte_order);
27927 proto_tree_add_item(t, hf_x11_xprint_PrintGetOneAttributes_reply_valueLen, tvb, *offsetp, 4, byte_order);
27928 *offsetp += 4;
27929 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 20, ENC_NA);
27930 *offsetp += 20;
27931 listOfByte(tvb, offsetp, t, hf_x11_xprint_PrintGetOneAttributes_reply_value, f_valueLen, byte_order);
27932}
27933
27934static void xprintPrintSetAttributes(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
27935{
27936 proto_tree_add_item(t, hf_x11_xprint_PrintSetAttributes_context, tvb, *offsetp, 4, byte_order);
27937 *offsetp += 4;
27938 proto_tree_add_item(t, hf_x11_xprint_PrintSetAttributes_stringLen, tvb, *offsetp, 4, byte_order);
27939 *offsetp += 4;
27940 proto_tree_add_item(t, hf_x11_xprint_PrintSetAttributes_pool, tvb, *offsetp, 1, byte_order);
27941 *offsetp += 1;
27942 proto_tree_add_item(t, hf_x11_xprint_PrintSetAttributes_rule, tvb, *offsetp, 1, byte_order);
27943 *offsetp += 1;
27944 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 2, ENC_NA);
27945 *offsetp += 2;
27946 listOfByte(tvb, offsetp, t, hf_x11_xprint_PrintSetAttributes_attributes, (length - 16) / 1, byte_order);
27947}
27948
27949static void xprintPrintGetPageDimensions(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
27950{
27951 proto_tree_add_item(t, hf_x11_xprint_PrintGetPageDimensions_context, tvb, *offsetp, 4, byte_order);
27952 *offsetp += 4;
27953}
27954static void xprintPrintGetPageDimensions_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
27955{
27956 int sequence_number;
27957
27958 col_append_fstr(pinfo->cinfo, COL_INFO, "-PrintGetPageDimensions");
27959
27960 REPLY(reply);
27961 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
27962 *offsetp += 1;
27963 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
27964 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
27965 "%d (xprint-PrintGetPageDimensions)", sequence_number);
27966 *offsetp += 2;
27967 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
27968 *offsetp += 4;
27969 proto_tree_add_item(t, hf_x11_xprint_PrintGetPageDimensions_reply_width, tvb, *offsetp, 2, byte_order);
27970 *offsetp += 2;
27971 proto_tree_add_item(t, hf_x11_xprint_PrintGetPageDimensions_reply_height, tvb, *offsetp, 2, byte_order);
27972 *offsetp += 2;
27973 proto_tree_add_item(t, hf_x11_xprint_PrintGetPageDimensions_reply_offset_x, tvb, *offsetp, 2, byte_order);
27974 *offsetp += 2;
27975 proto_tree_add_item(t, hf_x11_xprint_PrintGetPageDimensions_reply_offset_y, tvb, *offsetp, 2, byte_order);
27976 *offsetp += 2;
27977 proto_tree_add_item(t, hf_x11_xprint_PrintGetPageDimensions_reply_reproducible_width, tvb, *offsetp, 2, byte_order);
27978 *offsetp += 2;
27979 proto_tree_add_item(t, hf_x11_xprint_PrintGetPageDimensions_reply_reproducible_height, tvb, *offsetp, 2, byte_order);
27980 *offsetp += 2;
27981}
27982
27983static void xprintPrintQueryScreens(tvbuff_t *tvb _U_, packet_info *pinfo _U_, int *offsetp _U_, proto_tree *t _U_, unsigned byte_order _U_, int length _U_)
27984{
27985}
27986static void xprintPrintQueryScreens_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
27987{
27988 int sequence_number;
27989 int f_listCount;
27990
27991 col_append_fstr(pinfo->cinfo, COL_INFO, "-PrintQueryScreens");
27992
27993 REPLY(reply);
27994 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
27995 *offsetp += 1;
27996 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
27997 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
27998 "%d (xprint-PrintQueryScreens)", sequence_number);
27999 *offsetp += 2;
28000 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
28001 *offsetp += 4;
28002 f_listCount = tvb_get_uint32(tvb, *offsetp, byte_order);
28003 proto_tree_add_item(t, hf_x11_xprint_PrintQueryScreens_reply_listCount, tvb, *offsetp, 4, byte_order);
28004 *offsetp += 4;
28005 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 20, ENC_NA);
28006 *offsetp += 20;
28007 listOfCard32(tvb, offsetp, t, hf_x11_xprint_PrintQueryScreens_reply_roots, hf_x11_xprint_PrintQueryScreens_reply_roots_item, f_listCount, byte_order);
28008}
28009
28010static void xprintPrintSetImageResolution(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
28011{
28012 proto_tree_add_item(t, hf_x11_xprint_PrintSetImageResolution_context, tvb, *offsetp, 4, byte_order);
28013 *offsetp += 4;
28014 proto_tree_add_item(t, hf_x11_xprint_PrintSetImageResolution_image_resolution, tvb, *offsetp, 2, byte_order);
28015 *offsetp += 2;
28016}
28017static void xprintPrintSetImageResolution_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
28018{
28019 int sequence_number;
28020
28021 col_append_fstr(pinfo->cinfo, COL_INFO, "-PrintSetImageResolution");
28022
28023 REPLY(reply);
28024 proto_tree_add_item(t, hf_x11_xprint_PrintSetImageResolution_reply_status, tvb, *offsetp, 1, byte_order);
28025 *offsetp += 1;
28026 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
28027 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
28028 "%d (xprint-PrintSetImageResolution)", sequence_number);
28029 *offsetp += 2;
28030 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
28031 *offsetp += 4;
28032 proto_tree_add_item(t, hf_x11_xprint_PrintSetImageResolution_reply_previous_resolutions, tvb, *offsetp, 2, byte_order);
28033 *offsetp += 2;
28034}
28035
28036static void xprintPrintGetImageResolution(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
28037{
28038 proto_tree_add_item(t, hf_x11_xprint_PrintGetImageResolution_context, tvb, *offsetp, 4, byte_order);
28039 *offsetp += 4;
28040}
28041static void xprintPrintGetImageResolution_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
28042{
28043 int sequence_number;
28044
28045 col_append_fstr(pinfo->cinfo, COL_INFO, "-PrintGetImageResolution");
28046
28047 REPLY(reply);
28048 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
28049 *offsetp += 1;
28050 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
28051 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
28052 "%d (xprint-PrintGetImageResolution)", sequence_number);
28053 *offsetp += 2;
28054 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
28055 *offsetp += 4;
28056 proto_tree_add_item(t, hf_x11_xprint_PrintGetImageResolution_reply_image_resolution, tvb, *offsetp, 2, byte_order);
28057 *offsetp += 2;
28058}
28059
28060static void xprintAttributNotify(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order)
28061{
28062 proto_tree_add_item(t, hf_x11_xprint_AttributNotify_detail, tvb, *offsetp, 1, byte_order);
28063 *offsetp += 1;
28064 CARD16(event_sequencenumber);
28065 proto_tree_add_item(t, hf_x11_xprint_AttributNotify_context, tvb, *offsetp, 4, byte_order);
28066 *offsetp += 4;
28067}
28068
28069static const value_string xprint_extension_minor[] = {
28070 { 0, "PrintQueryVersion" },
28071 { 1, "PrintGetPrinterList" },
28072 { 2, "CreateContext" },
28073 { 3, "PrintSetContext" },
28074 { 4, "PrintGetContext" },
28075 { 5, "PrintDestroyContext" },
28076 { 6, "PrintGetScreenOfContext" },
28077 { 7, "PrintStartJob" },
28078 { 8, "PrintEndJob" },
28079 { 9, "PrintStartDoc" },
28080 { 10, "PrintEndDoc" },
28081 { 11, "PrintPutDocumentData" },
28082 { 12, "PrintGetDocumentData" },
28083 { 13, "PrintStartPage" },
28084 { 14, "PrintEndPage" },
28085 { 15, "PrintSelectInput" },
28086 { 16, "PrintInputSelected" },
28087 { 17, "PrintGetAttributes" },
28088 { 18, "PrintSetAttributes" },
28089 { 19, "PrintGetOneAttributes" },
28090 { 20, "PrintRehashPrinterList" },
28091 { 21, "PrintGetPageDimensions" },
28092 { 22, "PrintQueryScreens" },
28093 { 23, "PrintSetImageResolution" },
28094 { 24, "PrintGetImageResolution" },
28095 { 0, NULL }
28096};
28097static const x11_event_info xprint_events[] = {
28098 { "xprint-AttributNotify", xprintAttributNotify },
28099 { NULL, NULL }
28100};
28101static const x11_reply_info xprint_replies[] = {
28102 { 0, xprintPrintQueryVersion_Reply },
28103 { 1, xprintPrintGetPrinterList_Reply },
28104 { 4, xprintPrintGetContext_Reply },
28105 { 6, xprintPrintGetScreenOfContext_Reply },
28106 { 12, xprintPrintGetDocumentData_Reply },
28107 { 16, xprintPrintInputSelected_Reply },
28108 { 17, xprintPrintGetAttributes_Reply },
28109 { 19, xprintPrintGetOneAttributes_Reply },
28110 { 21, xprintPrintGetPageDimensions_Reply },
28111 { 22, xprintPrintQueryScreens_Reply },
28112 { 23, xprintPrintSetImageResolution_Reply },
28113 { 24, xprintPrintGetImageResolution_Reply },
28114 { 0, NULL }
28115};
28116
28117static void dispatch_xprint(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
28118{
28119 int minor, length;
28120 minor = CARD8(xprint_extension_minor);
28121 length = REQUEST_LENGTH();
28122
28123 col_append_fstr(pinfo->cinfo, COL_INFO, "-%s",
28124 val_to_str(minor, xprint_extension_minor,
28125 "<Unknown opcode %d>"));
28126 switch (minor) {
28127 case 0:
28128 xprintPrintQueryVersion(tvb, pinfo, offsetp, t, byte_order, length);
28129 break;
28130 case 1:
28131 xprintPrintGetPrinterList(tvb, pinfo, offsetp, t, byte_order, length);
28132 break;
28133 case 2:
28134 xprintCreateContext(tvb, pinfo, offsetp, t, byte_order, length);
28135 break;
28136 case 3:
28137 xprintPrintSetContext(tvb, pinfo, offsetp, t, byte_order, length);
28138 break;
28139 case 4:
28140 xprintPrintGetContext(tvb, pinfo, offsetp, t, byte_order, length);
28141 break;
28142 case 5:
28143 xprintPrintDestroyContext(tvb, pinfo, offsetp, t, byte_order, length);
28144 break;
28145 case 6:
28146 xprintPrintGetScreenOfContext(tvb, pinfo, offsetp, t, byte_order, length);
28147 break;
28148 case 7:
28149 xprintPrintStartJob(tvb, pinfo, offsetp, t, byte_order, length);
28150 break;
28151 case 8:
28152 xprintPrintEndJob(tvb, pinfo, offsetp, t, byte_order, length);
28153 break;
28154 case 9:
28155 xprintPrintStartDoc(tvb, pinfo, offsetp, t, byte_order, length);
28156 break;
28157 case 10:
28158 xprintPrintEndDoc(tvb, pinfo, offsetp, t, byte_order, length);
28159 break;
28160 case 11:
28161 xprintPrintPutDocumentData(tvb, pinfo, offsetp, t, byte_order, length);
28162 break;
28163 case 12:
28164 xprintPrintGetDocumentData(tvb, pinfo, offsetp, t, byte_order, length);
28165 break;
28166 case 13:
28167 xprintPrintStartPage(tvb, pinfo, offsetp, t, byte_order, length);
28168 break;
28169 case 14:
28170 xprintPrintEndPage(tvb, pinfo, offsetp, t, byte_order, length);
28171 break;
28172 case 15:
28173 xprintPrintSelectInput(tvb, pinfo, offsetp, t, byte_order, length);
28174 break;
28175 case 16:
28176 xprintPrintInputSelected(tvb, pinfo, offsetp, t, byte_order, length);
28177 break;
28178 case 17:
28179 xprintPrintGetAttributes(tvb, pinfo, offsetp, t, byte_order, length);
28180 break;
28181 case 18:
28182 xprintPrintSetAttributes(tvb, pinfo, offsetp, t, byte_order, length);
28183 break;
28184 case 19:
28185 xprintPrintGetOneAttributes(tvb, pinfo, offsetp, t, byte_order, length);
28186 break;
28187 case 20:
28188 xprintPrintRehashPrinterList(tvb, pinfo, offsetp, t, byte_order, length);
28189 break;
28190 case 21:
28191 xprintPrintGetPageDimensions(tvb, pinfo, offsetp, t, byte_order, length);
28192 break;
28193 case 22:
28194 xprintPrintQueryScreens(tvb, pinfo, offsetp, t, byte_order, length);
28195 break;
28196 case 23:
28197 xprintPrintSetImageResolution(tvb, pinfo, offsetp, t, byte_order, length);
28198 break;
28199 case 24:
28200 xprintPrintGetImageResolution(tvb, pinfo, offsetp, t, byte_order, length);
28201 break;
28202 /* No need for a default case here, since Unknown is printed above,
28203 and UNDECODED() is taken care of by dissect_x11_request */
28204 }
28205}
28206
28207static void register_xprint(void)
28208{
28209 set_handler("XpExtension", dispatch_xprint, xprint_errors, xprint_events, NULL, xprint_replies);
28210}
28211
28212static void xselinuxQueryVersion(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
28213{
28214 proto_tree_add_item(t, hf_x11_xselinux_QueryVersion_client_major, tvb, *offsetp, 1, byte_order);
28215 *offsetp += 1;
28216 proto_tree_add_item(t, hf_x11_xselinux_QueryVersion_client_minor, tvb, *offsetp, 1, byte_order);
28217 *offsetp += 1;
28218}
28219static void xselinuxQueryVersion_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
28220{
28221 int sequence_number;
28222
28223 col_append_fstr(pinfo->cinfo, COL_INFO, "-QueryVersion");
28224
28225 REPLY(reply);
28226 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
28227 *offsetp += 1;
28228 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
28229 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
28230 "%d (xselinux-QueryVersion)", sequence_number);
28231 *offsetp += 2;
28232 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
28233 *offsetp += 4;
28234 proto_tree_add_item(t, hf_x11_xselinux_QueryVersion_reply_server_major, tvb, *offsetp, 2, byte_order);
28235 *offsetp += 2;
28236 proto_tree_add_item(t, hf_x11_xselinux_QueryVersion_reply_server_minor, tvb, *offsetp, 2, byte_order);
28237 *offsetp += 2;
28238}
28239
28240static void xselinuxSetDeviceCreateContext(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
28241{
28242 int f_context_len;
28243 f_context_len = tvb_get_uint32(tvb, *offsetp, byte_order);
28244 proto_tree_add_item(t, hf_x11_xselinux_SetDeviceCreateContext_context_len, tvb, *offsetp, 4, byte_order);
28245 *offsetp += 4;
28246 listOfByte(tvb, offsetp, t, hf_x11_xselinux_SetDeviceCreateContext_context, f_context_len, byte_order);
28247 length -= f_context_len * 1;
28248}
28249
28250static void xselinuxGetDeviceCreateContext(tvbuff_t *tvb _U_, packet_info *pinfo _U_, int *offsetp _U_, proto_tree *t _U_, unsigned byte_order _U_, int length _U_)
28251{
28252}
28253static void xselinuxGetDeviceCreateContext_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
28254{
28255 int sequence_number;
28256 int f_context_len;
28257
28258 col_append_fstr(pinfo->cinfo, COL_INFO, "-GetDeviceCreateContext");
28259
28260 REPLY(reply);
28261 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
28262 *offsetp += 1;
28263 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
28264 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
28265 "%d (xselinux-GetDeviceCreateContext)", sequence_number);
28266 *offsetp += 2;
28267 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
28268 *offsetp += 4;
28269 f_context_len = tvb_get_uint32(tvb, *offsetp, byte_order);
28270 proto_tree_add_item(t, hf_x11_xselinux_GetDeviceCreateContext_reply_context_len, tvb, *offsetp, 4, byte_order);
28271 *offsetp += 4;
28272 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 20, ENC_NA);
28273 *offsetp += 20;
28274 listOfByte(tvb, offsetp, t, hf_x11_xselinux_GetDeviceCreateContext_reply_context, f_context_len, byte_order);
28275}
28276
28277static void xselinuxSetDeviceContext(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
28278{
28279 int f_context_len;
28280 proto_tree_add_item(t, hf_x11_xselinux_SetDeviceContext_device, tvb, *offsetp, 4, byte_order);
28281 *offsetp += 4;
28282 f_context_len = tvb_get_uint32(tvb, *offsetp, byte_order);
28283 proto_tree_add_item(t, hf_x11_xselinux_SetDeviceContext_context_len, tvb, *offsetp, 4, byte_order);
28284 *offsetp += 4;
28285 listOfByte(tvb, offsetp, t, hf_x11_xselinux_SetDeviceContext_context, f_context_len, byte_order);
28286 length -= f_context_len * 1;
28287}
28288
28289static void xselinuxGetDeviceContext(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
28290{
28291 proto_tree_add_item(t, hf_x11_xselinux_GetDeviceContext_device, tvb, *offsetp, 4, byte_order);
28292 *offsetp += 4;
28293}
28294static void xselinuxGetDeviceContext_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
28295{
28296 int sequence_number;
28297 int f_context_len;
28298
28299 col_append_fstr(pinfo->cinfo, COL_INFO, "-GetDeviceContext");
28300
28301 REPLY(reply);
28302 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
28303 *offsetp += 1;
28304 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
28305 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
28306 "%d (xselinux-GetDeviceContext)", sequence_number);
28307 *offsetp += 2;
28308 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
28309 *offsetp += 4;
28310 f_context_len = tvb_get_uint32(tvb, *offsetp, byte_order);
28311 proto_tree_add_item(t, hf_x11_xselinux_GetDeviceContext_reply_context_len, tvb, *offsetp, 4, byte_order);
28312 *offsetp += 4;
28313 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 20, ENC_NA);
28314 *offsetp += 20;
28315 listOfByte(tvb, offsetp, t, hf_x11_xselinux_GetDeviceContext_reply_context, f_context_len, byte_order);
28316}
28317
28318static void xselinuxSetWindowCreateContext(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
28319{
28320 int f_context_len;
28321 f_context_len = tvb_get_uint32(tvb, *offsetp, byte_order);
28322 proto_tree_add_item(t, hf_x11_xselinux_SetWindowCreateContext_context_len, tvb, *offsetp, 4, byte_order);
28323 *offsetp += 4;
28324 listOfByte(tvb, offsetp, t, hf_x11_xselinux_SetWindowCreateContext_context, f_context_len, byte_order);
28325 length -= f_context_len * 1;
28326}
28327
28328static void xselinuxGetWindowCreateContext(tvbuff_t *tvb _U_, packet_info *pinfo _U_, int *offsetp _U_, proto_tree *t _U_, unsigned byte_order _U_, int length _U_)
28329{
28330}
28331static void xselinuxGetWindowCreateContext_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
28332{
28333 int sequence_number;
28334 int f_context_len;
28335
28336 col_append_fstr(pinfo->cinfo, COL_INFO, "-GetWindowCreateContext");
28337
28338 REPLY(reply);
28339 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
28340 *offsetp += 1;
28341 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
28342 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
28343 "%d (xselinux-GetWindowCreateContext)", sequence_number);
28344 *offsetp += 2;
28345 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
28346 *offsetp += 4;
28347 f_context_len = tvb_get_uint32(tvb, *offsetp, byte_order);
28348 proto_tree_add_item(t, hf_x11_xselinux_GetWindowCreateContext_reply_context_len, tvb, *offsetp, 4, byte_order);
28349 *offsetp += 4;
28350 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 20, ENC_NA);
28351 *offsetp += 20;
28352 listOfByte(tvb, offsetp, t, hf_x11_xselinux_GetWindowCreateContext_reply_context, f_context_len, byte_order);
28353}
28354
28355static void xselinuxGetWindowContext(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
28356{
28357 proto_tree_add_item(t, hf_x11_xselinux_GetWindowContext_window, tvb, *offsetp, 4, byte_order);
28358 *offsetp += 4;
28359}
28360static void xselinuxGetWindowContext_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
28361{
28362 int sequence_number;
28363 int f_context_len;
28364
28365 col_append_fstr(pinfo->cinfo, COL_INFO, "-GetWindowContext");
28366
28367 REPLY(reply);
28368 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
28369 *offsetp += 1;
28370 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
28371 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
28372 "%d (xselinux-GetWindowContext)", sequence_number);
28373 *offsetp += 2;
28374 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
28375 *offsetp += 4;
28376 f_context_len = tvb_get_uint32(tvb, *offsetp, byte_order);
28377 proto_tree_add_item(t, hf_x11_xselinux_GetWindowContext_reply_context_len, tvb, *offsetp, 4, byte_order);
28378 *offsetp += 4;
28379 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 20, ENC_NA);
28380 *offsetp += 20;
28381 listOfByte(tvb, offsetp, t, hf_x11_xselinux_GetWindowContext_reply_context, f_context_len, byte_order);
28382}
28383
28384static int struct_size_xselinux_ListItem(tvbuff_t *tvb _U_, int *offsetp _U_, unsigned byte_order _U_)
28385{
28386 int size = 0;
28387 int f_data_context_len;
28388 int f_object_context_len;
28389 f_object_context_len = tvb_get_uint32(tvb, *offsetp + size + 4, byte_order);
28390 f_data_context_len = tvb_get_uint32(tvb, *offsetp + size + 8, byte_order);
28391 size += f_object_context_len * 1;
28392 size = (size + 3) & ~3;
28393 size += f_data_context_len * 1;
28394 size = (size + 3) & ~3;
28395 return size + 12;
28396}
28397
28398static void struct_xselinux_ListItem(tvbuff_t *tvb, int *offsetp, proto_tree *root, unsigned byte_order _U_, int count)
28399{
28400 int i;
28401 for (i = 0; i < count; i++) {
28402 proto_item *item;
28403 proto_tree *t;
28404 int f_object_context_len;
28405 int f_data_context_len;
28406
28407 item = proto_tree_add_item(root, hf_x11_struct_xselinux_ListItem, tvb, *offsetp, struct_size_xselinux_ListItem(tvb, offsetp, byte_order), ENC_NA);
28408 t = proto_item_add_subtree(item, ett_x11_rectangle);
28409 proto_tree_add_item(t, hf_x11_struct_xselinux_ListItem_name, tvb, *offsetp, 4, byte_order);
28410 *offsetp += 4;
28411 f_object_context_len = tvb_get_uint32(tvb, *offsetp, byte_order);
28412 proto_tree_add_item(t, hf_x11_struct_xselinux_ListItem_object_context_len, tvb, *offsetp, 4, byte_order);
28413 *offsetp += 4;
28414 f_data_context_len = tvb_get_uint32(tvb, *offsetp, byte_order);
28415 proto_tree_add_item(t, hf_x11_struct_xselinux_ListItem_data_context_len, tvb, *offsetp, 4, byte_order);
28416 *offsetp += 4;
28417 listOfByte(tvb, offsetp, t, hf_x11_struct_xselinux_ListItem_object_context, f_object_context_len, byte_order);
28418 if (*offsetp % 4) {
28419 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, (4 - *offsetp % 4), ENC_NA);
28420 *offsetp += (4 - *offsetp % 4);
28421 }
28422 listOfByte(tvb, offsetp, t, hf_x11_struct_xselinux_ListItem_data_context, f_data_context_len, byte_order);
28423 if (*offsetp % 4) {
28424 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, (4 - *offsetp % 4), ENC_NA);
28425 *offsetp += (4 - *offsetp % 4);
28426 }
28427 }
28428}
28429
28430static void xselinuxSetPropertyCreateContext(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
28431{
28432 int f_context_len;
28433 f_context_len = tvb_get_uint32(tvb, *offsetp, byte_order);
28434 proto_tree_add_item(t, hf_x11_xselinux_SetPropertyCreateContext_context_len, tvb, *offsetp, 4, byte_order);
28435 *offsetp += 4;
28436 listOfByte(tvb, offsetp, t, hf_x11_xselinux_SetPropertyCreateContext_context, f_context_len, byte_order);
28437 length -= f_context_len * 1;
28438}
28439
28440static void xselinuxGetPropertyCreateContext(tvbuff_t *tvb _U_, packet_info *pinfo _U_, int *offsetp _U_, proto_tree *t _U_, unsigned byte_order _U_, int length _U_)
28441{
28442}
28443static void xselinuxGetPropertyCreateContext_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
28444{
28445 int sequence_number;
28446 int f_context_len;
28447
28448 col_append_fstr(pinfo->cinfo, COL_INFO, "-GetPropertyCreateContext");
28449
28450 REPLY(reply);
28451 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
28452 *offsetp += 1;
28453 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
28454 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
28455 "%d (xselinux-GetPropertyCreateContext)", sequence_number);
28456 *offsetp += 2;
28457 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
28458 *offsetp += 4;
28459 f_context_len = tvb_get_uint32(tvb, *offsetp, byte_order);
28460 proto_tree_add_item(t, hf_x11_xselinux_GetPropertyCreateContext_reply_context_len, tvb, *offsetp, 4, byte_order);
28461 *offsetp += 4;
28462 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 20, ENC_NA);
28463 *offsetp += 20;
28464 listOfByte(tvb, offsetp, t, hf_x11_xselinux_GetPropertyCreateContext_reply_context, f_context_len, byte_order);
28465}
28466
28467static void xselinuxSetPropertyUseContext(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
28468{
28469 int f_context_len;
28470 f_context_len = tvb_get_uint32(tvb, *offsetp, byte_order);
28471 proto_tree_add_item(t, hf_x11_xselinux_SetPropertyUseContext_context_len, tvb, *offsetp, 4, byte_order);
28472 *offsetp += 4;
28473 listOfByte(tvb, offsetp, t, hf_x11_xselinux_SetPropertyUseContext_context, f_context_len, byte_order);
28474 length -= f_context_len * 1;
28475}
28476
28477static void xselinuxGetPropertyUseContext(tvbuff_t *tvb _U_, packet_info *pinfo _U_, int *offsetp _U_, proto_tree *t _U_, unsigned byte_order _U_, int length _U_)
28478{
28479}
28480static void xselinuxGetPropertyUseContext_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
28481{
28482 int sequence_number;
28483 int f_context_len;
28484
28485 col_append_fstr(pinfo->cinfo, COL_INFO, "-GetPropertyUseContext");
28486
28487 REPLY(reply);
28488 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
28489 *offsetp += 1;
28490 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
28491 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
28492 "%d (xselinux-GetPropertyUseContext)", sequence_number);
28493 *offsetp += 2;
28494 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
28495 *offsetp += 4;
28496 f_context_len = tvb_get_uint32(tvb, *offsetp, byte_order);
28497 proto_tree_add_item(t, hf_x11_xselinux_GetPropertyUseContext_reply_context_len, tvb, *offsetp, 4, byte_order);
28498 *offsetp += 4;
28499 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 20, ENC_NA);
28500 *offsetp += 20;
28501 listOfByte(tvb, offsetp, t, hf_x11_xselinux_GetPropertyUseContext_reply_context, f_context_len, byte_order);
28502}
28503
28504static void xselinuxGetPropertyContext(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
28505{
28506 proto_tree_add_item(t, hf_x11_xselinux_GetPropertyContext_window, tvb, *offsetp, 4, byte_order);
28507 *offsetp += 4;
28508 proto_tree_add_item(t, hf_x11_xselinux_GetPropertyContext_property, tvb, *offsetp, 4, byte_order);
28509 *offsetp += 4;
28510}
28511static void xselinuxGetPropertyContext_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
28512{
28513 int sequence_number;
28514 int f_context_len;
28515
28516 col_append_fstr(pinfo->cinfo, COL_INFO, "-GetPropertyContext");
28517
28518 REPLY(reply);
28519 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
28520 *offsetp += 1;
28521 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
28522 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
28523 "%d (xselinux-GetPropertyContext)", sequence_number);
28524 *offsetp += 2;
28525 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
28526 *offsetp += 4;
28527 f_context_len = tvb_get_uint32(tvb, *offsetp, byte_order);
28528 proto_tree_add_item(t, hf_x11_xselinux_GetPropertyContext_reply_context_len, tvb, *offsetp, 4, byte_order);
28529 *offsetp += 4;
28530 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 20, ENC_NA);
28531 *offsetp += 20;
28532 listOfByte(tvb, offsetp, t, hf_x11_xselinux_GetPropertyContext_reply_context, f_context_len, byte_order);
28533}
28534
28535static void xselinuxGetPropertyDataContext(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
28536{
28537 proto_tree_add_item(t, hf_x11_xselinux_GetPropertyDataContext_window, tvb, *offsetp, 4, byte_order);
28538 *offsetp += 4;
28539 proto_tree_add_item(t, hf_x11_xselinux_GetPropertyDataContext_property, tvb, *offsetp, 4, byte_order);
28540 *offsetp += 4;
28541}
28542static void xselinuxGetPropertyDataContext_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
28543{
28544 int sequence_number;
28545 int f_context_len;
28546
28547 col_append_fstr(pinfo->cinfo, COL_INFO, "-GetPropertyDataContext");
28548
28549 REPLY(reply);
28550 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
28551 *offsetp += 1;
28552 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
28553 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
28554 "%d (xselinux-GetPropertyDataContext)", sequence_number);
28555 *offsetp += 2;
28556 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
28557 *offsetp += 4;
28558 f_context_len = tvb_get_uint32(tvb, *offsetp, byte_order);
28559 proto_tree_add_item(t, hf_x11_xselinux_GetPropertyDataContext_reply_context_len, tvb, *offsetp, 4, byte_order);
28560 *offsetp += 4;
28561 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 20, ENC_NA);
28562 *offsetp += 20;
28563 listOfByte(tvb, offsetp, t, hf_x11_xselinux_GetPropertyDataContext_reply_context, f_context_len, byte_order);
28564}
28565
28566static void xselinuxListProperties(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
28567{
28568 proto_tree_add_item(t, hf_x11_xselinux_ListProperties_window, tvb, *offsetp, 4, byte_order);
28569 *offsetp += 4;
28570}
28571static void xselinuxListProperties_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
28572{
28573 int sequence_number;
28574 int f_properties_len;
28575
28576 col_append_fstr(pinfo->cinfo, COL_INFO, "-ListProperties");
28577
28578 REPLY(reply);
28579 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
28580 *offsetp += 1;
28581 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
28582 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
28583 "%d (xselinux-ListProperties)", sequence_number);
28584 *offsetp += 2;
28585 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
28586 *offsetp += 4;
28587 f_properties_len = tvb_get_uint32(tvb, *offsetp, byte_order);
28588 proto_tree_add_item(t, hf_x11_xselinux_ListProperties_reply_properties_len, tvb, *offsetp, 4, byte_order);
28589 *offsetp += 4;
28590 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 20, ENC_NA);
28591 *offsetp += 20;
28592 struct_xselinux_ListItem(tvb, offsetp, t, byte_order, f_properties_len);
28593}
28594
28595static void xselinuxSetSelectionCreateContext(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
28596{
28597 int f_context_len;
28598 f_context_len = tvb_get_uint32(tvb, *offsetp, byte_order);
28599 proto_tree_add_item(t, hf_x11_xselinux_SetSelectionCreateContext_context_len, tvb, *offsetp, 4, byte_order);
28600 *offsetp += 4;
28601 listOfByte(tvb, offsetp, t, hf_x11_xselinux_SetSelectionCreateContext_context, f_context_len, byte_order);
28602 length -= f_context_len * 1;
28603}
28604
28605static void xselinuxGetSelectionCreateContext(tvbuff_t *tvb _U_, packet_info *pinfo _U_, int *offsetp _U_, proto_tree *t _U_, unsigned byte_order _U_, int length _U_)
28606{
28607}
28608static void xselinuxGetSelectionCreateContext_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
28609{
28610 int sequence_number;
28611 int f_context_len;
28612
28613 col_append_fstr(pinfo->cinfo, COL_INFO, "-GetSelectionCreateContext");
28614
28615 REPLY(reply);
28616 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
28617 *offsetp += 1;
28618 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
28619 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
28620 "%d (xselinux-GetSelectionCreateContext)", sequence_number);
28621 *offsetp += 2;
28622 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
28623 *offsetp += 4;
28624 f_context_len = tvb_get_uint32(tvb, *offsetp, byte_order);
28625 proto_tree_add_item(t, hf_x11_xselinux_GetSelectionCreateContext_reply_context_len, tvb, *offsetp, 4, byte_order);
28626 *offsetp += 4;
28627 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 20, ENC_NA);
28628 *offsetp += 20;
28629 listOfByte(tvb, offsetp, t, hf_x11_xselinux_GetSelectionCreateContext_reply_context, f_context_len, byte_order);
28630}
28631
28632static void xselinuxSetSelectionUseContext(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
28633{
28634 int f_context_len;
28635 f_context_len = tvb_get_uint32(tvb, *offsetp, byte_order);
28636 proto_tree_add_item(t, hf_x11_xselinux_SetSelectionUseContext_context_len, tvb, *offsetp, 4, byte_order);
28637 *offsetp += 4;
28638 listOfByte(tvb, offsetp, t, hf_x11_xselinux_SetSelectionUseContext_context, f_context_len, byte_order);
28639 length -= f_context_len * 1;
28640}
28641
28642static void xselinuxGetSelectionUseContext(tvbuff_t *tvb _U_, packet_info *pinfo _U_, int *offsetp _U_, proto_tree *t _U_, unsigned byte_order _U_, int length _U_)
28643{
28644}
28645static void xselinuxGetSelectionUseContext_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
28646{
28647 int sequence_number;
28648 int f_context_len;
28649
28650 col_append_fstr(pinfo->cinfo, COL_INFO, "-GetSelectionUseContext");
28651
28652 REPLY(reply);
28653 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
28654 *offsetp += 1;
28655 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
28656 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
28657 "%d (xselinux-GetSelectionUseContext)", sequence_number);
28658 *offsetp += 2;
28659 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
28660 *offsetp += 4;
28661 f_context_len = tvb_get_uint32(tvb, *offsetp, byte_order);
28662 proto_tree_add_item(t, hf_x11_xselinux_GetSelectionUseContext_reply_context_len, tvb, *offsetp, 4, byte_order);
28663 *offsetp += 4;
28664 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 20, ENC_NA);
28665 *offsetp += 20;
28666 listOfByte(tvb, offsetp, t, hf_x11_xselinux_GetSelectionUseContext_reply_context, f_context_len, byte_order);
28667}
28668
28669static void xselinuxGetSelectionContext(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
28670{
28671 proto_tree_add_item(t, hf_x11_xselinux_GetSelectionContext_selection, tvb, *offsetp, 4, byte_order);
28672 *offsetp += 4;
28673}
28674static void xselinuxGetSelectionContext_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
28675{
28676 int sequence_number;
28677 int f_context_len;
28678
28679 col_append_fstr(pinfo->cinfo, COL_INFO, "-GetSelectionContext");
28680
28681 REPLY(reply);
28682 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
28683 *offsetp += 1;
28684 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
28685 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
28686 "%d (xselinux-GetSelectionContext)", sequence_number);
28687 *offsetp += 2;
28688 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
28689 *offsetp += 4;
28690 f_context_len = tvb_get_uint32(tvb, *offsetp, byte_order);
28691 proto_tree_add_item(t, hf_x11_xselinux_GetSelectionContext_reply_context_len, tvb, *offsetp, 4, byte_order);
28692 *offsetp += 4;
28693 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 20, ENC_NA);
28694 *offsetp += 20;
28695 listOfByte(tvb, offsetp, t, hf_x11_xselinux_GetSelectionContext_reply_context, f_context_len, byte_order);
28696}
28697
28698static void xselinuxGetSelectionDataContext(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
28699{
28700 proto_tree_add_item(t, hf_x11_xselinux_GetSelectionDataContext_selection, tvb, *offsetp, 4, byte_order);
28701 *offsetp += 4;
28702}
28703static void xselinuxGetSelectionDataContext_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
28704{
28705 int sequence_number;
28706 int f_context_len;
28707
28708 col_append_fstr(pinfo->cinfo, COL_INFO, "-GetSelectionDataContext");
28709
28710 REPLY(reply);
28711 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
28712 *offsetp += 1;
28713 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
28714 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
28715 "%d (xselinux-GetSelectionDataContext)", sequence_number);
28716 *offsetp += 2;
28717 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
28718 *offsetp += 4;
28719 f_context_len = tvb_get_uint32(tvb, *offsetp, byte_order);
28720 proto_tree_add_item(t, hf_x11_xselinux_GetSelectionDataContext_reply_context_len, tvb, *offsetp, 4, byte_order);
28721 *offsetp += 4;
28722 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 20, ENC_NA);
28723 *offsetp += 20;
28724 listOfByte(tvb, offsetp, t, hf_x11_xselinux_GetSelectionDataContext_reply_context, f_context_len, byte_order);
28725}
28726
28727static void xselinuxListSelections(tvbuff_t *tvb _U_, packet_info *pinfo _U_, int *offsetp _U_, proto_tree *t _U_, unsigned byte_order _U_, int length _U_)
28728{
28729}
28730static void xselinuxListSelections_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
28731{
28732 int sequence_number;
28733 int f_selections_len;
28734
28735 col_append_fstr(pinfo->cinfo, COL_INFO, "-ListSelections");
28736
28737 REPLY(reply);
28738 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
28739 *offsetp += 1;
28740 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
28741 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
28742 "%d (xselinux-ListSelections)", sequence_number);
28743 *offsetp += 2;
28744 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
28745 *offsetp += 4;
28746 f_selections_len = tvb_get_uint32(tvb, *offsetp, byte_order);
28747 proto_tree_add_item(t, hf_x11_xselinux_ListSelections_reply_selections_len, tvb, *offsetp, 4, byte_order);
28748 *offsetp += 4;
28749 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 20, ENC_NA);
28750 *offsetp += 20;
28751 struct_xselinux_ListItem(tvb, offsetp, t, byte_order, f_selections_len);
28752}
28753
28754static void xselinuxGetClientContext(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
28755{
28756 proto_tree_add_item(t, hf_x11_xselinux_GetClientContext_resource, tvb, *offsetp, 4, byte_order);
28757 *offsetp += 4;
28758}
28759static void xselinuxGetClientContext_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
28760{
28761 int sequence_number;
28762 int f_context_len;
28763
28764 col_append_fstr(pinfo->cinfo, COL_INFO, "-GetClientContext");
28765
28766 REPLY(reply);
28767 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
28768 *offsetp += 1;
28769 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
28770 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
28771 "%d (xselinux-GetClientContext)", sequence_number);
28772 *offsetp += 2;
28773 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
28774 *offsetp += 4;
28775 f_context_len = tvb_get_uint32(tvb, *offsetp, byte_order);
28776 proto_tree_add_item(t, hf_x11_xselinux_GetClientContext_reply_context_len, tvb, *offsetp, 4, byte_order);
28777 *offsetp += 4;
28778 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 20, ENC_NA);
28779 *offsetp += 20;
28780 listOfByte(tvb, offsetp, t, hf_x11_xselinux_GetClientContext_reply_context, f_context_len, byte_order);
28781}
28782static const value_string xselinux_extension_minor[] = {
28783 { 0, "QueryVersion" },
28784 { 1, "SetDeviceCreateContext" },
28785 { 2, "GetDeviceCreateContext" },
28786 { 3, "SetDeviceContext" },
28787 { 4, "GetDeviceContext" },
28788 { 5, "SetWindowCreateContext" },
28789 { 6, "GetWindowCreateContext" },
28790 { 7, "GetWindowContext" },
28791 { 8, "SetPropertyCreateContext" },
28792 { 9, "GetPropertyCreateContext" },
28793 { 10, "SetPropertyUseContext" },
28794 { 11, "GetPropertyUseContext" },
28795 { 12, "GetPropertyContext" },
28796 { 13, "GetPropertyDataContext" },
28797 { 14, "ListProperties" },
28798 { 15, "SetSelectionCreateContext" },
28799 { 16, "GetSelectionCreateContext" },
28800 { 17, "SetSelectionUseContext" },
28801 { 18, "GetSelectionUseContext" },
28802 { 19, "GetSelectionContext" },
28803 { 20, "GetSelectionDataContext" },
28804 { 21, "ListSelections" },
28805 { 22, "GetClientContext" },
28806 { 0, NULL }
28807};
28808static const x11_event_info xselinux_events[] = {
28809 { NULL, NULL }
28810};
28811static const x11_reply_info xselinux_replies[] = {
28812 { 0, xselinuxQueryVersion_Reply },
28813 { 2, xselinuxGetDeviceCreateContext_Reply },
28814 { 4, xselinuxGetDeviceContext_Reply },
28815 { 6, xselinuxGetWindowCreateContext_Reply },
28816 { 7, xselinuxGetWindowContext_Reply },
28817 { 9, xselinuxGetPropertyCreateContext_Reply },
28818 { 11, xselinuxGetPropertyUseContext_Reply },
28819 { 12, xselinuxGetPropertyContext_Reply },
28820 { 13, xselinuxGetPropertyDataContext_Reply },
28821 { 14, xselinuxListProperties_Reply },
28822 { 16, xselinuxGetSelectionCreateContext_Reply },
28823 { 18, xselinuxGetSelectionUseContext_Reply },
28824 { 19, xselinuxGetSelectionContext_Reply },
28825 { 20, xselinuxGetSelectionDataContext_Reply },
28826 { 21, xselinuxListSelections_Reply },
28827 { 22, xselinuxGetClientContext_Reply },
28828 { 0, NULL }
28829};
28830
28831static void dispatch_xselinux(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
28832{
28833 int minor, length;
28834 minor = CARD8(xselinux_extension_minor);
28835 length = REQUEST_LENGTH();
28836
28837 col_append_fstr(pinfo->cinfo, COL_INFO, "-%s",
28838 val_to_str(minor, xselinux_extension_minor,
28839 "<Unknown opcode %d>"));
28840 switch (minor) {
28841 case 0:
28842 xselinuxQueryVersion(tvb, pinfo, offsetp, t, byte_order, length);
28843 break;
28844 case 1:
28845 xselinuxSetDeviceCreateContext(tvb, pinfo, offsetp, t, byte_order, length);
28846 break;
28847 case 2:
28848 xselinuxGetDeviceCreateContext(tvb, pinfo, offsetp, t, byte_order, length);
28849 break;
28850 case 3:
28851 xselinuxSetDeviceContext(tvb, pinfo, offsetp, t, byte_order, length);
28852 break;
28853 case 4:
28854 xselinuxGetDeviceContext(tvb, pinfo, offsetp, t, byte_order, length);
28855 break;
28856 case 5:
28857 xselinuxSetWindowCreateContext(tvb, pinfo, offsetp, t, byte_order, length);
28858 break;
28859 case 6:
28860 xselinuxGetWindowCreateContext(tvb, pinfo, offsetp, t, byte_order, length);
28861 break;
28862 case 7:
28863 xselinuxGetWindowContext(tvb, pinfo, offsetp, t, byte_order, length);
28864 break;
28865 case 8:
28866 xselinuxSetPropertyCreateContext(tvb, pinfo, offsetp, t, byte_order, length);
28867 break;
28868 case 9:
28869 xselinuxGetPropertyCreateContext(tvb, pinfo, offsetp, t, byte_order, length);
28870 break;
28871 case 10:
28872 xselinuxSetPropertyUseContext(tvb, pinfo, offsetp, t, byte_order, length);
28873 break;
28874 case 11:
28875 xselinuxGetPropertyUseContext(tvb, pinfo, offsetp, t, byte_order, length);
28876 break;
28877 case 12:
28878 xselinuxGetPropertyContext(tvb, pinfo, offsetp, t, byte_order, length);
28879 break;
28880 case 13:
28881 xselinuxGetPropertyDataContext(tvb, pinfo, offsetp, t, byte_order, length);
28882 break;
28883 case 14:
28884 xselinuxListProperties(tvb, pinfo, offsetp, t, byte_order, length);
28885 break;
28886 case 15:
28887 xselinuxSetSelectionCreateContext(tvb, pinfo, offsetp, t, byte_order, length);
28888 break;
28889 case 16:
28890 xselinuxGetSelectionCreateContext(tvb, pinfo, offsetp, t, byte_order, length);
28891 break;
28892 case 17:
28893 xselinuxSetSelectionUseContext(tvb, pinfo, offsetp, t, byte_order, length);
28894 break;
28895 case 18:
28896 xselinuxGetSelectionUseContext(tvb, pinfo, offsetp, t, byte_order, length);
28897 break;
28898 case 19:
28899 xselinuxGetSelectionContext(tvb, pinfo, offsetp, t, byte_order, length);
28900 break;
28901 case 20:
28902 xselinuxGetSelectionDataContext(tvb, pinfo, offsetp, t, byte_order, length);
28903 break;
28904 case 21:
28905 xselinuxListSelections(tvb, pinfo, offsetp, t, byte_order, length);
28906 break;
28907 case 22:
28908 xselinuxGetClientContext(tvb, pinfo, offsetp, t, byte_order, length);
28909 break;
28910 /* No need for a default case here, since Unknown is printed above,
28911 and UNDECODED() is taken care of by dissect_x11_request */
28912 }
28913}
28914
28915static void register_xselinux(void)
28916{
28917 set_handler("SELinux", dispatch_xselinux, xselinux_errors, xselinux_events, NULL, xselinux_replies);
28918}
28919
28920static void xtestGetVersion(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
28921{
28922 proto_tree_add_item(t, hf_x11_xtest_GetVersion_major_version, tvb, *offsetp, 1, byte_order);
28923 *offsetp += 1;
28924 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
28925 *offsetp += 1;
28926 proto_tree_add_item(t, hf_x11_xtest_GetVersion_minor_version, tvb, *offsetp, 2, byte_order);
28927 *offsetp += 2;
28928}
28929static void xtestGetVersion_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
28930{
28931 int sequence_number;
28932
28933 col_append_fstr(pinfo->cinfo, COL_INFO, "-GetVersion");
28934
28935 REPLY(reply);
28936 proto_tree_add_item(t, hf_x11_xtest_GetVersion_reply_major_version, tvb, *offsetp, 1, byte_order);
28937 *offsetp += 1;
28938 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
28939 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
28940 "%d (xtest-GetVersion)", sequence_number);
28941 *offsetp += 2;
28942 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
28943 *offsetp += 4;
28944 proto_tree_add_item(t, hf_x11_xtest_GetVersion_reply_minor_version, tvb, *offsetp, 2, byte_order);
28945 *offsetp += 2;
28946}
28947
28948static void xtestCompareCursor(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
28949{
28950 proto_tree_add_item(t, hf_x11_xtest_CompareCursor_window, tvb, *offsetp, 4, byte_order);
28951 *offsetp += 4;
28952 proto_tree_add_item(t, hf_x11_xtest_CompareCursor_cursor, tvb, *offsetp, 4, byte_order);
28953 *offsetp += 4;
28954}
28955static void xtestCompareCursor_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
28956{
28957 int sequence_number;
28958
28959 col_append_fstr(pinfo->cinfo, COL_INFO, "-CompareCursor");
28960
28961 REPLY(reply);
28962 proto_tree_add_item(t, hf_x11_xtest_CompareCursor_reply_same, tvb, *offsetp, 1, byte_order);
28963 *offsetp += 1;
28964 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
28965 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
28966 "%d (xtest-CompareCursor)", sequence_number);
28967 *offsetp += 2;
28968 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
28969 *offsetp += 4;
28970}
28971
28972static void xtestFakeInput(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
28973{
28974 proto_tree_add_item(t, hf_x11_xtest_FakeInput_type, tvb, *offsetp, 1, ENC_NA);
28975 *offsetp += 1;
28976 proto_tree_add_item(t, hf_x11_xtest_FakeInput_detail, tvb, *offsetp, 1, ENC_NA);
28977 *offsetp += 1;
28978 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 2, ENC_NA);
28979 *offsetp += 2;
28980 proto_tree_add_item(t, hf_x11_xtest_FakeInput_time, tvb, *offsetp, 4, byte_order);
28981 *offsetp += 4;
28982 proto_tree_add_item(t, hf_x11_xtest_FakeInput_root, tvb, *offsetp, 4, byte_order);
28983 *offsetp += 4;
28984 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 8, ENC_NA);
28985 *offsetp += 8;
28986 proto_tree_add_item(t, hf_x11_xtest_FakeInput_rootX, tvb, *offsetp, 2, byte_order);
28987 *offsetp += 2;
28988 proto_tree_add_item(t, hf_x11_xtest_FakeInput_rootY, tvb, *offsetp, 2, byte_order);
28989 *offsetp += 2;
28990 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 7, ENC_NA);
28991 *offsetp += 7;
28992 proto_tree_add_item(t, hf_x11_xtest_FakeInput_deviceid, tvb, *offsetp, 1, byte_order);
28993 *offsetp += 1;
28994}
28995
28996static void xtestGrabControl(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
28997{
28998 proto_tree_add_item(t, hf_x11_xtest_GrabControl_impervious, tvb, *offsetp, 1, byte_order);
28999 *offsetp += 1;
29000 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 3, ENC_NA);
29001 *offsetp += 3;
29002}
29003static const value_string xtest_extension_minor[] = {
29004 { 0, "GetVersion" },
29005 { 1, "CompareCursor" },
29006 { 2, "FakeInput" },
29007 { 3, "GrabControl" },
29008 { 0, NULL }
29009};
29010static const x11_event_info xtest_events[] = {
29011 { NULL, NULL }
29012};
29013static const x11_reply_info xtest_replies[] = {
29014 { 0, xtestGetVersion_Reply },
29015 { 1, xtestCompareCursor_Reply },
29016 { 0, NULL }
29017};
29018
29019static void dispatch_xtest(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
29020{
29021 int minor, length;
29022 minor = CARD8(xtest_extension_minor);
29023 length = REQUEST_LENGTH();
29024
29025 col_append_fstr(pinfo->cinfo, COL_INFO, "-%s",
29026 val_to_str(minor, xtest_extension_minor,
29027 "<Unknown opcode %d>"));
29028 switch (minor) {
29029 case 0:
29030 xtestGetVersion(tvb, pinfo, offsetp, t, byte_order, length);
29031 break;
29032 case 1:
29033 xtestCompareCursor(tvb, pinfo, offsetp, t, byte_order, length);
29034 break;
29035 case 2:
29036 xtestFakeInput(tvb, pinfo, offsetp, t, byte_order, length);
29037 break;
29038 case 3:
29039 xtestGrabControl(tvb, pinfo, offsetp, t, byte_order, length);
29040 break;
29041 /* No need for a default case here, since Unknown is printed above,
29042 and UNDECODED() is taken care of by dissect_x11_request */
29043 }
29044}
29045
29046static void register_xtest(void)
29047{
29048 set_handler("XTEST", dispatch_xtest, xtest_errors, xtest_events, NULL, xtest_replies);
29049}
29050
29051static void struct_xv_Rational(tvbuff_t *tvb, int *offsetp, proto_tree *root, unsigned byte_order _U_, int count)
29052{
29053 int i;
29054 for (i = 0; i < count; i++) {
29055 proto_item *item;
29056 proto_tree *t;
29057
29058 item = proto_tree_add_item(root, hf_x11_struct_xv_Rational, tvb, *offsetp, 8, ENC_NA);
29059 t = proto_item_add_subtree(item, ett_x11_rectangle);
29060 proto_tree_add_item(t, hf_x11_struct_xv_Rational_numerator, tvb, *offsetp, 4, byte_order);
29061 *offsetp += 4;
29062 proto_tree_add_item(t, hf_x11_struct_xv_Rational_denominator, tvb, *offsetp, 4, byte_order);
29063 *offsetp += 4;
29064 }
29065}
29066
29067static void struct_xv_Format(tvbuff_t *tvb, int *offsetp, proto_tree *root, unsigned byte_order _U_, int count)
29068{
29069 int i;
29070 for (i = 0; i < count; i++) {
29071 proto_item *item;
29072 proto_tree *t;
29073
29074 item = proto_tree_add_item(root, hf_x11_struct_xv_Format, tvb, *offsetp, 8, ENC_NA);
29075 t = proto_item_add_subtree(item, ett_x11_rectangle);
29076 proto_tree_add_item(t, hf_x11_struct_xv_Format_visual, tvb, *offsetp, 4, byte_order);
29077 *offsetp += 4;
29078 proto_tree_add_item(t, hf_x11_struct_xv_Format_depth, tvb, *offsetp, 1, byte_order);
29079 *offsetp += 1;
29080 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 3, ENC_NA);
29081 *offsetp += 3;
29082 }
29083}
29084
29085static int struct_size_xv_AdaptorInfo(tvbuff_t *tvb _U_, int *offsetp _U_, unsigned byte_order _U_)
29086{
29087 int size = 0;
29088 int f_name_size;
29089 int f_num_formats;
29090 f_name_size = tvb_get_uint16(tvb, *offsetp + size + 4, byte_order);
29091 f_num_formats = tvb_get_uint16(tvb, *offsetp + size + 8, byte_order);
29092 size += f_name_size * 1;
29093 size = (size + 3) & ~3;
29094 size += f_num_formats * 8;
29095 return size + 12;
29096}
29097
29098static void struct_xv_AdaptorInfo(tvbuff_t *tvb, int *offsetp, proto_tree *root, unsigned byte_order _U_, int count)
29099{
29100 int i;
29101 for (i = 0; i < count; i++) {
29102 proto_item *item;
29103 proto_tree *t;
29104 int f_name_size;
29105 int f_num_formats;
29106
29107 item = proto_tree_add_item(root, hf_x11_struct_xv_AdaptorInfo, tvb, *offsetp, struct_size_xv_AdaptorInfo(tvb, offsetp, byte_order), ENC_NA);
29108 t = proto_item_add_subtree(item, ett_x11_rectangle);
29109 proto_tree_add_item(t, hf_x11_struct_xv_AdaptorInfo_base_id, tvb, *offsetp, 4, byte_order);
29110 *offsetp += 4;
29111 f_name_size = tvb_get_uint16(tvb, *offsetp, byte_order);
29112 proto_tree_add_item(t, hf_x11_struct_xv_AdaptorInfo_name_size, tvb, *offsetp, 2, byte_order);
29113 *offsetp += 2;
29114 proto_tree_add_item(t, hf_x11_struct_xv_AdaptorInfo_num_ports, tvb, *offsetp, 2, byte_order);
29115 *offsetp += 2;
29116 f_num_formats = tvb_get_uint16(tvb, *offsetp, byte_order);
29117 proto_tree_add_item(t, hf_x11_struct_xv_AdaptorInfo_num_formats, tvb, *offsetp, 2, byte_order);
29118 *offsetp += 2;
29119 {
29120 static int* const type_bits [] = {
29121 &hf_x11_struct_xv_AdaptorInfo_type_mask_InputMask,
29122 &hf_x11_struct_xv_AdaptorInfo_type_mask_OutputMask,
29123 &hf_x11_struct_xv_AdaptorInfo_type_mask_VideoMask,
29124 &hf_x11_struct_xv_AdaptorInfo_type_mask_StillMask,
29125 &hf_x11_struct_xv_AdaptorInfo_type_mask_ImageMask,
29126 NULL
29127 };
29128 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_struct_xv_AdaptorInfo_type, ett_x11_rectangle, type_bits, byte_order);
29129 }
29130 *offsetp += 1;
29131 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
29132 *offsetp += 1;
29133 listOfByte(tvb, offsetp, t, hf_x11_struct_xv_AdaptorInfo_name, f_name_size, byte_order);
29134 if (*offsetp % 4) {
29135 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, (4 - *offsetp % 4), ENC_NA);
29136 *offsetp += (4 - *offsetp % 4);
29137 }
29138 struct_xv_Format(tvb, offsetp, t, byte_order, f_num_formats);
29139 }
29140}
29141
29142static int struct_size_xv_EncodingInfo(tvbuff_t *tvb _U_, int *offsetp _U_, unsigned byte_order _U_)
29143{
29144 int size = 0;
29145 int f_name_size;
29146 f_name_size = tvb_get_uint16(tvb, *offsetp + size + 4, byte_order);
29147 size += f_name_size * 1;
29148 size = (size + 3) & ~3;
29149 return size + 20;
29150}
29151
29152static void struct_xv_EncodingInfo(tvbuff_t *tvb, int *offsetp, proto_tree *root, unsigned byte_order _U_, int count)
29153{
29154 int i;
29155 for (i = 0; i < count; i++) {
29156 proto_item *item;
29157 proto_tree *t;
29158 int f_name_size;
29159
29160 item = proto_tree_add_item(root, hf_x11_struct_xv_EncodingInfo, tvb, *offsetp, struct_size_xv_EncodingInfo(tvb, offsetp, byte_order), ENC_NA);
29161 t = proto_item_add_subtree(item, ett_x11_rectangle);
29162 proto_tree_add_item(t, hf_x11_struct_xv_EncodingInfo_encoding, tvb, *offsetp, 4, byte_order);
29163 *offsetp += 4;
29164 f_name_size = tvb_get_uint16(tvb, *offsetp, byte_order);
29165 proto_tree_add_item(t, hf_x11_struct_xv_EncodingInfo_name_size, tvb, *offsetp, 2, byte_order);
29166 *offsetp += 2;
29167 proto_tree_add_item(t, hf_x11_struct_xv_EncodingInfo_width, tvb, *offsetp, 2, byte_order);
29168 *offsetp += 2;
29169 proto_tree_add_item(t, hf_x11_struct_xv_EncodingInfo_height, tvb, *offsetp, 2, byte_order);
29170 *offsetp += 2;
29171 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 2, ENC_NA);
29172 *offsetp += 2;
29173 struct_xv_Rational(tvb, offsetp, t, byte_order, 1);
29174 listOfByte(tvb, offsetp, t, hf_x11_struct_xv_EncodingInfo_name, f_name_size, byte_order);
29175 if (*offsetp % 4) {
29176 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, (4 - *offsetp % 4), ENC_NA);
29177 *offsetp += (4 - *offsetp % 4);
29178 }
29179 }
29180}
29181
29182static int struct_size_xv_AttributeInfo(tvbuff_t *tvb _U_, int *offsetp _U_, unsigned byte_order _U_)
29183{
29184 int size = 0;
29185 int f_size;
29186 f_size = tvb_get_uint32(tvb, *offsetp + size + 12, byte_order);
29187 size += f_size * 1;
29188 size = (size + 3) & ~3;
29189 return size + 16;
29190}
29191
29192static void struct_xv_AttributeInfo(tvbuff_t *tvb, int *offsetp, proto_tree *root, unsigned byte_order _U_, int count)
29193{
29194 int i;
29195 for (i = 0; i < count; i++) {
29196 proto_item *item;
29197 proto_tree *t;
29198 int f_size;
29199
29200 item = proto_tree_add_item(root, hf_x11_struct_xv_AttributeInfo, tvb, *offsetp, struct_size_xv_AttributeInfo(tvb, offsetp, byte_order), ENC_NA);
29201 t = proto_item_add_subtree(item, ett_x11_rectangle);
29202 {
29203 static int* const flags_bits [] = {
29204 &hf_x11_struct_xv_AttributeInfo_flags_mask_Gettable,
29205 &hf_x11_struct_xv_AttributeInfo_flags_mask_Settable,
29206 NULL
29207 };
29208 proto_tree_add_bitmask(t, tvb, *offsetp, hf_x11_struct_xv_AttributeInfo_flags, ett_x11_rectangle, flags_bits, byte_order);
29209 }
29210 *offsetp += 4;
29211 proto_tree_add_item(t, hf_x11_struct_xv_AttributeInfo_min, tvb, *offsetp, 4, byte_order);
29212 *offsetp += 4;
29213 proto_tree_add_item(t, hf_x11_struct_xv_AttributeInfo_max, tvb, *offsetp, 4, byte_order);
29214 *offsetp += 4;
29215 f_size = tvb_get_uint32(tvb, *offsetp, byte_order);
29216 proto_tree_add_item(t, hf_x11_struct_xv_AttributeInfo_size, tvb, *offsetp, 4, byte_order);
29217 *offsetp += 4;
29218 listOfByte(tvb, offsetp, t, hf_x11_struct_xv_AttributeInfo_name, f_size, byte_order);
29219 if (*offsetp % 4) {
29220 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, (4 - *offsetp % 4), ENC_NA);
29221 *offsetp += (4 - *offsetp % 4);
29222 }
29223 }
29224}
29225
29226static void struct_xv_ImageFormatInfo(tvbuff_t *tvb, int *offsetp, proto_tree *root, unsigned byte_order _U_, int count)
29227{
29228 int i;
29229 for (i = 0; i < count; i++) {
29230 proto_item *item;
29231 proto_tree *t;
29232
29233 item = proto_tree_add_item(root, hf_x11_struct_xv_ImageFormatInfo, tvb, *offsetp, 128, ENC_NA);
29234 t = proto_item_add_subtree(item, ett_x11_rectangle);
29235 proto_tree_add_item(t, hf_x11_struct_xv_ImageFormatInfo_id, tvb, *offsetp, 4, byte_order);
29236 *offsetp += 4;
29237 field8(tvb, offsetp, t, hf_x11_struct_xv_ImageFormatInfo_type, byte_order);
29238 field8(tvb, offsetp, t, hf_x11_struct_xv_ImageFormatInfo_byte_order, byte_order);
29239 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 2, ENC_NA);
29240 *offsetp += 2;
29241 listOfByte(tvb, offsetp, t, hf_x11_struct_xv_ImageFormatInfo_guid, 16, byte_order);
29242 proto_tree_add_item(t, hf_x11_struct_xv_ImageFormatInfo_bpp, tvb, *offsetp, 1, byte_order);
29243 *offsetp += 1;
29244 proto_tree_add_item(t, hf_x11_struct_xv_ImageFormatInfo_num_planes, tvb, *offsetp, 1, byte_order);
29245 *offsetp += 1;
29246 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 2, ENC_NA);
29247 *offsetp += 2;
29248 proto_tree_add_item(t, hf_x11_struct_xv_ImageFormatInfo_depth, tvb, *offsetp, 1, byte_order);
29249 *offsetp += 1;
29250 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 3, ENC_NA);
29251 *offsetp += 3;
29252 proto_tree_add_item(t, hf_x11_struct_xv_ImageFormatInfo_red_mask, tvb, *offsetp, 4, byte_order);
29253 *offsetp += 4;
29254 proto_tree_add_item(t, hf_x11_struct_xv_ImageFormatInfo_green_mask, tvb, *offsetp, 4, byte_order);
29255 *offsetp += 4;
29256 proto_tree_add_item(t, hf_x11_struct_xv_ImageFormatInfo_blue_mask, tvb, *offsetp, 4, byte_order);
29257 *offsetp += 4;
29258 field8(tvb, offsetp, t, hf_x11_struct_xv_ImageFormatInfo_format, byte_order);
29259 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 3, ENC_NA);
29260 *offsetp += 3;
29261 proto_tree_add_item(t, hf_x11_struct_xv_ImageFormatInfo_y_sample_bits, tvb, *offsetp, 4, byte_order);
29262 *offsetp += 4;
29263 proto_tree_add_item(t, hf_x11_struct_xv_ImageFormatInfo_u_sample_bits, tvb, *offsetp, 4, byte_order);
29264 *offsetp += 4;
29265 proto_tree_add_item(t, hf_x11_struct_xv_ImageFormatInfo_v_sample_bits, tvb, *offsetp, 4, byte_order);
29266 *offsetp += 4;
29267 proto_tree_add_item(t, hf_x11_struct_xv_ImageFormatInfo_vhorz_y_period, tvb, *offsetp, 4, byte_order);
29268 *offsetp += 4;
29269 proto_tree_add_item(t, hf_x11_struct_xv_ImageFormatInfo_vhorz_u_period, tvb, *offsetp, 4, byte_order);
29270 *offsetp += 4;
29271 proto_tree_add_item(t, hf_x11_struct_xv_ImageFormatInfo_vhorz_v_period, tvb, *offsetp, 4, byte_order);
29272 *offsetp += 4;
29273 proto_tree_add_item(t, hf_x11_struct_xv_ImageFormatInfo_vvert_y_period, tvb, *offsetp, 4, byte_order);
29274 *offsetp += 4;
29275 proto_tree_add_item(t, hf_x11_struct_xv_ImageFormatInfo_vvert_u_period, tvb, *offsetp, 4, byte_order);
29276 *offsetp += 4;
29277 proto_tree_add_item(t, hf_x11_struct_xv_ImageFormatInfo_vvert_v_period, tvb, *offsetp, 4, byte_order);
29278 *offsetp += 4;
29279 listOfByte(tvb, offsetp, t, hf_x11_struct_xv_ImageFormatInfo_vcomp_order, 32, byte_order);
29280 field8(tvb, offsetp, t, hf_x11_struct_xv_ImageFormatInfo_vscanline_order, byte_order);
29281 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 11, ENC_NA);
29282 *offsetp += 11;
29283 }
29284}
29285
29286static void xvPortNotify(tvbuff_t *tvb, int *offsetp, proto_tree *t, unsigned byte_order)
29287{
29288 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
29289 *offsetp += 1;
29290 CARD16(event_sequencenumber);
29291 proto_tree_add_item(t, hf_x11_xv_PortNotify_time, tvb, *offsetp, 4, byte_order);
29292 *offsetp += 4;
29293 proto_tree_add_item(t, hf_x11_xv_PortNotify_port, tvb, *offsetp, 4, byte_order);
29294 *offsetp += 4;
29295 proto_tree_add_item(t, hf_x11_xv_PortNotify_attribute, tvb, *offsetp, 4, byte_order);
29296 *offsetp += 4;
29297 proto_tree_add_item(t, hf_x11_xv_PortNotify_value, tvb, *offsetp, 4, byte_order);
29298 *offsetp += 4;
29299}
29300
29301
29302static void xvQueryExtension(tvbuff_t *tvb _U_, packet_info *pinfo _U_, int *offsetp _U_, proto_tree *t _U_, unsigned byte_order _U_, int length _U_)
29303{
29304}
29305static void xvQueryExtension_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
29306{
29307 int sequence_number;
29308
29309 col_append_fstr(pinfo->cinfo, COL_INFO, "-QueryExtension");
29310
29311 REPLY(reply);
29312 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
29313 *offsetp += 1;
29314 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
29315 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
29316 "%d (xv-QueryExtension)", sequence_number);
29317 *offsetp += 2;
29318 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
29319 *offsetp += 4;
29320 proto_tree_add_item(t, hf_x11_xv_QueryExtension_reply_major, tvb, *offsetp, 2, byte_order);
29321 *offsetp += 2;
29322 proto_tree_add_item(t, hf_x11_xv_QueryExtension_reply_minor, tvb, *offsetp, 2, byte_order);
29323 *offsetp += 2;
29324}
29325
29326static void xvQueryAdaptors(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
29327{
29328 proto_tree_add_item(t, hf_x11_xv_QueryAdaptors_window, tvb, *offsetp, 4, byte_order);
29329 *offsetp += 4;
29330}
29331static void xvQueryAdaptors_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
29332{
29333 int sequence_number;
29334 int f_num_adaptors;
29335
29336 col_append_fstr(pinfo->cinfo, COL_INFO, "-QueryAdaptors");
29337
29338 REPLY(reply);
29339 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
29340 *offsetp += 1;
29341 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
29342 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
29343 "%d (xv-QueryAdaptors)", sequence_number);
29344 *offsetp += 2;
29345 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
29346 *offsetp += 4;
29347 f_num_adaptors = tvb_get_uint16(tvb, *offsetp, byte_order);
29348 proto_tree_add_item(t, hf_x11_xv_QueryAdaptors_reply_num_adaptors, tvb, *offsetp, 2, byte_order);
29349 *offsetp += 2;
29350 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 22, ENC_NA);
29351 *offsetp += 22;
29352 struct_xv_AdaptorInfo(tvb, offsetp, t, byte_order, f_num_adaptors);
29353}
29354
29355static void xvQueryEncodings(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
29356{
29357 proto_tree_add_item(t, hf_x11_xv_QueryEncodings_port, tvb, *offsetp, 4, byte_order);
29358 *offsetp += 4;
29359}
29360static void xvQueryEncodings_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
29361{
29362 int sequence_number;
29363 int f_num_encodings;
29364
29365 col_append_fstr(pinfo->cinfo, COL_INFO, "-QueryEncodings");
29366
29367 REPLY(reply);
29368 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
29369 *offsetp += 1;
29370 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
29371 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
29372 "%d (xv-QueryEncodings)", sequence_number);
29373 *offsetp += 2;
29374 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
29375 *offsetp += 4;
29376 f_num_encodings = tvb_get_uint16(tvb, *offsetp, byte_order);
29377 proto_tree_add_item(t, hf_x11_xv_QueryEncodings_reply_num_encodings, tvb, *offsetp, 2, byte_order);
29378 *offsetp += 2;
29379 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 22, ENC_NA);
29380 *offsetp += 22;
29381 struct_xv_EncodingInfo(tvb, offsetp, t, byte_order, f_num_encodings);
29382}
29383
29384static void xvGrabPort(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
29385{
29386 proto_tree_add_item(t, hf_x11_xv_GrabPort_port, tvb, *offsetp, 4, byte_order);
29387 *offsetp += 4;
29388 field32(tvb, offsetp, t, hf_x11_xv_GrabPort_time, byte_order);
29389}
29390static void xvGrabPort_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
29391{
29392 int sequence_number;
29393
29394 col_append_fstr(pinfo->cinfo, COL_INFO, "-GrabPort");
29395
29396 REPLY(reply);
29397 field8(tvb, offsetp, t, hf_x11_xv_GrabPort_reply_result, byte_order);
29398 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
29399 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
29400 "%d (xv-GrabPort)", sequence_number);
29401 *offsetp += 2;
29402 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
29403 *offsetp += 4;
29404}
29405
29406static void xvUngrabPort(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
29407{
29408 proto_tree_add_item(t, hf_x11_xv_UngrabPort_port, tvb, *offsetp, 4, byte_order);
29409 *offsetp += 4;
29410 field32(tvb, offsetp, t, hf_x11_xv_UngrabPort_time, byte_order);
29411}
29412
29413static void xvPutVideo(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
29414{
29415 proto_tree_add_item(t, hf_x11_xv_PutVideo_port, tvb, *offsetp, 4, byte_order);
29416 *offsetp += 4;
29417 proto_tree_add_item(t, hf_x11_xv_PutVideo_drawable, tvb, *offsetp, 4, byte_order);
29418 *offsetp += 4;
29419 proto_tree_add_item(t, hf_x11_xv_PutVideo_gc, tvb, *offsetp, 4, byte_order);
29420 *offsetp += 4;
29421 proto_tree_add_item(t, hf_x11_xv_PutVideo_vid_x, tvb, *offsetp, 2, byte_order);
29422 *offsetp += 2;
29423 proto_tree_add_item(t, hf_x11_xv_PutVideo_vid_y, tvb, *offsetp, 2, byte_order);
29424 *offsetp += 2;
29425 proto_tree_add_item(t, hf_x11_xv_PutVideo_vid_w, tvb, *offsetp, 2, byte_order);
29426 *offsetp += 2;
29427 proto_tree_add_item(t, hf_x11_xv_PutVideo_vid_h, tvb, *offsetp, 2, byte_order);
29428 *offsetp += 2;
29429 proto_tree_add_item(t, hf_x11_xv_PutVideo_drw_x, tvb, *offsetp, 2, byte_order);
29430 *offsetp += 2;
29431 proto_tree_add_item(t, hf_x11_xv_PutVideo_drw_y, tvb, *offsetp, 2, byte_order);
29432 *offsetp += 2;
29433 proto_tree_add_item(t, hf_x11_xv_PutVideo_drw_w, tvb, *offsetp, 2, byte_order);
29434 *offsetp += 2;
29435 proto_tree_add_item(t, hf_x11_xv_PutVideo_drw_h, tvb, *offsetp, 2, byte_order);
29436 *offsetp += 2;
29437}
29438
29439static void xvPutStill(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
29440{
29441 proto_tree_add_item(t, hf_x11_xv_PutStill_port, tvb, *offsetp, 4, byte_order);
29442 *offsetp += 4;
29443 proto_tree_add_item(t, hf_x11_xv_PutStill_drawable, tvb, *offsetp, 4, byte_order);
29444 *offsetp += 4;
29445 proto_tree_add_item(t, hf_x11_xv_PutStill_gc, tvb, *offsetp, 4, byte_order);
29446 *offsetp += 4;
29447 proto_tree_add_item(t, hf_x11_xv_PutStill_vid_x, tvb, *offsetp, 2, byte_order);
29448 *offsetp += 2;
29449 proto_tree_add_item(t, hf_x11_xv_PutStill_vid_y, tvb, *offsetp, 2, byte_order);
29450 *offsetp += 2;
29451 proto_tree_add_item(t, hf_x11_xv_PutStill_vid_w, tvb, *offsetp, 2, byte_order);
29452 *offsetp += 2;
29453 proto_tree_add_item(t, hf_x11_xv_PutStill_vid_h, tvb, *offsetp, 2, byte_order);
29454 *offsetp += 2;
29455 proto_tree_add_item(t, hf_x11_xv_PutStill_drw_x, tvb, *offsetp, 2, byte_order);
29456 *offsetp += 2;
29457 proto_tree_add_item(t, hf_x11_xv_PutStill_drw_y, tvb, *offsetp, 2, byte_order);
29458 *offsetp += 2;
29459 proto_tree_add_item(t, hf_x11_xv_PutStill_drw_w, tvb, *offsetp, 2, byte_order);
29460 *offsetp += 2;
29461 proto_tree_add_item(t, hf_x11_xv_PutStill_drw_h, tvb, *offsetp, 2, byte_order);
29462 *offsetp += 2;
29463}
29464
29465static void xvGetVideo(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
29466{
29467 proto_tree_add_item(t, hf_x11_xv_GetVideo_port, tvb, *offsetp, 4, byte_order);
29468 *offsetp += 4;
29469 proto_tree_add_item(t, hf_x11_xv_GetVideo_drawable, tvb, *offsetp, 4, byte_order);
29470 *offsetp += 4;
29471 proto_tree_add_item(t, hf_x11_xv_GetVideo_gc, tvb, *offsetp, 4, byte_order);
29472 *offsetp += 4;
29473 proto_tree_add_item(t, hf_x11_xv_GetVideo_vid_x, tvb, *offsetp, 2, byte_order);
29474 *offsetp += 2;
29475 proto_tree_add_item(t, hf_x11_xv_GetVideo_vid_y, tvb, *offsetp, 2, byte_order);
29476 *offsetp += 2;
29477 proto_tree_add_item(t, hf_x11_xv_GetVideo_vid_w, tvb, *offsetp, 2, byte_order);
29478 *offsetp += 2;
29479 proto_tree_add_item(t, hf_x11_xv_GetVideo_vid_h, tvb, *offsetp, 2, byte_order);
29480 *offsetp += 2;
29481 proto_tree_add_item(t, hf_x11_xv_GetVideo_drw_x, tvb, *offsetp, 2, byte_order);
29482 *offsetp += 2;
29483 proto_tree_add_item(t, hf_x11_xv_GetVideo_drw_y, tvb, *offsetp, 2, byte_order);
29484 *offsetp += 2;
29485 proto_tree_add_item(t, hf_x11_xv_GetVideo_drw_w, tvb, *offsetp, 2, byte_order);
29486 *offsetp += 2;
29487 proto_tree_add_item(t, hf_x11_xv_GetVideo_drw_h, tvb, *offsetp, 2, byte_order);
29488 *offsetp += 2;
29489}
29490
29491static void xvGetStill(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
29492{
29493 proto_tree_add_item(t, hf_x11_xv_GetStill_port, tvb, *offsetp, 4, byte_order);
29494 *offsetp += 4;
29495 proto_tree_add_item(t, hf_x11_xv_GetStill_drawable, tvb, *offsetp, 4, byte_order);
29496 *offsetp += 4;
29497 proto_tree_add_item(t, hf_x11_xv_GetStill_gc, tvb, *offsetp, 4, byte_order);
29498 *offsetp += 4;
29499 proto_tree_add_item(t, hf_x11_xv_GetStill_vid_x, tvb, *offsetp, 2, byte_order);
29500 *offsetp += 2;
29501 proto_tree_add_item(t, hf_x11_xv_GetStill_vid_y, tvb, *offsetp, 2, byte_order);
29502 *offsetp += 2;
29503 proto_tree_add_item(t, hf_x11_xv_GetStill_vid_w, tvb, *offsetp, 2, byte_order);
29504 *offsetp += 2;
29505 proto_tree_add_item(t, hf_x11_xv_GetStill_vid_h, tvb, *offsetp, 2, byte_order);
29506 *offsetp += 2;
29507 proto_tree_add_item(t, hf_x11_xv_GetStill_drw_x, tvb, *offsetp, 2, byte_order);
29508 *offsetp += 2;
29509 proto_tree_add_item(t, hf_x11_xv_GetStill_drw_y, tvb, *offsetp, 2, byte_order);
29510 *offsetp += 2;
29511 proto_tree_add_item(t, hf_x11_xv_GetStill_drw_w, tvb, *offsetp, 2, byte_order);
29512 *offsetp += 2;
29513 proto_tree_add_item(t, hf_x11_xv_GetStill_drw_h, tvb, *offsetp, 2, byte_order);
29514 *offsetp += 2;
29515}
29516
29517static void xvStopVideo(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
29518{
29519 proto_tree_add_item(t, hf_x11_xv_StopVideo_port, tvb, *offsetp, 4, byte_order);
29520 *offsetp += 4;
29521 proto_tree_add_item(t, hf_x11_xv_StopVideo_drawable, tvb, *offsetp, 4, byte_order);
29522 *offsetp += 4;
29523}
29524
29525static void xvSelectVideoNotify(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
29526{
29527 proto_tree_add_item(t, hf_x11_xv_SelectVideoNotify_drawable, tvb, *offsetp, 4, byte_order);
29528 *offsetp += 4;
29529 proto_tree_add_item(t, hf_x11_xv_SelectVideoNotify_onoff, tvb, *offsetp, 1, byte_order);
29530 *offsetp += 1;
29531 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 3, ENC_NA);
29532 *offsetp += 3;
29533}
29534
29535static void xvSelectPortNotify(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
29536{
29537 proto_tree_add_item(t, hf_x11_xv_SelectPortNotify_port, tvb, *offsetp, 4, byte_order);
29538 *offsetp += 4;
29539 proto_tree_add_item(t, hf_x11_xv_SelectPortNotify_onoff, tvb, *offsetp, 1, byte_order);
29540 *offsetp += 1;
29541 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 3, ENC_NA);
29542 *offsetp += 3;
29543}
29544
29545static void xvQueryBestSize(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
29546{
29547 proto_tree_add_item(t, hf_x11_xv_QueryBestSize_port, tvb, *offsetp, 4, byte_order);
29548 *offsetp += 4;
29549 proto_tree_add_item(t, hf_x11_xv_QueryBestSize_vid_w, tvb, *offsetp, 2, byte_order);
29550 *offsetp += 2;
29551 proto_tree_add_item(t, hf_x11_xv_QueryBestSize_vid_h, tvb, *offsetp, 2, byte_order);
29552 *offsetp += 2;
29553 proto_tree_add_item(t, hf_x11_xv_QueryBestSize_drw_w, tvb, *offsetp, 2, byte_order);
29554 *offsetp += 2;
29555 proto_tree_add_item(t, hf_x11_xv_QueryBestSize_drw_h, tvb, *offsetp, 2, byte_order);
29556 *offsetp += 2;
29557 proto_tree_add_item(t, hf_x11_xv_QueryBestSize_motion, tvb, *offsetp, 1, byte_order);
29558 *offsetp += 1;
29559 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 3, ENC_NA);
29560 *offsetp += 3;
29561}
29562static void xvQueryBestSize_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
29563{
29564 int sequence_number;
29565
29566 col_append_fstr(pinfo->cinfo, COL_INFO, "-QueryBestSize");
29567
29568 REPLY(reply);
29569 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
29570 *offsetp += 1;
29571 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
29572 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
29573 "%d (xv-QueryBestSize)", sequence_number);
29574 *offsetp += 2;
29575 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
29576 *offsetp += 4;
29577 proto_tree_add_item(t, hf_x11_xv_QueryBestSize_reply_actual_width, tvb, *offsetp, 2, byte_order);
29578 *offsetp += 2;
29579 proto_tree_add_item(t, hf_x11_xv_QueryBestSize_reply_actual_height, tvb, *offsetp, 2, byte_order);
29580 *offsetp += 2;
29581}
29582
29583static void xvSetPortAttribute(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
29584{
29585 proto_tree_add_item(t, hf_x11_xv_SetPortAttribute_port, tvb, *offsetp, 4, byte_order);
29586 *offsetp += 4;
29587 proto_tree_add_item(t, hf_x11_xv_SetPortAttribute_attribute, tvb, *offsetp, 4, byte_order);
29588 *offsetp += 4;
29589 proto_tree_add_item(t, hf_x11_xv_SetPortAttribute_value, tvb, *offsetp, 4, byte_order);
29590 *offsetp += 4;
29591}
29592
29593static void xvGetPortAttribute(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
29594{
29595 proto_tree_add_item(t, hf_x11_xv_GetPortAttribute_port, tvb, *offsetp, 4, byte_order);
29596 *offsetp += 4;
29597 proto_tree_add_item(t, hf_x11_xv_GetPortAttribute_attribute, tvb, *offsetp, 4, byte_order);
29598 *offsetp += 4;
29599}
29600static void xvGetPortAttribute_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
29601{
29602 int sequence_number;
29603
29604 col_append_fstr(pinfo->cinfo, COL_INFO, "-GetPortAttribute");
29605
29606 REPLY(reply);
29607 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
29608 *offsetp += 1;
29609 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
29610 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
29611 "%d (xv-GetPortAttribute)", sequence_number);
29612 *offsetp += 2;
29613 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
29614 *offsetp += 4;
29615 proto_tree_add_item(t, hf_x11_xv_GetPortAttribute_reply_value, tvb, *offsetp, 4, byte_order);
29616 *offsetp += 4;
29617}
29618
29619static void xvQueryPortAttributes(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
29620{
29621 proto_tree_add_item(t, hf_x11_xv_QueryPortAttributes_port, tvb, *offsetp, 4, byte_order);
29622 *offsetp += 4;
29623}
29624static void xvQueryPortAttributes_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
29625{
29626 int sequence_number;
29627 int f_num_attributes;
29628
29629 col_append_fstr(pinfo->cinfo, COL_INFO, "-QueryPortAttributes");
29630
29631 REPLY(reply);
29632 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
29633 *offsetp += 1;
29634 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
29635 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
29636 "%d (xv-QueryPortAttributes)", sequence_number);
29637 *offsetp += 2;
29638 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
29639 *offsetp += 4;
29640 f_num_attributes = tvb_get_uint32(tvb, *offsetp, byte_order);
29641 proto_tree_add_item(t, hf_x11_xv_QueryPortAttributes_reply_num_attributes, tvb, *offsetp, 4, byte_order);
29642 *offsetp += 4;
29643 proto_tree_add_item(t, hf_x11_xv_QueryPortAttributes_reply_text_size, tvb, *offsetp, 4, byte_order);
29644 *offsetp += 4;
29645 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 16, ENC_NA);
29646 *offsetp += 16;
29647 struct_xv_AttributeInfo(tvb, offsetp, t, byte_order, f_num_attributes);
29648}
29649
29650static void xvListImageFormats(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
29651{
29652 proto_tree_add_item(t, hf_x11_xv_ListImageFormats_port, tvb, *offsetp, 4, byte_order);
29653 *offsetp += 4;
29654}
29655static void xvListImageFormats_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
29656{
29657 int sequence_number;
29658 int f_num_formats;
29659
29660 col_append_fstr(pinfo->cinfo, COL_INFO, "-ListImageFormats");
29661
29662 REPLY(reply);
29663 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
29664 *offsetp += 1;
29665 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
29666 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
29667 "%d (xv-ListImageFormats)", sequence_number);
29668 *offsetp += 2;
29669 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
29670 *offsetp += 4;
29671 f_num_formats = tvb_get_uint32(tvb, *offsetp, byte_order);
29672 proto_tree_add_item(t, hf_x11_xv_ListImageFormats_reply_num_formats, tvb, *offsetp, 4, byte_order);
29673 *offsetp += 4;
29674 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 20, ENC_NA);
29675 *offsetp += 20;
29676 struct_xv_ImageFormatInfo(tvb, offsetp, t, byte_order, f_num_formats);
29677}
29678
29679static void xvQueryImageAttributes(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
29680{
29681 proto_tree_add_item(t, hf_x11_xv_QueryImageAttributes_port, tvb, *offsetp, 4, byte_order);
29682 *offsetp += 4;
29683 proto_tree_add_item(t, hf_x11_xv_QueryImageAttributes_id, tvb, *offsetp, 4, byte_order);
29684 *offsetp += 4;
29685 proto_tree_add_item(t, hf_x11_xv_QueryImageAttributes_width, tvb, *offsetp, 2, byte_order);
29686 *offsetp += 2;
29687 proto_tree_add_item(t, hf_x11_xv_QueryImageAttributes_height, tvb, *offsetp, 2, byte_order);
29688 *offsetp += 2;
29689}
29690static void xvQueryImageAttributes_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
29691{
29692 int sequence_number;
29693 int f_num_planes;
29694
29695 col_append_fstr(pinfo->cinfo, COL_INFO, "-QueryImageAttributes");
29696
29697 REPLY(reply);
29698 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
29699 *offsetp += 1;
29700 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
29701 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
29702 "%d (xv-QueryImageAttributes)", sequence_number);
29703 *offsetp += 2;
29704 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
29705 *offsetp += 4;
29706 f_num_planes = tvb_get_uint32(tvb, *offsetp, byte_order);
29707 proto_tree_add_item(t, hf_x11_xv_QueryImageAttributes_reply_num_planes, tvb, *offsetp, 4, byte_order);
29708 *offsetp += 4;
29709 proto_tree_add_item(t, hf_x11_xv_QueryImageAttributes_reply_data_size, tvb, *offsetp, 4, byte_order);
29710 *offsetp += 4;
29711 proto_tree_add_item(t, hf_x11_xv_QueryImageAttributes_reply_width, tvb, *offsetp, 2, byte_order);
29712 *offsetp += 2;
29713 proto_tree_add_item(t, hf_x11_xv_QueryImageAttributes_reply_height, tvb, *offsetp, 2, byte_order);
29714 *offsetp += 2;
29715 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 12, ENC_NA);
29716 *offsetp += 12;
29717 listOfCard32(tvb, offsetp, t, hf_x11_xv_QueryImageAttributes_reply_pitches, hf_x11_xv_QueryImageAttributes_reply_pitches_item, f_num_planes, byte_order);
29718 listOfCard32(tvb, offsetp, t, hf_x11_xv_QueryImageAttributes_reply_offsets, hf_x11_xv_QueryImageAttributes_reply_offsets_item, f_num_planes, byte_order);
29719}
29720
29721static void xvPutImage(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
29722{
29723 proto_tree_add_item(t, hf_x11_xv_PutImage_port, tvb, *offsetp, 4, byte_order);
29724 *offsetp += 4;
29725 proto_tree_add_item(t, hf_x11_xv_PutImage_drawable, tvb, *offsetp, 4, byte_order);
29726 *offsetp += 4;
29727 proto_tree_add_item(t, hf_x11_xv_PutImage_gc, tvb, *offsetp, 4, byte_order);
29728 *offsetp += 4;
29729 proto_tree_add_item(t, hf_x11_xv_PutImage_id, tvb, *offsetp, 4, byte_order);
29730 *offsetp += 4;
29731 proto_tree_add_item(t, hf_x11_xv_PutImage_src_x, tvb, *offsetp, 2, byte_order);
29732 *offsetp += 2;
29733 proto_tree_add_item(t, hf_x11_xv_PutImage_src_y, tvb, *offsetp, 2, byte_order);
29734 *offsetp += 2;
29735 proto_tree_add_item(t, hf_x11_xv_PutImage_src_w, tvb, *offsetp, 2, byte_order);
29736 *offsetp += 2;
29737 proto_tree_add_item(t, hf_x11_xv_PutImage_src_h, tvb, *offsetp, 2, byte_order);
29738 *offsetp += 2;
29739 proto_tree_add_item(t, hf_x11_xv_PutImage_drw_x, tvb, *offsetp, 2, byte_order);
29740 *offsetp += 2;
29741 proto_tree_add_item(t, hf_x11_xv_PutImage_drw_y, tvb, *offsetp, 2, byte_order);
29742 *offsetp += 2;
29743 proto_tree_add_item(t, hf_x11_xv_PutImage_drw_w, tvb, *offsetp, 2, byte_order);
29744 *offsetp += 2;
29745 proto_tree_add_item(t, hf_x11_xv_PutImage_drw_h, tvb, *offsetp, 2, byte_order);
29746 *offsetp += 2;
29747 proto_tree_add_item(t, hf_x11_xv_PutImage_width, tvb, *offsetp, 2, byte_order);
29748 *offsetp += 2;
29749 proto_tree_add_item(t, hf_x11_xv_PutImage_height, tvb, *offsetp, 2, byte_order);
29750 *offsetp += 2;
29751 listOfByte(tvb, offsetp, t, hf_x11_xv_PutImage_data, (length - 40) / 1, byte_order);
29752}
29753
29754static void xvShmPutImage(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
29755{
29756 proto_tree_add_item(t, hf_x11_xv_ShmPutImage_port, tvb, *offsetp, 4, byte_order);
29757 *offsetp += 4;
29758 proto_tree_add_item(t, hf_x11_xv_ShmPutImage_drawable, tvb, *offsetp, 4, byte_order);
29759 *offsetp += 4;
29760 proto_tree_add_item(t, hf_x11_xv_ShmPutImage_gc, tvb, *offsetp, 4, byte_order);
29761 *offsetp += 4;
29762 proto_tree_add_item(t, hf_x11_xv_ShmPutImage_shmseg, tvb, *offsetp, 4, byte_order);
29763 *offsetp += 4;
29764 proto_tree_add_item(t, hf_x11_xv_ShmPutImage_id, tvb, *offsetp, 4, byte_order);
29765 *offsetp += 4;
29766 proto_tree_add_item(t, hf_x11_xv_ShmPutImage_offset, tvb, *offsetp, 4, byte_order);
29767 *offsetp += 4;
29768 proto_tree_add_item(t, hf_x11_xv_ShmPutImage_src_x, tvb, *offsetp, 2, byte_order);
29769 *offsetp += 2;
29770 proto_tree_add_item(t, hf_x11_xv_ShmPutImage_src_y, tvb, *offsetp, 2, byte_order);
29771 *offsetp += 2;
29772 proto_tree_add_item(t, hf_x11_xv_ShmPutImage_src_w, tvb, *offsetp, 2, byte_order);
29773 *offsetp += 2;
29774 proto_tree_add_item(t, hf_x11_xv_ShmPutImage_src_h, tvb, *offsetp, 2, byte_order);
29775 *offsetp += 2;
29776 proto_tree_add_item(t, hf_x11_xv_ShmPutImage_drw_x, tvb, *offsetp, 2, byte_order);
29777 *offsetp += 2;
29778 proto_tree_add_item(t, hf_x11_xv_ShmPutImage_drw_y, tvb, *offsetp, 2, byte_order);
29779 *offsetp += 2;
29780 proto_tree_add_item(t, hf_x11_xv_ShmPutImage_drw_w, tvb, *offsetp, 2, byte_order);
29781 *offsetp += 2;
29782 proto_tree_add_item(t, hf_x11_xv_ShmPutImage_drw_h, tvb, *offsetp, 2, byte_order);
29783 *offsetp += 2;
29784 proto_tree_add_item(t, hf_x11_xv_ShmPutImage_width, tvb, *offsetp, 2, byte_order);
29785 *offsetp += 2;
29786 proto_tree_add_item(t, hf_x11_xv_ShmPutImage_height, tvb, *offsetp, 2, byte_order);
29787 *offsetp += 2;
29788 proto_tree_add_item(t, hf_x11_xv_ShmPutImage_send_event, tvb, *offsetp, 1, byte_order);
29789 *offsetp += 1;
29790 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 3, ENC_NA);
29791 *offsetp += 3;
29792}
29793static const value_string xv_extension_minor[] = {
29794 { 0, "QueryExtension" },
29795 { 1, "QueryAdaptors" },
29796 { 2, "QueryEncodings" },
29797 { 3, "GrabPort" },
29798 { 4, "UngrabPort" },
29799 { 5, "PutVideo" },
29800 { 6, "PutStill" },
29801 { 7, "GetVideo" },
29802 { 8, "GetStill" },
29803 { 9, "StopVideo" },
29804 { 10, "SelectVideoNotify" },
29805 { 11, "SelectPortNotify" },
29806 { 12, "QueryBestSize" },
29807 { 13, "SetPortAttribute" },
29808 { 14, "GetPortAttribute" },
29809 { 15, "QueryPortAttributes" },
29810 { 16, "ListImageFormats" },
29811 { 17, "QueryImageAttributes" },
29812 { 18, "PutImage" },
29813 { 19, "ShmPutImage" },
29814 { 0, NULL }
29815};
29816static const x11_event_info xv_events[] = {
29817 { "xv-PortNotify", xvPortNotify },
29818 { NULL, NULL }
29819};
29820static const x11_reply_info xv_replies[] = {
29821 { 0, xvQueryExtension_Reply },
29822 { 1, xvQueryAdaptors_Reply },
29823 { 2, xvQueryEncodings_Reply },
29824 { 3, xvGrabPort_Reply },
29825 { 12, xvQueryBestSize_Reply },
29826 { 14, xvGetPortAttribute_Reply },
29827 { 15, xvQueryPortAttributes_Reply },
29828 { 16, xvListImageFormats_Reply },
29829 { 17, xvQueryImageAttributes_Reply },
29830 { 0, NULL }
29831};
29832
29833static void dispatch_xv(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
29834{
29835 int minor, length;
29836 minor = CARD8(xv_extension_minor);
29837 length = REQUEST_LENGTH();
29838
29839 col_append_fstr(pinfo->cinfo, COL_INFO, "-%s",
29840 val_to_str(minor, xv_extension_minor,
29841 "<Unknown opcode %d>"));
29842 switch (minor) {
29843 case 0:
29844 xvQueryExtension(tvb, pinfo, offsetp, t, byte_order, length);
29845 break;
29846 case 1:
29847 xvQueryAdaptors(tvb, pinfo, offsetp, t, byte_order, length);
29848 break;
29849 case 2:
29850 xvQueryEncodings(tvb, pinfo, offsetp, t, byte_order, length);
29851 break;
29852 case 3:
29853 xvGrabPort(tvb, pinfo, offsetp, t, byte_order, length);
29854 break;
29855 case 4:
29856 xvUngrabPort(tvb, pinfo, offsetp, t, byte_order, length);
29857 break;
29858 case 5:
29859 xvPutVideo(tvb, pinfo, offsetp, t, byte_order, length);
29860 break;
29861 case 6:
29862 xvPutStill(tvb, pinfo, offsetp, t, byte_order, length);
29863 break;
29864 case 7:
29865 xvGetVideo(tvb, pinfo, offsetp, t, byte_order, length);
29866 break;
29867 case 8:
29868 xvGetStill(tvb, pinfo, offsetp, t, byte_order, length);
29869 break;
29870 case 9:
29871 xvStopVideo(tvb, pinfo, offsetp, t, byte_order, length);
29872 break;
29873 case 10:
29874 xvSelectVideoNotify(tvb, pinfo, offsetp, t, byte_order, length);
29875 break;
29876 case 11:
29877 xvSelectPortNotify(tvb, pinfo, offsetp, t, byte_order, length);
29878 break;
29879 case 12:
29880 xvQueryBestSize(tvb, pinfo, offsetp, t, byte_order, length);
29881 break;
29882 case 13:
29883 xvSetPortAttribute(tvb, pinfo, offsetp, t, byte_order, length);
29884 break;
29885 case 14:
29886 xvGetPortAttribute(tvb, pinfo, offsetp, t, byte_order, length);
29887 break;
29888 case 15:
29889 xvQueryPortAttributes(tvb, pinfo, offsetp, t, byte_order, length);
29890 break;
29891 case 16:
29892 xvListImageFormats(tvb, pinfo, offsetp, t, byte_order, length);
29893 break;
29894 case 17:
29895 xvQueryImageAttributes(tvb, pinfo, offsetp, t, byte_order, length);
29896 break;
29897 case 18:
29898 xvPutImage(tvb, pinfo, offsetp, t, byte_order, length);
29899 break;
29900 case 19:
29901 xvShmPutImage(tvb, pinfo, offsetp, t, byte_order, length);
29902 break;
29903 /* No need for a default case here, since Unknown is printed above,
29904 and UNDECODED() is taken care of by dissect_x11_request */
29905 }
29906}
29907
29908static void register_xv(void)
29909{
29910 set_handler("XVideo", dispatch_xv, xv_errors, xv_events, NULL, xv_replies);
29911}
29912
29913static void struct_xvmc_SurfaceInfo(tvbuff_t *tvb, int *offsetp, proto_tree *root, unsigned byte_order _U_, int count)
29914{
29915 int i;
29916 for (i = 0; i < count; i++) {
29917 proto_item *item;
29918 proto_tree *t;
29919
29920 item = proto_tree_add_item(root, hf_x11_struct_xvmc_SurfaceInfo, tvb, *offsetp, 24, ENC_NA);
29921 t = proto_item_add_subtree(item, ett_x11_rectangle);
29922 proto_tree_add_item(t, hf_x11_struct_xvmc_SurfaceInfo_id, tvb, *offsetp, 4, byte_order);
29923 *offsetp += 4;
29924 proto_tree_add_item(t, hf_x11_struct_xvmc_SurfaceInfo_chroma_format, tvb, *offsetp, 2, byte_order);
29925 *offsetp += 2;
29926 proto_tree_add_item(t, hf_x11_struct_xvmc_SurfaceInfo_pad0, tvb, *offsetp, 2, byte_order);
29927 *offsetp += 2;
29928 proto_tree_add_item(t, hf_x11_struct_xvmc_SurfaceInfo_max_width, tvb, *offsetp, 2, byte_order);
29929 *offsetp += 2;
29930 proto_tree_add_item(t, hf_x11_struct_xvmc_SurfaceInfo_max_height, tvb, *offsetp, 2, byte_order);
29931 *offsetp += 2;
29932 proto_tree_add_item(t, hf_x11_struct_xvmc_SurfaceInfo_subpicture_max_width, tvb, *offsetp, 2, byte_order);
29933 *offsetp += 2;
29934 proto_tree_add_item(t, hf_x11_struct_xvmc_SurfaceInfo_subpicture_max_height, tvb, *offsetp, 2, byte_order);
29935 *offsetp += 2;
29936 proto_tree_add_item(t, hf_x11_struct_xvmc_SurfaceInfo_mc_type, tvb, *offsetp, 4, byte_order);
29937 *offsetp += 4;
29938 proto_tree_add_item(t, hf_x11_struct_xvmc_SurfaceInfo_flags, tvb, *offsetp, 4, byte_order);
29939 *offsetp += 4;
29940 }
29941}
29942
29943static void xvmcQueryVersion(tvbuff_t *tvb _U_, packet_info *pinfo _U_, int *offsetp _U_, proto_tree *t _U_, unsigned byte_order _U_, int length _U_)
29944{
29945}
29946static void xvmcQueryVersion_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
29947{
29948 int sequence_number;
29949
29950 col_append_fstr(pinfo->cinfo, COL_INFO, "-QueryVersion");
29951
29952 REPLY(reply);
29953 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
29954 *offsetp += 1;
29955 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
29956 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
29957 "%d (xvmc-QueryVersion)", sequence_number);
29958 *offsetp += 2;
29959 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
29960 *offsetp += 4;
29961 proto_tree_add_item(t, hf_x11_xvmc_QueryVersion_reply_major, tvb, *offsetp, 4, byte_order);
29962 *offsetp += 4;
29963 proto_tree_add_item(t, hf_x11_xvmc_QueryVersion_reply_minor, tvb, *offsetp, 4, byte_order);
29964 *offsetp += 4;
29965}
29966
29967static void xvmcListSurfaceTypes(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
29968{
29969 proto_tree_add_item(t, hf_x11_xvmc_ListSurfaceTypes_port_id, tvb, *offsetp, 4, byte_order);
29970 *offsetp += 4;
29971}
29972static void xvmcListSurfaceTypes_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
29973{
29974 int sequence_number;
29975 int f_num;
29976
29977 col_append_fstr(pinfo->cinfo, COL_INFO, "-ListSurfaceTypes");
29978
29979 REPLY(reply);
29980 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
29981 *offsetp += 1;
29982 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
29983 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
29984 "%d (xvmc-ListSurfaceTypes)", sequence_number);
29985 *offsetp += 2;
29986 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
29987 *offsetp += 4;
29988 f_num = tvb_get_uint32(tvb, *offsetp, byte_order);
29989 proto_tree_add_item(t, hf_x11_xvmc_ListSurfaceTypes_reply_num, tvb, *offsetp, 4, byte_order);
29990 *offsetp += 4;
29991 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 20, ENC_NA);
29992 *offsetp += 20;
29993 struct_xvmc_SurfaceInfo(tvb, offsetp, t, byte_order, f_num);
29994}
29995
29996static void xvmcCreateContext(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
29997{
29998 proto_tree_add_item(t, hf_x11_xvmc_CreateContext_context_id, tvb, *offsetp, 4, byte_order);
29999 *offsetp += 4;
30000 proto_tree_add_item(t, hf_x11_xvmc_CreateContext_port_id, tvb, *offsetp, 4, byte_order);
30001 *offsetp += 4;
30002 proto_tree_add_item(t, hf_x11_xvmc_CreateContext_surface_id, tvb, *offsetp, 4, byte_order);
30003 *offsetp += 4;
30004 proto_tree_add_item(t, hf_x11_xvmc_CreateContext_width, tvb, *offsetp, 2, byte_order);
30005 *offsetp += 2;
30006 proto_tree_add_item(t, hf_x11_xvmc_CreateContext_height, tvb, *offsetp, 2, byte_order);
30007 *offsetp += 2;
30008 proto_tree_add_item(t, hf_x11_xvmc_CreateContext_flags, tvb, *offsetp, 4, byte_order);
30009 *offsetp += 4;
30010}
30011static void xvmcCreateContext_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
30012{
30013 int sequence_number;
30014 int f_length;
30015
30016 col_append_fstr(pinfo->cinfo, COL_INFO, "-CreateContext");
30017
30018 REPLY(reply);
30019 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
30020 *offsetp += 1;
30021 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
30022 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
30023 "%d (xvmc-CreateContext)", sequence_number);
30024 *offsetp += 2;
30025 f_length = tvb_get_uint32(tvb, *offsetp, byte_order);
30026 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
30027 *offsetp += 4;
30028 proto_tree_add_item(t, hf_x11_xvmc_CreateContext_reply_width_actual, tvb, *offsetp, 2, byte_order);
30029 *offsetp += 2;
30030 proto_tree_add_item(t, hf_x11_xvmc_CreateContext_reply_height_actual, tvb, *offsetp, 2, byte_order);
30031 *offsetp += 2;
30032 proto_tree_add_item(t, hf_x11_xvmc_CreateContext_reply_flags_return, tvb, *offsetp, 4, byte_order);
30033 *offsetp += 4;
30034 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 20, ENC_NA);
30035 *offsetp += 20;
30036 listOfCard32(tvb, offsetp, t, hf_x11_xvmc_CreateContext_reply_priv_data, hf_x11_xvmc_CreateContext_reply_priv_data_item, f_length, byte_order);
30037}
30038
30039static void xvmcDestroyContext(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
30040{
30041 proto_tree_add_item(t, hf_x11_xvmc_DestroyContext_context_id, tvb, *offsetp, 4, byte_order);
30042 *offsetp += 4;
30043}
30044
30045static void xvmcCreateSurface(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
30046{
30047 proto_tree_add_item(t, hf_x11_xvmc_CreateSurface_surface_id, tvb, *offsetp, 4, byte_order);
30048 *offsetp += 4;
30049 proto_tree_add_item(t, hf_x11_xvmc_CreateSurface_context_id, tvb, *offsetp, 4, byte_order);
30050 *offsetp += 4;
30051}
30052static void xvmcCreateSurface_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
30053{
30054 int sequence_number;
30055 int f_length;
30056
30057 col_append_fstr(pinfo->cinfo, COL_INFO, "-CreateSurface");
30058
30059 REPLY(reply);
30060 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
30061 *offsetp += 1;
30062 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
30063 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
30064 "%d (xvmc-CreateSurface)", sequence_number);
30065 *offsetp += 2;
30066 f_length = tvb_get_uint32(tvb, *offsetp, byte_order);
30067 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
30068 *offsetp += 4;
30069 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 24, ENC_NA);
30070 *offsetp += 24;
30071 listOfCard32(tvb, offsetp, t, hf_x11_xvmc_CreateSurface_reply_priv_data, hf_x11_xvmc_CreateSurface_reply_priv_data_item, f_length, byte_order);
30072}
30073
30074static void xvmcDestroySurface(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
30075{
30076 proto_tree_add_item(t, hf_x11_xvmc_DestroySurface_surface_id, tvb, *offsetp, 4, byte_order);
30077 *offsetp += 4;
30078}
30079
30080static void xvmcCreateSubpicture(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
30081{
30082 proto_tree_add_item(t, hf_x11_xvmc_CreateSubpicture_subpicture_id, tvb, *offsetp, 4, byte_order);
30083 *offsetp += 4;
30084 proto_tree_add_item(t, hf_x11_xvmc_CreateSubpicture_context, tvb, *offsetp, 4, byte_order);
30085 *offsetp += 4;
30086 proto_tree_add_item(t, hf_x11_xvmc_CreateSubpicture_xvimage_id, tvb, *offsetp, 4, byte_order);
30087 *offsetp += 4;
30088 proto_tree_add_item(t, hf_x11_xvmc_CreateSubpicture_width, tvb, *offsetp, 2, byte_order);
30089 *offsetp += 2;
30090 proto_tree_add_item(t, hf_x11_xvmc_CreateSubpicture_height, tvb, *offsetp, 2, byte_order);
30091 *offsetp += 2;
30092}
30093static void xvmcCreateSubpicture_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
30094{
30095 int sequence_number;
30096 int f_length;
30097
30098 col_append_fstr(pinfo->cinfo, COL_INFO, "-CreateSubpicture");
30099
30100 REPLY(reply);
30101 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
30102 *offsetp += 1;
30103 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
30104 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
30105 "%d (xvmc-CreateSubpicture)", sequence_number);
30106 *offsetp += 2;
30107 f_length = tvb_get_uint32(tvb, *offsetp, byte_order);
30108 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
30109 *offsetp += 4;
30110 proto_tree_add_item(t, hf_x11_xvmc_CreateSubpicture_reply_width_actual, tvb, *offsetp, 2, byte_order);
30111 *offsetp += 2;
30112 proto_tree_add_item(t, hf_x11_xvmc_CreateSubpicture_reply_height_actual, tvb, *offsetp, 2, byte_order);
30113 *offsetp += 2;
30114 proto_tree_add_item(t, hf_x11_xvmc_CreateSubpicture_reply_num_palette_entries, tvb, *offsetp, 2, byte_order);
30115 *offsetp += 2;
30116 proto_tree_add_item(t, hf_x11_xvmc_CreateSubpicture_reply_entry_bytes, tvb, *offsetp, 2, byte_order);
30117 *offsetp += 2;
30118 listOfByte(tvb, offsetp, t, hf_x11_xvmc_CreateSubpicture_reply_component_order, 4, byte_order);
30119 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 12, ENC_NA);
30120 *offsetp += 12;
30121 listOfCard32(tvb, offsetp, t, hf_x11_xvmc_CreateSubpicture_reply_priv_data, hf_x11_xvmc_CreateSubpicture_reply_priv_data_item, f_length, byte_order);
30122}
30123
30124static void xvmcDestroySubpicture(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
30125{
30126 proto_tree_add_item(t, hf_x11_xvmc_DestroySubpicture_subpicture_id, tvb, *offsetp, 4, byte_order);
30127 *offsetp += 4;
30128}
30129
30130static void xvmcListSubpictureTypes(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, unsigned byte_order, int length _U_)
30131{
30132 proto_tree_add_item(t, hf_x11_xvmc_ListSubpictureTypes_port_id, tvb, *offsetp, 4, byte_order);
30133 *offsetp += 4;
30134 proto_tree_add_item(t, hf_x11_xvmc_ListSubpictureTypes_surface_id, tvb, *offsetp, 4, byte_order);
30135 *offsetp += 4;
30136}
30137static void xvmcListSubpictureTypes_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
30138{
30139 int sequence_number;
30140 int f_num;
30141
30142 col_append_fstr(pinfo->cinfo, COL_INFO, "-ListSubpictureTypes");
30143
30144 REPLY(reply);
30145 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 1, ENC_NA);
30146 *offsetp += 1;
30147 sequence_number = tvb_get_uint16(tvb, *offsetp, byte_order);
30148 proto_tree_add_uint_format_value(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number,
30149 "%d (xvmc-ListSubpictureTypes)", sequence_number);
30150 *offsetp += 2;
30151 proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, byte_order);
30152 *offsetp += 4;
30153 f_num = tvb_get_uint32(tvb, *offsetp, byte_order);
30154 proto_tree_add_item(t, hf_x11_xvmc_ListSubpictureTypes_reply_num, tvb, *offsetp, 4, byte_order);
30155 *offsetp += 4;
30156 proto_tree_add_item(t, hf_x11_unused, tvb, *offsetp, 20, ENC_NA);
30157 *offsetp += 20;
30158 struct_xv_ImageFormatInfo(tvb, offsetp, t, byte_order, f_num);
30159}
30160static const value_string xvmc_extension_minor[] = {
30161 { 0, "QueryVersion" },
30162 { 1, "ListSurfaceTypes" },
30163 { 2, "CreateContext" },
30164 { 3, "DestroyContext" },
30165 { 4, "CreateSurface" },
30166 { 5, "DestroySurface" },
30167 { 6, "CreateSubpicture" },
30168 { 7, "DestroySubpicture" },
30169 { 8, "ListSubpictureTypes" },
30170 { 0, NULL }
30171};
30172static const x11_event_info xvmc_events[] = {
30173 { NULL, NULL }
30174};
30175static const x11_reply_info xvmc_replies[] = {
30176 { 0, xvmcQueryVersion_Reply },
30177 { 1, xvmcListSurfaceTypes_Reply },
30178 { 2, xvmcCreateContext_Reply },
30179 { 4, xvmcCreateSurface_Reply },
30180 { 6, xvmcCreateSubpicture_Reply },
30181 { 8, xvmcListSubpictureTypes_Reply },
30182 { 0, NULL }
30183};
30184
30185static void dispatch_xvmc(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, unsigned byte_order)
30186{
30187 int minor, length;
30188 minor = CARD8(xvmc_extension_minor);
30189 length = REQUEST_LENGTH();
30190
30191 col_append_fstr(pinfo->cinfo, COL_INFO, "-%s",
30192 val_to_str(minor, xvmc_extension_minor,
30193 "<Unknown opcode %d>"));
30194 switch (minor) {
30195 case 0:
30196 xvmcQueryVersion(tvb, pinfo, offsetp, t, byte_order, length);
30197 break;
30198 case 1:
30199 xvmcListSurfaceTypes(tvb, pinfo, offsetp, t, byte_order, length);
30200 break;
30201 case 2:
30202 xvmcCreateContext(tvb, pinfo, offsetp, t, byte_order, length);
30203 break;
30204 case 3:
30205 xvmcDestroyContext(tvb, pinfo, offsetp, t, byte_order, length);
30206 break;
30207 case 4:
30208 xvmcCreateSurface(tvb, pinfo, offsetp, t, byte_order, length);
30209 break;
30210 case 5:
30211 xvmcDestroySurface(tvb, pinfo, offsetp, t, byte_order, length);
30212 break;
30213 case 6:
30214 xvmcCreateSubpicture(tvb, pinfo, offsetp, t, byte_order, length);
30215 break;
30216 case 7:
30217 xvmcDestroySubpicture(tvb, pinfo, offsetp, t, byte_order, length);
30218 break;
30219 case 8:
30220 xvmcListSubpictureTypes(tvb, pinfo, offsetp, t, byte_order, length);
30221 break;
30222 /* No need for a default case here, since Unknown is printed above,
30223 and UNDECODED() is taken care of by dissect_x11_request */
30224 }
30225}
30226
30227static void register_xvmc(void)
30228{
30229 set_handler("XVideo-MotionCompensation", dispatch_xvmc, xvmc_errors, xvmc_events, NULL, xvmc_replies);
30230}
30231static void register_x11_extensions(void)
30232{
30233 register_bigreq();
30234 register_composite();
30235 register_damage();
30236 register_dbe();
30237 register_dpms();
30238 register_dri2();
30239 register_dri3();
30240 register_ge();
30241 register_glx();
30242 register_present();
30243 register_randr();
30244 register_record();
30245 register_render();
30246 register_res();
30247 register_screensaver();
30248 register_shape();
30249 register_shm();
30250 register_sync();
30251 register_xc_misc();
30252 register_xevie();
30253 register_xf86dri();
30254 register_xf86vidmode();
30255 register_xfixes();
30256 register_xinerama();
30257 register_xinput();
30258 register_xkb();
30259 register_xprint();
30260 register_xselinux();
30261 register_xtest();
30262 register_xv();
30263 register_xvmc();
30264}
@ COL_INFO
Definition column-utils.h:88
proto_item * proto_tree_add_uint(proto_tree *tree, int hfindex, tvbuff_t *tvb, int start, int length, uint32_t value)
Definition proto.c:5805
proto_tree * proto_item_add_subtree(proto_item *pi, const int idx)
Definition proto.c:8023
proto_item * proto_tree_add_bitmask(proto_tree *parent_tree, tvbuff_t *tvb, const unsigned offset, const int hf_hdr, const int ett, int *const *fields, const unsigned encoding)
Definition proto.c:12882
Definition packet_info.h:43
struct epan_column_info * cinfo
Definition packet_info.h:45
Definition proto.h:903
Definition value_string.h:169
Definition value_string.h:25
Definition packet-x11.c:3295
Definition tvbuff-int.h:35
Definition packet-x11.c:3300
Definition packet-x11.c:3290