diff options
author | Jeff Morriss <jeff.morriss@ulticom.com> | 2009-10-03 01:56:10 +0000 |
---|---|---|
committer | Jeff Morriss <jeff.morriss@ulticom.com> | 2009-10-03 01:56:10 +0000 |
commit | 37aa66532ac557c9d4c5fff43c2a7cabe47c4ef5 (patch) | |
tree | 2e1d5a80de4b7b5b6604581dc09c68d5e616877e /epan/dissectors/x11-extension-implementation.h | |
parent | d85de669201b13b8c937c2f949bf9dfb0a61df83 (diff) |
From Peter Harris via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4067 :
This patch adds enum support to x11-process-xcb.pl
svn path=/trunk/; revision=30257
Diffstat (limited to 'epan/dissectors/x11-extension-implementation.h')
-rw-r--r-- | epan/dissectors/x11-extension-implementation.h | 812 |
1 files changed, 447 insertions, 365 deletions
diff --git a/epan/dissectors/x11-extension-implementation.h b/epan/dissectors/x11-extension-implementation.h index 05e44ac168..813dbb3d2c 100644 --- a/epan/dissectors/x11-extension-implementation.h +++ b/epan/dissectors/x11-extension-implementation.h @@ -1,6 +1,6 @@ /* Do not modify this file. */ /* It was automatically generated by ../../tools/process-x11-xcb.pl - using xcbproto version 1.5-4-ga507629 */ + using xcbproto version 1.5-5-g4f4d43e */ /* $Id$ */ /* @@ -4820,6 +4820,8 @@ static void dispatch_glx_render(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, length -= (len + 4); } } +#include "x11-enum.h" + static void bigreqEnable(tvbuff_t *tvb _U_, packet_info *pinfo _U_, int *offsetp _U_, proto_tree *t _U_, int little_endian _U_, int length _U_) { @@ -4994,9 +4996,7 @@ static void struct_PICTFORMINFO(tvbuff_t *tvb, int *offsetp, proto_tree *root, i f_id = VALUE32(tvb, *offsetp); proto_tree_add_item(t, hf_x11_struct_PICTFORMINFO_id, tvb, *offsetp, 4, little_endian); *offsetp += 4; - f_type = VALUE8(tvb, *offsetp); - proto_tree_add_item(t, hf_x11_struct_PICTFORMINFO_type, tvb, *offsetp, 1, little_endian); - *offsetp += 1; + f_type = field8(tvb, offsetp, t, hf_x11_struct_PICTFORMINFO_type, little_endian); f_depth = VALUE8(tvb, *offsetp); proto_tree_add_item(t, hf_x11_struct_PICTFORMINFO_depth, tvb, *offsetp, 1, little_endian); *offsetp += 1; @@ -5412,9 +5412,7 @@ static void compositeRedirectWindow(tvbuff_t *tvb, packet_info *pinfo _U_, int * f_window = VALUE32(tvb, *offsetp); proto_tree_add_item(t, hf_x11_composite_RedirectWindow_window, tvb, *offsetp, 4, little_endian); *offsetp += 4; - f_update = VALUE8(tvb, *offsetp); - proto_tree_add_item(t, hf_x11_composite_RedirectWindow_update, tvb, *offsetp, 1, little_endian); - *offsetp += 1; + f_update = field8(tvb, offsetp, t, hf_x11_composite_RedirectWindow_update, little_endian); UNUSED(3); } @@ -5425,9 +5423,7 @@ static void compositeRedirectSubwindows(tvbuff_t *tvb, packet_info *pinfo _U_, i f_window = VALUE32(tvb, *offsetp); proto_tree_add_item(t, hf_x11_composite_RedirectSubwindows_window, tvb, *offsetp, 4, little_endian); *offsetp += 4; - f_update = VALUE8(tvb, *offsetp); - proto_tree_add_item(t, hf_x11_composite_RedirectSubwindows_update, tvb, *offsetp, 1, little_endian); - *offsetp += 1; + f_update = field8(tvb, offsetp, t, hf_x11_composite_RedirectSubwindows_update, little_endian); UNUSED(3); } @@ -5438,9 +5434,7 @@ static void compositeUnredirectWindow(tvbuff_t *tvb, packet_info *pinfo _U_, int f_window = VALUE32(tvb, *offsetp); proto_tree_add_item(t, hf_x11_composite_UnredirectWindow_window, tvb, *offsetp, 4, little_endian); *offsetp += 4; - f_update = VALUE8(tvb, *offsetp); - proto_tree_add_item(t, hf_x11_composite_UnredirectWindow_update, tvb, *offsetp, 1, little_endian); - *offsetp += 1; + f_update = field8(tvb, offsetp, t, hf_x11_composite_UnredirectWindow_update, little_endian); UNUSED(3); } @@ -5451,9 +5445,7 @@ static void compositeUnredirectSubwindows(tvbuff_t *tvb, packet_info *pinfo _U_, f_window = VALUE32(tvb, *offsetp); proto_tree_add_item(t, hf_x11_composite_UnredirectSubwindows_window, tvb, *offsetp, 4, little_endian); *offsetp += 4; - f_update = VALUE8(tvb, *offsetp); - proto_tree_add_item(t, hf_x11_composite_UnredirectSubwindows_update, tvb, *offsetp, 1, little_endian); - *offsetp += 1; + f_update = field8(tvb, offsetp, t, hf_x11_composite_UnredirectSubwindows_update, little_endian); UNUSED(3); } @@ -5635,9 +5627,7 @@ static void damageCreate(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, pr f_drawable = VALUE32(tvb, *offsetp); proto_tree_add_item(t, hf_x11_damage_Create_drawable, tvb, *offsetp, 4, little_endian); *offsetp += 4; - f_level = VALUE8(tvb, *offsetp); - proto_tree_add_item(t, hf_x11_damage_Create_level, tvb, *offsetp, 1, little_endian); - *offsetp += 1; + f_level = field8(tvb, offsetp, t, hf_x11_damage_Create_level, little_endian); UNUSED(3); } @@ -5657,12 +5647,8 @@ static void damageSubtract(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, f_damage = VALUE32(tvb, *offsetp); proto_tree_add_item(t, hf_x11_damage_Subtract_damage, tvb, *offsetp, 4, little_endian); *offsetp += 4; - f_repair = VALUE32(tvb, *offsetp); - proto_tree_add_item(t, hf_x11_damage_Subtract_repair, tvb, *offsetp, 4, little_endian); - *offsetp += 4; - f_parts = VALUE32(tvb, *offsetp); - proto_tree_add_item(t, hf_x11_damage_Subtract_parts, tvb, *offsetp, 4, little_endian); - *offsetp += 4; + f_repair = field32(tvb, offsetp, t, hf_x11_damage_Subtract_repair, little_endian); + f_parts = field32(tvb, offsetp, t, hf_x11_damage_Subtract_parts, little_endian); } static void damageAdd(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, int little_endian, int length _U_) @@ -5683,9 +5669,7 @@ static void damageNotify(tvbuff_t *tvb, int *offsetp, proto_tree *t, int little_ int f_drawable; int f_damage; int f_timestamp; - f_level = VALUE8(tvb, *offsetp); - proto_tree_add_item(t, hf_x11_damage_Notify_level, tvb, *offsetp, 1, little_endian); - *offsetp += 1; + f_level = field8(tvb, offsetp, t, hf_x11_damage_Notify_level, little_endian); CARD16(event_sequencenumber); f_drawable = VALUE32(tvb, *offsetp); proto_tree_add_item(t, hf_x11_damage_Notify_drawable, tvb, *offsetp, 4, little_endian); @@ -5875,9 +5859,7 @@ static void dpmsDisable(tvbuff_t *tvb _U_, packet_info *pinfo _U_, int *offsetp static void dpmsForceLevel(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, int little_endian, int length _U_) { int f_power_level; - f_power_level = VALUE16(tvb, *offsetp); - proto_tree_add_item(t, hf_x11_dpms_ForceLevel_power_level, tvb, *offsetp, 2, little_endian); - *offsetp += 2; + f_power_level = field16(tvb, offsetp, t, hf_x11_dpms_ForceLevel_power_level, little_endian); } static void dpmsInfo(tvbuff_t *tvb _U_, packet_info *pinfo _U_, int *offsetp _U_, proto_tree *t _U_, int little_endian _U_, int length _U_) @@ -5901,9 +5883,7 @@ static void dpmsInfo_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, prot length = f_length * 4 + 32; proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, little_endian); *offsetp += 4; - f_power_level = VALUE16(tvb, *offsetp); - proto_tree_add_item(t, hf_x11_dpms_Info_reply_power_level, tvb, *offsetp, 2, little_endian); - *offsetp += 2; + f_power_level = field16(tvb, offsetp, t, hf_x11_dpms_Info_reply_power_level, little_endian); f_state = VALUE8(tvb, *offsetp); proto_tree_add_item(t, hf_x11_dpms_Info_reply_state, tvb, *offsetp, 1, little_endian); *offsetp += 1; @@ -9865,7 +9845,16 @@ static void randrSetScreenConfig(tvbuff_t *tvb, packet_info *pinfo _U_, int *off proto_tree_add_item(t, hf_x11_randr_SetScreenConfig_sizeID, tvb, *offsetp, 2, little_endian); *offsetp += 2; f_rotation = VALUE16(tvb, *offsetp); - proto_tree_add_item(t, hf_x11_randr_SetScreenConfig_rotation, tvb, *offsetp, 2, little_endian); + { + proto_item *ti = proto_tree_add_item(t, hf_x11_randr_SetScreenConfig_rotation, tvb, *offsetp, 2, little_endian); + proto_tree *bitmask_tree = proto_item_add_subtree(ti, ett_x11_rectangle); + proto_tree_add_item(bitmask_tree, hf_x11_randr_SetScreenConfig_rotation_mask_Rotate_0, tvb, *offsetp, 2, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_randr_SetScreenConfig_rotation_mask_Rotate_90, tvb, *offsetp, 2, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_randr_SetScreenConfig_rotation_mask_Rotate_180, tvb, *offsetp, 2, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_randr_SetScreenConfig_rotation_mask_Rotate_270, tvb, *offsetp, 2, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_randr_SetScreenConfig_rotation_mask_Reflect_X, tvb, *offsetp, 2, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_randr_SetScreenConfig_rotation_mask_Reflect_Y, tvb, *offsetp, 2, little_endian); + } *offsetp += 2; f_rate = VALUE16(tvb, *offsetp); proto_tree_add_item(t, hf_x11_randr_SetScreenConfig_rate, tvb, *offsetp, 2, little_endian); @@ -9884,9 +9873,7 @@ static void randrSetScreenConfig_Reply(tvbuff_t *tvb, packet_info *pinfo, int *o col_append_fstr(pinfo->cinfo, COL_INFO, "-SetScreenConfig"); REPLY(reply); - f_status = VALUE8(tvb, *offsetp); - proto_tree_add_item(t, hf_x11_randr_SetScreenConfig_reply_status, tvb, *offsetp, 1, little_endian); - *offsetp += 1; + f_status = field8(tvb, offsetp, t, hf_x11_randr_SetScreenConfig_reply_status, little_endian); sequence_number = VALUE16(tvb, *offsetp); proto_tree_add_uint_format(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number, "sequencenumber: %d (randr-SetScreenConfig)", sequence_number); @@ -9904,9 +9891,7 @@ static void randrSetScreenConfig_Reply(tvbuff_t *tvb, packet_info *pinfo, int *o f_root = VALUE32(tvb, *offsetp); proto_tree_add_item(t, hf_x11_randr_SetScreenConfig_reply_root, tvb, *offsetp, 4, little_endian); *offsetp += 4; - f_subpixel_order = VALUE16(tvb, *offsetp); - proto_tree_add_item(t, hf_x11_randr_SetScreenConfig_reply_subpixel_order, tvb, *offsetp, 2, little_endian); - *offsetp += 2; + f_subpixel_order = field16(tvb, offsetp, t, hf_x11_randr_SetScreenConfig_reply_subpixel_order, little_endian); UNUSED(10); } @@ -9918,7 +9903,14 @@ static void randrSelectInput(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp proto_tree_add_item(t, hf_x11_randr_SelectInput_window, tvb, *offsetp, 4, little_endian); *offsetp += 4; f_enable = VALUE16(tvb, *offsetp); - proto_tree_add_item(t, hf_x11_randr_SelectInput_enable, tvb, *offsetp, 2, little_endian); + { + proto_item *ti = proto_tree_add_item(t, hf_x11_randr_SelectInput_enable, tvb, *offsetp, 2, little_endian); + proto_tree *bitmask_tree = proto_item_add_subtree(ti, ett_x11_rectangle); + proto_tree_add_item(bitmask_tree, hf_x11_randr_SelectInput_enable_mask_ScreenChange, tvb, *offsetp, 2, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_randr_SelectInput_enable_mask_CrtcChange, tvb, *offsetp, 2, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_randr_SelectInput_enable_mask_OutputChange, tvb, *offsetp, 2, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_randr_SelectInput_enable_mask_OutputProperty, tvb, *offsetp, 2, little_endian); + } *offsetp += 2; UNUSED(2); } @@ -9947,7 +9939,16 @@ static void randrGetScreenInfo_Reply(tvbuff_t *tvb, packet_info *pinfo, int *off REPLY(reply); f_rotations = VALUE8(tvb, *offsetp); - proto_tree_add_item(t, hf_x11_randr_GetScreenInfo_reply_rotations, tvb, *offsetp, 1, little_endian); + { + proto_item *ti = proto_tree_add_item(t, hf_x11_randr_GetScreenInfo_reply_rotations, tvb, *offsetp, 1, little_endian); + proto_tree *bitmask_tree = proto_item_add_subtree(ti, ett_x11_rectangle); + proto_tree_add_item(bitmask_tree, hf_x11_randr_GetScreenInfo_reply_rotations_mask_Rotate_0, tvb, *offsetp, 1, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_randr_GetScreenInfo_reply_rotations_mask_Rotate_90, tvb, *offsetp, 1, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_randr_GetScreenInfo_reply_rotations_mask_Rotate_180, tvb, *offsetp, 1, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_randr_GetScreenInfo_reply_rotations_mask_Rotate_270, tvb, *offsetp, 1, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_randr_GetScreenInfo_reply_rotations_mask_Reflect_X, tvb, *offsetp, 1, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_randr_GetScreenInfo_reply_rotations_mask_Reflect_Y, tvb, *offsetp, 1, little_endian); + } *offsetp += 1; sequence_number = VALUE16(tvb, *offsetp); proto_tree_add_uint_format(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number, @@ -9973,7 +9974,16 @@ static void randrGetScreenInfo_Reply(tvbuff_t *tvb, packet_info *pinfo, int *off proto_tree_add_item(t, hf_x11_randr_GetScreenInfo_reply_sizeID, tvb, *offsetp, 2, little_endian); *offsetp += 2; f_rotation = VALUE16(tvb, *offsetp); - proto_tree_add_item(t, hf_x11_randr_GetScreenInfo_reply_rotation, tvb, *offsetp, 2, little_endian); + { + proto_item *ti = proto_tree_add_item(t, hf_x11_randr_GetScreenInfo_reply_rotation, tvb, *offsetp, 2, little_endian); + proto_tree *bitmask_tree = proto_item_add_subtree(ti, ett_x11_rectangle); + proto_tree_add_item(bitmask_tree, hf_x11_randr_GetScreenInfo_reply_rotation_mask_Rotate_0, tvb, *offsetp, 2, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_randr_GetScreenInfo_reply_rotation_mask_Rotate_90, tvb, *offsetp, 2, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_randr_GetScreenInfo_reply_rotation_mask_Rotate_180, tvb, *offsetp, 2, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_randr_GetScreenInfo_reply_rotation_mask_Rotate_270, tvb, *offsetp, 2, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_randr_GetScreenInfo_reply_rotation_mask_Reflect_X, tvb, *offsetp, 2, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_randr_GetScreenInfo_reply_rotation_mask_Reflect_Y, tvb, *offsetp, 2, little_endian); + } *offsetp += 2; f_rate = VALUE16(tvb, *offsetp); proto_tree_add_item(t, hf_x11_randr_GetScreenInfo_reply_rate, tvb, *offsetp, 2, little_endian); @@ -10111,7 +10121,24 @@ static void struct_ModeInfo(tvbuff_t *tvb, int *offsetp, proto_tree *root, int l proto_tree_add_item(t, hf_x11_struct_ModeInfo_name_len, tvb, *offsetp, 2, little_endian); *offsetp += 2; f_mode_flags = VALUE32(tvb, *offsetp); - proto_tree_add_item(t, hf_x11_struct_ModeInfo_mode_flags, tvb, *offsetp, 4, little_endian); + { + proto_item *ti = proto_tree_add_item(t, hf_x11_struct_ModeInfo_mode_flags, tvb, *offsetp, 4, little_endian); + proto_tree *bitmask_tree = proto_item_add_subtree(ti, ett_x11_rectangle); + proto_tree_add_item(bitmask_tree, hf_x11_struct_ModeInfo_mode_flags_mask_HsyncPositive, tvb, *offsetp, 4, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_struct_ModeInfo_mode_flags_mask_HsyncNegative, tvb, *offsetp, 4, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_struct_ModeInfo_mode_flags_mask_VsyncPositive, tvb, *offsetp, 4, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_struct_ModeInfo_mode_flags_mask_VsyncNegative, tvb, *offsetp, 4, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_struct_ModeInfo_mode_flags_mask_Interlace, tvb, *offsetp, 4, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_struct_ModeInfo_mode_flags_mask_DoubleScan, tvb, *offsetp, 4, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_struct_ModeInfo_mode_flags_mask_Csync, tvb, *offsetp, 4, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_struct_ModeInfo_mode_flags_mask_CsyncPositive, tvb, *offsetp, 4, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_struct_ModeInfo_mode_flags_mask_CsyncNegative, tvb, *offsetp, 4, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_struct_ModeInfo_mode_flags_mask_HskewPresent, tvb, *offsetp, 4, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_struct_ModeInfo_mode_flags_mask_Bcast, tvb, *offsetp, 4, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_struct_ModeInfo_mode_flags_mask_PixelMultiplex, tvb, *offsetp, 4, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_struct_ModeInfo_mode_flags_mask_DoubleClock, tvb, *offsetp, 4, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_struct_ModeInfo_mode_flags_mask_HalveClock, tvb, *offsetp, 4, little_endian); + } *offsetp += 4; } } @@ -10200,9 +10227,7 @@ static void randrGetOutputInfo_Reply(tvbuff_t *tvb, packet_info *pinfo, int *off col_append_fstr(pinfo->cinfo, COL_INFO, "-GetOutputInfo"); REPLY(reply); - f_status = VALUE8(tvb, *offsetp); - proto_tree_add_item(t, hf_x11_randr_GetOutputInfo_reply_status, tvb, *offsetp, 1, little_endian); - *offsetp += 1; + f_status = field8(tvb, offsetp, t, hf_x11_randr_GetOutputInfo_reply_status, little_endian); sequence_number = VALUE16(tvb, *offsetp); proto_tree_add_uint_format(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number, "sequencenumber: %d (randr-GetOutputInfo)", sequence_number); @@ -10223,12 +10248,8 @@ static void randrGetOutputInfo_Reply(tvbuff_t *tvb, packet_info *pinfo, int *off f_mm_height = VALUE32(tvb, *offsetp); proto_tree_add_item(t, hf_x11_randr_GetOutputInfo_reply_mm_height, tvb, *offsetp, 4, little_endian); *offsetp += 4; - f_connection = VALUE8(tvb, *offsetp); - proto_tree_add_item(t, hf_x11_randr_GetOutputInfo_reply_connection, tvb, *offsetp, 1, little_endian); - *offsetp += 1; - f_subpixel_order = VALUE8(tvb, *offsetp); - proto_tree_add_item(t, hf_x11_randr_GetOutputInfo_reply_subpixel_order, tvb, *offsetp, 1, little_endian); - *offsetp += 1; + f_connection = field8(tvb, offsetp, t, hf_x11_randr_GetOutputInfo_reply_connection, little_endian); + f_subpixel_order = field8(tvb, offsetp, t, hf_x11_randr_GetOutputInfo_reply_subpixel_order, little_endian); f_num_crtcs = VALUE16(tvb, *offsetp); proto_tree_add_item(t, hf_x11_randr_GetOutputInfo_reply_num_crtcs, tvb, *offsetp, 2, little_endian); *offsetp += 2; @@ -10366,9 +10387,7 @@ static void randrChangeOutputProperty(tvbuff_t *tvb, packet_info *pinfo _U_, int f_format = VALUE8(tvb, *offsetp); proto_tree_add_item(t, hf_x11_randr_ChangeOutputProperty_format, tvb, *offsetp, 1, little_endian); *offsetp += 1; - f_mode = VALUE8(tvb, *offsetp); - proto_tree_add_item(t, hf_x11_randr_ChangeOutputProperty_mode, tvb, *offsetp, 1, little_endian); - *offsetp += 1; + f_mode = field8(tvb, offsetp, t, hf_x11_randr_ChangeOutputProperty_mode, little_endian); UNUSED(2); f_num_units = VALUE32(tvb, *offsetp); proto_tree_add_item(t, hf_x11_randr_ChangeOutputProperty_num_units, tvb, *offsetp, 4, little_endian); @@ -10404,9 +10423,7 @@ static void randrGetOutputProperty(tvbuff_t *tvb, packet_info *pinfo _U_, int *o f_property = VALUE32(tvb, *offsetp); proto_tree_add_item(t, hf_x11_randr_GetOutputProperty_property, tvb, *offsetp, 4, little_endian); *offsetp += 4; - f_type = VALUE32(tvb, *offsetp); - proto_tree_add_item(t, hf_x11_randr_GetOutputProperty_type, tvb, *offsetp, 4, little_endian); - *offsetp += 4; + f_type = field32(tvb, offsetp, t, hf_x11_randr_GetOutputProperty_type, little_endian); f_long_offset = VALUE32(tvb, *offsetp); proto_tree_add_item(t, hf_x11_randr_GetOutputProperty_long_offset, tvb, *offsetp, 4, little_endian); *offsetp += 4; @@ -10443,9 +10460,7 @@ static void randrGetOutputProperty_Reply(tvbuff_t *tvb, packet_info *pinfo, int length = f_length * 4 + 32; proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, little_endian); *offsetp += 4; - f_type = VALUE32(tvb, *offsetp); - proto_tree_add_item(t, hf_x11_randr_GetOutputProperty_reply_type, tvb, *offsetp, 4, little_endian); - *offsetp += 4; + f_type = field32(tvb, offsetp, t, hf_x11_randr_GetOutputProperty_reply_type, little_endian); f_bytes_after = VALUE32(tvb, *offsetp); proto_tree_add_item(t, hf_x11_randr_GetOutputProperty_reply_bytes_after, tvb, *offsetp, 4, little_endian); *offsetp += 4; @@ -10549,9 +10564,7 @@ static void randrGetCrtcInfo_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offse col_append_fstr(pinfo->cinfo, COL_INFO, "-GetCrtcInfo"); REPLY(reply); - f_status = VALUE8(tvb, *offsetp); - proto_tree_add_item(t, hf_x11_randr_GetCrtcInfo_reply_status, tvb, *offsetp, 1, little_endian); - *offsetp += 1; + f_status = field8(tvb, offsetp, t, hf_x11_randr_GetCrtcInfo_reply_status, little_endian); sequence_number = VALUE16(tvb, *offsetp); proto_tree_add_uint_format(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number, "sequencenumber: %d (randr-GetCrtcInfo)", sequence_number); @@ -10579,10 +10592,28 @@ static void randrGetCrtcInfo_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offse proto_tree_add_item(t, hf_x11_randr_GetCrtcInfo_reply_mode, tvb, *offsetp, 4, little_endian); *offsetp += 4; f_rotation = VALUE16(tvb, *offsetp); - proto_tree_add_item(t, hf_x11_randr_GetCrtcInfo_reply_rotation, tvb, *offsetp, 2, little_endian); + { + proto_item *ti = proto_tree_add_item(t, hf_x11_randr_GetCrtcInfo_reply_rotation, tvb, *offsetp, 2, little_endian); + proto_tree *bitmask_tree = proto_item_add_subtree(ti, ett_x11_rectangle); + proto_tree_add_item(bitmask_tree, hf_x11_randr_GetCrtcInfo_reply_rotation_mask_Rotate_0, tvb, *offsetp, 2, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_randr_GetCrtcInfo_reply_rotation_mask_Rotate_90, tvb, *offsetp, 2, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_randr_GetCrtcInfo_reply_rotation_mask_Rotate_180, tvb, *offsetp, 2, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_randr_GetCrtcInfo_reply_rotation_mask_Rotate_270, tvb, *offsetp, 2, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_randr_GetCrtcInfo_reply_rotation_mask_Reflect_X, tvb, *offsetp, 2, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_randr_GetCrtcInfo_reply_rotation_mask_Reflect_Y, tvb, *offsetp, 2, little_endian); + } *offsetp += 2; f_rotations = VALUE16(tvb, *offsetp); - proto_tree_add_item(t, hf_x11_randr_GetCrtcInfo_reply_rotations, tvb, *offsetp, 2, little_endian); + { + proto_item *ti = proto_tree_add_item(t, hf_x11_randr_GetCrtcInfo_reply_rotations, tvb, *offsetp, 2, little_endian); + proto_tree *bitmask_tree = proto_item_add_subtree(ti, ett_x11_rectangle); + proto_tree_add_item(bitmask_tree, hf_x11_randr_GetCrtcInfo_reply_rotations_mask_Rotate_0, tvb, *offsetp, 2, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_randr_GetCrtcInfo_reply_rotations_mask_Rotate_90, tvb, *offsetp, 2, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_randr_GetCrtcInfo_reply_rotations_mask_Rotate_180, tvb, *offsetp, 2, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_randr_GetCrtcInfo_reply_rotations_mask_Rotate_270, tvb, *offsetp, 2, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_randr_GetCrtcInfo_reply_rotations_mask_Reflect_X, tvb, *offsetp, 2, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_randr_GetCrtcInfo_reply_rotations_mask_Reflect_Y, tvb, *offsetp, 2, little_endian); + } *offsetp += 2; f_num_outputs = VALUE16(tvb, *offsetp); proto_tree_add_item(t, hf_x11_randr_GetCrtcInfo_reply_num_outputs, tvb, *offsetp, 2, little_endian); @@ -10622,7 +10653,16 @@ static void randrSetCrtcConfig(tvbuff_t *tvb, packet_info *pinfo _U_, int *offse proto_tree_add_item(t, hf_x11_randr_SetCrtcConfig_mode, tvb, *offsetp, 4, little_endian); *offsetp += 4; f_rotation = VALUE16(tvb, *offsetp); - proto_tree_add_item(t, hf_x11_randr_SetCrtcConfig_rotation, tvb, *offsetp, 2, little_endian); + { + proto_item *ti = proto_tree_add_item(t, hf_x11_randr_SetCrtcConfig_rotation, tvb, *offsetp, 2, little_endian); + proto_tree *bitmask_tree = proto_item_add_subtree(ti, ett_x11_rectangle); + proto_tree_add_item(bitmask_tree, hf_x11_randr_SetCrtcConfig_rotation_mask_Rotate_0, tvb, *offsetp, 2, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_randr_SetCrtcConfig_rotation_mask_Rotate_90, tvb, *offsetp, 2, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_randr_SetCrtcConfig_rotation_mask_Rotate_180, tvb, *offsetp, 2, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_randr_SetCrtcConfig_rotation_mask_Rotate_270, tvb, *offsetp, 2, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_randr_SetCrtcConfig_rotation_mask_Reflect_X, tvb, *offsetp, 2, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_randr_SetCrtcConfig_rotation_mask_Reflect_Y, tvb, *offsetp, 2, little_endian); + } *offsetp += 2; UNUSED(2); listOfCard32(tvb, offsetp, t, hf_x11_randr_SetCrtcConfig_outputs, hf_x11_randr_SetCrtcConfig_outputs_item, (length - 28) / 4, little_endian); @@ -10636,9 +10676,7 @@ static void randrSetCrtcConfig_Reply(tvbuff_t *tvb, packet_info *pinfo, int *off col_append_fstr(pinfo->cinfo, COL_INFO, "-SetCrtcConfig"); REPLY(reply); - f_status = VALUE8(tvb, *offsetp); - proto_tree_add_item(t, hf_x11_randr_SetCrtcConfig_reply_status, tvb, *offsetp, 1, little_endian); - *offsetp += 1; + f_status = field8(tvb, offsetp, t, hf_x11_randr_SetCrtcConfig_reply_status, little_endian); sequence_number = VALUE16(tvb, *offsetp); proto_tree_add_uint_format(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number, "sequencenumber: %d (randr-SetCrtcConfig)", sequence_number); @@ -10887,9 +10925,7 @@ static void randrGetPanning_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offset col_append_fstr(pinfo->cinfo, COL_INFO, "-GetPanning"); REPLY(reply); - f_status = VALUE8(tvb, *offsetp); - proto_tree_add_item(t, hf_x11_randr_GetPanning_reply_status, tvb, *offsetp, 1, little_endian); - *offsetp += 1; + f_status = field8(tvb, offsetp, t, hf_x11_randr_GetPanning_reply_status, little_endian); sequence_number = VALUE16(tvb, *offsetp); proto_tree_add_uint_format(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number, "sequencenumber: %d (randr-GetPanning)", sequence_number); @@ -11007,9 +11043,7 @@ static void randrSetPanning_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offset col_append_fstr(pinfo->cinfo, COL_INFO, "-SetPanning"); REPLY(reply); - f_status = VALUE8(tvb, *offsetp); - proto_tree_add_item(t, hf_x11_randr_SetPanning_reply_status, tvb, *offsetp, 1, little_endian); - *offsetp += 1; + f_status = field8(tvb, offsetp, t, hf_x11_randr_SetPanning_reply_status, little_endian); sequence_number = VALUE16(tvb, *offsetp); proto_tree_add_uint_format(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number, "sequencenumber: %d (randr-SetPanning)", sequence_number); @@ -11078,7 +11112,16 @@ static void randrScreenChangeNotify(tvbuff_t *tvb, int *offsetp, proto_tree *t, int f_mwidth; int f_mheight; f_rotation = VALUE8(tvb, *offsetp); - proto_tree_add_item(t, hf_x11_randr_ScreenChangeNotify_rotation, tvb, *offsetp, 1, little_endian); + { + proto_item *ti = proto_tree_add_item(t, hf_x11_randr_ScreenChangeNotify_rotation, tvb, *offsetp, 1, little_endian); + proto_tree *bitmask_tree = proto_item_add_subtree(ti, ett_x11_rectangle); + proto_tree_add_item(bitmask_tree, hf_x11_randr_ScreenChangeNotify_rotation_mask_Rotate_0, tvb, *offsetp, 1, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_randr_ScreenChangeNotify_rotation_mask_Rotate_90, tvb, *offsetp, 1, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_randr_ScreenChangeNotify_rotation_mask_Rotate_180, tvb, *offsetp, 1, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_randr_ScreenChangeNotify_rotation_mask_Rotate_270, tvb, *offsetp, 1, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_randr_ScreenChangeNotify_rotation_mask_Reflect_X, tvb, *offsetp, 1, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_randr_ScreenChangeNotify_rotation_mask_Reflect_Y, tvb, *offsetp, 1, little_endian); + } *offsetp += 1; CARD16(event_sequencenumber); f_timestamp = VALUE32(tvb, *offsetp); @@ -11096,9 +11139,7 @@ static void randrScreenChangeNotify(tvbuff_t *tvb, int *offsetp, proto_tree *t, f_sizeID = VALUE16(tvb, *offsetp); proto_tree_add_item(t, hf_x11_randr_ScreenChangeNotify_sizeID, tvb, *offsetp, 2, little_endian); *offsetp += 2; - f_subpixel_order = VALUE16(tvb, *offsetp); - proto_tree_add_item(t, hf_x11_randr_ScreenChangeNotify_subpixel_order, tvb, *offsetp, 2, little_endian); - *offsetp += 2; + f_subpixel_order = field16(tvb, offsetp, t, hf_x11_randr_ScreenChangeNotify_subpixel_order, little_endian); f_width = VALUE16(tvb, *offsetp); proto_tree_add_item(t, hf_x11_randr_ScreenChangeNotify_width, tvb, *offsetp, 2, little_endian); *offsetp += 2; @@ -11144,7 +11185,16 @@ static void struct_CrtcChange(tvbuff_t *tvb, int *offsetp, proto_tree *root, int proto_tree_add_item(t, hf_x11_struct_CrtcChange_mode, tvb, *offsetp, 4, little_endian); *offsetp += 4; f_rotation = VALUE16(tvb, *offsetp); - proto_tree_add_item(t, hf_x11_struct_CrtcChange_rotation, tvb, *offsetp, 2, little_endian); + { + proto_item *ti = proto_tree_add_item(t, hf_x11_struct_CrtcChange_rotation, tvb, *offsetp, 2, little_endian); + proto_tree *bitmask_tree = proto_item_add_subtree(ti, ett_x11_rectangle); + proto_tree_add_item(bitmask_tree, hf_x11_struct_CrtcChange_rotation_mask_Rotate_0, tvb, *offsetp, 2, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_struct_CrtcChange_rotation_mask_Rotate_90, tvb, *offsetp, 2, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_struct_CrtcChange_rotation_mask_Rotate_180, tvb, *offsetp, 2, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_struct_CrtcChange_rotation_mask_Rotate_270, tvb, *offsetp, 2, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_struct_CrtcChange_rotation_mask_Reflect_X, tvb, *offsetp, 2, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_struct_CrtcChange_rotation_mask_Reflect_Y, tvb, *offsetp, 2, little_endian); + } *offsetp += 2; UNUSED(2); f_x = VALUE16(tvb, *offsetp); @@ -11199,14 +11249,19 @@ static void struct_OutputChange(tvbuff_t *tvb, int *offsetp, proto_tree *root, i proto_tree_add_item(t, hf_x11_struct_OutputChange_mode, tvb, *offsetp, 4, little_endian); *offsetp += 4; f_rotation = VALUE16(tvb, *offsetp); - proto_tree_add_item(t, hf_x11_struct_OutputChange_rotation, tvb, *offsetp, 2, little_endian); + { + proto_item *ti = proto_tree_add_item(t, hf_x11_struct_OutputChange_rotation, tvb, *offsetp, 2, little_endian); + proto_tree *bitmask_tree = proto_item_add_subtree(ti, ett_x11_rectangle); + proto_tree_add_item(bitmask_tree, hf_x11_struct_OutputChange_rotation_mask_Rotate_0, tvb, *offsetp, 2, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_struct_OutputChange_rotation_mask_Rotate_90, tvb, *offsetp, 2, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_struct_OutputChange_rotation_mask_Rotate_180, tvb, *offsetp, 2, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_struct_OutputChange_rotation_mask_Rotate_270, tvb, *offsetp, 2, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_struct_OutputChange_rotation_mask_Reflect_X, tvb, *offsetp, 2, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_struct_OutputChange_rotation_mask_Reflect_Y, tvb, *offsetp, 2, little_endian); + } *offsetp += 2; - f_connection = VALUE8(tvb, *offsetp); - proto_tree_add_item(t, hf_x11_struct_OutputChange_connection, tvb, *offsetp, 1, little_endian); - *offsetp += 1; - f_subpixel_order = VALUE8(tvb, *offsetp); - proto_tree_add_item(t, hf_x11_struct_OutputChange_subpixel_order, tvb, *offsetp, 1, little_endian); - *offsetp += 1; + f_connection = field8(tvb, offsetp, t, hf_x11_struct_OutputChange_connection, little_endian); + f_subpixel_order = field8(tvb, offsetp, t, hf_x11_struct_OutputChange_subpixel_order, little_endian); } } @@ -11236,9 +11291,7 @@ static void struct_OutputProperty(tvbuff_t *tvb, int *offsetp, proto_tree *root, f_timestamp = VALUE32(tvb, *offsetp); proto_tree_add_item(t, hf_x11_struct_OutputProperty_timestamp, tvb, *offsetp, 4, little_endian); *offsetp += 4; - f_status = VALUE8(tvb, *offsetp); - proto_tree_add_item(t, hf_x11_struct_OutputProperty_status, tvb, *offsetp, 1, little_endian); - *offsetp += 1; + f_status = field8(tvb, offsetp, t, hf_x11_struct_OutputProperty_status, little_endian); UNUSED(11); } } @@ -11268,9 +11321,7 @@ static void struct_NotifyData(tvbuff_t *tvb, int *offsetp, proto_tree *root, int static void randrNotify(tvbuff_t *tvb, int *offsetp, proto_tree *t, int little_endian) { int f_subCode; - f_subCode = VALUE8(tvb, *offsetp); - proto_tree_add_item(t, hf_x11_randr_Notify_subCode, tvb, *offsetp, 1, little_endian); - *offsetp += 1; + f_subCode = field8(tvb, offsetp, t, hf_x11_randr_Notify_subCode, little_endian); CARD16(event_sequencenumber); struct_NotifyData(tvb, offsetp, t, little_endian, 1); } @@ -12004,16 +12055,12 @@ static void renderComposite(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, int f_dst_y; int f_width; int f_height; - f_op = VALUE8(tvb, *offsetp); - proto_tree_add_item(t, hf_x11_render_Composite_op, tvb, *offsetp, 1, little_endian); - *offsetp += 1; + f_op = field8(tvb, offsetp, t, hf_x11_render_Composite_op, little_endian); UNUSED(3); f_src = VALUE32(tvb, *offsetp); proto_tree_add_item(t, hf_x11_render_Composite_src, tvb, *offsetp, 4, little_endian); *offsetp += 4; - f_mask = VALUE32(tvb, *offsetp); - proto_tree_add_item(t, hf_x11_render_Composite_mask, tvb, *offsetp, 4, little_endian); - *offsetp += 4; + f_mask = field32(tvb, offsetp, t, hf_x11_render_Composite_mask, little_endian); f_dst = VALUE32(tvb, *offsetp); proto_tree_add_item(t, hf_x11_render_Composite_dst, tvb, *offsetp, 4, little_endian); *offsetp += 4; @@ -12051,9 +12098,7 @@ static void renderTrapezoids(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp int f_mask_format; int f_src_x; int f_src_y; - f_op = VALUE8(tvb, *offsetp); - proto_tree_add_item(t, hf_x11_render_Trapezoids_op, tvb, *offsetp, 1, little_endian); - *offsetp += 1; + f_op = field8(tvb, offsetp, t, hf_x11_render_Trapezoids_op, little_endian); UNUSED(3); f_src = VALUE32(tvb, *offsetp); proto_tree_add_item(t, hf_x11_render_Trapezoids_src, tvb, *offsetp, 4, little_endian); @@ -12081,9 +12126,7 @@ static void renderTriangles(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, int f_mask_format; int f_src_x; int f_src_y; - f_op = VALUE8(tvb, *offsetp); - proto_tree_add_item(t, hf_x11_render_Triangles_op, tvb, *offsetp, 1, little_endian); - *offsetp += 1; + f_op = field8(tvb, offsetp, t, hf_x11_render_Triangles_op, little_endian); UNUSED(3); f_src = VALUE32(tvb, *offsetp); proto_tree_add_item(t, hf_x11_render_Triangles_src, tvb, *offsetp, 4, little_endian); @@ -12111,9 +12154,7 @@ static void renderTriStrip(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, int f_mask_format; int f_src_x; int f_src_y; - f_op = VALUE8(tvb, *offsetp); - proto_tree_add_item(t, hf_x11_render_TriStrip_op, tvb, *offsetp, 1, little_endian); - *offsetp += 1; + f_op = field8(tvb, offsetp, t, hf_x11_render_TriStrip_op, little_endian); UNUSED(3); f_src = VALUE32(tvb, *offsetp); proto_tree_add_item(t, hf_x11_render_TriStrip_src, tvb, *offsetp, 4, little_endian); @@ -12141,9 +12182,7 @@ static void renderTriFan(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, pr int f_mask_format; int f_src_x; int f_src_y; - f_op = VALUE8(tvb, *offsetp); - proto_tree_add_item(t, hf_x11_render_TriFan_op, tvb, *offsetp, 1, little_endian); - *offsetp += 1; + f_op = field8(tvb, offsetp, t, hf_x11_render_TriFan_op, little_endian); UNUSED(3); f_src = VALUE32(tvb, *offsetp); proto_tree_add_item(t, hf_x11_render_TriFan_src, tvb, *offsetp, 4, little_endian); @@ -12230,9 +12269,7 @@ static void renderCompositeGlyphs8(tvbuff_t *tvb, packet_info *pinfo _U_, int *o int f_glyphset; int f_src_x; int f_src_y; - f_op = VALUE8(tvb, *offsetp); - proto_tree_add_item(t, hf_x11_render_CompositeGlyphs8_op, tvb, *offsetp, 1, little_endian); - *offsetp += 1; + f_op = field8(tvb, offsetp, t, hf_x11_render_CompositeGlyphs8_op, little_endian); UNUSED(3); f_src = VALUE32(tvb, *offsetp); proto_tree_add_item(t, hf_x11_render_CompositeGlyphs8_src, tvb, *offsetp, 4, little_endian); @@ -12264,9 +12301,7 @@ static void renderCompositeGlyphs16(tvbuff_t *tvb, packet_info *pinfo _U_, int * int f_glyphset; int f_src_x; int f_src_y; - f_op = VALUE8(tvb, *offsetp); - proto_tree_add_item(t, hf_x11_render_CompositeGlyphs16_op, tvb, *offsetp, 1, little_endian); - *offsetp += 1; + f_op = field8(tvb, offsetp, t, hf_x11_render_CompositeGlyphs16_op, little_endian); UNUSED(3); f_src = VALUE32(tvb, *offsetp); proto_tree_add_item(t, hf_x11_render_CompositeGlyphs16_src, tvb, *offsetp, 4, little_endian); @@ -12298,9 +12333,7 @@ static void renderCompositeGlyphs32(tvbuff_t *tvb, packet_info *pinfo _U_, int * int f_glyphset; int f_src_x; int f_src_y; - f_op = VALUE8(tvb, *offsetp); - proto_tree_add_item(t, hf_x11_render_CompositeGlyphs32_op, tvb, *offsetp, 1, little_endian); - *offsetp += 1; + f_op = field8(tvb, offsetp, t, hf_x11_render_CompositeGlyphs32_op, little_endian); UNUSED(3); f_src = VALUE32(tvb, *offsetp); proto_tree_add_item(t, hf_x11_render_CompositeGlyphs32_src, tvb, *offsetp, 4, little_endian); @@ -12327,9 +12360,7 @@ static void renderFillRectangles(tvbuff_t *tvb, packet_info *pinfo _U_, int *off { int f_op; int f_dst; - f_op = VALUE8(tvb, *offsetp); - proto_tree_add_item(t, hf_x11_render_FillRectangles_op, tvb, *offsetp, 1, little_endian); - *offsetp += 1; + f_op = field8(tvb, offsetp, t, hf_x11_render_FillRectangles_op, little_endian); UNUSED(3); f_dst = VALUE32(tvb, *offsetp); proto_tree_add_item(t, hf_x11_render_FillRectangles_dst, tvb, *offsetp, 4, little_endian); @@ -13155,9 +13186,7 @@ static void shapeNotify(tvbuff_t *tvb, int *offsetp, proto_tree *t, int little_e int f_extents_height; int f_server_time; int f_shaped; - f_shape_kind = VALUE8(tvb, *offsetp); - proto_tree_add_item(t, hf_x11_shape_Notify_shape_kind, tvb, *offsetp, 1, little_endian); - *offsetp += 1; + f_shape_kind = field8(tvb, offsetp, t, hf_x11_shape_Notify_shape_kind, little_endian); CARD16(event_sequencenumber); f_affected_window = VALUE32(tvb, *offsetp); proto_tree_add_item(t, hf_x11_shape_Notify_affected_window, tvb, *offsetp, 4, little_endian); @@ -13220,15 +13249,9 @@ static void shapeRectangles(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, int f_destination_window; int f_x_offset; int f_y_offset; - f_operation = VALUE8(tvb, *offsetp); - proto_tree_add_item(t, hf_x11_shape_Rectangles_operation, tvb, *offsetp, 1, little_endian); - *offsetp += 1; - f_destination_kind = VALUE8(tvb, *offsetp); - proto_tree_add_item(t, hf_x11_shape_Rectangles_destination_kind, tvb, *offsetp, 1, little_endian); - *offsetp += 1; - f_ordering = VALUE8(tvb, *offsetp); - proto_tree_add_item(t, hf_x11_shape_Rectangles_ordering, tvb, *offsetp, 1, little_endian); - *offsetp += 1; + f_operation = field8(tvb, offsetp, t, hf_x11_shape_Rectangles_operation, little_endian); + f_destination_kind = field8(tvb, offsetp, t, hf_x11_shape_Rectangles_destination_kind, little_endian); + f_ordering = field8(tvb, offsetp, t, hf_x11_shape_Rectangles_ordering, little_endian); UNUSED(1); f_destination_window = VALUE32(tvb, *offsetp); proto_tree_add_item(t, hf_x11_shape_Rectangles_destination_window, tvb, *offsetp, 4, little_endian); @@ -13250,12 +13273,8 @@ static void shapeMask(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto int f_x_offset; int f_y_offset; int f_source_bitmap; - f_operation = VALUE8(tvb, *offsetp); - proto_tree_add_item(t, hf_x11_shape_Mask_operation, tvb, *offsetp, 1, little_endian); - *offsetp += 1; - f_destination_kind = VALUE8(tvb, *offsetp); - proto_tree_add_item(t, hf_x11_shape_Mask_destination_kind, tvb, *offsetp, 1, little_endian); - *offsetp += 1; + f_operation = field8(tvb, offsetp, t, hf_x11_shape_Mask_operation, little_endian); + f_destination_kind = field8(tvb, offsetp, t, hf_x11_shape_Mask_destination_kind, little_endian); UNUSED(2); f_destination_window = VALUE32(tvb, *offsetp); proto_tree_add_item(t, hf_x11_shape_Mask_destination_window, tvb, *offsetp, 4, little_endian); @@ -13266,9 +13285,7 @@ static void shapeMask(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto f_y_offset = VALUE16(tvb, *offsetp); proto_tree_add_item(t, hf_x11_shape_Mask_y_offset, tvb, *offsetp, 2, little_endian); *offsetp += 2; - f_source_bitmap = VALUE32(tvb, *offsetp); - proto_tree_add_item(t, hf_x11_shape_Mask_source_bitmap, tvb, *offsetp, 4, little_endian); - *offsetp += 4; + f_source_bitmap = field32(tvb, offsetp, t, hf_x11_shape_Mask_source_bitmap, little_endian); } static void shapeCombine(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, int little_endian, int length _U_) @@ -13280,15 +13297,9 @@ static void shapeCombine(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, pr int f_x_offset; int f_y_offset; int f_source_window; - f_operation = VALUE8(tvb, *offsetp); - proto_tree_add_item(t, hf_x11_shape_Combine_operation, tvb, *offsetp, 1, little_endian); - *offsetp += 1; - f_destination_kind = VALUE8(tvb, *offsetp); - proto_tree_add_item(t, hf_x11_shape_Combine_destination_kind, tvb, *offsetp, 1, little_endian); - *offsetp += 1; - f_source_kind = VALUE8(tvb, *offsetp); - proto_tree_add_item(t, hf_x11_shape_Combine_source_kind, tvb, *offsetp, 1, little_endian); - *offsetp += 1; + f_operation = field8(tvb, offsetp, t, hf_x11_shape_Combine_operation, little_endian); + f_destination_kind = field8(tvb, offsetp, t, hf_x11_shape_Combine_destination_kind, little_endian); + f_source_kind = field8(tvb, offsetp, t, hf_x11_shape_Combine_source_kind, little_endian); UNUSED(1); f_destination_window = VALUE32(tvb, *offsetp); proto_tree_add_item(t, hf_x11_shape_Combine_destination_window, tvb, *offsetp, 4, little_endian); @@ -13310,9 +13321,7 @@ static void shapeOffset(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, pro int f_destination_window; int f_x_offset; int f_y_offset; - f_destination_kind = VALUE8(tvb, *offsetp); - proto_tree_add_item(t, hf_x11_shape_Offset_destination_kind, tvb, *offsetp, 1, little_endian); - *offsetp += 1; + f_destination_kind = field8(tvb, offsetp, t, hf_x11_shape_Offset_destination_kind, little_endian); UNUSED(3); f_destination_window = VALUE32(tvb, *offsetp); proto_tree_add_item(t, hf_x11_shape_Offset_destination_window, tvb, *offsetp, 4, little_endian); @@ -13439,9 +13448,7 @@ static void shapeGetRectangles(tvbuff_t *tvb, packet_info *pinfo _U_, int *offse f_window = VALUE32(tvb, *offsetp); proto_tree_add_item(t, hf_x11_shape_GetRectangles_window, tvb, *offsetp, 4, little_endian); *offsetp += 4; - f_source_kind = VALUE8(tvb, *offsetp); - proto_tree_add_item(t, hf_x11_shape_GetRectangles_source_kind, tvb, *offsetp, 1, little_endian); - *offsetp += 1; + f_source_kind = field8(tvb, offsetp, t, hf_x11_shape_GetRectangles_source_kind, little_endian); UNUSED(3); } static void shapeGetRectangles_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, int little_endian) @@ -13453,9 +13460,7 @@ static void shapeGetRectangles_Reply(tvbuff_t *tvb, packet_info *pinfo, int *off col_append_fstr(pinfo->cinfo, COL_INFO, "-GetRectangles"); REPLY(reply); - f_ordering = VALUE8(tvb, *offsetp); - proto_tree_add_item(t, hf_x11_shape_GetRectangles_reply_ordering, tvb, *offsetp, 1, little_endian); - *offsetp += 1; + f_ordering = field8(tvb, offsetp, t, hf_x11_shape_GetRectangles_reply_ordering, little_endian); sequence_number = VALUE16(tvb, *offsetp); proto_tree_add_uint_format(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number, "sequencenumber: %d (shape-GetRectangles)", sequence_number); @@ -13927,13 +13932,9 @@ static void struct_TRIGGER(tvbuff_t *tvb, int *offsetp, proto_tree *root, int li f_counter = VALUE32(tvb, *offsetp); proto_tree_add_item(t, hf_x11_struct_TRIGGER_counter, tvb, *offsetp, 4, little_endian); *offsetp += 4; - f_wait_type = VALUE32(tvb, *offsetp); - proto_tree_add_item(t, hf_x11_struct_TRIGGER_wait_type, tvb, *offsetp, 4, little_endian); - *offsetp += 4; + f_wait_type = field32(tvb, offsetp, t, hf_x11_struct_TRIGGER_wait_type, little_endian); struct_INT64(tvb, offsetp, t, little_endian, 1); - f_test_type = VALUE32(tvb, *offsetp); - proto_tree_add_item(t, hf_x11_struct_TRIGGER_test_type, tvb, *offsetp, 4, little_endian); - *offsetp += 4; + f_test_type = field32(tvb, offsetp, t, hf_x11_struct_TRIGGER_test_type, little_endian); } } @@ -14136,9 +14137,7 @@ static void syncQueryAlarm_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp f_events = VALUE8(tvb, *offsetp); proto_tree_add_item(t, hf_x11_sync_QueryAlarm_reply_events, tvb, *offsetp, 1, little_endian); *offsetp += 1; - f_state = VALUE8(tvb, *offsetp); - proto_tree_add_item(t, hf_x11_sync_QueryAlarm_reply_state, tvb, *offsetp, 1, little_endian); - *offsetp += 1; + f_state = field8(tvb, offsetp, t, hf_x11_sync_QueryAlarm_reply_state, little_endian); UNUSED(2); } @@ -14229,9 +14228,7 @@ static void syncAlarmNotify(tvbuff_t *tvb, int *offsetp, proto_tree *t, int litt f_timestamp = VALUE32(tvb, *offsetp); proto_tree_add_item(t, hf_x11_sync_AlarmNotify_timestamp, tvb, *offsetp, 4, little_endian); *offsetp += 4; - f_state = VALUE8(tvb, *offsetp); - proto_tree_add_item(t, hf_x11_sync_AlarmNotify_state, tvb, *offsetp, 1, little_endian); - *offsetp += 1; + f_state = field8(tvb, offsetp, t, hf_x11_sync_AlarmNotify_state, little_endian); UNUSED(3); } static const value_string sync_extension_minor[] = { @@ -15286,7 +15283,24 @@ static void xf86vidmodeGetModeLine_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp += 2; UNUSED(2); f_flags = VALUE32(tvb, *offsetp); - proto_tree_add_item(t, hf_x11_xf86vidmode_GetModeLine_reply_flags, tvb, *offsetp, 4, little_endian); + { + proto_item *ti = proto_tree_add_item(t, hf_x11_xf86vidmode_GetModeLine_reply_flags, tvb, *offsetp, 4, little_endian); + proto_tree *bitmask_tree = proto_item_add_subtree(ti, ett_x11_rectangle); + proto_tree_add_item(bitmask_tree, hf_x11_xf86vidmode_GetModeLine_reply_flags_mask_HsyncPositive, tvb, *offsetp, 4, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_xf86vidmode_GetModeLine_reply_flags_mask_HsyncNegative, tvb, *offsetp, 4, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_xf86vidmode_GetModeLine_reply_flags_mask_VsyncPositive, tvb, *offsetp, 4, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_xf86vidmode_GetModeLine_reply_flags_mask_VsyncNegative, tvb, *offsetp, 4, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_xf86vidmode_GetModeLine_reply_flags_mask_Interlace, tvb, *offsetp, 4, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_xf86vidmode_GetModeLine_reply_flags_mask_DoubleScan, tvb, *offsetp, 4, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_xf86vidmode_GetModeLine_reply_flags_mask_Csync, tvb, *offsetp, 4, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_xf86vidmode_GetModeLine_reply_flags_mask_CsyncPositive, tvb, *offsetp, 4, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_xf86vidmode_GetModeLine_reply_flags_mask_CsyncNegative, tvb, *offsetp, 4, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_xf86vidmode_GetModeLine_reply_flags_mask_HskewPresent, tvb, *offsetp, 4, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_xf86vidmode_GetModeLine_reply_flags_mask_Bcast, tvb, *offsetp, 4, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_xf86vidmode_GetModeLine_reply_flags_mask_PixelMultiplex, tvb, *offsetp, 4, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_xf86vidmode_GetModeLine_reply_flags_mask_DoubleClock, tvb, *offsetp, 4, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_xf86vidmode_GetModeLine_reply_flags_mask_HalveClock, tvb, *offsetp, 4, little_endian); + } *offsetp += 4; UNUSED(12); f_privsize = VALUE32(tvb, *offsetp); @@ -15341,7 +15355,24 @@ static void xf86vidmodeModModeLine(tvbuff_t *tvb, packet_info *pinfo _U_, int *o *offsetp += 2; UNUSED(2); f_flags = VALUE32(tvb, *offsetp); - proto_tree_add_item(t, hf_x11_xf86vidmode_ModModeLine_flags, tvb, *offsetp, 4, little_endian); + { + proto_item *ti = proto_tree_add_item(t, hf_x11_xf86vidmode_ModModeLine_flags, tvb, *offsetp, 4, little_endian); + proto_tree *bitmask_tree = proto_item_add_subtree(ti, ett_x11_rectangle); + proto_tree_add_item(bitmask_tree, hf_x11_xf86vidmode_ModModeLine_flags_mask_HsyncPositive, tvb, *offsetp, 4, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_xf86vidmode_ModModeLine_flags_mask_HsyncNegative, tvb, *offsetp, 4, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_xf86vidmode_ModModeLine_flags_mask_VsyncPositive, tvb, *offsetp, 4, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_xf86vidmode_ModModeLine_flags_mask_VsyncNegative, tvb, *offsetp, 4, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_xf86vidmode_ModModeLine_flags_mask_Interlace, tvb, *offsetp, 4, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_xf86vidmode_ModModeLine_flags_mask_DoubleScan, tvb, *offsetp, 4, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_xf86vidmode_ModModeLine_flags_mask_Csync, tvb, *offsetp, 4, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_xf86vidmode_ModModeLine_flags_mask_CsyncPositive, tvb, *offsetp, 4, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_xf86vidmode_ModModeLine_flags_mask_CsyncNegative, tvb, *offsetp, 4, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_xf86vidmode_ModModeLine_flags_mask_HskewPresent, tvb, *offsetp, 4, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_xf86vidmode_ModModeLine_flags_mask_Bcast, tvb, *offsetp, 4, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_xf86vidmode_ModModeLine_flags_mask_PixelMultiplex, tvb, *offsetp, 4, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_xf86vidmode_ModModeLine_flags_mask_DoubleClock, tvb, *offsetp, 4, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_xf86vidmode_ModModeLine_flags_mask_HalveClock, tvb, *offsetp, 4, little_endian); + } *offsetp += 4; UNUSED(12); f_privsize = VALUE32(tvb, *offsetp); @@ -15516,7 +15547,24 @@ static void xf86vidmodeAddModeLine(tvbuff_t *tvb, packet_info *pinfo _U_, int *o *offsetp += 2; UNUSED(2); f_flags = VALUE32(tvb, *offsetp); - proto_tree_add_item(t, hf_x11_xf86vidmode_AddModeLine_flags, tvb, *offsetp, 4, little_endian); + { + proto_item *ti = proto_tree_add_item(t, hf_x11_xf86vidmode_AddModeLine_flags, tvb, *offsetp, 4, little_endian); + proto_tree *bitmask_tree = proto_item_add_subtree(ti, ett_x11_rectangle); + proto_tree_add_item(bitmask_tree, hf_x11_xf86vidmode_AddModeLine_flags_mask_HsyncPositive, tvb, *offsetp, 4, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_xf86vidmode_AddModeLine_flags_mask_HsyncNegative, tvb, *offsetp, 4, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_xf86vidmode_AddModeLine_flags_mask_VsyncPositive, tvb, *offsetp, 4, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_xf86vidmode_AddModeLine_flags_mask_VsyncNegative, tvb, *offsetp, 4, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_xf86vidmode_AddModeLine_flags_mask_Interlace, tvb, *offsetp, 4, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_xf86vidmode_AddModeLine_flags_mask_DoubleScan, tvb, *offsetp, 4, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_xf86vidmode_AddModeLine_flags_mask_Csync, tvb, *offsetp, 4, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_xf86vidmode_AddModeLine_flags_mask_CsyncPositive, tvb, *offsetp, 4, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_xf86vidmode_AddModeLine_flags_mask_CsyncNegative, tvb, *offsetp, 4, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_xf86vidmode_AddModeLine_flags_mask_HskewPresent, tvb, *offsetp, 4, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_xf86vidmode_AddModeLine_flags_mask_Bcast, tvb, *offsetp, 4, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_xf86vidmode_AddModeLine_flags_mask_PixelMultiplex, tvb, *offsetp, 4, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_xf86vidmode_AddModeLine_flags_mask_DoubleClock, tvb, *offsetp, 4, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_xf86vidmode_AddModeLine_flags_mask_HalveClock, tvb, *offsetp, 4, little_endian); + } *offsetp += 4; UNUSED(12); f_privsize = VALUE32(tvb, *offsetp); @@ -15554,7 +15602,24 @@ static void xf86vidmodeAddModeLine(tvbuff_t *tvb, packet_info *pinfo _U_, int *o *offsetp += 2; UNUSED(2); f_after_flags = VALUE32(tvb, *offsetp); - proto_tree_add_item(t, hf_x11_xf86vidmode_AddModeLine_after_flags, tvb, *offsetp, 4, little_endian); + { + proto_item *ti = proto_tree_add_item(t, hf_x11_xf86vidmode_AddModeLine_after_flags, tvb, *offsetp, 4, little_endian); + proto_tree *bitmask_tree = proto_item_add_subtree(ti, ett_x11_rectangle); + proto_tree_add_item(bitmask_tree, hf_x11_xf86vidmode_AddModeLine_after_flags_mask_HsyncPositive, tvb, *offsetp, 4, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_xf86vidmode_AddModeLine_after_flags_mask_HsyncNegative, tvb, *offsetp, 4, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_xf86vidmode_AddModeLine_after_flags_mask_VsyncPositive, tvb, *offsetp, 4, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_xf86vidmode_AddModeLine_after_flags_mask_VsyncNegative, tvb, *offsetp, 4, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_xf86vidmode_AddModeLine_after_flags_mask_Interlace, tvb, *offsetp, 4, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_xf86vidmode_AddModeLine_after_flags_mask_DoubleScan, tvb, *offsetp, 4, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_xf86vidmode_AddModeLine_after_flags_mask_Csync, tvb, *offsetp, 4, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_xf86vidmode_AddModeLine_after_flags_mask_CsyncPositive, tvb, *offsetp, 4, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_xf86vidmode_AddModeLine_after_flags_mask_CsyncNegative, tvb, *offsetp, 4, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_xf86vidmode_AddModeLine_after_flags_mask_HskewPresent, tvb, *offsetp, 4, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_xf86vidmode_AddModeLine_after_flags_mask_Bcast, tvb, *offsetp, 4, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_xf86vidmode_AddModeLine_after_flags_mask_PixelMultiplex, tvb, *offsetp, 4, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_xf86vidmode_AddModeLine_after_flags_mask_DoubleClock, tvb, *offsetp, 4, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_xf86vidmode_AddModeLine_after_flags_mask_HalveClock, tvb, *offsetp, 4, little_endian); + } *offsetp += 4; UNUSED(12); listOfByte(tvb, offsetp, t, hf_x11_xf86vidmode_AddModeLine_private, f_privsize, little_endian); @@ -15611,7 +15676,24 @@ static void xf86vidmodeDeleteModeLine(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp += 2; UNUSED(2); f_flags = VALUE32(tvb, *offsetp); - proto_tree_add_item(t, hf_x11_xf86vidmode_DeleteModeLine_flags, tvb, *offsetp, 4, little_endian); + { + proto_item *ti = proto_tree_add_item(t, hf_x11_xf86vidmode_DeleteModeLine_flags, tvb, *offsetp, 4, little_endian); + proto_tree *bitmask_tree = proto_item_add_subtree(ti, ett_x11_rectangle); + proto_tree_add_item(bitmask_tree, hf_x11_xf86vidmode_DeleteModeLine_flags_mask_HsyncPositive, tvb, *offsetp, 4, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_xf86vidmode_DeleteModeLine_flags_mask_HsyncNegative, tvb, *offsetp, 4, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_xf86vidmode_DeleteModeLine_flags_mask_VsyncPositive, tvb, *offsetp, 4, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_xf86vidmode_DeleteModeLine_flags_mask_VsyncNegative, tvb, *offsetp, 4, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_xf86vidmode_DeleteModeLine_flags_mask_Interlace, tvb, *offsetp, 4, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_xf86vidmode_DeleteModeLine_flags_mask_DoubleScan, tvb, *offsetp, 4, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_xf86vidmode_DeleteModeLine_flags_mask_Csync, tvb, *offsetp, 4, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_xf86vidmode_DeleteModeLine_flags_mask_CsyncPositive, tvb, *offsetp, 4, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_xf86vidmode_DeleteModeLine_flags_mask_CsyncNegative, tvb, *offsetp, 4, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_xf86vidmode_DeleteModeLine_flags_mask_HskewPresent, tvb, *offsetp, 4, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_xf86vidmode_DeleteModeLine_flags_mask_Bcast, tvb, *offsetp, 4, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_xf86vidmode_DeleteModeLine_flags_mask_PixelMultiplex, tvb, *offsetp, 4, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_xf86vidmode_DeleteModeLine_flags_mask_DoubleClock, tvb, *offsetp, 4, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_xf86vidmode_DeleteModeLine_flags_mask_HalveClock, tvb, *offsetp, 4, little_endian); + } *offsetp += 4; UNUSED(12); f_privsize = VALUE32(tvb, *offsetp); @@ -15671,7 +15753,24 @@ static void xf86vidmodeValidateModeLine(tvbuff_t *tvb, packet_info *pinfo _U_, i *offsetp += 2; UNUSED(2); f_flags = VALUE32(tvb, *offsetp); - proto_tree_add_item(t, hf_x11_xf86vidmode_ValidateModeLine_flags, tvb, *offsetp, 4, little_endian); + { + proto_item *ti = proto_tree_add_item(t, hf_x11_xf86vidmode_ValidateModeLine_flags, tvb, *offsetp, 4, little_endian); + proto_tree *bitmask_tree = proto_item_add_subtree(ti, ett_x11_rectangle); + proto_tree_add_item(bitmask_tree, hf_x11_xf86vidmode_ValidateModeLine_flags_mask_HsyncPositive, tvb, *offsetp, 4, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_xf86vidmode_ValidateModeLine_flags_mask_HsyncNegative, tvb, *offsetp, 4, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_xf86vidmode_ValidateModeLine_flags_mask_VsyncPositive, tvb, *offsetp, 4, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_xf86vidmode_ValidateModeLine_flags_mask_VsyncNegative, tvb, *offsetp, 4, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_xf86vidmode_ValidateModeLine_flags_mask_Interlace, tvb, *offsetp, 4, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_xf86vidmode_ValidateModeLine_flags_mask_DoubleScan, tvb, *offsetp, 4, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_xf86vidmode_ValidateModeLine_flags_mask_Csync, tvb, *offsetp, 4, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_xf86vidmode_ValidateModeLine_flags_mask_CsyncPositive, tvb, *offsetp, 4, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_xf86vidmode_ValidateModeLine_flags_mask_CsyncNegative, tvb, *offsetp, 4, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_xf86vidmode_ValidateModeLine_flags_mask_HskewPresent, tvb, *offsetp, 4, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_xf86vidmode_ValidateModeLine_flags_mask_Bcast, tvb, *offsetp, 4, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_xf86vidmode_ValidateModeLine_flags_mask_PixelMultiplex, tvb, *offsetp, 4, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_xf86vidmode_ValidateModeLine_flags_mask_DoubleClock, tvb, *offsetp, 4, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_xf86vidmode_ValidateModeLine_flags_mask_HalveClock, tvb, *offsetp, 4, little_endian); + } *offsetp += 4; UNUSED(12); f_privsize = VALUE32(tvb, *offsetp); @@ -15753,7 +15852,24 @@ static void xf86vidmodeSwitchToMode(tvbuff_t *tvb, packet_info *pinfo _U_, int * *offsetp += 2; UNUSED(2); f_flags = VALUE32(tvb, *offsetp); - proto_tree_add_item(t, hf_x11_xf86vidmode_SwitchToMode_flags, tvb, *offsetp, 4, little_endian); + { + proto_item *ti = proto_tree_add_item(t, hf_x11_xf86vidmode_SwitchToMode_flags, tvb, *offsetp, 4, little_endian); + proto_tree *bitmask_tree = proto_item_add_subtree(ti, ett_x11_rectangle); + proto_tree_add_item(bitmask_tree, hf_x11_xf86vidmode_SwitchToMode_flags_mask_HsyncPositive, tvb, *offsetp, 4, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_xf86vidmode_SwitchToMode_flags_mask_HsyncNegative, tvb, *offsetp, 4, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_xf86vidmode_SwitchToMode_flags_mask_VsyncPositive, tvb, *offsetp, 4, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_xf86vidmode_SwitchToMode_flags_mask_VsyncNegative, tvb, *offsetp, 4, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_xf86vidmode_SwitchToMode_flags_mask_Interlace, tvb, *offsetp, 4, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_xf86vidmode_SwitchToMode_flags_mask_DoubleScan, tvb, *offsetp, 4, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_xf86vidmode_SwitchToMode_flags_mask_Csync, tvb, *offsetp, 4, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_xf86vidmode_SwitchToMode_flags_mask_CsyncPositive, tvb, *offsetp, 4, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_xf86vidmode_SwitchToMode_flags_mask_CsyncNegative, tvb, *offsetp, 4, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_xf86vidmode_SwitchToMode_flags_mask_HskewPresent, tvb, *offsetp, 4, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_xf86vidmode_SwitchToMode_flags_mask_Bcast, tvb, *offsetp, 4, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_xf86vidmode_SwitchToMode_flags_mask_PixelMultiplex, tvb, *offsetp, 4, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_xf86vidmode_SwitchToMode_flags_mask_DoubleClock, tvb, *offsetp, 4, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_xf86vidmode_SwitchToMode_flags_mask_HalveClock, tvb, *offsetp, 4, little_endian); + } *offsetp += 4; UNUSED(12); f_privsize = VALUE32(tvb, *offsetp); @@ -15843,7 +15959,11 @@ static void xf86vidmodeGetDotClocks_Reply(tvbuff_t *tvb, packet_info *pinfo, int proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, little_endian); *offsetp += 4; f_flags = VALUE32(tvb, *offsetp); - proto_tree_add_item(t, hf_x11_xf86vidmode_GetDotClocks_reply_flags, tvb, *offsetp, 4, little_endian); + { + proto_item *ti = proto_tree_add_item(t, hf_x11_xf86vidmode_GetDotClocks_reply_flags, tvb, *offsetp, 4, little_endian); + proto_tree *bitmask_tree = proto_item_add_subtree(ti, ett_x11_rectangle); + proto_tree_add_item(bitmask_tree, hf_x11_xf86vidmode_GetDotClocks_reply_flags_mask_Programable, tvb, *offsetp, 4, little_endian); + } *offsetp += 4; f_clocks = VALUE32(tvb, *offsetp); proto_tree_add_item(t, hf_x11_xf86vidmode_GetDotClocks_reply_clocks, tvb, *offsetp, 4, little_endian); @@ -16040,7 +16160,12 @@ static void xf86vidmodeGetPermissions_Reply(tvbuff_t *tvb, packet_info *pinfo, i proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, little_endian); *offsetp += 4; f_permissions = VALUE32(tvb, *offsetp); - proto_tree_add_item(t, hf_x11_xf86vidmode_GetPermissions_reply_permissions, tvb, *offsetp, 4, little_endian); + { + proto_item *ti = proto_tree_add_item(t, hf_x11_xf86vidmode_GetPermissions_reply_permissions, tvb, *offsetp, 4, little_endian); + proto_tree *bitmask_tree = proto_item_add_subtree(ti, ett_x11_rectangle); + proto_tree_add_item(bitmask_tree, hf_x11_xf86vidmode_GetPermissions_reply_permissions_mask_Read, tvb, *offsetp, 4, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_xf86vidmode_GetPermissions_reply_permissions_mask_Write, tvb, *offsetp, 4, little_endian); + } *offsetp += 4; UNUSED(20); } @@ -16213,15 +16338,9 @@ static void xfixesChangeSaveSet(tvbuff_t *tvb, packet_info *pinfo _U_, int *offs int f_target; int f_map; int f_window; - f_mode = VALUE8(tvb, *offsetp); - proto_tree_add_item(t, hf_x11_xfixes_ChangeSaveSet_mode, tvb, *offsetp, 1, little_endian); - *offsetp += 1; - f_target = VALUE8(tvb, *offsetp); - proto_tree_add_item(t, hf_x11_xfixes_ChangeSaveSet_target, tvb, *offsetp, 1, little_endian); - *offsetp += 1; - f_map = VALUE8(tvb, *offsetp); - proto_tree_add_item(t, hf_x11_xfixes_ChangeSaveSet_map, tvb, *offsetp, 1, little_endian); - *offsetp += 1; + f_mode = field8(tvb, offsetp, t, hf_x11_xfixes_ChangeSaveSet_mode, little_endian); + f_target = field8(tvb, offsetp, t, hf_x11_xfixes_ChangeSaveSet_target, little_endian); + f_map = field8(tvb, offsetp, t, hf_x11_xfixes_ChangeSaveSet_map, little_endian); UNUSED(1); f_window = VALUE32(tvb, *offsetp); proto_tree_add_item(t, hf_x11_xfixes_ChangeSaveSet_window, tvb, *offsetp, 4, little_endian); @@ -16236,9 +16355,7 @@ static void xfixesSelectionNotify(tvbuff_t *tvb, int *offsetp, proto_tree *t, in int f_selection; int f_timestamp; int f_selection_timestamp; - f_subtype = VALUE8(tvb, *offsetp); - proto_tree_add_item(t, hf_x11_xfixes_SelectionNotify_subtype, tvb, *offsetp, 1, little_endian); - *offsetp += 1; + f_subtype = field8(tvb, offsetp, t, hf_x11_xfixes_SelectionNotify_subtype, little_endian); CARD16(event_sequencenumber); f_window = VALUE32(tvb, *offsetp); proto_tree_add_item(t, hf_x11_xfixes_SelectionNotify_window, tvb, *offsetp, 4, little_endian); @@ -16270,7 +16387,13 @@ static void xfixesSelectSelectionInput(tvbuff_t *tvb, packet_info *pinfo _U_, in proto_tree_add_item(t, hf_x11_xfixes_SelectSelectionInput_selection, tvb, *offsetp, 4, little_endian); *offsetp += 4; f_event_mask = VALUE32(tvb, *offsetp); - proto_tree_add_item(t, hf_x11_xfixes_SelectSelectionInput_event_mask, tvb, *offsetp, 4, little_endian); + { + proto_item *ti = proto_tree_add_item(t, hf_x11_xfixes_SelectSelectionInput_event_mask, tvb, *offsetp, 4, little_endian); + proto_tree *bitmask_tree = proto_item_add_subtree(ti, ett_x11_rectangle); + proto_tree_add_item(bitmask_tree, hf_x11_xfixes_SelectSelectionInput_event_mask_mask_SetSelectionOwner, tvb, *offsetp, 4, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_xfixes_SelectSelectionInput_event_mask_mask_SelectionWindowDestroy, tvb, *offsetp, 4, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_xfixes_SelectSelectionInput_event_mask_mask_SelectionClientClose, tvb, *offsetp, 4, little_endian); + } *offsetp += 4; } @@ -16281,9 +16404,7 @@ static void xfixesCursorNotify(tvbuff_t *tvb, int *offsetp, proto_tree *t, int l int f_cursor_serial; int f_timestamp; int f_name; - f_subtype = VALUE8(tvb, *offsetp); - proto_tree_add_item(t, hf_x11_xfixes_CursorNotify_subtype, tvb, *offsetp, 1, little_endian); - *offsetp += 1; + f_subtype = field8(tvb, offsetp, t, hf_x11_xfixes_CursorNotify_subtype, little_endian); CARD16(event_sequencenumber); f_window = VALUE32(tvb, *offsetp); proto_tree_add_item(t, hf_x11_xfixes_CursorNotify_window, tvb, *offsetp, 4, little_endian); @@ -16294,9 +16415,7 @@ static void xfixesCursorNotify(tvbuff_t *tvb, int *offsetp, proto_tree *t, int l f_timestamp = VALUE32(tvb, *offsetp); proto_tree_add_item(t, hf_x11_xfixes_CursorNotify_timestamp, tvb, *offsetp, 4, little_endian); *offsetp += 4; - f_name = VALUE32(tvb, *offsetp); - proto_tree_add_item(t, hf_x11_xfixes_CursorNotify_name, tvb, *offsetp, 4, little_endian); - *offsetp += 4; + f_name = field32(tvb, offsetp, t, hf_x11_xfixes_CursorNotify_name, little_endian); UNUSED(12); } @@ -16308,7 +16427,11 @@ static void xfixesSelectCursorInput(tvbuff_t *tvb, packet_info *pinfo _U_, int * proto_tree_add_item(t, hf_x11_xfixes_SelectCursorInput_window, tvb, *offsetp, 4, little_endian); *offsetp += 4; f_event_mask = VALUE32(tvb, *offsetp); - proto_tree_add_item(t, hf_x11_xfixes_SelectCursorInput_event_mask, tvb, *offsetp, 4, little_endian); + { + proto_item *ti = proto_tree_add_item(t, hf_x11_xfixes_SelectCursorInput_event_mask, tvb, *offsetp, 4, little_endian); + proto_tree *bitmask_tree = proto_item_add_subtree(ti, ett_x11_rectangle); + proto_tree_add_item(bitmask_tree, hf_x11_xfixes_SelectCursorInput_event_mask_mask_DisplayCursor, tvb, *offsetp, 4, little_endian); + } *offsetp += 4; } @@ -16395,9 +16518,7 @@ static void xfixesCreateRegionFromWindow(tvbuff_t *tvb, packet_info *pinfo _U_, f_window = VALUE32(tvb, *offsetp); proto_tree_add_item(t, hf_x11_xfixes_CreateRegionFromWindow_window, tvb, *offsetp, 4, little_endian); *offsetp += 4; - f_kind = VALUE8(tvb, *offsetp); - proto_tree_add_item(t, hf_x11_xfixes_CreateRegionFromWindow_kind, tvb, *offsetp, 1, little_endian); - *offsetp += 1; + f_kind = field8(tvb, offsetp, t, hf_x11_xfixes_CreateRegionFromWindow_kind, little_endian); UNUSED(3); } @@ -16580,9 +16701,7 @@ static void xfixesSetGCClipRegion(tvbuff_t *tvb, packet_info *pinfo _U_, int *of f_gc = VALUE32(tvb, *offsetp); proto_tree_add_item(t, hf_x11_xfixes_SetGCClipRegion_gc, tvb, *offsetp, 4, little_endian); *offsetp += 4; - f_region = VALUE32(tvb, *offsetp); - proto_tree_add_item(t, hf_x11_xfixes_SetGCClipRegion_region, tvb, *offsetp, 4, little_endian); - *offsetp += 4; + f_region = field32(tvb, offsetp, t, hf_x11_xfixes_SetGCClipRegion_region, little_endian); f_x_origin = VALUE16(tvb, *offsetp); proto_tree_add_item(t, hf_x11_xfixes_SetGCClipRegion_x_origin, tvb, *offsetp, 2, little_endian); *offsetp += 2; @@ -16601,9 +16720,7 @@ static void xfixesSetWindowShapeRegion(tvbuff_t *tvb, packet_info *pinfo _U_, in f_dest = VALUE32(tvb, *offsetp); proto_tree_add_item(t, hf_x11_xfixes_SetWindowShapeRegion_dest, tvb, *offsetp, 4, little_endian); *offsetp += 4; - f_dest_kind = VALUE8(tvb, *offsetp); - proto_tree_add_item(t, hf_x11_xfixes_SetWindowShapeRegion_dest_kind, tvb, *offsetp, 1, little_endian); - *offsetp += 1; + f_dest_kind = field8(tvb, offsetp, t, hf_x11_xfixes_SetWindowShapeRegion_dest_kind, little_endian); UNUSED(3); f_x_offset = VALUE16(tvb, *offsetp); proto_tree_add_item(t, hf_x11_xfixes_SetWindowShapeRegion_x_offset, tvb, *offsetp, 2, little_endian); @@ -16611,9 +16728,7 @@ static void xfixesSetWindowShapeRegion(tvbuff_t *tvb, packet_info *pinfo _U_, in f_y_offset = VALUE16(tvb, *offsetp); proto_tree_add_item(t, hf_x11_xfixes_SetWindowShapeRegion_y_offset, tvb, *offsetp, 2, little_endian); *offsetp += 2; - f_region = VALUE32(tvb, *offsetp); - proto_tree_add_item(t, hf_x11_xfixes_SetWindowShapeRegion_region, tvb, *offsetp, 4, little_endian); - *offsetp += 4; + f_region = field32(tvb, offsetp, t, hf_x11_xfixes_SetWindowShapeRegion_region, little_endian); } static void xfixesSetPictureClipRegion(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, int little_endian, int length _U_) @@ -16625,9 +16740,7 @@ static void xfixesSetPictureClipRegion(tvbuff_t *tvb, packet_info *pinfo _U_, in f_picture = VALUE32(tvb, *offsetp); proto_tree_add_item(t, hf_x11_xfixes_SetPictureClipRegion_picture, tvb, *offsetp, 4, little_endian); *offsetp += 4; - f_region = VALUE32(tvb, *offsetp); - proto_tree_add_item(t, hf_x11_xfixes_SetPictureClipRegion_region, tvb, *offsetp, 4, little_endian); - *offsetp += 4; + f_region = field32(tvb, offsetp, t, hf_x11_xfixes_SetPictureClipRegion_region, little_endian); f_x_origin = VALUE16(tvb, *offsetp); proto_tree_add_item(t, hf_x11_xfixes_SetPictureClipRegion_x_origin, tvb, *offsetp, 2, little_endian); *offsetp += 2; @@ -16676,9 +16789,7 @@ static void xfixesGetCursorName_Reply(tvbuff_t *tvb, packet_info *pinfo, int *of length = f_length * 4 + 32; proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, little_endian); *offsetp += 4; - f_atom = VALUE32(tvb, *offsetp); - proto_tree_add_item(t, hf_x11_xfixes_GetCursorName_reply_atom, tvb, *offsetp, 4, little_endian); - *offsetp += 4; + f_atom = field32(tvb, offsetp, t, hf_x11_xfixes_GetCursorName_reply_atom, little_endian); f_nbytes = VALUE16(tvb, *offsetp); proto_tree_add_item(t, hf_x11_xfixes_GetCursorName_reply_nbytes, tvb, *offsetp, 2, little_endian); *offsetp += 2; @@ -16735,9 +16846,7 @@ static void xfixesGetCursorImageAndName_Reply(tvbuff_t *tvb, packet_info *pinfo, f_cursor_serial = VALUE32(tvb, *offsetp); proto_tree_add_item(t, hf_x11_xfixes_GetCursorImageAndName_reply_cursor_serial, tvb, *offsetp, 4, little_endian); *offsetp += 4; - f_cursor_atom = VALUE32(tvb, *offsetp); - proto_tree_add_item(t, hf_x11_xfixes_GetCursorImageAndName_reply_cursor_atom, tvb, *offsetp, 4, little_endian); - *offsetp += 4; + f_cursor_atom = field32(tvb, offsetp, t, hf_x11_xfixes_GetCursorImageAndName_reply_cursor_atom, little_endian); f_nbytes = VALUE16(tvb, *offsetp); proto_tree_add_item(t, hf_x11_xfixes_GetCursorImageAndName_reply_nbytes, tvb, *offsetp, 2, little_endian); *offsetp += 2; @@ -17325,9 +17434,7 @@ static void struct_DeviceInfo(tvbuff_t *tvb, int *offsetp, proto_tree *root, int f_num_class_info = VALUE8(tvb, *offsetp); proto_tree_add_item(t, hf_x11_struct_DeviceInfo_num_class_info, tvb, *offsetp, 1, little_endian); *offsetp += 1; - f_device_use = VALUE8(tvb, *offsetp); - proto_tree_add_item(t, hf_x11_struct_DeviceInfo_device_use, tvb, *offsetp, 1, little_endian); - *offsetp += 1; + f_device_use = field8(tvb, offsetp, t, hf_x11_struct_DeviceInfo_device_use, little_endian); UNUSED(1); } } @@ -17370,9 +17477,7 @@ static void struct_InputClassInfo(tvbuff_t *tvb, int *offsetp, proto_tree *root, item = proto_tree_add_item(root, hf_x11_struct_InputClassInfo, tvb, *offsetp, 2, little_endian); t = proto_item_add_subtree(item, ett_x11_rectangle); - f_class_id = VALUE8(tvb, *offsetp); - proto_tree_add_item(t, hf_x11_struct_InputClassInfo_class_id, tvb, *offsetp, 1, little_endian); - *offsetp += 1; + f_class_id = field8(tvb, offsetp, t, hf_x11_struct_InputClassInfo_class_id, little_endian); f_event_type_base = VALUE8(tvb, *offsetp); proto_tree_add_item(t, hf_x11_struct_InputClassInfo_event_type_base, tvb, *offsetp, 1, little_endian); *offsetp += 1; @@ -17427,9 +17532,7 @@ static void xinputSetDeviceMode(tvbuff_t *tvb, packet_info *pinfo _U_, int *offs f_device_id = VALUE8(tvb, *offsetp); proto_tree_add_item(t, hf_x11_xinput_SetDeviceMode_device_id, tvb, *offsetp, 1, little_endian); *offsetp += 1; - f_mode = VALUE8(tvb, *offsetp); - proto_tree_add_item(t, hf_x11_xinput_SetDeviceMode_mode, tvb, *offsetp, 1, little_endian); - *offsetp += 1; + f_mode = field8(tvb, offsetp, t, hf_x11_xinput_SetDeviceMode_mode, little_endian); UNUSED(2); } static void xinputSetDeviceMode_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, int little_endian) @@ -17449,9 +17552,7 @@ static void xinputSetDeviceMode_Reply(tvbuff_t *tvb, packet_info *pinfo, int *of length = f_length * 4 + 32; proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, little_endian); *offsetp += 4; - f_status = VALUE8(tvb, *offsetp); - proto_tree_add_item(t, hf_x11_xinput_SetDeviceMode_reply_status, tvb, *offsetp, 1, little_endian); - *offsetp += 1; + f_status = field8(tvb, offsetp, t, hf_x11_xinput_SetDeviceMode_reply_status, little_endian); UNUSED(23); } @@ -17517,9 +17618,7 @@ static void xinputChangeDeviceDontPropagateList(tvbuff_t *tvb, packet_info *pinf f_num_classes = VALUE16(tvb, *offsetp); proto_tree_add_item(t, hf_x11_xinput_ChangeDeviceDontPropagateList_num_classes, tvb, *offsetp, 2, little_endian); *offsetp += 2; - f_mode = VALUE8(tvb, *offsetp); - proto_tree_add_item(t, hf_x11_xinput_ChangeDeviceDontPropagateList_mode, tvb, *offsetp, 1, little_endian); - *offsetp += 1; + f_mode = field8(tvb, offsetp, t, hf_x11_xinput_ChangeDeviceDontPropagateList_mode, little_endian); UNUSED(1); listOfCard32(tvb, offsetp, t, hf_x11_xinput_ChangeDeviceDontPropagateList_classes, hf_x11_xinput_ChangeDeviceDontPropagateList_classes_item, f_num_classes, little_endian); length -= f_num_classes * 4; @@ -17564,9 +17663,7 @@ static void xinputGetDeviceMotionEvents(tvbuff_t *tvb, packet_info *pinfo _U_, i f_start = VALUE32(tvb, *offsetp); proto_tree_add_item(t, hf_x11_xinput_GetDeviceMotionEvents_start, tvb, *offsetp, 4, little_endian); *offsetp += 4; - f_stop = VALUE32(tvb, *offsetp); - proto_tree_add_item(t, hf_x11_xinput_GetDeviceMotionEvents_stop, tvb, *offsetp, 4, little_endian); - *offsetp += 4; + f_stop = field32(tvb, offsetp, t, hf_x11_xinput_GetDeviceMotionEvents_stop, little_endian); f_device_id = VALUE8(tvb, *offsetp); proto_tree_add_item(t, hf_x11_xinput_GetDeviceMotionEvents_device_id, tvb, *offsetp, 1, little_endian); *offsetp += 1; @@ -17596,9 +17693,7 @@ static void xinputGetDeviceMotionEvents_Reply(tvbuff_t *tvb, packet_info *pinfo, f_num_axes = VALUE8(tvb, *offsetp); proto_tree_add_item(t, hf_x11_xinput_GetDeviceMotionEvents_reply_num_axes, tvb, *offsetp, 1, little_endian); *offsetp += 1; - f_device_mode = VALUE8(tvb, *offsetp); - proto_tree_add_item(t, hf_x11_xinput_GetDeviceMotionEvents_reply_device_mode, tvb, *offsetp, 1, little_endian); - *offsetp += 1; + f_device_mode = field8(tvb, offsetp, t, hf_x11_xinput_GetDeviceMotionEvents_reply_device_mode, little_endian); UNUSED(18); } @@ -17627,9 +17722,7 @@ static void xinputChangeKeyboardDevice_Reply(tvbuff_t *tvb, packet_info *pinfo, length = f_length * 4 + 32; proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, little_endian); *offsetp += 4; - f_status = VALUE8(tvb, *offsetp); - proto_tree_add_item(t, hf_x11_xinput_ChangeKeyboardDevice_reply_status, tvb, *offsetp, 1, little_endian); - *offsetp += 1; + f_status = field8(tvb, offsetp, t, hf_x11_xinput_ChangeKeyboardDevice_reply_status, little_endian); UNUSED(23); } @@ -17666,9 +17759,7 @@ static void xinputChangePointerDevice_Reply(tvbuff_t *tvb, packet_info *pinfo, i length = f_length * 4 + 32; proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, little_endian); *offsetp += 4; - f_status = VALUE8(tvb, *offsetp); - proto_tree_add_item(t, hf_x11_xinput_ChangePointerDevice_reply_status, tvb, *offsetp, 1, little_endian); - *offsetp += 1; + f_status = field8(tvb, offsetp, t, hf_x11_xinput_ChangePointerDevice_reply_status, little_endian); UNUSED(23); } @@ -17684,18 +17775,12 @@ static void xinputGrabDevice(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp f_grab_window = VALUE32(tvb, *offsetp); proto_tree_add_item(t, hf_x11_xinput_GrabDevice_grab_window, tvb, *offsetp, 4, little_endian); *offsetp += 4; - f_time = VALUE32(tvb, *offsetp); - proto_tree_add_item(t, hf_x11_xinput_GrabDevice_time, tvb, *offsetp, 4, little_endian); - *offsetp += 4; + f_time = field32(tvb, offsetp, t, hf_x11_xinput_GrabDevice_time, little_endian); f_num_classes = VALUE16(tvb, *offsetp); proto_tree_add_item(t, hf_x11_xinput_GrabDevice_num_classes, tvb, *offsetp, 2, little_endian); *offsetp += 2; - f_this_device_mode = VALUE8(tvb, *offsetp); - proto_tree_add_item(t, hf_x11_xinput_GrabDevice_this_device_mode, tvb, *offsetp, 1, little_endian); - *offsetp += 1; - f_other_device_mode = VALUE8(tvb, *offsetp); - proto_tree_add_item(t, hf_x11_xinput_GrabDevice_other_device_mode, tvb, *offsetp, 1, little_endian); - *offsetp += 1; + f_this_device_mode = field8(tvb, offsetp, t, hf_x11_xinput_GrabDevice_this_device_mode, little_endian); + f_other_device_mode = field8(tvb, offsetp, t, hf_x11_xinput_GrabDevice_other_device_mode, little_endian); f_owner_events = VALUE8(tvb, *offsetp); proto_tree_add_item(t, hf_x11_xinput_GrabDevice_owner_events, tvb, *offsetp, 1, little_endian); *offsetp += 1; @@ -17723,9 +17808,7 @@ static void xinputGrabDevice_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offse length = f_length * 4 + 32; proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, little_endian); *offsetp += 4; - f_status = VALUE8(tvb, *offsetp); - proto_tree_add_item(t, hf_x11_xinput_GrabDevice_reply_status, tvb, *offsetp, 1, little_endian); - *offsetp += 1; + f_status = field8(tvb, offsetp, t, hf_x11_xinput_GrabDevice_reply_status, little_endian); UNUSED(23); } @@ -17733,9 +17816,7 @@ static void xinputUngrabDevice(tvbuff_t *tvb, packet_info *pinfo _U_, int *offse { int f_time; int f_device_id; - f_time = VALUE32(tvb, *offsetp); - proto_tree_add_item(t, hf_x11_xinput_UngrabDevice_time, tvb, *offsetp, 4, little_endian); - *offsetp += 4; + f_time = field32(tvb, offsetp, t, hf_x11_xinput_UngrabDevice_time, little_endian); f_device_id = VALUE8(tvb, *offsetp); proto_tree_add_item(t, hf_x11_xinput_UngrabDevice_device_id, tvb, *offsetp, 1, little_endian); *offsetp += 1; @@ -17759,7 +17840,19 @@ static void xinputGrabDeviceKey(tvbuff_t *tvb, packet_info *pinfo _U_, int *offs proto_tree_add_item(t, hf_x11_xinput_GrabDeviceKey_num_classes, tvb, *offsetp, 2, little_endian); *offsetp += 2; f_modifiers = VALUE16(tvb, *offsetp); - proto_tree_add_item(t, hf_x11_xinput_GrabDeviceKey_modifiers, tvb, *offsetp, 2, little_endian); + { + proto_item *ti = proto_tree_add_item(t, hf_x11_xinput_GrabDeviceKey_modifiers, tvb, *offsetp, 2, little_endian); + proto_tree *bitmask_tree = proto_item_add_subtree(ti, ett_x11_rectangle); + proto_tree_add_item(bitmask_tree, hf_x11_xinput_GrabDeviceKey_modifiers_mask_Shift, tvb, *offsetp, 2, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_xinput_GrabDeviceKey_modifiers_mask_Lock, tvb, *offsetp, 2, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_xinput_GrabDeviceKey_modifiers_mask_Control, tvb, *offsetp, 2, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_xinput_GrabDeviceKey_modifiers_mask_1, tvb, *offsetp, 2, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_xinput_GrabDeviceKey_modifiers_mask_2, tvb, *offsetp, 2, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_xinput_GrabDeviceKey_modifiers_mask_3, tvb, *offsetp, 2, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_xinput_GrabDeviceKey_modifiers_mask_4, tvb, *offsetp, 2, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_xinput_GrabDeviceKey_modifiers_mask_5, tvb, *offsetp, 2, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_xinput_GrabDeviceKey_modifiers_mask_Any, tvb, *offsetp, 2, little_endian); + } *offsetp += 2; f_modifier_device = VALUE8(tvb, *offsetp); proto_tree_add_item(t, hf_x11_xinput_GrabDeviceKey_modifier_device, tvb, *offsetp, 1, little_endian); @@ -17767,15 +17860,9 @@ static void xinputGrabDeviceKey(tvbuff_t *tvb, packet_info *pinfo _U_, int *offs f_grabbed_device = VALUE8(tvb, *offsetp); proto_tree_add_item(t, hf_x11_xinput_GrabDeviceKey_grabbed_device, tvb, *offsetp, 1, little_endian); *offsetp += 1; - f_key = VALUE8(tvb, *offsetp); - proto_tree_add_item(t, hf_x11_xinput_GrabDeviceKey_key, tvb, *offsetp, 1, little_endian); - *offsetp += 1; - f_this_device_mode = VALUE8(tvb, *offsetp); - proto_tree_add_item(t, hf_x11_xinput_GrabDeviceKey_this_device_mode, tvb, *offsetp, 1, little_endian); - *offsetp += 1; - f_other_device_mode = VALUE8(tvb, *offsetp); - proto_tree_add_item(t, hf_x11_xinput_GrabDeviceKey_other_device_mode, tvb, *offsetp, 1, little_endian); - *offsetp += 1; + f_key = field8(tvb, offsetp, t, hf_x11_xinput_GrabDeviceKey_key, little_endian); + f_this_device_mode = field8(tvb, offsetp, t, hf_x11_xinput_GrabDeviceKey_this_device_mode, little_endian); + f_other_device_mode = field8(tvb, offsetp, t, hf_x11_xinput_GrabDeviceKey_other_device_mode, little_endian); f_owner_events = VALUE8(tvb, *offsetp); proto_tree_add_item(t, hf_x11_xinput_GrabDeviceKey_owner_events, tvb, *offsetp, 1, little_endian); *offsetp += 1; @@ -17795,14 +17882,24 @@ static void xinputUngrabDeviceKey(tvbuff_t *tvb, packet_info *pinfo _U_, int *of proto_tree_add_item(t, hf_x11_xinput_UngrabDeviceKey_grabWindow, tvb, *offsetp, 4, little_endian); *offsetp += 4; f_modifiers = VALUE16(tvb, *offsetp); - proto_tree_add_item(t, hf_x11_xinput_UngrabDeviceKey_modifiers, tvb, *offsetp, 2, little_endian); + { + proto_item *ti = proto_tree_add_item(t, hf_x11_xinput_UngrabDeviceKey_modifiers, tvb, *offsetp, 2, little_endian); + proto_tree *bitmask_tree = proto_item_add_subtree(ti, ett_x11_rectangle); + proto_tree_add_item(bitmask_tree, hf_x11_xinput_UngrabDeviceKey_modifiers_mask_Shift, tvb, *offsetp, 2, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_xinput_UngrabDeviceKey_modifiers_mask_Lock, tvb, *offsetp, 2, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_xinput_UngrabDeviceKey_modifiers_mask_Control, tvb, *offsetp, 2, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_xinput_UngrabDeviceKey_modifiers_mask_1, tvb, *offsetp, 2, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_xinput_UngrabDeviceKey_modifiers_mask_2, tvb, *offsetp, 2, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_xinput_UngrabDeviceKey_modifiers_mask_3, tvb, *offsetp, 2, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_xinput_UngrabDeviceKey_modifiers_mask_4, tvb, *offsetp, 2, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_xinput_UngrabDeviceKey_modifiers_mask_5, tvb, *offsetp, 2, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_xinput_UngrabDeviceKey_modifiers_mask_Any, tvb, *offsetp, 2, little_endian); + } *offsetp += 2; f_modifier_device = VALUE8(tvb, *offsetp); proto_tree_add_item(t, hf_x11_xinput_UngrabDeviceKey_modifier_device, tvb, *offsetp, 1, little_endian); *offsetp += 1; - f_key = VALUE8(tvb, *offsetp); - proto_tree_add_item(t, hf_x11_xinput_UngrabDeviceKey_key, tvb, *offsetp, 1, little_endian); - *offsetp += 1; + f_key = field8(tvb, offsetp, t, hf_x11_xinput_UngrabDeviceKey_key, little_endian); f_grabbed_device = VALUE8(tvb, *offsetp); proto_tree_add_item(t, hf_x11_xinput_UngrabDeviceKey_grabbed_device, tvb, *offsetp, 1, little_endian); *offsetp += 1; @@ -17832,17 +17929,23 @@ static void xinputGrabDeviceButton(tvbuff_t *tvb, packet_info *pinfo _U_, int *o proto_tree_add_item(t, hf_x11_xinput_GrabDeviceButton_num_classes, tvb, *offsetp, 2, little_endian); *offsetp += 2; f_modifiers = VALUE16(tvb, *offsetp); - proto_tree_add_item(t, hf_x11_xinput_GrabDeviceButton_modifiers, tvb, *offsetp, 2, little_endian); + { + proto_item *ti = proto_tree_add_item(t, hf_x11_xinput_GrabDeviceButton_modifiers, tvb, *offsetp, 2, little_endian); + proto_tree *bitmask_tree = proto_item_add_subtree(ti, ett_x11_rectangle); + proto_tree_add_item(bitmask_tree, hf_x11_xinput_GrabDeviceButton_modifiers_mask_Shift, tvb, *offsetp, 2, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_xinput_GrabDeviceButton_modifiers_mask_Lock, tvb, *offsetp, 2, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_xinput_GrabDeviceButton_modifiers_mask_Control, tvb, *offsetp, 2, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_xinput_GrabDeviceButton_modifiers_mask_1, tvb, *offsetp, 2, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_xinput_GrabDeviceButton_modifiers_mask_2, tvb, *offsetp, 2, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_xinput_GrabDeviceButton_modifiers_mask_3, tvb, *offsetp, 2, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_xinput_GrabDeviceButton_modifiers_mask_4, tvb, *offsetp, 2, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_xinput_GrabDeviceButton_modifiers_mask_5, tvb, *offsetp, 2, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_xinput_GrabDeviceButton_modifiers_mask_Any, tvb, *offsetp, 2, little_endian); + } *offsetp += 2; - f_this_device_mode = VALUE8(tvb, *offsetp); - proto_tree_add_item(t, hf_x11_xinput_GrabDeviceButton_this_device_mode, tvb, *offsetp, 1, little_endian); - *offsetp += 1; - f_other_device_mode = VALUE8(tvb, *offsetp); - proto_tree_add_item(t, hf_x11_xinput_GrabDeviceButton_other_device_mode, tvb, *offsetp, 1, little_endian); - *offsetp += 1; - f_button = VALUE8(tvb, *offsetp); - proto_tree_add_item(t, hf_x11_xinput_GrabDeviceButton_button, tvb, *offsetp, 1, little_endian); - *offsetp += 1; + f_this_device_mode = field8(tvb, offsetp, t, hf_x11_xinput_GrabDeviceButton_this_device_mode, little_endian); + f_other_device_mode = field8(tvb, offsetp, t, hf_x11_xinput_GrabDeviceButton_other_device_mode, little_endian); + f_button = field8(tvb, offsetp, t, hf_x11_xinput_GrabDeviceButton_button, little_endian); f_owner_events = VALUE8(tvb, *offsetp); proto_tree_add_item(t, hf_x11_xinput_GrabDeviceButton_owner_events, tvb, *offsetp, 1, little_endian); *offsetp += 1; @@ -17862,14 +17965,24 @@ static void xinputUngrabDeviceButton(tvbuff_t *tvb, packet_info *pinfo _U_, int proto_tree_add_item(t, hf_x11_xinput_UngrabDeviceButton_grab_window, tvb, *offsetp, 4, little_endian); *offsetp += 4; f_modifiers = VALUE16(tvb, *offsetp); - proto_tree_add_item(t, hf_x11_xinput_UngrabDeviceButton_modifiers, tvb, *offsetp, 2, little_endian); + { + proto_item *ti = proto_tree_add_item(t, hf_x11_xinput_UngrabDeviceButton_modifiers, tvb, *offsetp, 2, little_endian); + proto_tree *bitmask_tree = proto_item_add_subtree(ti, ett_x11_rectangle); + proto_tree_add_item(bitmask_tree, hf_x11_xinput_UngrabDeviceButton_modifiers_mask_Shift, tvb, *offsetp, 2, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_xinput_UngrabDeviceButton_modifiers_mask_Lock, tvb, *offsetp, 2, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_xinput_UngrabDeviceButton_modifiers_mask_Control, tvb, *offsetp, 2, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_xinput_UngrabDeviceButton_modifiers_mask_1, tvb, *offsetp, 2, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_xinput_UngrabDeviceButton_modifiers_mask_2, tvb, *offsetp, 2, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_xinput_UngrabDeviceButton_modifiers_mask_3, tvb, *offsetp, 2, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_xinput_UngrabDeviceButton_modifiers_mask_4, tvb, *offsetp, 2, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_xinput_UngrabDeviceButton_modifiers_mask_5, tvb, *offsetp, 2, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_xinput_UngrabDeviceButton_modifiers_mask_Any, tvb, *offsetp, 2, little_endian); + } *offsetp += 2; f_modifier_device = VALUE8(tvb, *offsetp); proto_tree_add_item(t, hf_x11_xinput_UngrabDeviceButton_modifier_device, tvb, *offsetp, 1, little_endian); *offsetp += 1; - f_button = VALUE8(tvb, *offsetp); - proto_tree_add_item(t, hf_x11_xinput_UngrabDeviceButton_button, tvb, *offsetp, 1, little_endian); - *offsetp += 1; + f_button = field8(tvb, offsetp, t, hf_x11_xinput_UngrabDeviceButton_button, little_endian); f_grabbed_device = VALUE8(tvb, *offsetp); proto_tree_add_item(t, hf_x11_xinput_UngrabDeviceButton_grabbed_device, tvb, *offsetp, 1, little_endian); *offsetp += 1; @@ -17880,12 +17993,8 @@ static void xinputAllowDeviceEvents(tvbuff_t *tvb, packet_info *pinfo _U_, int * int f_time; int f_mode; int f_device_id; - f_time = VALUE32(tvb, *offsetp); - proto_tree_add_item(t, hf_x11_xinput_AllowDeviceEvents_time, tvb, *offsetp, 4, little_endian); - *offsetp += 4; - f_mode = VALUE8(tvb, *offsetp); - proto_tree_add_item(t, hf_x11_xinput_AllowDeviceEvents_mode, tvb, *offsetp, 1, little_endian); - *offsetp += 1; + f_time = field32(tvb, offsetp, t, hf_x11_xinput_AllowDeviceEvents_time, little_endian); + f_mode = field8(tvb, offsetp, t, hf_x11_xinput_AllowDeviceEvents_mode, little_endian); f_device_id = VALUE8(tvb, *offsetp); proto_tree_add_item(t, hf_x11_xinput_AllowDeviceEvents_device_id, tvb, *offsetp, 1, little_endian); *offsetp += 1; @@ -17918,15 +18027,11 @@ static void xinputGetDeviceFocus_Reply(tvbuff_t *tvb, packet_info *pinfo, int *o length = f_length * 4 + 32; proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, little_endian); *offsetp += 4; - f_focus = VALUE32(tvb, *offsetp); - proto_tree_add_item(t, hf_x11_xinput_GetDeviceFocus_reply_focus, tvb, *offsetp, 4, little_endian); - *offsetp += 4; + f_focus = field32(tvb, offsetp, t, hf_x11_xinput_GetDeviceFocus_reply_focus, little_endian); f_time = VALUE32(tvb, *offsetp); proto_tree_add_item(t, hf_x11_xinput_GetDeviceFocus_reply_time, tvb, *offsetp, 4, little_endian); *offsetp += 4; - f_revert_to = VALUE8(tvb, *offsetp); - proto_tree_add_item(t, hf_x11_xinput_GetDeviceFocus_reply_revert_to, tvb, *offsetp, 1, little_endian); - *offsetp += 1; + f_revert_to = field8(tvb, offsetp, t, hf_x11_xinput_GetDeviceFocus_reply_revert_to, little_endian); UNUSED(15); } @@ -17936,15 +18041,9 @@ static void xinputSetDeviceFocus(tvbuff_t *tvb, packet_info *pinfo _U_, int *off int f_time; int f_revert_to; int f_device_id; - f_focus = VALUE32(tvb, *offsetp); - proto_tree_add_item(t, hf_x11_xinput_SetDeviceFocus_focus, tvb, *offsetp, 4, little_endian); - *offsetp += 4; - f_time = VALUE32(tvb, *offsetp); - proto_tree_add_item(t, hf_x11_xinput_SetDeviceFocus_time, tvb, *offsetp, 4, little_endian); - *offsetp += 4; - f_revert_to = VALUE8(tvb, *offsetp); - proto_tree_add_item(t, hf_x11_xinput_SetDeviceFocus_revert_to, tvb, *offsetp, 1, little_endian); - *offsetp += 1; + f_focus = field32(tvb, offsetp, t, hf_x11_xinput_SetDeviceFocus_focus, little_endian); + f_time = field32(tvb, offsetp, t, hf_x11_xinput_SetDeviceFocus_time, little_endian); + f_revert_to = field8(tvb, offsetp, t, hf_x11_xinput_SetDeviceFocus_revert_to, little_endian); f_device_id = VALUE8(tvb, *offsetp); proto_tree_add_item(t, hf_x11_xinput_SetDeviceFocus_device_id, tvb, *offsetp, 1, little_endian); *offsetp += 1; @@ -18105,9 +18204,7 @@ static void xinputSetDeviceModifierMapping_Reply(tvbuff_t *tvb, packet_info *pin length = f_length * 4 + 32; proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, little_endian); *offsetp += 4; - f_status = VALUE8(tvb, *offsetp); - proto_tree_add_item(t, hf_x11_xinput_SetDeviceModifierMapping_reply_status, tvb, *offsetp, 1, little_endian); - *offsetp += 1; + f_status = field8(tvb, offsetp, t, hf_x11_xinput_SetDeviceModifierMapping_reply_status, little_endian); UNUSED(23); } @@ -18174,9 +18271,7 @@ static void xinputSetDeviceButtonMapping_Reply(tvbuff_t *tvb, packet_info *pinfo length = f_length * 4 + 32; proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, little_endian); *offsetp += 4; - f_status = VALUE8(tvb, *offsetp); - proto_tree_add_item(t, hf_x11_xinput_SetDeviceButtonMapping_reply_status, tvb, *offsetp, 1, little_endian); - *offsetp += 1; + f_status = field8(tvb, offsetp, t, hf_x11_xinput_SetDeviceButtonMapping_reply_status, little_endian); UNUSED(23); } @@ -18295,9 +18390,7 @@ static void xinputSetDeviceValuators_Reply(tvbuff_t *tvb, packet_info *pinfo, in length = f_length * 4 + 32; proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, little_endian); *offsetp += 4; - f_status = VALUE8(tvb, *offsetp); - proto_tree_add_item(t, hf_x11_xinput_SetDeviceValuators_reply_status, tvb, *offsetp, 1, little_endian); - *offsetp += 1; + f_status = field8(tvb, offsetp, t, hf_x11_xinput_SetDeviceValuators_reply_status, little_endian); UNUSED(23); } @@ -18330,9 +18423,7 @@ static void xinputGetDeviceControl_Reply(tvbuff_t *tvb, packet_info *pinfo, int length = f_length * 4 + 32; proto_tree_add_item(t, hf_x11_replylength, tvb, *offsetp, 4, little_endian); *offsetp += 4; - f_status = VALUE8(tvb, *offsetp); - proto_tree_add_item(t, hf_x11_xinput_GetDeviceControl_reply_status, tvb, *offsetp, 1, little_endian); - *offsetp += 1; + f_status = field8(tvb, offsetp, t, hf_x11_xinput_GetDeviceControl_reply_status, little_endian); UNUSED(23); } @@ -18385,9 +18476,7 @@ static void xinputDeviceKeyPress(tvbuff_t *tvb, int *offsetp, proto_tree *t, int f_event = VALUE32(tvb, *offsetp); proto_tree_add_item(t, hf_x11_xinput_DeviceKeyPress_event, tvb, *offsetp, 4, little_endian); *offsetp += 4; - f_child = VALUE32(tvb, *offsetp); - proto_tree_add_item(t, hf_x11_xinput_DeviceKeyPress_child, tvb, *offsetp, 4, little_endian); - *offsetp += 4; + f_child = field32(tvb, offsetp, t, hf_x11_xinput_DeviceKeyPress_child, little_endian); f_root_x = VALUE16(tvb, *offsetp); proto_tree_add_item(t, hf_x11_xinput_DeviceKeyPress_root_x, tvb, *offsetp, 2, little_endian); *offsetp += 2; @@ -18418,9 +18507,7 @@ static void xinputFocusIn(tvbuff_t *tvb, int *offsetp, proto_tree *t, int little int f_window; int f_mode; int f_device_id; - f_detail = VALUE8(tvb, *offsetp); - proto_tree_add_item(t, hf_x11_xinput_FocusIn_detail, tvb, *offsetp, 1, little_endian); - *offsetp += 1; + f_detail = field8(tvb, offsetp, t, hf_x11_xinput_FocusIn_detail, little_endian); CARD16(event_sequencenumber); f_time = VALUE32(tvb, *offsetp); proto_tree_add_item(t, hf_x11_xinput_FocusIn_time, tvb, *offsetp, 4, little_endian); @@ -18428,9 +18515,7 @@ static void xinputFocusIn(tvbuff_t *tvb, int *offsetp, proto_tree *t, int little f_window = VALUE32(tvb, *offsetp); proto_tree_add_item(t, hf_x11_xinput_FocusIn_window, tvb, *offsetp, 4, little_endian); *offsetp += 4; - f_mode = VALUE8(tvb, *offsetp); - proto_tree_add_item(t, hf_x11_xinput_FocusIn_mode, tvb, *offsetp, 1, little_endian); - *offsetp += 1; + f_mode = field8(tvb, offsetp, t, hf_x11_xinput_FocusIn_mode, little_endian); f_device_id = VALUE8(tvb, *offsetp); proto_tree_add_item(t, hf_x11_xinput_FocusIn_device_id, tvb, *offsetp, 1, little_endian); *offsetp += 1; @@ -20476,7 +20561,15 @@ static void struct_AdaptorInfo(tvbuff_t *tvb, int *offsetp, proto_tree *root, in proto_tree_add_item(t, hf_x11_struct_AdaptorInfo_num_formats, tvb, *offsetp, 2, little_endian); *offsetp += 2; f_type = VALUE8(tvb, *offsetp); - proto_tree_add_item(t, hf_x11_struct_AdaptorInfo_type, tvb, *offsetp, 1, little_endian); + { + proto_item *ti = proto_tree_add_item(t, hf_x11_struct_AdaptorInfo_type, tvb, *offsetp, 1, little_endian); + proto_tree *bitmask_tree = proto_item_add_subtree(ti, ett_x11_rectangle); + proto_tree_add_item(bitmask_tree, hf_x11_struct_AdaptorInfo_type_mask_InputMask, tvb, *offsetp, 1, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_struct_AdaptorInfo_type_mask_OutputMask, tvb, *offsetp, 1, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_struct_AdaptorInfo_type_mask_VideoMask, tvb, *offsetp, 1, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_struct_AdaptorInfo_type_mask_StillMask, tvb, *offsetp, 1, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_struct_AdaptorInfo_type_mask_ImageMask, tvb, *offsetp, 1, little_endian); + } *offsetp += 1; UNUSED(1); listOfByte(tvb, offsetp, t, hf_x11_struct_AdaptorInfo_name, f_name_size, little_endian); @@ -20547,7 +20640,12 @@ static void struct_AttributeInfo(tvbuff_t *tvb, int *offsetp, proto_tree *root, item = proto_tree_add_item(root, hf_x11_struct_AttributeInfo, tvb, *offsetp, struct_size_AttributeInfo(tvb, offsetp, little_endian), little_endian); t = proto_item_add_subtree(item, ett_x11_rectangle); f_flags = VALUE32(tvb, *offsetp); - proto_tree_add_item(t, hf_x11_struct_AttributeInfo_flags, tvb, *offsetp, 4, little_endian); + { + proto_item *ti = proto_tree_add_item(t, hf_x11_struct_AttributeInfo_flags, tvb, *offsetp, 4, little_endian); + proto_tree *bitmask_tree = proto_item_add_subtree(ti, ett_x11_rectangle); + proto_tree_add_item(bitmask_tree, hf_x11_struct_AttributeInfo_flags_mask_Gettable, tvb, *offsetp, 4, little_endian); + proto_tree_add_item(bitmask_tree, hf_x11_struct_AttributeInfo_flags_mask_Settable, tvb, *offsetp, 4, little_endian); + } *offsetp += 4; f_min = VALUE32(tvb, *offsetp); proto_tree_add_item(t, hf_x11_struct_AttributeInfo_min, tvb, *offsetp, 4, little_endian); @@ -20594,12 +20692,8 @@ static void struct_ImageFormatInfo(tvbuff_t *tvb, int *offsetp, proto_tree *root f_id = VALUE32(tvb, *offsetp); proto_tree_add_item(t, hf_x11_struct_ImageFormatInfo_id, tvb, *offsetp, 4, little_endian); *offsetp += 4; - f_type = VALUE8(tvb, *offsetp); - proto_tree_add_item(t, hf_x11_struct_ImageFormatInfo_type, tvb, *offsetp, 1, little_endian); - *offsetp += 1; - f_byte_order = VALUE8(tvb, *offsetp); - proto_tree_add_item(t, hf_x11_struct_ImageFormatInfo_byte_order, tvb, *offsetp, 1, little_endian); - *offsetp += 1; + f_type = field8(tvb, offsetp, t, hf_x11_struct_ImageFormatInfo_type, little_endian); + f_byte_order = field8(tvb, offsetp, t, hf_x11_struct_ImageFormatInfo_byte_order, little_endian); UNUSED(2); listOfByte(tvb, offsetp, t, hf_x11_struct_ImageFormatInfo_guid, 16, little_endian); f_bpp = VALUE8(tvb, *offsetp); @@ -20622,9 +20716,7 @@ static void struct_ImageFormatInfo(tvbuff_t *tvb, int *offsetp, proto_tree *root f_blue_mask = VALUE32(tvb, *offsetp); proto_tree_add_item(t, hf_x11_struct_ImageFormatInfo_blue_mask, tvb, *offsetp, 4, little_endian); *offsetp += 4; - f_format = VALUE8(tvb, *offsetp); - proto_tree_add_item(t, hf_x11_struct_ImageFormatInfo_format, tvb, *offsetp, 1, little_endian); - *offsetp += 1; + f_format = field8(tvb, offsetp, t, hf_x11_struct_ImageFormatInfo_format, little_endian); UNUSED(3); f_y_sample_bits = VALUE32(tvb, *offsetp); proto_tree_add_item(t, hf_x11_struct_ImageFormatInfo_y_sample_bits, tvb, *offsetp, 4, little_endian); @@ -20654,9 +20746,7 @@ static void struct_ImageFormatInfo(tvbuff_t *tvb, int *offsetp, proto_tree *root proto_tree_add_item(t, hf_x11_struct_ImageFormatInfo_vvert_v_period, tvb, *offsetp, 4, little_endian); *offsetp += 4; listOfByte(tvb, offsetp, t, hf_x11_struct_ImageFormatInfo_vcomp_order, 32, little_endian); - f_vscanline_order = VALUE8(tvb, *offsetp); - proto_tree_add_item(t, hf_x11_struct_ImageFormatInfo_vscanline_order, tvb, *offsetp, 1, little_endian); - *offsetp += 1; + f_vscanline_order = field8(tvb, offsetp, t, hf_x11_struct_ImageFormatInfo_vscanline_order, little_endian); UNUSED(11); } } @@ -20667,9 +20757,7 @@ static void xvVideoNotify(tvbuff_t *tvb, int *offsetp, proto_tree *t, int little int f_time; int f_drawable; int f_port; - f_reason = VALUE8(tvb, *offsetp); - proto_tree_add_item(t, hf_x11_xv_VideoNotify_reason, tvb, *offsetp, 1, little_endian); - *offsetp += 1; + f_reason = field8(tvb, offsetp, t, hf_x11_xv_VideoNotify_reason, little_endian); CARD16(event_sequencenumber); f_time = VALUE32(tvb, *offsetp); proto_tree_add_item(t, hf_x11_xv_VideoNotify_time, tvb, *offsetp, 4, little_endian); @@ -20802,9 +20890,7 @@ static void xvGrabPort(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, prot f_port = VALUE32(tvb, *offsetp); proto_tree_add_item(t, hf_x11_xv_GrabPort_port, tvb, *offsetp, 4, little_endian); *offsetp += 4; - f_time = VALUE32(tvb, *offsetp); - proto_tree_add_item(t, hf_x11_xv_GrabPort_time, tvb, *offsetp, 4, little_endian); - *offsetp += 4; + f_time = field32(tvb, offsetp, t, hf_x11_xv_GrabPort_time, little_endian); } static void xvGrabPort_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, proto_tree *t, int little_endian) { @@ -20814,9 +20900,7 @@ static void xvGrabPort_Reply(tvbuff_t *tvb, packet_info *pinfo, int *offsetp, pr col_append_fstr(pinfo->cinfo, COL_INFO, "-GrabPort"); REPLY(reply); - f_result = VALUE8(tvb, *offsetp); - proto_tree_add_item(t, hf_x11_xv_GrabPort_reply_result, tvb, *offsetp, 1, little_endian); - *offsetp += 1; + f_result = field8(tvb, offsetp, t, hf_x11_xv_GrabPort_reply_result, little_endian); sequence_number = VALUE16(tvb, *offsetp); proto_tree_add_uint_format(t, hf_x11_reply_sequencenumber, tvb, *offsetp, 2, sequence_number, "sequencenumber: %d (xv-GrabPort)", sequence_number); @@ -20834,9 +20918,7 @@ static void xvUngrabPort(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, pr f_port = VALUE32(tvb, *offsetp); proto_tree_add_item(t, hf_x11_xv_UngrabPort_port, tvb, *offsetp, 4, little_endian); *offsetp += 4; - f_time = VALUE32(tvb, *offsetp); - proto_tree_add_item(t, hf_x11_xv_UngrabPort_time, tvb, *offsetp, 4, little_endian); - *offsetp += 4; + f_time = field32(tvb, offsetp, t, hf_x11_xv_UngrabPort_time, little_endian); } static void xvPutVideo(tvbuff_t *tvb, packet_info *pinfo _U_, int *offsetp, proto_tree *t, int little_endian, int length _U_) |