diff options
author | Bill Meier <wmeier@newsguy.com> | 2011-09-21 23:42:55 +0000 |
---|---|---|
committer | Bill Meier <wmeier@newsguy.com> | 2011-09-21 23:42:55 +0000 |
commit | ad1efb6b9c4c2c50289d7264d6ae79afcb1ae7b4 (patch) | |
tree | 66b6a5f30acef7b0ac0af0bfe5790ecbd6f3a998 /epan | |
parent | d4a982fd1f3fc47924ac8beeae756b6273d26221 (diff) |
(Trivial) Remove trailing whitespace from lines for a few files.
svn path=/trunk/; revision=39084
Diffstat (limited to 'epan')
29 files changed, 1125 insertions, 1125 deletions
diff --git a/epan/dissectors/packet-bootp.c b/epan/dissectors/packet-bootp.c index 689e36ec76..026485953b 100644 --- a/epan/dissectors/packet-bootp.c +++ b/epan/dissectors/packet-bootp.c @@ -203,12 +203,12 @@ static int hf_bootp_option_nis_domain = -1; /* 40 */ static int hf_bootp_option_nis_server = -1; /* 41 */ static int hf_bootp_option_ntp_server = -1; /* 42 */ -static int hf_bootp_option43_value = -1; /* 43 suboption value */ -static int hf_bootp_option43_value_8 = -1; /* 43 suboption value */ -static int hf_bootp_option43_value_16 = -1; /* 43 suboption value */ -static int hf_bootp_option43_value_32 = -1; /* 43 suboption value */ -static int hf_bootp_option43_value_stringz = -1; /* 43 suboption value */ -static int hf_bootp_option43_value_ip_address = -1; /* 43 suboption value */ +static int hf_bootp_option43_value = -1; /* 43 suboption value */ +static int hf_bootp_option43_value_8 = -1; /* 43 suboption value */ +static int hf_bootp_option43_value_16 = -1; /* 43 suboption value */ +static int hf_bootp_option43_value_32 = -1; /* 43 suboption value */ +static int hf_bootp_option43_value_stringz = -1; /* 43 suboption value */ +static int hf_bootp_option43_value_ip_address = -1; /* 43 suboption value */ static int hf_bootp_option43_pxeclient_suboption = -1; /* 43 suboption */ static int hf_bootp_option43_pxeclient_padding = -1; /* 43:0 PXE */ @@ -285,17 +285,17 @@ static int hf_bootp_option_vendor_class_id = -1; /* 60 */ static int hf_bootp_option_novell_netware_ip_domain = -1; /* 62 */ static int hf_bootp_option63_suboption = -1; /* 63 suboption */ -static int hf_bootp_option63_value = -1; /* 63 suboption value */ -static int hf_bootp_option63_value_8 = -1; /* 63 suboption value */ -static int hf_bootp_option63_value_ip_address = -1; /* 63 suboption value */ -static int hf_bootp_option63_value_boolean = -1; /* 63 suboption value */ -static int hf_bootp_option63_broadcast = -1; /* 63:5 */ +static int hf_bootp_option63_value = -1; /* 63 suboption value */ +static int hf_bootp_option63_value_8 = -1; /* 63 suboption value */ +static int hf_bootp_option63_value_ip_address = -1; /* 63 suboption value */ +static int hf_bootp_option63_value_boolean = -1; /* 63 suboption value */ +static int hf_bootp_option63_broadcast = -1; /* 63:5 */ static int hf_bootp_option63_preferred_dss_server = -1; /* 63:6 */ -static int hf_bootp_option63_nearest_nwip_server = -1; /* 63:7 */ -static int hf_bootp_option63_autoretries = -1; /* 63:8 */ -static int hf_bootp_option63_autoretry_delay = -1; /* 63:9 */ -static int hf_bootp_option63_support_netware_v1_1 = -1; /* 63:10 */ -static int hf_bootp_option63_primary_dss = -1; /* 63:11 */ +static int hf_bootp_option63_nearest_nwip_server = -1; /* 63:7 */ +static int hf_bootp_option63_autoretries = -1; /* 63:8 */ +static int hf_bootp_option63_autoretry_delay = -1; /* 63:9 */ +static int hf_bootp_option63_support_netware_v1_1 = -1; /* 63:10 */ +static int hf_bootp_option63_primary_dss = -1; /* 63:11 */ static int hf_bootp_option_nis_plus_domain = -1; /* 64 */ static int hf_bootp_option_nis_plus_server = -1; /* 65 */ @@ -316,20 +316,20 @@ static int hf_bootp_option_slp_service_scope_value = -1; /* 79 */ static int hf_bootp_option_slp_service_scope_string = -1; /* 79 */ static int hf_bootp_option82_suboption = -1; /* 82 suboption */ -static int hf_bootp_option82_value = -1; /* 82 suboption value */ -static int hf_bootp_option82_value_8 = -1; /* 82 suboption value */ -static int hf_bootp_option82_value_32 = -1; /* 82 suboption value */ -static int hf_bootp_option82_value_ip_address = -1; /* 82 suboption value */ -static int hf_bootp_option82_value_stringz = -1; /* 82 suboption value */ -static int hf_bootp_option82_padding = -1; /* 82:0 */ -static int hf_bootp_option82_agent_circuit_id = -1; /* 82:1 */ -static int hf_bootp_option82_agent_remote_id = -1; /* 82:2 */ -static int hf_bootp_option82_reserved = -1; /* 82:3 */ -static int hf_bootp_option82_docsis_device_class = -1; /* 82:4 */ -static int hf_bootp_option82_link_selection = -1; /* 82:5 */ -static int hf_bootp_option82_subscriber_id = -1; /* 82:6 */ -static int hf_bootp_option82_radius_attributes = -1; /* 82:7 */ -static int hf_bootp_option82_authentication = -1; /* 82:8 */ +static int hf_bootp_option82_value = -1; /* 82 suboption value */ +static int hf_bootp_option82_value_8 = -1; /* 82 suboption value */ +static int hf_bootp_option82_value_32 = -1; /* 82 suboption value */ +static int hf_bootp_option82_value_ip_address = -1; /* 82 suboption value */ +static int hf_bootp_option82_value_stringz = -1; /* 82 suboption value */ +static int hf_bootp_option82_padding = -1; /* 82:0 */ +static int hf_bootp_option82_agent_circuit_id = -1; /* 82:1 */ +static int hf_bootp_option82_agent_remote_id = -1; /* 82:2 */ +static int hf_bootp_option82_reserved = -1; /* 82:3 */ +static int hf_bootp_option82_docsis_device_class = -1; /* 82:4 */ +static int hf_bootp_option82_link_selection = -1; /* 82:5 */ +static int hf_bootp_option82_subscriber_id = -1; /* 82:6 */ +static int hf_bootp_option82_radius_attributes = -1; /* 82:7 */ +static int hf_bootp_option82_authentication = -1; /* 82:8 */ static int hf_bootp_option82_vi = -1; /* 82:9 */ /* 82:9 suboptions */ static int hf_bootp_option82_vi_enterprise = -1; @@ -340,8 +340,8 @@ static int hf_bootp_option82_vi_cl_tag = -1; static int hf_bootp_option82_vi_cl_tag_length = -1; static int hf_bootp_option82_vi_cl_docsis_version = -1; /* 82:9 suboptions end */ -static int hf_bootp_option82_flags = -1; /* 82:10 */ -static int hf_bootp_option82_server_id_override = -1; /* 82:11 */ +static int hf_bootp_option82_flags = -1; /* 82:10 */ +static int hf_bootp_option82_server_id_override = -1; /* 82:11 */ static int hf_bootp_option_novell_dss_string = -1; /* 85 */ static int hf_bootp_option_novell_dss_ip = -1; /* 85 */ @@ -378,24 +378,24 @@ static int hf_bootp_option_vi_class_data_length = -1; /* 124 * static int hf_bootp_option_vi_class_data = -1; /* 124 */ static int hf_bootp_option125_enterprise = -1; -static int hf_bootp_option125_value = -1; /* 125 suboption value */ -static int hf_bootp_option125_value_8 = -1; /* 125 suboption value */ -static int hf_bootp_option125_value_16 = -1; /* 125 suboption value */ -static int hf_bootp_option125_value_ip_address = -1; /* 125 suboption value */ -static int hf_bootp_option125_value_stringz = -1; /* 125 suboption value */ +static int hf_bootp_option125_value = -1; /* 125 suboption value */ +static int hf_bootp_option125_value_8 = -1; /* 125 suboption value */ +static int hf_bootp_option125_value_16 = -1; /* 125 suboption value */ +static int hf_bootp_option125_value_ip_address = -1; /* 125 suboption value */ +static int hf_bootp_option125_value_stringz = -1; /* 125 suboption value */ static int hf_bootp_option125_tr111_suboption = -1; /* 125 suboption */ -static int hf_bootp_option125_tr111_device_manufacturer_oui = -1; /* 125:TR-111 1 */ -static int hf_bootp_option125_tr111_device_serial_number = -1; /* 125:TR-111 2 */ -static int hf_bootp_option125_tr111_device_product_class = -1; /* 125:TR-111 3 */ -static int hf_bootp_option125_tr111_gateway_manufacturer_oui = -1; /* 125:TR-111 4 */ -static int hf_bootp_option125_tr111_gateway_serial_number = -1; /* 125:TR-111 5 */ -static int hf_bootp_option125_tr111_gateway_product_class = -1; /* 125:TR-111 6 */ +static int hf_bootp_option125_tr111_device_manufacturer_oui = -1; /* 125:TR-111 1 */ +static int hf_bootp_option125_tr111_device_serial_number = -1; /* 125:TR-111 2 */ +static int hf_bootp_option125_tr111_device_product_class = -1; /* 125:TR-111 3 */ +static int hf_bootp_option125_tr111_gateway_manufacturer_oui = -1; /* 125:TR-111 4 */ +static int hf_bootp_option125_tr111_gateway_serial_number = -1; /* 125:TR-111 5 */ +static int hf_bootp_option125_tr111_gateway_product_class = -1; /* 125:TR-111 6 */ static int hf_bootp_option125_cl_suboption = -1; /* 125 suboption */ -static int hf_bootp_option125_cl_option_request = -1; /* 125:CL 1 */ -static int hf_bootp_option125_cl_tftp_server_addresses = -1; /* 125:CL 1 */ -static int hf_bootp_option125_cl_erouter_container_option = -1; /* 125:CL 1 */ -static int hf_bootp_option125_cl_mib_environment_indicator_option = -1; /* 125:CL 1 */ -static int hf_bootp_option125_cl_modem_capabilities = -1; /* 125:CL 1 */ +static int hf_bootp_option125_cl_option_request = -1; /* 125:CL 1 */ +static int hf_bootp_option125_cl_tftp_server_addresses = -1; /* 125:CL 1 */ +static int hf_bootp_option125_cl_erouter_container_option = -1; /* 125:CL 1 */ +static int hf_bootp_option125_cl_mib_environment_indicator_option = -1; /* 125:CL 1 */ +static int hf_bootp_option125_cl_modem_capabilities = -1; /* 125:CL 1 */ static int hf_bootp_option_subnet_selection_option = -1; /* 118 */ static int hf_bootp_option_lost_server_domain_name = -1; /* 137 */ @@ -692,27 +692,27 @@ static gint pkt_ccc_protocol_version = PACKETCABLE_CCC_RFC_3495; static guint pkt_ccc_option = 122; -static int dissect_vendor_pxeclient_suboption(packet_info *pinfo, proto_item *v_ti, proto_tree *v_tree, +static int dissect_vendor_pxeclient_suboption(packet_info *pinfo, proto_item *v_ti, proto_tree *v_tree, tvbuff_t *tvb, int optoff, int optend); -static int dissect_vendor_cablelabs_suboption(packet_info *pinfo, proto_item *v_ti, proto_tree *v_tree, +static int dissect_vendor_cablelabs_suboption(packet_info *pinfo, proto_item *v_ti, proto_tree *v_tree, tvbuff_t *tvb, int optoff, int optend); -static int dissect_vendor_alcatel_suboption(packet_info *pinfo, proto_item *v_ti, proto_tree *v_tree, +static int dissect_vendor_alcatel_suboption(packet_info *pinfo, proto_item *v_ti, proto_tree *v_tree, tvbuff_t *tvb, int optoff, int optend); -static int dissect_netware_ip_suboption(packet_info *pinfo, proto_item *v_ti, proto_tree *v_tree, +static int dissect_netware_ip_suboption(packet_info *pinfo, proto_item *v_ti, proto_tree *v_tree, tvbuff_t *tvb, int optoff, int optend); -static int dissect_vendor_tr111_suboption(packet_info *pinfo, proto_item *v_ti, proto_tree *v_tree, +static int dissect_vendor_tr111_suboption(packet_info *pinfo, proto_item *v_ti, proto_tree *v_tree, tvbuff_t *tvb, int optoff, int optend); -static int bootp_dhcp_decode_agent_info(packet_info *pinfo, proto_item *v_ti, proto_tree *v_tree, +static int bootp_dhcp_decode_agent_info(packet_info *pinfo, proto_item *v_ti, proto_tree *v_tree, tvbuff_t *tvb, int optoff, int optend); static void dissect_packetcable_mta_cap(proto_tree *v_tree, tvbuff_t *tvb, int voff, int len); static void dissect_docsis_cm_cap(proto_tree *v_tree, tvbuff_t *tvb, int voff, int len, gboolean opt125); -static int dissect_packetcable_i05_ccc(packet_info *pinfo, proto_item *v_ti, proto_tree *v_tree, +static int dissect_packetcable_i05_ccc(packet_info *pinfo, proto_item *v_ti, proto_tree *v_tree, tvbuff_t *tvb, int optoff, int optend); -static int dissect_packetcable_ietf_ccc(packet_info *pinfo, proto_item *v_ti, proto_tree *v_tree, +static int dissect_packetcable_ietf_ccc(packet_info *pinfo, proto_item *v_ti, proto_tree *v_tree, tvbuff_t *tvb, int optoff, int optend, int revision); -static int dissect_vendor_cl_suboption(packet_info *pinfo, proto_item *v_ti, proto_tree *v_tree, +static int dissect_vendor_cl_suboption(packet_info *pinfo, proto_item *v_ti, proto_tree *v_tree, tvbuff_t *tvb, int optoff, int optend); #define OPT53_DISCOVER "Discover" @@ -1165,7 +1165,7 @@ struct basic_types_hfs { /* Handle "basic" datatypes adding to a tree */ static int -bootp_handle_basic_types(packet_info *pinfo, proto_tree *tree, proto_item *item, tvbuff_t *tvb, +bootp_handle_basic_types(packet_info *pinfo, proto_tree *tree, proto_item *item, tvbuff_t *tvb, enum field_type ftype, int offset, int total_len, gint *hf, struct basic_types_hfs* hf_default) { @@ -1285,7 +1285,7 @@ bootp_handle_basic_types(packet_info *pinfo, proto_tree *tree, proto_item *item, else if (hf_default->val_u_short_list != NULL) proto_tree_add_item(tree, *hf_default->val_u_short_list, tvb, i, 2, ENC_BIG_ENDIAN); consumed += 2; - } + } break; case val_u_long: @@ -1327,14 +1327,14 @@ bootp_handle_basic_types(packet_info *pinfo, proto_tree *tree, proto_item *item, if (hf != NULL) { time_u_secs = tvb_get_ntohl(tvb, offset); proto_tree_add_uint_format_value(tree, *hf, - tvb, offset, 4, time_u_secs, "(%us) %s", time_u_secs, + tvb, offset, 4, time_u_secs, "(%us) %s", time_u_secs, ((time_u_secs == 0xffffffff) ? "infinity" : time_secs_to_str_unsigned(time_u_secs))); } else if (hf_default->time_in_u_secs != NULL) proto_tree_add_item(tree, *hf_default->time_in_u_secs, tvb, offset, 4, ENC_BIG_ENDIAN); consumed = 4; break; - default: + default: /* Ignore other field_types */ break; } @@ -1367,9 +1367,9 @@ bootp_option(tvbuff_t *tvb, packet_info *pinfo, proto_tree *bp_tree, int voff, guint8 s_len; const guchar *dns_name; gboolean option_handled = TRUE; - struct basic_types_hfs default_hfs = {&hf_bootp_option_value, &hf_bootp_option_value_ip_address, &hf_bootp_option_value_ip_address, - &hf_bootp_option_value_stringz, &hf_bootp_option_value_boolean, &hf_bootp_option_value_8, - &hf_bootp_option_value_16, &hf_bootp_option_value_16, + struct basic_types_hfs default_hfs = {&hf_bootp_option_value, &hf_bootp_option_value_ip_address, &hf_bootp_option_value_ip_address, + &hf_bootp_option_value_stringz, &hf_bootp_option_value_boolean, &hf_bootp_option_value_8, + &hf_bootp_option_value_16, &hf_bootp_option_value_16, &hf_bootp_option_value_u32, &hf_bootp_option_value_i32, &hf_bootp_option_value_u32 }; /* Options whose length isn't "optlen + 2". */ @@ -1490,7 +1490,7 @@ bootp_option(tvbuff_t *tvb, packet_info *pinfo, proto_tree *bp_tree, int voff, } /* function type may be overriden and that shouldn't be a 'saved' change */ - ftype = opt->ftype; + ftype = opt->ftype; optoff = voff+2; @@ -1639,7 +1639,7 @@ bootp_option(tvbuff_t *tvb, packet_info *pinfo, proto_tree *bp_tree, int voff, * XXX - RFC 2132 says this is a string of octets; * should we check for non-printables? */ - + proto_tree_add_item(v_tree, hf_bootp_option_vendor_class_id, tvb, optoff, consumed-2, ENC_BIG_ENDIAN); if ((tvb_memeql(tvb, optoff, (const guint8*)PACKETCABLE_MTA_CAP10, (int)strlen(PACKETCABLE_MTA_CAP10)) == 0) @@ -2301,10 +2301,10 @@ bootp_option(tvbuff_t *tvb, packet_info *pinfo, proto_tree *bp_tree, int voff, break; } - basictype_consumed = bootp_handle_basic_types(pinfo, v_tree, vti, tvb, ftype, + basictype_consumed = bootp_handle_basic_types(pinfo, v_tree, vti, tvb, ftype, optoff, optlen, opt->phf, &default_hfs); - if ((basictype_consumed == 0) && (option_handled == FALSE) && + if ((basictype_consumed == 0) && (option_handled == FALSE) && (opt->phf == NULL) && (optlen > 0)) { proto_tree_add_item(v_tree, hf_bootp_option_value, tvb, voff+2, optlen, ENC_BIG_ENDIAN); } @@ -2339,8 +2339,8 @@ bootp_dhcp_decode_agent_info(packet_info *pinfo, proto_item *v_ti, proto_tree *v proto_item *vti; proto_tree *o82_v_tree, *o82_9_tree; guint8 tag, tag_len; - struct basic_types_hfs default_hfs = {&hf_bootp_option82_value, &hf_bootp_option82_value_ip_address, &hf_bootp_option82_value_ip_address, - &hf_bootp_option82_value_stringz, NULL, &hf_bootp_option82_value_8, + struct basic_types_hfs default_hfs = {&hf_bootp_option82_value, &hf_bootp_option82_value_ip_address, &hf_bootp_option82_value_ip_address, + &hf_bootp_option82_value_stringz, NULL, &hf_bootp_option82_value_8, NULL, NULL, &hf_bootp_option82_value_32, NULL, NULL}; static struct opt_info o82_opt[]= { @@ -2362,7 +2362,7 @@ bootp_dhcp_decode_agent_info(packet_info *pinfo, proto_item *v_ti, proto_tree *v suboptoff++; if (suboptoff >= optend) { - expert_add_info_format(pinfo, v_ti, PI_PROTOCOL, PI_ERROR, + expert_add_info_format(pinfo, v_ti, PI_PROTOCOL, PI_ERROR, "Suboption %d: no room left in option for suboption length", subopt); return (optend); } @@ -2376,7 +2376,7 @@ bootp_dhcp_decode_agent_info(packet_info *pinfo, proto_item *v_ti, proto_tree *v suboptoff++; if (suboptoff+subopt_len > optend) { - expert_add_info_format(pinfo, vti, PI_PROTOCOL, PI_ERROR, + expert_add_info_format(pinfo, vti, PI_PROTOCOL, PI_ERROR, "Suboption %d: no room left in option for suboption value", subopt); return (optend); } @@ -2421,7 +2421,7 @@ bootp_dhcp_decode_agent_info(packet_info *pinfo, proto_item *v_ti, proto_tree *v tvb_get_guint8(tvb, suboptoff), tvb_get_guint8(tvb, suboptoff+1)); suboptoff+=2; } else { - expert_add_info_format(pinfo, vti, PI_PROTOCOL, PI_ERROR, + expert_add_info_format(pinfo, vti, PI_PROTOCOL, PI_ERROR, "Unknown tag %d (%d bytes)", tag, tag_len); suboptoff += tag_len; } @@ -2431,7 +2431,7 @@ bootp_dhcp_decode_agent_info(packet_info *pinfo, proto_item *v_ti, proto_tree *v break; default: - expert_add_info_format(pinfo, vti, PI_PROTOCOL, PI_ERROR, + expert_add_info_format(pinfo, vti, PI_PROTOCOL, PI_ERROR, "Invalid suboption %d (%d bytes)", vs_opt, vs_len); suboptoff += vs_len; break; @@ -2453,7 +2453,7 @@ bootp_dhcp_decode_agent_info(packet_info *pinfo, proto_item *v_ti, proto_tree *v } } else { - if (bootp_handle_basic_types(pinfo, o82_v_tree, vti, tvb, o82_opt[subopt].ftype, + if (bootp_handle_basic_types(pinfo, o82_v_tree, vti, tvb, o82_opt[subopt].ftype, suboptoff, subopt_len, o82_opt[subopt].phf, &default_hfs) == 0) { expert_add_info_format(pinfo, vti, PI_PROTOCOL, PI_ERROR, "ERROR, please report: Unknown subopt type handler %d", subopt); } @@ -2483,7 +2483,7 @@ static const value_string option43_pxeclient_suboption_vals[] = { }; static int -dissect_vendor_pxeclient_suboption(packet_info *pinfo, proto_item *v_ti, proto_tree *v_tree, +dissect_vendor_pxeclient_suboption(packet_info *pinfo, proto_item *v_ti, proto_tree *v_tree, tvbuff_t *tvb, int optoff, int optend) { int suboptoff = optoff; @@ -2491,8 +2491,8 @@ dissect_vendor_pxeclient_suboption(packet_info *pinfo, proto_item *v_ti, proto_t guint8 subopt_len; proto_tree *o43pxeclient_v_tree; proto_item *vti; - struct basic_types_hfs default_hfs = {NULL, &hf_bootp_option43_value_ip_address, &hf_bootp_option43_value_ip_address, - NULL, NULL, &hf_bootp_option43_value_8, + struct basic_types_hfs default_hfs = {NULL, &hf_bootp_option43_value_ip_address, &hf_bootp_option43_value_ip_address, + NULL, NULL, &hf_bootp_option43_value_8, NULL, NULL, NULL, NULL, NULL}; static struct opt_info o43pxeclient_opt[]= { @@ -2515,8 +2515,8 @@ dissect_vendor_pxeclient_suboption(packet_info *pinfo, proto_item *v_ti, proto_t /* 10 */ {"PXE menu prompt", special, &hf_bootp_option43_pxeclient_menu_prompt}, /* 11 */ {"PXE multicast address alloc", special, &hf_bootp_option43_pxeclient_multicast_address_alloc}, /* 12 */ {"PXE credential types", special, &hf_bootp_option43_pxeclient_credential_types} - /* 71 {"PXE boot item", bytes, &hf_bootp_option43_pxeclient_boot_item}, */ - /* 255 {"PXE end options", special, &hf_bootp_option43_pxeclient_end} */ + /* 71 {"PXE boot item", bytes, &hf_bootp_option43_pxeclient_boot_item}, */ + /* 255 {"PXE end options", special, &hf_bootp_option43_pxeclient_end} */ }; subopt = tvb_get_guint8(tvb, optoff); @@ -2532,14 +2532,14 @@ dissect_vendor_pxeclient_suboption(packet_info *pinfo, proto_item *v_ti, proto_t } if (suboptoff >= optend) { - expert_add_info_format(pinfo, v_ti, PI_PROTOCOL, PI_ERROR, + expert_add_info_format(pinfo, v_ti, PI_PROTOCOL, PI_ERROR, "Suboption %d: no room left in option for suboption length", subopt); return (optend); } subopt_len = tvb_get_guint8(tvb, suboptoff); vti = proto_tree_add_uint_format_value(v_tree, hf_bootp_option43_pxeclient_suboption, - tvb, optoff, subopt_len+2, subopt, "(%d) %s", + tvb, optoff, subopt_len+2, subopt, "(%d) %s", subopt, val_to_str(subopt, option43_pxeclient_suboption_vals, "Unknown")); o43pxeclient_v_tree = proto_item_add_subtree(vti, ett_bootp_option43_suboption); @@ -2559,7 +2559,7 @@ dissect_vendor_pxeclient_suboption(packet_info *pinfo, proto_item *v_ti, proto_t else proto_tree_add_item(o43pxeclient_v_tree, hf_bootp_option43_value, tvb, suboptoff, subopt_len, ENC_BIG_ENDIAN); } else { - if (bootp_handle_basic_types(pinfo, o43pxeclient_v_tree, vti, tvb, o43pxeclient_opt[subopt].ftype, + if (bootp_handle_basic_types(pinfo, o43pxeclient_v_tree, vti, tvb, o43pxeclient_opt[subopt].ftype, suboptoff, subopt_len, o43pxeclient_opt[subopt].phf, &default_hfs) == 0) { expert_add_info_format(pinfo, vti, PI_PROTOCOL, PI_ERROR, "ERROR, please report: Unknown subopt type handler %d", subopt); @@ -2730,7 +2730,7 @@ static const value_string cablehome_subopt11_vals[] = { }; static int -dissect_vendor_cablelabs_suboption(packet_info *pinfo, proto_item *v_ti, proto_tree *v_tree, +dissect_vendor_cablelabs_suboption(packet_info *pinfo, proto_item *v_ti, proto_tree *v_tree, tvbuff_t *tvb, int optoff, int optend) { int suboptoff = optoff; @@ -2738,8 +2738,8 @@ dissect_vendor_cablelabs_suboption(packet_info *pinfo, proto_item *v_ti, proto_t guint8 subopt_len; proto_tree *o43cl_v_tree; proto_item *vti; - struct basic_types_hfs default_hfs = {&hf_bootp_option43_value, NULL, NULL, - &hf_bootp_option43_value_stringz, NULL, &hf_bootp_option43_value_8, + struct basic_types_hfs default_hfs = {&hf_bootp_option43_value, NULL, NULL, + &hf_bootp_option43_value_stringz, NULL, &hf_bootp_option43_value_8, NULL, NULL, &hf_bootp_option43_value_32, NULL, NULL}; static struct opt_info o43cablelabs_opt[]= { @@ -2820,14 +2820,14 @@ dissect_vendor_cablelabs_suboption(packet_info *pinfo, proto_item *v_ti, proto_t } if (suboptoff >= optend) { - expert_add_info_format(pinfo, v_ti, PI_PROTOCOL, PI_ERROR, + expert_add_info_format(pinfo, v_ti, PI_PROTOCOL, PI_ERROR, "Suboption %d: no room left in option for suboption length", subopt); return (optend); } subopt_len = tvb_get_guint8(tvb, suboptoff); vti = proto_tree_add_uint_format_value(v_tree, hf_bootp_option43_cl_suboption, - tvb, optoff, subopt_len+2, subopt, "(%d) %s", + tvb, optoff, subopt_len+2, subopt, "(%d) %s", subopt, val_to_str(subopt, option43_cl_suboption_vals, "Unknown")); o43cl_v_tree = proto_item_add_subtree(vti, ett_bootp_option43_suboption); @@ -2848,7 +2848,7 @@ dissect_vendor_cablelabs_suboption(packet_info *pinfo, proto_item *v_ti, proto_t /* CableLabs specs treat 43.8 inconsistently * as either binary (3b) or string (6b) */ if (subopt_len == 3) { - proto_tree_add_bytes_format_value(o43cl_v_tree, hf_bootp_option43_cl_oui_bytes, tvb, suboptoff, subopt_len, NULL, + proto_tree_add_bytes_format_value(o43cl_v_tree, hf_bootp_option43_cl_oui_bytes, tvb, suboptoff, subopt_len, NULL, "%02x:%02x:%02x", tvb_get_guint8(tvb, suboptoff), tvb_get_guint8(tvb, suboptoff+1), tvb_get_guint8(tvb, suboptoff+2)); } else if (subopt_len == 6) { proto_tree_add_item(o43cl_v_tree, hf_bootp_option43_cl_oui_string, tvb, suboptoff, subopt_len, ENC_BIG_ENDIAN); @@ -2872,7 +2872,7 @@ dissect_vendor_cablelabs_suboption(packet_info *pinfo, proto_item *v_ti, proto_t } } else { - if (bootp_handle_basic_types(pinfo, o43cl_v_tree, vti, tvb, o43cablelabs_opt[subopt].ftype, + if (bootp_handle_basic_types(pinfo, o43cl_v_tree, vti, tvb, o43cablelabs_opt[subopt].ftype, suboptoff, subopt_len, o43cablelabs_opt[subopt].phf, &default_hfs) == 0) { expert_add_info_format(pinfo, vti, PI_PROTOCOL, PI_ERROR, "ERROR, please report: Unknown subopt type handler %d", subopt); } @@ -2900,7 +2900,7 @@ static const value_string option43_alcatel_app_type_vals[] = { }; static int -dissect_vendor_alcatel_suboption(packet_info *pinfo, proto_item *v_ti, proto_tree *v_tree, +dissect_vendor_alcatel_suboption(packet_info *pinfo, proto_item *v_ti, proto_tree *v_tree, tvbuff_t *tvb, int optoff, int optend) { int suboptoff = optoff; @@ -2922,14 +2922,14 @@ dissect_vendor_alcatel_suboption(packet_info *pinfo, proto_item *v_ti, proto_tre } if (suboptoff >= optend) { - expert_add_info_format(pinfo, v_ti, PI_PROTOCOL, PI_ERROR, + expert_add_info_format(pinfo, v_ti, PI_PROTOCOL, PI_ERROR, "Suboption %d: no room left in option for suboption length", subopt); return (optend); } subopt_len = tvb_get_guint8(tvb, suboptoff); vti = proto_tree_add_uint_format_value(v_tree, hf_bootp_option43_alcatel_suboption, - tvb, optoff, subopt_len+2, subopt, "(%d) %s", + tvb, optoff, subopt_len+2, subopt, "(%d) %s", subopt, val_to_str(subopt, option43_alcatel_suboption_vals, "Unknown")); o43alcatel_v_tree = proto_item_add_subtree(vti, ett_bootp_option43_suboption); @@ -3002,15 +3002,15 @@ static const value_string option63_suboption_vals[] = { }; static int -dissect_netware_ip_suboption(packet_info *pinfo, proto_item *v_ti, proto_tree *v_tree, +dissect_netware_ip_suboption(packet_info *pinfo, proto_item *v_ti, proto_tree *v_tree, tvbuff_t *tvb, int optoff, int optend) { int suboptoff = optoff; guint8 subopt, subopt_len; proto_tree *o63_v_tree; proto_item *vti; - struct basic_types_hfs default_hfs = {NULL, &hf_bootp_option63_value_ip_address, &hf_bootp_option63_value_ip_address, - NULL, &hf_bootp_option63_value_boolean, &hf_bootp_option63_value_8, + struct basic_types_hfs default_hfs = {NULL, &hf_bootp_option63_value_ip_address, &hf_bootp_option63_value_ip_address, + NULL, &hf_bootp_option63_value_boolean, &hf_bootp_option63_value_8, NULL, NULL, NULL, NULL, NULL}; static struct opt_info o63_opt[]= { @@ -3032,14 +3032,14 @@ dissect_netware_ip_suboption(packet_info *pinfo, proto_item *v_ti, proto_tree *v suboptoff++; if (suboptoff >= optend) { - expert_add_info_format(pinfo, v_ti, PI_PROTOCOL, PI_ERROR, + expert_add_info_format(pinfo, v_ti, PI_PROTOCOL, PI_ERROR, "Suboption %d: no room left in option for suboption length", subopt); return (optend); } subopt_len = tvb_get_guint8(tvb, suboptoff); vti = proto_tree_add_uint_format_value(v_tree, hf_bootp_option63_suboption, - tvb, optoff, subopt_len+2, subopt, "(%d) %s", + tvb, optoff, subopt_len+2, subopt, "(%d) %s", subopt, val_to_str(subopt, option63_suboption_vals, "Unknown")); o63_v_tree = proto_item_add_subtree(vti, ett_bootp_option63_suboption); @@ -3047,15 +3047,15 @@ dissect_netware_ip_suboption(packet_info *pinfo, proto_item *v_ti, proto_tree *v suboptoff++; if (subopt < array_length(o63_opt)) { - if (bootp_handle_basic_types(pinfo, o63_v_tree, vti, tvb, o63_opt[subopt].ftype, + if (bootp_handle_basic_types(pinfo, o63_v_tree, vti, tvb, o63_opt[subopt].ftype, suboptoff, subopt_len, o63_opt[subopt].phf, &default_hfs) == 0) { switch(o63_opt[subopt].ftype) { case presence: if (subopt_len != 0) { - expert_add_info_format(pinfo, vti, PI_PROTOCOL, PI_ERROR, + expert_add_info_format(pinfo, vti, PI_PROTOCOL, PI_ERROR, "Suboption %d: length isn't 0", subopt); - } + } break; default: if (o63_opt[subopt].phf == NULL) @@ -3079,15 +3079,15 @@ static const value_string option125_tr111_suboption_vals[] = { }; static int -dissect_vendor_tr111_suboption(packet_info *pinfo, proto_item *v_ti, proto_tree *v_tree, +dissect_vendor_tr111_suboption(packet_info *pinfo, proto_item *v_ti, proto_tree *v_tree, tvbuff_t *tvb, int optoff, int optend) { int suboptoff = optoff; proto_tree *o125_v_tree; proto_item *vti; guint8 subopt, subopt_len; - struct basic_types_hfs default_hfs = {NULL, NULL, NULL, - &hf_bootp_option125_value_stringz, NULL, NULL, + struct basic_types_hfs default_hfs = {NULL, NULL, NULL, + &hf_bootp_option125_value_stringz, NULL, NULL, NULL, NULL, NULL, NULL, NULL}; /* Reference: TR-111 DHCP Option 125 Sub-Option Data Fields @@ -3108,14 +3108,14 @@ dissect_vendor_tr111_suboption(packet_info *pinfo, proto_item *v_ti, proto_tree suboptoff++; if (suboptoff >= optend) { - expert_add_info_format(pinfo, v_ti, PI_PROTOCOL, PI_ERROR, + expert_add_info_format(pinfo, v_ti, PI_PROTOCOL, PI_ERROR, "Suboption %d: no room left in option for suboption length", subopt); return (optend); } subopt_len = tvb_get_guint8(tvb, suboptoff); vti = proto_tree_add_uint_format_value(v_tree, hf_bootp_option125_tr111_suboption, - tvb, optoff, subopt_len+2, subopt, "(%d) %s", + tvb, optoff, subopt_len+2, subopt, "(%d) %s", subopt, val_to_str(subopt, option125_tr111_suboption_vals, "Unknown")); o125_v_tree = proto_item_add_subtree(vti, hf_bootp_option125_tr111_suboption); @@ -3123,13 +3123,13 @@ dissect_vendor_tr111_suboption(packet_info *pinfo, proto_item *v_ti, proto_tree suboptoff++; if (suboptoff+subopt_len > optend) { - expert_add_info_format(pinfo, vti, PI_PROTOCOL, PI_ERROR, + expert_add_info_format(pinfo, vti, PI_PROTOCOL, PI_ERROR, "Suboption %d: no room left in option for suboption value", subopt); return (optend); } if (subopt < array_length(o125_tr111_opt)) { - if (bootp_handle_basic_types(pinfo, o125_v_tree, vti, tvb, o125_tr111_opt[subopt].ftype, + if (bootp_handle_basic_types(pinfo, o125_v_tree, vti, tvb, o125_tr111_opt[subopt].ftype, suboptoff, subopt_len, o125_tr111_opt[subopt].phf, &default_hfs) == 0) { if (o125_tr111_opt[subopt].ftype == special) { if (o125_tr111_opt[subopt].phf != NULL) @@ -3163,15 +3163,15 @@ static const value_string pkt_mib_env_ind_opt_vals[] = { }; static int -dissect_vendor_cl_suboption(packet_info *pinfo, proto_item *v_ti, proto_tree *v_tree, +dissect_vendor_cl_suboption(packet_info *pinfo, proto_item *v_ti, proto_tree *v_tree, tvbuff_t *tvb, int optoff, int optend) { int suboptoff = optoff; guint8 subopt, subopt_len; proto_tree *o125_v_tree; proto_item *vti; - struct basic_types_hfs default_hfs = {&hf_bootp_option125_value, &hf_bootp_option125_value_ip_address, &hf_bootp_option125_value_ip_address, - &hf_bootp_option125_value_stringz, NULL, &hf_bootp_option125_value_8, + struct basic_types_hfs default_hfs = {&hf_bootp_option125_value, &hf_bootp_option125_value_ip_address, &hf_bootp_option125_value_ip_address, + &hf_bootp_option125_value_stringz, NULL, &hf_bootp_option125_value_8, &hf_bootp_option125_value_16, NULL, NULL, NULL, NULL}; static struct opt_info o125_cl_opt[]= { @@ -3187,14 +3187,14 @@ dissect_vendor_cl_suboption(packet_info *pinfo, proto_item *v_ti, proto_tree *v_ suboptoff++; if (suboptoff >= optend) { - expert_add_info_format(pinfo, v_ti, PI_PROTOCOL, PI_ERROR, + expert_add_info_format(pinfo, v_ti, PI_PROTOCOL, PI_ERROR, "Suboption %d: no room left in option for suboption length", subopt); return (optend); } subopt_len = tvb_get_guint8(tvb, suboptoff); vti = proto_tree_add_uint_format_value(v_tree, hf_bootp_option125_cl_suboption, - tvb, optoff, subopt_len+2, subopt, "(%d) %s", + tvb, optoff, subopt_len+2, subopt, "(%d) %s", subopt, val_to_str(subopt, option125_cl_suboption_vals, "Unknown")); o125_v_tree = proto_item_add_subtree(vti, hf_bootp_option125_cl_suboption); @@ -3202,13 +3202,13 @@ dissect_vendor_cl_suboption(packet_info *pinfo, proto_item *v_ti, proto_tree *v_ suboptoff++; if (suboptoff+subopt_len > optend) { - expert_add_info_format(pinfo, vti, PI_PROTOCOL, PI_ERROR, + expert_add_info_format(pinfo, vti, PI_PROTOCOL, PI_ERROR, "Suboption %d: no room left in option for suboption value", subopt); return (optend); } if (subopt < array_length(o125_cl_opt)) { - if (bootp_handle_basic_types(pinfo, o125_v_tree, vti, tvb, o125_cl_opt[subopt].ftype, + if (bootp_handle_basic_types(pinfo, o125_v_tree, vti, tvb, o125_cl_opt[subopt].ftype, suboptoff, subopt_len, o125_cl_opt[subopt].phf, &default_hfs) == 0) { switch(o125_cl_opt[subopt].ftype) { @@ -4201,7 +4201,7 @@ static const value_string pkt_i05_ccc_ticket_ctl_vals[] = { }; static int -dissect_packetcable_i05_ccc(packet_info *pinfo, proto_item *v_ti, proto_tree *v_tree, +dissect_packetcable_i05_ccc(packet_info *pinfo, proto_item *v_ti, proto_tree *v_tree, tvbuff_t *tvb, int optoff, int optend) { int suboptoff = optoff; @@ -4345,7 +4345,7 @@ static const value_string sec_tcm_vals[] = { }; static int -dissect_packetcable_ietf_ccc(packet_info *pinfo, proto_item *v_ti, proto_tree *v_tree, +dissect_packetcable_ietf_ccc(packet_info *pinfo, proto_item *v_ti, proto_tree *v_tree, tvbuff_t *tvb, int optoff, int optend, int revision) { int suboptoff = optoff; @@ -4363,7 +4363,7 @@ dissect_packetcable_ietf_ccc(packet_info *pinfo, proto_item *v_ti, proto_tree *v suboptoff++; if (suboptoff >= optend) { - expert_add_info_format(pinfo, v_ti, PI_PROTOCOL, PI_ERROR, + expert_add_info_format(pinfo, v_ti, PI_PROTOCOL, PI_ERROR, "Suboption %d: no room left in option for suboption length", subopt); return (optend); } @@ -5345,7 +5345,7 @@ proto_register_bootp(void) NULL, /* post update callback */ bootp_uat_flds); /* UAT field definitions */ - prefs_register_uat_preference(bootp_module, + prefs_register_uat_preference(bootp_module, "custom_bootp_table", "Custom BootP/DHCP Options (Excl. suboptions)", "Custom BootP/DHCP Options (Excl. suboptions)", diff --git a/epan/dissectors/packet-bpdu.c b/epan/dissectors/packet-bpdu.c index f3c6deffd1..aefa8fa4a9 100644 --- a/epan/dissectors/packet-bpdu.c +++ b/epan/dissectors/packet-bpdu.c @@ -350,8 +350,8 @@ dissect_bpdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) col_add_fstr(pinfo->cinfo, COL_INFO, "Conf. %sRoot = %d/%d/%s Cost = %d Port = 0x%04x", flags & 0x1 ? "TC + " : "", - root_identifier_bridge_priority, - root_identifier_system_id_extension, + root_identifier_bridge_priority, + root_identifier_system_id_extension, root_identifier_mac_str, root_path_cost, port_identifier); } else { @@ -499,10 +499,10 @@ dissect_bpdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) root_identifier_mac_str); root_id_tree = proto_item_add_subtree(root_id_item, ett_root_id); proto_tree_add_uint(root_id_tree, hf_bpdu_root_prio, tvb, - BPDU_ROOT_IDENTIFIER , 1, + BPDU_ROOT_IDENTIFIER , 1, root_identifier_bridge_priority); proto_tree_add_uint(root_id_tree, hf_bpdu_root_sys_id_ext, tvb, - BPDU_ROOT_IDENTIFIER , 2, + BPDU_ROOT_IDENTIFIER , 2, root_identifier_system_id_extension); proto_tree_add_ether_format_value(root_id_tree, hf_bpdu_root_mac, tvb, BPDU_ROOT_IDENTIFIER + 2, 6, @@ -516,7 +516,7 @@ dissect_bpdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) root_identifier_mac_str); root_id_tree = proto_item_add_subtree(root_id_item, ett_root_id); proto_tree_add_uint(root_id_tree, hf_bpdu_root_prio, tvb, - BPDU_ROOT_IDENTIFIER , 2, + BPDU_ROOT_IDENTIFIER , 2, root_identifier_bridge_priority); proto_tree_add_ether_format_value(root_id_tree, hf_bpdu_root_mac, tvb, BPDU_ROOT_IDENTIFIER + 2, 6, @@ -540,24 +540,24 @@ dissect_bpdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) bridge_identifier_mac_str); bridge_id_tree = proto_item_add_subtree(bridge_id_item, ett_bridge_id); proto_tree_add_uint(bridge_id_tree, hf_bpdu_bridge_prio, tvb, - BPDU_BRIDGE_IDENTIFIER , 1, + BPDU_BRIDGE_IDENTIFIER , 1, bridge_identifier_bridge_priority); proto_tree_add_uint(bridge_id_tree, hf_bpdu_bridge_sys_id_ext, tvb, - BPDU_BRIDGE_IDENTIFIER , 2, + BPDU_BRIDGE_IDENTIFIER , 2, bridge_identifier_system_id_extension); proto_tree_add_ether_format_value(bridge_id_tree, hf_bpdu_bridge_mac, tvb, BPDU_BRIDGE_IDENTIFIER + 2, 6, bridge_identifier_mac, "%s", bridge_identifier_mac_str); } else { - bridge_id_item = proto_tree_add_text(bpdu_tree, tvb, + bridge_id_item = proto_tree_add_text(bpdu_tree, tvb, BPDU_BRIDGE_IDENTIFIER, 8, "Bridge Identifier: %d / %s", bridge_identifier_bridge_priority, bridge_identifier_mac_str); bridge_id_tree = proto_item_add_subtree(bridge_id_item, ett_bridge_id); proto_tree_add_uint(bridge_id_tree, hf_bpdu_bridge_prio, tvb, - BPDU_BRIDGE_IDENTIFIER , 2, + BPDU_BRIDGE_IDENTIFIER , 2, bridge_identifier_bridge_priority); proto_tree_add_ether_format_value(bridge_id_tree, hf_bpdu_bridge_mac, tvb, BPDU_BRIDGE_IDENTIFIER + 2, 6, @@ -607,8 +607,8 @@ dissect_bpdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) /* * Check the Version 3 Length, and see whether it's a * multiple of the MSTI Configuration Message length. Also - * check the config_format_selector because some MST BPDU's - * have BPDU_VERSION_3_LENGTH set to 0 and use the + * check the config_format_selector because some MST BPDU's + * have BPDU_VERSION_3_LENGTH set to 0 and use the * field BPDU_MST_CONFIG_FORMAT_SELECTOR as a length-field * for the MSTI data. */ @@ -648,7 +648,7 @@ dissect_bpdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) msti_format = MSTI_FORMAT_ALTERNATIVE; total_msti_length = config_format_selector - VERSION_3_STATIC_LENGTH; } else { - /* + /* * XXX - Unknown MSTI format, since version_3_length is 0 * lets assume there are no msti instances in the packet. */ @@ -698,10 +698,10 @@ dissect_bpdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) cist_bridge_identifier_mac_str); cist_bridge_id_tree = proto_item_add_subtree(cist_bridge_id_item, ett_cist_bridge_id); proto_tree_add_uint(cist_bridge_id_tree, hf_bpdu_cist_bridge_prio, tvb, - BPDU_CIST_BRIDGE_IDENTIFIER , 1, + BPDU_CIST_BRIDGE_IDENTIFIER , 1, cist_bridge_identifier_bridge_priority); proto_tree_add_uint(cist_bridge_id_tree, hf_bpdu_cist_bridge_sys_id_ext, tvb, - BPDU_CIST_BRIDGE_IDENTIFIER , 2, + BPDU_CIST_BRIDGE_IDENTIFIER , 2, cist_bridge_identifier_system_id_extension); proto_tree_add_ether_format_value(cist_bridge_id_tree, hf_bpdu_cist_bridge_mac, tvb, BPDU_CIST_BRIDGE_IDENTIFIER + 2, 6, @@ -715,7 +715,7 @@ dissect_bpdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) cist_bridge_identifier_mac_str); cist_bridge_id_tree = proto_item_add_subtree(cist_bridge_id_item, ett_cist_bridge_id); proto_tree_add_uint(cist_bridge_id_tree, hf_bpdu_cist_bridge_prio, tvb, - BPDU_CIST_BRIDGE_IDENTIFIER , 2, + BPDU_CIST_BRIDGE_IDENTIFIER , 2, cist_bridge_identifier_bridge_priority); proto_tree_add_ether_format_value(cist_bridge_id_tree, hf_bpdu_cist_bridge_mac, tvb, BPDU_CIST_BRIDGE_IDENTIFIER + 2, 6, @@ -746,10 +746,10 @@ dissect_bpdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) cist_bridge_identifier_mac_str); cist_bridge_id_tree = proto_item_add_subtree(cist_bridge_id_item, ett_cist_bridge_id); proto_tree_add_uint(cist_bridge_id_tree, hf_bpdu_cist_bridge_prio, tvb, - ALT_BPDU_CIST_BRIDGE_IDENTIFIER , 1, + ALT_BPDU_CIST_BRIDGE_IDENTIFIER , 1, cist_bridge_identifier_bridge_priority); proto_tree_add_uint(cist_bridge_id_tree, hf_bpdu_cist_bridge_sys_id_ext, tvb, - ALT_BPDU_CIST_BRIDGE_IDENTIFIER , 2, + ALT_BPDU_CIST_BRIDGE_IDENTIFIER , 2, cist_bridge_identifier_system_id_extension); proto_tree_add_ether_format_value(cist_bridge_id_tree, hf_bpdu_cist_bridge_mac, tvb, ALT_BPDU_CIST_BRIDGE_IDENTIFIER + 2, 6, @@ -763,7 +763,7 @@ dissect_bpdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) cist_bridge_identifier_mac_str); cist_bridge_id_tree = proto_item_add_subtree(cist_bridge_id_item, ett_cist_bridge_id); proto_tree_add_uint(cist_bridge_id_tree, hf_bpdu_cist_bridge_prio, tvb, - ALT_BPDU_CIST_BRIDGE_IDENTIFIER , 2, + ALT_BPDU_CIST_BRIDGE_IDENTIFIER , 2, cist_bridge_identifier_bridge_priority); proto_tree_add_ether_format_value(cist_bridge_id_tree, hf_bpdu_cist_bridge_mac, tvb, ALT_BPDU_CIST_BRIDGE_IDENTIFIER + 2, 6, @@ -888,7 +888,7 @@ dissect_bpdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) msti_tree = proto_item_add_subtree(msti_item, ett_msti); msti_mstid = tvb_get_ntohs(tvb, offset+ ALT_MSTI_MSTID); - proto_tree_add_text(msti_tree, tvb, offset+ALT_MSTI_MSTID, 2, + proto_tree_add_text(msti_tree, tvb, offset+ALT_MSTI_MSTID, 2, "MSTID: %d", msti_mstid); /* flags */ @@ -955,7 +955,7 @@ dissect_bpdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) msti_bridge_identifier_mac_str); msti_port_identifier_priority = tvb_get_ntohs(tvb, offset+ALT_MSTI_PORT_IDENTIFIER); - proto_tree_add_uint(msti_tree, hf_bpdu_msti_port_id, tvb, + proto_tree_add_uint(msti_tree, hf_bpdu_msti_port_id, tvb, offset+ALT_MSTI_PORT_IDENTIFIER, 2, msti_port_identifier_priority); proto_tree_add_item(msti_tree, hf_bpdu_msti_remaining_hops, tvb, @@ -974,7 +974,7 @@ dissect_bpdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) void proto_register_bpdu(void) -{ +{ static hf_register_info hf[] = { { &hf_bpdu_proto_id, diff --git a/epan/dissectors/packet-dcerpc-browser.c b/epan/dissectors/packet-dcerpc-browser.c index c4b696b6c6..db7edbf81b 100644 --- a/epan/dissectors/packet-dcerpc-browser.c +++ b/epan/dissectors/packet-dcerpc-browser.c @@ -257,15 +257,15 @@ dissect_browser_browserr_server_enum_rqst(tvbuff_t *tvb, int offset, guint8 *drep) { offset = dissect_ndr_str_pointer_item(tvb, offset, pinfo, tree, drep, - NDR_POINTER_UNIQUE, "unknown string", + NDR_POINTER_UNIQUE, "unknown string", hf_browser_unknown_string, 0); offset = dissect_ndr_str_pointer_item(tvb, offset, pinfo, tree, drep, - NDR_POINTER_UNIQUE, "unknown string", + NDR_POINTER_UNIQUE, "unknown string", hf_browser_unknown_string, 0); offset = dissect_ndr_str_pointer_item(tvb, offset, pinfo, tree, drep, - NDR_POINTER_UNIQUE, "unknown string", + NDR_POINTER_UNIQUE, "unknown string", hf_browser_unknown_string, 0); offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep, @@ -279,11 +279,11 @@ dissect_browser_browserr_server_enum_rqst(tvbuff_t *tvb, int offset, hf_browser_unknown_long, NULL); offset = dissect_ndr_str_pointer_item(tvb, offset, pinfo, tree, drep, - NDR_POINTER_UNIQUE, "unknown string", + NDR_POINTER_UNIQUE, "unknown string", hf_browser_unknown_string, 0); offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep, - dissect_browser_long_pointer, NDR_POINTER_UNIQUE, + dissect_browser_long_pointer, NDR_POINTER_UNIQUE, "unknown long", hf_browser_unknown_long); return offset; @@ -323,7 +323,7 @@ dissect_browser_browserr_debug_call_rqst(tvbuff_t *tvb, int offset, guint8 *drep) { offset = dissect_ndr_str_pointer_item(tvb, offset, pinfo, tree, drep, - NDR_POINTER_UNIQUE, "unknown string", + NDR_POINTER_UNIQUE, "unknown string", hf_browser_unknown_string, 0); offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep, @@ -359,7 +359,7 @@ dissect_browser_browserr_query_other_domains_rqst(tvbuff_t *tvb, int offset, guint8 *drep) { offset = dissect_ndr_str_pointer_item(tvb, offset, pinfo, tree, drep, - NDR_POINTER_UNIQUE, "unknown string", + NDR_POINTER_UNIQUE, "unknown string", hf_browser_unknown_string, 0); offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep, @@ -394,7 +394,7 @@ dissect_browser_browserr_reset_netlogon_state_rqst(tvbuff_t *tvb, int offset, guint8 *drep) { offset = dissect_ndr_str_pointer_item(tvb, offset, pinfo, tree, drep, - NDR_POINTER_UNIQUE, "unknown string", + NDR_POINTER_UNIQUE, "unknown string", hf_browser_unknown_string, 0); return offset; @@ -423,11 +423,11 @@ dissect_browser_browserr_debug_trace_rqst(tvbuff_t *tvb, int offset, guint8 *drep) { offset = dissect_ndr_str_pointer_item(tvb, offset, pinfo, tree, drep, - NDR_POINTER_UNIQUE, "unknown string", + NDR_POINTER_UNIQUE, "unknown string", hf_browser_unknown_string, 0); offset = dissect_ndr_str_pointer_item(tvb, offset, pinfo, tree, drep, - NDR_POINTER_REF, "unknown string", + NDR_POINTER_REF, "unknown string", hf_browser_unknown_string, 0); return offset; @@ -550,7 +550,7 @@ dissect_browser_browserr_query_statistics_rqst(tvbuff_t *tvb, int offset, guint8 *drep) { offset = dissect_ndr_str_pointer_item(tvb, offset, pinfo, tree, drep, - NDR_POINTER_UNIQUE, "unknown string", + NDR_POINTER_UNIQUE, "unknown string", hf_browser_unknown_string, 0); return offset; @@ -582,7 +582,7 @@ dissect_browser_browserr_reset_statistics_rqst(tvbuff_t *tvb, int offset, guint8 *drep) { offset = dissect_ndr_str_pointer_item(tvb, offset, pinfo, tree, drep, - NDR_POINTER_UNIQUE, "unknown string", + NDR_POINTER_UNIQUE, "unknown string", hf_browser_unknown_string, 0); return offset; @@ -610,7 +610,7 @@ dissect_browser_netr_browser_statistics_clear_rqst(tvbuff_t *tvb, int offset, guint8 *drep) { offset = dissect_ndr_str_pointer_item(tvb, offset, pinfo, tree, drep, - NDR_POINTER_UNIQUE, "unknown string", + NDR_POINTER_UNIQUE, "unknown string", hf_browser_unknown_string, 0); return offset; @@ -856,7 +856,7 @@ dissect_browser_netr_browser_statistics_get_rqst(tvbuff_t *tvb, int offset, guint8 *drep) { offset = dissect_ndr_str_pointer_item(tvb, offset, pinfo, tree, drep, - NDR_POINTER_UNIQUE, "unknown string", + NDR_POINTER_UNIQUE, "unknown string", hf_browser_unknown_string, 0); offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep, @@ -898,15 +898,15 @@ dissect_browser_browserr_set_netlogon_state_rqst(tvbuff_t *tvb, int offset, guint8 *drep) { offset = dissect_ndr_str_pointer_item(tvb, offset, pinfo, tree, drep, - NDR_POINTER_UNIQUE, "unknown string", + NDR_POINTER_UNIQUE, "unknown string", hf_browser_unknown_string, 0); offset = dissect_ndr_str_pointer_item(tvb, offset, pinfo, tree, drep, - NDR_POINTER_REF, "unknown string", + NDR_POINTER_REF, "unknown string", hf_browser_unknown_string, 0); offset = dissect_ndr_str_pointer_item(tvb, offset, pinfo, tree, drep, - NDR_POINTER_UNIQUE, "unknown string", + NDR_POINTER_UNIQUE, "unknown string", hf_browser_unknown_string, 0); offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep, @@ -991,7 +991,7 @@ dissect_browser_browserr_query_emulated_domains_rqst(tvbuff_t *tvb, int offset, guint8 *drep) { offset = dissect_ndr_str_pointer_item(tvb, offset, pinfo, tree, drep, - NDR_POINTER_UNIQUE, "unknown string", + NDR_POINTER_UNIQUE, "unknown string", hf_browser_unknown_string, 0); offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep, @@ -1035,15 +1035,15 @@ dissect_browser_browserr_server_enum_ex_rqst(tvbuff_t *tvb, int offset, guint8 *drep) { offset = dissect_ndr_str_pointer_item(tvb, offset, pinfo, tree, drep, - NDR_POINTER_UNIQUE, "unknown string", + NDR_POINTER_UNIQUE, "unknown string", hf_browser_unknown_string, 0); offset = dissect_ndr_str_pointer_item(tvb, offset, pinfo, tree, drep, - NDR_POINTER_UNIQUE, "unknown string", + NDR_POINTER_UNIQUE, "unknown string", hf_browser_unknown_string, 0); offset = dissect_ndr_str_pointer_item(tvb, offset, pinfo, tree, drep, - NDR_POINTER_UNIQUE, "unknown string", + NDR_POINTER_UNIQUE, "unknown string", hf_browser_unknown_string, 0); offset = dissect_ndr_pointer(tvb, offset, pinfo, tree, drep, @@ -1057,11 +1057,11 @@ dissect_browser_browserr_server_enum_ex_rqst(tvbuff_t *tvb, int offset, hf_browser_unknown_long, NULL); offset = dissect_ndr_str_pointer_item(tvb, offset, pinfo, tree, drep, - NDR_POINTER_UNIQUE, "unknown string", + NDR_POINTER_UNIQUE, "unknown string", hf_browser_unknown_string, 0); offset = dissect_ndr_str_pointer_item(tvb, offset, pinfo, tree, drep, - NDR_POINTER_UNIQUE, "unknown string", + NDR_POINTER_UNIQUE, "unknown string", hf_browser_unknown_string, 0); return offset; @@ -1096,43 +1096,43 @@ static dcerpc_sub_dissector dcerpc_browser_dissectors[] = { { BROWSER_BROWSERR_DEBUG_CALL, "BrowserrDebugCall", dissect_browser_browserr_debug_call_rqst, dissect_browser_browserr_debug_call_reply }, - { BROWSER_BROWSERR_QUERY_OTHER_DOMAINS, + { BROWSER_BROWSERR_QUERY_OTHER_DOMAINS, "BrowserrQueryOtherDomains", dissect_browser_browserr_query_other_domains_rqst, dissect_browser_browserr_query_other_domains_reply }, - { BROWSER_BROWSERR_RESET_NETLOGON_STATE, + { BROWSER_BROWSERR_RESET_NETLOGON_STATE, "BrowserrResetNetlogonState", dissect_browser_browserr_reset_netlogon_state_rqst, dissect_browser_browserr_reset_netlogon_state_reply }, - { BROWSER_BROWSERR_DEBUG_TRACE, + { BROWSER_BROWSERR_DEBUG_TRACE, "BrowserrDebugTrace", dissect_browser_browserr_debug_trace_rqst, dissect_browser_browserr_debug_trace_reply }, - { BROWSER_BROWSERR_QUERY_STATISTICS, + { BROWSER_BROWSERR_QUERY_STATISTICS, "BrowserrQueryStatistics", dissect_browser_browserr_query_statistics_rqst, dissect_browser_browserr_query_statistics_reply }, - { BROWSER_BROWSERR_RESET_STATISTICS, + { BROWSER_BROWSERR_RESET_STATISTICS, "BrowserrResetStatistics", dissect_browser_browserr_reset_statistics_rqst, dissect_browser_browserr_reset_statistics_reply }, - { BROWSER_NETR_BROWSER_STATISTICS_CLEAR, + { BROWSER_NETR_BROWSER_STATISTICS_CLEAR, "NetrBrowserStatisticsClear", dissect_browser_netr_browser_statistics_clear_rqst, dissect_browser_netr_browser_statistics_clear_reply }, - { BROWSER_NETR_BROWSER_STATISTICS_GET, + { BROWSER_NETR_BROWSER_STATISTICS_GET, "NetrBrowserStatisticsGet", dissect_browser_netr_browser_statistics_get_rqst, dissect_browser_netr_browser_statistics_get_reply }, - { BROWSER_BROWSERR_SET_NETLOGON_STATE, + { BROWSER_BROWSERR_SET_NETLOGON_STATE, "BrowserrSetNetlogonState", dissect_browser_browserr_set_netlogon_state_rqst, dissect_browser_browserr_set_netlogon_state_reply }, - { BROWSER_BROWSERR_QUERY_EMULATED_DOMAINS, + { BROWSER_BROWSERR_QUERY_EMULATED_DOMAINS, "BrowserrQueryEmulatedDomains", dissect_browser_browserr_query_emulated_domains_rqst, dissect_browser_browserr_query_emulated_domains_reply }, - { BROWSER_BROWSERR_SERVER_ENUM_EX, + { BROWSER_BROWSERR_SERVER_ENUM_EX, "BrowserrServerEnumEx", dissect_browser_browserr_server_enum_ex_rqst, dissect_browser_browserr_server_enum_ex_reply }, @@ -1145,7 +1145,7 @@ proto_register_dcerpc_browser(void) { static hf_register_info hf[] = { - { &hf_browser_opnum, { + { &hf_browser_opnum, { "Operation", "rpc_browser.opnum", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }}, diff --git a/epan/dissectors/packet-dcerpc-pnp.c b/epan/dissectors/packet-dcerpc-pnp.c index 28a27e95c2..384ae82fee 100644 --- a/epan/dissectors/packet-dcerpc-pnp.c +++ b/epan/dissectors/packet-dcerpc-pnp.c @@ -1,5 +1,5 @@ /* packet-dcerpc-pnp.c - * Routines for the pnp (Plug and Play) MSRPC interface + * Routines for the pnp (Plug and Play) MSRPC interface * Copyright 2005 Jean-Baptiste Marchand <jbm@hsc.fr> * * $Id$ @@ -39,7 +39,7 @@ static int hf_pnp_opnum = 0; static gint ett_dcerpc_pnp = -1; -/* +/* * The pnp MSRPC interface is typically reached using the ncacn_np transport * and \pipe\ntsvcs or \pipe\plugplay named pipes as endpoint. */ @@ -49,7 +49,7 @@ static e_uuid_t uuid_dcerpc_pnp = { { 0x8f, 0x69, 0x08, 0x00, 0x3e, 0x30, 0x05, 0x1b } }; -static guint16 ver_dcerpc_pnp = 1; +static guint16 ver_dcerpc_pnp = 1; static dcerpc_sub_dissector dcerpc_pnp_dissectors[] = { @@ -59,83 +59,83 @@ static dcerpc_sub_dissector dcerpc_pnp_dissectors[] = { { PNP_GET_GLOBAL_STATE, "PNP_GetGlobalState", NULL, NULL }, { PNP_INIT_DETECTION, "PNP_InitDetection", NULL, NULL }, { PNP_REPORT_LOGON, "PNP_ReportLogOn", NULL, NULL }, - { PNP_VALIDATE_DEVICE_INSTANCE, + { PNP_VALIDATE_DEVICE_INSTANCE, "PNP_ValidateDeviceInstance", NULL, NULL }, - { PNP_GET_ROOT_DEVICE_INSTANCE, + { PNP_GET_ROOT_DEVICE_INSTANCE, "PNP_GetRootDeviceInstance", NULL, NULL }, - { PNP_GET_RELATED_DEVICE_INSTANCE, + { PNP_GET_RELATED_DEVICE_INSTANCE, "PNP_GetRelatedDeviceInstance", NULL, NULL }, - { PNP_ENUMERATE_SUB_KEYS, + { PNP_ENUMERATE_SUB_KEYS, "PNP_EnumerateSubKeys", NULL, NULL }, - { PNP_GET_DEVICE_LIST, + { PNP_GET_DEVICE_LIST, "PNP_GetDeviceList", NULL, NULL }, - { PNP_GET_DEVICE_LIST_SIZE, + { PNP_GET_DEVICE_LIST_SIZE, "PNP_GetDeviceListSize", NULL, NULL }, { PNP_GET_DEPTH, "PNP_GetDepth", NULL, NULL }, - { PNP_GET_DEVICE_REG_PROP, + { PNP_GET_DEVICE_REG_PROP, "PNP_GetDeviceRegProp", NULL, NULL }, - { PNP_SET_DEVICE_REG_PROP, + { PNP_SET_DEVICE_REG_PROP, "PNP_SetDeviceRegProp", NULL, NULL }, - { PNP_GET_CLASS_INSTANCE, + { PNP_GET_CLASS_INSTANCE, "PNP_GetClassInstance", NULL, NULL }, { PNP_CREATE_KEY, "PNP_CreateKey", NULL, NULL }, - { PNP_DELETE_REGISTRY_KEY, + { PNP_DELETE_REGISTRY_KEY, "PNP_DeleteRegistryKey", NULL, NULL }, - { PNP_GET_CLASS_COUNT, + { PNP_GET_CLASS_COUNT, "PNP_GetClassCount", NULL, NULL }, - { PNP_GET_CLASS_NAME, + { PNP_GET_CLASS_NAME, "PNP_GetClassName", NULL, NULL }, - { PNP_DELETE_CLASS_KEY, + { PNP_DELETE_CLASS_KEY, "PNP_DeleteClassKey", NULL, NULL }, - { PNP_GET_INTERFACE_DEVICE_ALIAS, + { PNP_GET_INTERFACE_DEVICE_ALIAS, "PNP_GetInterfaceDeviceAlias", NULL, NULL }, - { PNP_GET_INTERFACE_DEVICE_LIST, + { PNP_GET_INTERFACE_DEVICE_LIST, "PNP_GetInterfaceDeviceList", NULL, NULL }, - { PNP_GET_INTERFACE_DEVICE_LIST_SIZE, + { PNP_GET_INTERFACE_DEVICE_LIST_SIZE, "PNP_GetInterfaceDeviceListSize", NULL, NULL }, - { PNP_REGISTER_DEVICE_CLASS_ASSOCIATION, + { PNP_REGISTER_DEVICE_CLASS_ASSOCIATION, "PNP_RegisterDeviceClassAssociation", NULL, NULL }, - { PNP_UNREGISTER_DEVICE_CLASS_ASSOCIATION, + { PNP_UNREGISTER_DEVICE_CLASS_ASSOCIATION, "PNP_UnregisterDeviceClassAssociation", NULL, NULL }, - { PNP_GET_CLASS_REG_PROP, + { PNP_GET_CLASS_REG_PROP, "PNP_GetClassRegProp", NULL, NULL }, - { PNP_SET_CLASS_REG_PROP, + { PNP_SET_CLASS_REG_PROP, "PNP_SetClassRegProp", NULL, NULL }, { PNP_CREATE_DEV_INST, "PNP_CreateDevInst", NULL, NULL }, - { PNP_DEVICE_INSTANCE_ACTION, + { PNP_DEVICE_INSTANCE_ACTION, "PNP_DeviceInstanceAction", NULL, NULL }, - { PNP_GET_DEVICE_STATUS, + { PNP_GET_DEVICE_STATUS, "PNP_GetDeviceStatus", NULL, NULL }, - { PNP_SET_DEVICE_PROBLEM, + { PNP_SET_DEVICE_PROBLEM, "PNP_SetDeviceProblem", NULL, NULL }, - { PNP_DISABLE_DEV_INST, + { PNP_DISABLE_DEV_INST, "PNP_DisableDevInst", NULL, NULL }, - { PNP_UNINSTALL_DEV_INST, + { PNP_UNINSTALL_DEV_INST, "PNP_UninstallDevInst", NULL, NULL }, { PNP_ADD_ID, "PNP_AddID", NULL, NULL }, - { PNP_REGISTER_DRIVER, + { PNP_REGISTER_DRIVER, "PNP_RegisterDriver", NULL, NULL }, - { PNP_QUERY_REMOVE, + { PNP_QUERY_REMOVE, "PNP_QueryRemove", NULL, NULL }, - { PNP_REQUEST_DEVICE_EJECT, + { PNP_REQUEST_DEVICE_EJECT, "PNP_RequestDeviceEject", NULL, NULL }, - { PNP_IS_DOCKSTATION_PRESENT, + { PNP_IS_DOCKSTATION_PRESENT, "PNP_IsDockStationPresent", NULL, NULL }, - { PNP_REQUEST_EJECT_PC, + { PNP_REQUEST_EJECT_PC, "PNP_RequestEjectPC", NULL, NULL }, - { PNP_HW_PROT_FLAGS, + { PNP_HW_PROT_FLAGS, "PNP_HwProfFlags", NULL, NULL }, - { PNP_GET_HW_PROT_INFO, + { PNP_GET_HW_PROT_INFO, "PNP_GetHwProfInfo", NULL, NULL }, - { PNP_ADD_EMPTY_LOG_CONF, + { PNP_ADD_EMPTY_LOG_CONF, "PNP_AddEmptyLogConf", NULL, NULL }, - { PNP_FREE_LOG_CONF, + { PNP_FREE_LOG_CONF, "PNP_FreeLogConf", NULL, NULL }, - { PNP_GET_FIRST_LOG_CONF, + { PNP_GET_FIRST_LOG_CONF, "PNP_GetFirstLogConf", NULL, NULL }, - { PNP_GET_NEXT_LOG_CONF, + { PNP_GET_NEXT_LOG_CONF, "PNP_GetNextLogConf", NULL, NULL }, - { PNP_GET_LOG_CONF_PRIORITY, + { PNP_GET_LOG_CONF_PRIORITY, "PNP_GetLogConfPriority", NULL, NULL }, { PNP_ADD_RES_DES, "PNP_AddResDes", NULL, NULL }, { PNP_FREE_RES_DES, "PNP_FreeResDes", NULL, NULL }, @@ -143,43 +143,43 @@ static dcerpc_sub_dissector dcerpc_pnp_dissectors[] = { { PNP_GET_RES_DES_DATA, "PNP_GetResDesData", NULL, NULL }, { PNP_GET_RES_DES_DATA_SIZE, "PNP_GetResDesDataSize", NULL, NULL }, { PNP_MODIFY_RES_DES, "PNP_ModifyResDes", NULL, NULL }, - { PNP_DETECT_RESOURCE_CONFLICT, + { PNP_DETECT_RESOURCE_CONFLICT, "PNP_DetectResourceConflict", NULL, NULL }, - { PNP_QUERY_RES_CONFLICT, + { PNP_QUERY_RES_CONFLICT, "PNP_QueryResConfList", NULL, NULL }, - { PNP_SET_HW_PROF, + { PNP_SET_HW_PROF, "PNP_SetHwProf", NULL, NULL }, - { PNP_QUERY_ARBITRATOR_FREE_DATA, + { PNP_QUERY_ARBITRATOR_FREE_DATA, "PNP_QueryArbitratorFreeData", NULL, NULL }, - { PNP_QUERY_ARBITRATOR_FREE_SIZE, + { PNP_QUERY_ARBITRATOR_FREE_SIZE, "PNP_QueryArbitratorFreeSize", NULL, NULL }, - { PNP_RUN_DETECTION, + { PNP_RUN_DETECTION, "PNP_RunDetection", NULL, NULL }, - { PNP_REGISTER_NOTIFICATION, + { PNP_REGISTER_NOTIFICATION, "PNP_RegisterNotification", NULL, NULL }, - { PNP_UNREGISTER_NOTIFICATION, + { PNP_UNREGISTER_NOTIFICATION, "PNP_UnregisterNotification", NULL, NULL }, - { PNP_GET_CUSTOM_DEV_PROP, + { PNP_GET_CUSTOM_DEV_PROP, "PNP_GetCustomDevProp", NULL, NULL }, - { PNP_GET_VERSION_INTERNAL, + { PNP_GET_VERSION_INTERNAL, "PNP_GetVersionInternal", NULL, NULL }, - { PNP_GET_BLOCKED_DRIVER_INFO, + { PNP_GET_BLOCKED_DRIVER_INFO, "PNP_GetBlockedDriverInfo", NULL, NULL }, - { PNP_GET_SERVER_SIDE_DEV_INSTALL_FLAGS, + { PNP_GET_SERVER_SIDE_DEV_INSTALL_FLAGS, "PNP_GetServerSideDeviceInstallFlags", NULL, NULL }, - { PNP_GET_OBJECT_PROP_KEYS, + { PNP_GET_OBJECT_PROP_KEYS, "PNP_GetObjectPropKeys", NULL, NULL }, - { PNP_GET_OBJECT_PROP, + { PNP_GET_OBJECT_PROP, "PNP_GetObjectProp", NULL, NULL }, - { PNP_SET_OBJECT_PROP, + { PNP_SET_OBJECT_PROP, "PNP_SetObjectProp", NULL, NULL }, - { PNP_INSTALL_DEV_INST, + { PNP_INSTALL_DEV_INST, "PNP_InstallDevInst", NULL, NULL }, - { PNP_APPLY_POWER_SETTINGS, + { PNP_APPLY_POWER_SETTINGS, "PNP_ApplyPowerSettings", NULL, NULL }, - { PNP_DRIVER_STORE_ADD_DRV_PKG, + { PNP_DRIVER_STORE_ADD_DRV_PKG, "PNP_DriverStoreAddDriverPackage", NULL, NULL }, - { PNP_DRIVER_STORE_DEL_DRV_PKG, + { PNP_DRIVER_STORE_DEL_DRV_PKG, "PNP_DriverStoreDeleteDriverPackage", NULL, NULL }, { PNP_REGISTER_SRV_NOTIFICATION, "PNP_RegisterServiceNotification", NULL, NULL }, @@ -197,9 +197,9 @@ proto_register_dcerpc_pnp(void) static hf_register_info hf[] = { - { &hf_pnp_opnum, + { &hf_pnp_opnum, { "Operation", "pnp.opnum", FT_UINT16, BASE_DEC, - NULL, 0x0, NULL, HFILL }}, + NULL, 0x0, NULL, HFILL }}, }; diff --git a/epan/dissectors/packet-dcerpc-rras.c b/epan/dissectors/packet-dcerpc-rras.c index d69ab0a582..c743afa48f 100644 --- a/epan/dissectors/packet-dcerpc-rras.c +++ b/epan/dissectors/packet-dcerpc-rras.c @@ -1,5 +1,5 @@ /* packet-dcerpc-rras.c - * Routines for the rras (Routing and Remote Access service) MSRPC interface + * Routines for the rras (Routing and Remote Access service) MSRPC interface * Copyright 2005 Jean-Baptiste Marchand <jbm@hsc.fr> * * $Id$ @@ -39,7 +39,7 @@ static int hf_rras_opnum = 0; static gint ett_dcerpc_rras = -1; -/* +/* * The rras MSRPC interface is typically reached using the ncacn_np transport * and the \pipe\ROUTER named pipe as endpoint. */ @@ -49,61 +49,61 @@ static e_uuid_t uuid_dcerpc_rras = { { 0xbb, 0xd2, 0x00, 0x00, 0x1a, 0x18, 0x1c, 0xad } }; -static guint16 ver_dcerpc_rras = 0; +static guint16 ver_dcerpc_rras = 0; static dcerpc_sub_dissector dcerpc_rras_dissectors[] = { - { RRAS_ADMIN_SERVER_GETINFO, + { RRAS_ADMIN_SERVER_GETINFO, "MprAdminServerGetInfo", NULL, NULL }, - { RRAS_ADMIN_CONNECTION_ENUM, + { RRAS_ADMIN_CONNECTION_ENUM, "RasAdminConnectionEnum", NULL, NULL }, - { RRAS_ADMIN_CONNECTION_GETINFO, + { RRAS_ADMIN_CONNECTION_GETINFO, "RasAdminConnectionGetInfo", NULL, NULL }, - { RRAS_ADMIN_CONNECTION_CLEARSTATS, + { RRAS_ADMIN_CONNECTION_CLEARSTATS, "RasAdminConnectionClearStats", NULL, NULL }, - { RRAS_ADMIN_PORT_ENUM, + { RRAS_ADMIN_PORT_ENUM, "RasAdminPortEnum", NULL, NULL }, - { RRAS_ADMIN_PORT_GETINFO, + { RRAS_ADMIN_PORT_GETINFO, "RasAdminPortGetInfo", NULL, NULL }, - { RRAS_ADMIN_PORT_CLEARSTATS, + { RRAS_ADMIN_PORT_CLEARSTATS, "RasAdminPortClearStats", NULL, NULL }, - { RRAS_ADMIN_PORT_RESET, + { RRAS_ADMIN_PORT_RESET, "RasAdminPortReset", NULL, NULL }, - { RRAS_ADMIN_PORT_DISCONNECT, + { RRAS_ADMIN_PORT_DISCONNECT, "RasAdminPortDisconnect", NULL, NULL }, - { RRAS_RI_TRANS_SET_GLOBALINFO, + { RRAS_RI_TRANS_SET_GLOBALINFO, "RouterInterfaceTransportSetGlobalInfo", NULL, NULL }, - { RRAS_RI_TRANS_GET_GLOBALINFO, + { RRAS_RI_TRANS_GET_GLOBALINFO, "RouterInterfaceTransportGetGlobalInfo", NULL, NULL }, - { RRAS_RI_GET_HANDLE, + { RRAS_RI_GET_HANDLE, "RouterInterfaceGetHandle", NULL, NULL }, - { RRAS_RI_CREATE, + { RRAS_RI_CREATE, "RouterInterfaceCreate", NULL, NULL }, - { RRAS_RI_GETINFO, + { RRAS_RI_GETINFO, "RouterInterfaceGetInfo", NULL, NULL }, - { RRAS_RI_SETINFO, + { RRAS_RI_SETINFO, "RouterInterfaceSetInfo", NULL, NULL }, - { RRAS_RI_DELETE, + { RRAS_RI_DELETE, "RouterInterfaceDelete", NULL, NULL }, - { RRAS_TRANS_REMOVE, + { RRAS_TRANS_REMOVE, "RouterInterfaceTransportRemove", NULL, NULL }, - { RRAS_TRANS_ADD, + { RRAS_TRANS_ADD, "RouterInterfaceTransportAdd", NULL, NULL }, - { RRAS_TRANS_GETINFO, + { RRAS_TRANS_GETINFO, "RouterInterfaceTransportGetInfo", NULL, NULL }, - { RRAS_TRANS_SETINFO, + { RRAS_TRANS_SETINFO, "RouterInterfaceTransportSetInfo", NULL, NULL }, - { RRAS_RI_ENUM, + { RRAS_RI_ENUM, "RouterInterfaceEnum", NULL, NULL }, - { RRAS_RI_CONNECT, + { RRAS_RI_CONNECT, "RouterInterfaceConnect", NULL, NULL }, - { RRAS_RI_DISCONNECT, + { RRAS_RI_DISCONNECT, "RouterInterfaceDisconnect", NULL, NULL }, - { RRAS_RI_UPDATE_ROUTES, + { RRAS_RI_UPDATE_ROUTES, "RouterInterfaceUpdateRoutes", NULL, NULL }, - { RRAS_RI_QUERY_UPDATE_RESULT, + { RRAS_RI_QUERY_UPDATE_RESULT, "RouterInterfaceQueryUpdateResult", NULL, NULL }, - { RRAS_RI_UPDATE_PB_INFO, + { RRAS_RI_UPDATE_PB_INFO, "RouterInterfaceUpdatePhonebookInfo", NULL, NULL }, { RRAS_MIB_ENTRY_CREATE, "MIBEntryCreate", NULL, NULL }, { RRAS_MIB_ENTRY_DELETE, "MIBEntryDelete", NULL, NULL }, @@ -113,11 +113,11 @@ static dcerpc_sub_dissector dcerpc_rras_dissectors[] = { { RRAS_MIB_GET_NEXT, "MIBEntryGetNext", NULL, NULL }, { RRAS_GET_TRAP_INFO, "MIBGetTrapInfo", NULL, NULL }, { RRAS_SET_TRAP_INFO, "MIBSetTrapInfo", NULL, NULL }, - { RRAS_ADMIN_CONNECTION_NOTIFICATION, + { RRAS_ADMIN_CONNECTION_NOTIFICATION, "RasAdminConnectionNotification", NULL, NULL }, { RRAS_ADMIN_SEND_USER_MSG, "RasAdminSendUserMessage", NULL, NULL }, { RRAS_ROUTER_DEVICE_ENUM, "RouterDeviceEnum", NULL, NULL }, - { RRAS_RI_TRANSPORT_CREATE, + { RRAS_RI_TRANSPORT_CREATE, "RouterInterfaceTransportCreate", NULL, NULL }, { RRAS_RI_DEV_GETINFO, "RouterInterfaceDeviceGetInfo", NULL, NULL }, { RRAS_RI_DEV_SETINFO, "RouterInterfaceDeviceSetInfo", NULL, NULL }, @@ -135,9 +135,9 @@ proto_register_dcerpc_rras(void) static hf_register_info hf[] = { - { &hf_rras_opnum, + { &hf_rras_opnum, { "Operation", "rras.opnum", FT_UINT16, BASE_DEC, - NULL, 0x0, NULL, HFILL }}, + NULL, 0x0, NULL, HFILL }}, }; diff --git a/epan/dissectors/packet-dcerpc-svcctl.c b/epan/dissectors/packet-dcerpc-svcctl.c index a921033e9c..e6e495692f 100644 --- a/epan/dissectors/packet-dcerpc-svcctl.c +++ b/epan/dissectors/packet-dcerpc-svcctl.c @@ -131,7 +131,7 @@ svcctl_dissect_dwServiceType_flags(tvbuff_t *tvb, int offset, item = proto_tree_add_uint(parent_tree, hf_svcctl_service_type, tvb, offset, len, value); tree = proto_item_add_subtree(item, ett_dcerpc_svcctl_service_type_bits); } - + switch(opnum) { case SVC_CREATE_SERVICE_W: proto_tree_add_boolean(tree, hf_svcctl_service_type_interactive_process, @@ -248,7 +248,7 @@ struct access_mask_info svcctl_scm_access_mask_info = { * IDL ); */ static int -svcctl_dissect_OpenSCManager_rqst(tvbuff_t *tvb, int offset, +svcctl_dissect_OpenSCManager_rqst(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep) { @@ -294,7 +294,7 @@ svcctl_dissect_OpenSCManager_rqst(tvbuff_t *tvb, int offset, } static int -svcctl_dissect_OpenSCManager_reply(tvbuff_t *tvb, int offset, +svcctl_dissect_OpenSCManager_reply(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep) { @@ -334,7 +334,7 @@ svcctl_dissect_OpenSCManager_reply(tvbuff_t *tvb, int offset, } static int -svcctl_dissect_OpenSCManagerW_rqst(tvbuff_t *tvb, int offset, +svcctl_dissect_OpenSCManagerW_rqst(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep) { @@ -380,7 +380,7 @@ svcctl_dissect_OpenSCManagerW_rqst(tvbuff_t *tvb, int offset, } static int -svcctl_dissect_OpenSCManagerW_reply(tvbuff_t *tvb, int offset, +svcctl_dissect_OpenSCManagerW_reply(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep) { @@ -437,7 +437,7 @@ svcctl_dissect_CreateServiceW_rqst(tvbuff_t *tvb, int offset, dissect_ndr_wchar_cvstring, NDR_POINTER_UNIQUE, "Display Name", hf_svcctl_display_name, cb_wstr_postprocess, GINT_TO_POINTER(1)); - + /* access mask */ offset = dissect_nt_access_mask( tvb, offset, pinfo, tree, drep, hf_svcctl_access_mask, @@ -526,7 +526,7 @@ svcctl_dissect_CreateServiceW_reply(tvbuff_t *tvb, int offset, * IDL ); */ static int -svcctl_dissect_CloseServiceHandle_rqst(tvbuff_t *tvb, int offset, +svcctl_dissect_CloseServiceHandle_rqst(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep) { @@ -550,7 +550,7 @@ svcctl_dissect_CloseServiceHandle_rqst(tvbuff_t *tvb, int offset, } static int -svcctl_dissect_CloseServiceHandle_reply(tvbuff_t *tvb, int offset, +svcctl_dissect_CloseServiceHandle_reply(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep) { @@ -573,7 +573,7 @@ svcctl_dissect_CloseServiceHandle_reply(tvbuff_t *tvb, int offset, * IDL ); */ static int -svcctl_dissect_LockServiceDatabase_rqst(tvbuff_t *tvb, int offset, +svcctl_dissect_LockServiceDatabase_rqst(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep) { @@ -585,7 +585,7 @@ svcctl_dissect_LockServiceDatabase_rqst(tvbuff_t *tvb, int offset, return offset; } static int -svcctl_dissect_LockServiceDatabase_reply(tvbuff_t *tvb, int offset, +svcctl_dissect_LockServiceDatabase_reply(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep) { @@ -608,7 +608,7 @@ svcctl_dissect_LockServiceDatabase_reply(tvbuff_t *tvb, int offset, * IDL ); */ static int -svcctl_dissect_UnlockServiceDatabase_rqst(tvbuff_t *tvb, int offset, +svcctl_dissect_UnlockServiceDatabase_rqst(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep) { @@ -620,7 +620,7 @@ svcctl_dissect_UnlockServiceDatabase_rqst(tvbuff_t *tvb, int offset, return offset; } static int -svcctl_dissect_UnlockServiceDatabase_reply(tvbuff_t *tvb, int offset, +svcctl_dissect_UnlockServiceDatabase_reply(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep) { @@ -642,9 +642,9 @@ svcctl_dissect_UnlockServiceDatabase_reply(tvbuff_t *tvb, int offset, * IDL [unique][string] char *lock_owner, * IDL long lock_duration, * IDL }; - */ + */ static int -svcctl_dissect_QUERY_SERVICE_LOCK_STATUS(tvbuff_t *tvb, int offset, +svcctl_dissect_QUERY_SERVICE_LOCK_STATUS(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep) { @@ -671,7 +671,7 @@ svcctl_dissect_QUERY_SERVICE_LOCK_STATUS(tvbuff_t *tvb, int offset, * IDL ); */ static int -svcctl_dissect_QueryServiceLockStatus_rqst(tvbuff_t *tvb, int offset, +svcctl_dissect_QueryServiceLockStatus_rqst(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep) { @@ -686,7 +686,7 @@ svcctl_dissect_QueryServiceLockStatus_rqst(tvbuff_t *tvb, int offset, return offset; } static int -svcctl_dissect_QueryServiceLockStatus_reply(tvbuff_t *tvb, int offset, +svcctl_dissect_QueryServiceLockStatus_reply(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep) { @@ -709,12 +709,12 @@ svcctl_dissect_QueryServiceLockStatus_reply(tvbuff_t *tvb, int offset, * IDL [in] long type, * IDL [in] long status, * IDL [in] long buf_size, - * IDL [in][unique] long *resume_handle, + * IDL [in][unique] long *resume_handle, * IDL ); */ static int -svcctl_dissect_EnumServicesStatus_rqst(tvbuff_t *tvb, int offset, +svcctl_dissect_EnumServicesStatus_rqst(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep) { /* policy handle */ @@ -751,7 +751,7 @@ svcctl_dissect_OpenServiceW_rqst(tvbuff_t *tvb, int offset, /* service name */ offset = dissect_ndr_cvstring(tvb, offset, pinfo, tree, drep, sizeof(guint16), hf_svcctl_service_name, TRUE, NULL); - + /* access mask */ offset = dissect_nt_access_mask( tvb, offset, pinfo, tree, drep, hf_svcctl_access_mask, @@ -790,37 +790,37 @@ svcctl_dissect_QueryServiceConfigW_rqst(tvbuff_t *tvb, int offset, } static dcerpc_sub_dissector dcerpc_svcctl_dissectors[] = { - { SVC_CLOSE_SERVICE_HANDLE, "CloseServiceHandle", - svcctl_dissect_CloseServiceHandle_rqst, + { SVC_CLOSE_SERVICE_HANDLE, "CloseServiceHandle", + svcctl_dissect_CloseServiceHandle_rqst, svcctl_dissect_CloseServiceHandle_reply }, { SVC_CONTROL_SERVICE, "ControlService", NULL, NULL }, { SVC_DELETE_SERVICE, "DeleteService", NULL, NULL }, { SVC_LOCK_SERVICE_DATABASE, "LockServiceDatabase", - svcctl_dissect_LockServiceDatabase_rqst, + svcctl_dissect_LockServiceDatabase_rqst, svcctl_dissect_LockServiceDatabase_reply }, - { SVC_QUERY_SERVICE_OBJECT_SECURITY, "QueryServiceObjectSecurity", + { SVC_QUERY_SERVICE_OBJECT_SECURITY, "QueryServiceObjectSecurity", NULL, NULL }, - { SVC_SET_SERVICE_OBJECT_SECURITY, "SetServiceObjectSecurity", + { SVC_SET_SERVICE_OBJECT_SECURITY, "SetServiceObjectSecurity", NULL, NULL }, - { SVC_QUERY_SERVICE_STATUS, "QueryServiceStatus", + { SVC_QUERY_SERVICE_STATUS, "QueryServiceStatus", NULL, NULL }, - { SVC_SET_SERVICE_STATUS, "SetServiceStatus", + { SVC_SET_SERVICE_STATUS, "SetServiceStatus", NULL, NULL }, { SVC_UNLOCK_SERVICE_DATABASE, "UnlockServiceDatabase", - svcctl_dissect_UnlockServiceDatabase_rqst, + svcctl_dissect_UnlockServiceDatabase_rqst, svcctl_dissect_UnlockServiceDatabase_reply }, - { SVC_NOTIFY_BOOT_CONFIG_STATUS, "NotifyBootConfigStatus", + { SVC_NOTIFY_BOOT_CONFIG_STATUS, "NotifyBootConfigStatus", NULL, NULL }, { SVC_SC_SET_SERVICE_BITS_W, "ScSetServiceBitsW", NULL, NULL }, - { SVC_CHANGE_SERVICE_CONFIG_W, "ChangeServiceConfigW", + { SVC_CHANGE_SERVICE_CONFIG_W, "ChangeServiceConfigW", NULL, NULL }, { SVC_CREATE_SERVICE_W, "CreateServiceW", svcctl_dissect_CreateServiceW_rqst, svcctl_dissect_CreateServiceW_reply }, - { SVC_ENUM_DEPENDENT_SERVICES_W, "EnumDependentServicesW", + { SVC_ENUM_DEPENDENT_SERVICES_W, "EnumDependentServicesW", NULL, NULL }, - { SVC_ENUM_SERVICES_STATUS_W, "EnumServicesStatusW", + { SVC_ENUM_SERVICES_STATUS_W, "EnumServicesStatusW", svcctl_dissect_EnumServicesStatus_rqst, NULL }, { SVC_OPEN_SC_MANAGER_W, "OpenSCManagerW", svcctl_dissect_OpenSCManagerW_rqst, @@ -830,19 +830,19 @@ static dcerpc_sub_dissector dcerpc_svcctl_dissectors[] = { svcctl_dissect_OpenServiceW_reply }, { SVC_QUERY_SERVICE_CONFIG_W, "QueryServiceConfigW", svcctl_dissect_QueryServiceConfigW_rqst, NULL }, - { SVC_QUERY_SERVICE_LOCK_STATUS_W, "QueryServiceLockStatusW", + { SVC_QUERY_SERVICE_LOCK_STATUS_W, "QueryServiceLockStatusW", NULL, NULL }, { SVC_START_SERVICE_W, "StartServiceW", NULL, NULL }, - { SVC_GET_SERVICE_DISPLAY_NAME_W, "GetServiceDisplayNameW", + { SVC_GET_SERVICE_DISPLAY_NAME_W, "GetServiceDisplayNameW", NULL, NULL }, { SVC_GET_SERVICE_KEY_NAME_W, "GetServiceKeyNameW", NULL, NULL }, { SVC_SC_SET_SERVICE_BITS_A, "ScSetServiceBitsA", NULL, NULL }, { SVC_CHANGE_SERVICE_CONFIG_A, "ChangeServiceConfigA", NULL, NULL }, { SVC_CREATE_SERVICE_A, "CreateServiceA", NULL, NULL }, - { SVC_ENUM_DEPENDENT_SERVICES_A, "EnumDependentServicesA", + { SVC_ENUM_DEPENDENT_SERVICES_A, "EnumDependentServicesA", NULL, NULL }, { SVC_ENUM_SERVICES_STATUS_A, "EnumServicesStatusA", - svcctl_dissect_EnumServicesStatus_rqst, + svcctl_dissect_EnumServicesStatus_rqst, NULL }, { SVC_OPEN_SC_MANAGER_A, "OpenSCManagerA", svcctl_dissect_OpenSCManager_rqst, @@ -855,26 +855,26 @@ static dcerpc_sub_dissector dcerpc_svcctl_dissectors[] = { { SVC_START_SERVICE_A, "StartServiceA", NULL, NULL }, { SVC_GET_SERVICE_DISPLAY_NAME_A, "GetServiceDisplayNameA", NULL, NULL }, - { SVC_GET_SERVICE_KEY_NAME_A, "GetServiceKeyNameA", NULL, NULL }, + { SVC_GET_SERVICE_KEY_NAME_A, "GetServiceKeyNameA", NULL, NULL }, { SVC_SC_GET_CURRENT_GROUPE_STATE_W, "ScGetCurrentGroupStateW", NULL, NULL }, - { SVC_ENUM_SERVICE_GROUP_W, "EnumServiceGroupW", + { SVC_ENUM_SERVICE_GROUP_W, "EnumServiceGroupW", NULL, NULL }, - { SVC_CHANGE_SERVICE_CONFIG2_A, "ChangeServiceConfig2A", + { SVC_CHANGE_SERVICE_CONFIG2_A, "ChangeServiceConfig2A", NULL, NULL }, { SVC_CHANGE_SERVICE_CONFIG2_W, "ChangeServiceConfig2W", NULL, NULL }, - { SVC_QUERY_SERVICE_CONFIG2_A, "QueryServiceConfig2A", + { SVC_QUERY_SERVICE_CONFIG2_A, "QueryServiceConfig2A", NULL, NULL }, - { SVC_QUERY_SERVICE_CONFIG2_W, "QueryServiceConfig2W", + { SVC_QUERY_SERVICE_CONFIG2_W, "QueryServiceConfig2W", NULL, NULL }, - { SVC_QUERY_SERVICE_STATUS_EX, "QueryServiceStatusEx", + { SVC_QUERY_SERVICE_STATUS_EX, "QueryServiceStatusEx", NULL, NULL }, - { SVC_ENUM_SERVICES_STATUS_EX_A, "EnumServicesStatusExA", + { SVC_ENUM_SERVICES_STATUS_EX_A, "EnumServicesStatusExA", NULL, NULL }, - { SVC_ENUM_SERVICES_STATUS_EX_W, "EnumServicesStatusExW", + { SVC_ENUM_SERVICES_STATUS_EX_W, "EnumServicesStatusExW", NULL, NULL }, - { SVC_SC_SEND_TS_MESSAGE, "ScSendTSMessage", + { SVC_SC_SEND_TS_MESSAGE, "ScSendTSMessage", NULL, NULL }, {0, NULL, NULL, NULL} }; diff --git a/epan/dissectors/packet-fcsb3.c b/epan/dissectors/packet-fcsb3.c index 8a35492be7..bfbf967b57 100644 --- a/epan/dissectors/packet-fcsb3.c +++ b/epan/dissectors/packet-fcsb3.c @@ -14,17 +14,17 @@ * don't bother with the "Copied from" - you don't even need to put * in a "Copied from" if you copied an existing dissector, especially * if the bulk of the code in the new dissector is your code) - * + * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. @@ -278,9 +278,9 @@ dissect_iui_flags (proto_tree *parent_tree, tvbuff_t *tvb, int offset, guint16 f { proto_item *item=NULL; proto_tree *tree=NULL; - + if(parent_tree){ - item=proto_tree_add_uint(parent_tree, hf_sbccs_iui, + item=proto_tree_add_uint(parent_tree, hf_sbccs_iui, tvb, offset, 1, flags); tree=proto_item_add_subtree(item, ett_sbccs_iui); } @@ -316,9 +316,9 @@ dissect_linkctlinfo (proto_tree *parent_tree, tvbuff_t *tvb, int offset, guint16 { proto_item *item=NULL; proto_tree *tree=NULL; - + if(parent_tree){ - item=proto_tree_add_uint(parent_tree, hf_sbccs_dib_linkctlinfo, + item=proto_tree_add_uint(parent_tree, hf_sbccs_dib_linkctlinfo, tvb, offset, 2, flags); tree=proto_item_add_subtree(item, ett_sbccs_dib_linkctlinfo); } @@ -359,9 +359,9 @@ dissect_dh_flags (proto_tree *parent_tree, tvbuff_t *tvb, int offset, guint16 fl { proto_item *item=NULL; proto_tree *tree=NULL; - + if(parent_tree){ - item=proto_tree_add_uint(parent_tree, hf_sbccs_dhflags, + item=proto_tree_add_uint(parent_tree, hf_sbccs_dhflags, tvb, offset, 1, flags); tree=proto_item_add_subtree(item, ett_sbccs_dhflags); } @@ -413,9 +413,9 @@ dissect_ccw_flags (proto_tree *parent_tree, tvbuff_t *tvb, int offset, guint8 fl { proto_item *item=NULL; proto_tree *tree=NULL; - + if(parent_tree){ - item=proto_tree_add_uint(parent_tree, hf_sbccs_dib_ccw_flags, + item=proto_tree_add_uint(parent_tree, hf_sbccs_dib_ccw_flags, tvb, offset, 1, flags); tree=proto_item_add_subtree(item, ett_sbccs_dib_ccw_flags); } @@ -471,9 +471,9 @@ dissect_cmd_flags (proto_tree *parent_tree, tvbuff_t *tvb, int offset, guint8 fl { proto_item *item=NULL; proto_tree *tree=NULL; - + if(parent_tree){ - item=proto_tree_add_uint(parent_tree, hf_sbccs_dib_cmdflags, + item=proto_tree_add_uint(parent_tree, hf_sbccs_dib_cmdflags, tvb, offset, 1, flags); tree=proto_item_add_subtree(item, ett_sbccs_dib_cmdflags); } @@ -538,9 +538,9 @@ dissect_status_flags (proto_tree *parent_tree, tvbuff_t *tvb, int offset, guint8 { proto_item *item=NULL; proto_tree *tree=NULL; - + if(parent_tree){ - item=proto_tree_add_uint(parent_tree, hf_sbccs_dib_statusflags, + item=proto_tree_add_uint(parent_tree, hf_sbccs_dib_statusflags, tvb, offset, 1, flags); tree=proto_item_add_subtree(item, ett_sbccs_dib_statusflags); } @@ -614,9 +614,9 @@ dissect_status (packet_info *pinfo, proto_tree *parent_tree, tvbuff_t *tvb, int { proto_item *item=NULL; proto_tree *tree=NULL; - + if(parent_tree){ - item=proto_tree_add_uint(parent_tree, hf_sbccs_dib_status, + item=proto_tree_add_uint(parent_tree, hf_sbccs_dib_status, tvb, offset, 1, flags); tree=proto_item_add_subtree(item, ett_sbccs_dib_status); } @@ -698,9 +698,9 @@ dissect_sel_rst_param (proto_tree *parent_tree, tvbuff_t *tvb, int offset, guint { proto_item *item=NULL; proto_tree *tree=NULL; - + if(parent_tree){ - item=proto_tree_add_uint(parent_tree, hf_sbccs_dib_ctlparam, + item=proto_tree_add_uint(parent_tree, hf_sbccs_dib_ctlparam, tvb, offset, 3, flags); tree=proto_item_add_subtree(item, ett_sbccs_dib_ctlparam); } @@ -746,7 +746,7 @@ dissect_fc_sbccs_sb3_iu_hdr (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree proto_tree *iuhdr_tree; guint8 iui, dhflags; guint type; - + /* Decode the basic SB3 and IU header and determine type of frame */ type = get_fc_sbccs_iu_type (tvb, offset); @@ -754,7 +754,7 @@ dissect_fc_sbccs_sb3_iu_hdr (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree col_add_str (pinfo->cinfo, COL_INFO, val_to_str (type, fc_sbccs_iu_val, "0x%x")); } - + if (tree) { /* Dissect SB3 header first */ subti = proto_tree_add_text (tree, tvb, offset, FC_SBCCS_SB3_HDR_SIZE, @@ -776,7 +776,7 @@ dissect_fc_sbccs_sb3_iu_hdr (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree dhflags = tvb_get_guint8 (tvb, offset+1); dissect_dh_flags(iuhdr_tree, tvb, offset+1, dhflags); - + proto_tree_add_item (iuhdr_tree, hf_sbccs_ccw, tvb, offset+2, 2, 0); proto_tree_add_item (iuhdr_tree, hf_sbccs_token, tvb, offset+5, 3, 0); } @@ -804,7 +804,7 @@ static void dissect_fc_sbccs_dib_cmd_hdr (tvbuff_t *tvb, packet_info *pinfo, fc_sbccs_dib_cmd_val, "0x%x")); } - + if (tree) { proto_tree_add_item (tree, hf_sbccs_dib_ccw_cmd, tvb, offset, 1, 0); @@ -837,7 +837,7 @@ static void dissect_fc_sbccs_dib_status_hdr (tvbuff_t *tvb, packet_info *pinfo, rv_valid = flags & 0x1; /* if residual count is valid */ qparam_valid = (((flags & 0xE0) >> 5) == 0x1); /* From the FFC field */ dissect_status_flags(tree, tvb, offset, flags); - + flags = tvb_get_guint8 (tvb, offset+1); dissect_status(pinfo, tree, tvb, offset+1, flags); @@ -849,7 +849,7 @@ static void dissect_fc_sbccs_dib_status_hdr (tvbuff_t *tvb, packet_info *pinfo, proto_tree_add_item (tree, hf_sbccs_dib_iupacing, tvb, offset+3, 1, 0); } - + if (qparam_valid) { proto_tree_add_item (tree, hf_sbccs_dib_qtuf, tvb, offset+4, 1, 0); proto_tree_add_item (tree, hf_sbccs_dib_qtu, tvb, offset+4, 2, 0); @@ -879,7 +879,7 @@ static void dissect_fc_sbccs_dib_ctl_hdr (tvbuff_t *tvb, packet_info *pinfo, if (check_col (pinfo->cinfo, COL_INFO)) { col_append_fstr (pinfo->cinfo, COL_INFO, ": %s", - val_to_str (ctlfn, + val_to_str (ctlfn, fc_sbccs_dib_ctl_fn_val, "0x%x")); } @@ -904,7 +904,7 @@ static void dissect_fc_sbccs_dib_ctl_hdr (tvbuff_t *tvb, packet_info *pinfo, 3, 0); break; } - + proto_tree_add_item (tree, hf_sbccs_dib_iucnt, tvb, offset+9, 1, 0); proto_tree_add_item (tree, hf_sbccs_dib_datacnt, tvb, offset+10, 2, 0); proto_tree_add_item (tree, hf_sbccs_lrc, tvb, offset+12, 4, 0); @@ -972,7 +972,7 @@ static void dissect_fc_sbccs_dib_link_hdr (tvbuff_t *tvb, packet_info *pinfo, link_payload_len = tvb_get_ntohs (tvb, offset+10); i = 0; offset += 16; - + while (i < link_payload_len) { proto_tree_add_text (tree, tvb, offset, 4, "Logical Paths %d-%d: %s", @@ -990,7 +990,7 @@ static void dissect_fc_sbccs (tvbuff_t *tvb, packet_info *pinfo, { guint8 type; guint16 ch_cu_id, dev_addr, ccw; - guint offset = 0; + guint offset = 0; proto_item *ti; proto_tree *sb3_tree = NULL, *dib_tree = NULL; @@ -998,7 +998,7 @@ static void dissect_fc_sbccs (tvbuff_t *tvb, packet_info *pinfo, conversation_t *conversation; sb3_task_id_t task_key; void* pd_save; - + /* Make entries in Protocol column and Info column on summary display */ col_set_str(pinfo->cinfo, COL_PROTOCOL, "FC-SB3"); @@ -1010,11 +1010,11 @@ static void dissect_fc_sbccs (tvbuff_t *tvb, packet_info *pinfo, col_add_str (pinfo->cinfo, COL_INFO, val_to_str (type, fc_sbccs_iu_val, "0x%x")); } - + /* Retrieve conversation state to determine expected payload */ conversation = find_conversation (pinfo->fd->num, &pinfo->src, &pinfo->dst, PT_SBCCS, ch_cu_id, dev_addr, 0); - + pd_save = pinfo->private_data; if (conversation) { task_key.conv_id = conversation->index; @@ -1022,7 +1022,7 @@ static void dissect_fc_sbccs (tvbuff_t *tvb, packet_info *pinfo, pinfo->private_data = (void *)&task_key; } - else if ((type == FC_SBCCS_IU_CMD_HDR) || + else if ((type == FC_SBCCS_IU_CMD_HDR) || (type != FC_SBCCS_IU_CMD_DATA)) { conversation = conversation_new (pinfo->fd->num, &pinfo->src, &pinfo->dst, PT_SBCCS, ch_cu_id, dev_addr, 0); @@ -1033,7 +1033,7 @@ static void dissect_fc_sbccs (tvbuff_t *tvb, packet_info *pinfo, else { pinfo->private_data = NULL; } - + if (tree) { ti = proto_tree_add_protocol_format (tree, proto_fc_sbccs, tvb, 0, -1, "FC-SB3"); @@ -1049,7 +1049,7 @@ static void dissect_fc_sbccs (tvbuff_t *tvb, packet_info *pinfo, else { offset += (FC_SBCCS_SB3_HDR_SIZE + FC_SBCCS_IU_HDR_SIZE); } - + switch (type) { case FC_SBCCS_IU_DATA: dissect_fc_sbccs_dib_data_hdr (tvb, pinfo, dib_tree, offset); @@ -1089,7 +1089,7 @@ static void dissect_fc_sbccs (tvbuff_t *tvb, packet_info *pinfo, void proto_register_fcsbccs (void) -{ +{ /* Setup list of header fields See Section 1.6.1 for details*/ static hf_register_info hf[] = { { &hf_sbccs_chid, diff --git a/epan/dissectors/packet-gre.c b/epan/dissectors/packet-gre.c index 57609f0b6b..604588fc6d 100644 --- a/epan/dissectors/packet-gre.c +++ b/epan/dissectors/packet-gre.c @@ -115,7 +115,7 @@ static dissector_handle_t data_handle; const value_string gre_version[] = { { 0, "GRE" }, /* [RFC2784] */ - { 1, "Enhanced GRE" }, /* [RFC2637] */ + { 1, "Enhanced GRE" }, /* [RFC2637] */ { 0, NULL} }; const value_string gre_typevals[] = { @@ -171,7 +171,7 @@ static const value_string gre_3ggp2_seg_vals[] = { { 0x02, "Packet Ended" }, { 0, NULL } }; -/* 3GPP2 A.S0012-C v2.0 +/* 3GPP2 A.S0012-C v2.0 * 2.6.1 GRE Attributes */ static const value_string gre_3ggp2_attrib_id_vals[] = { @@ -240,7 +240,7 @@ dissect_gre_3gpp2_attribs(tvbuff_t *tvb, int offset, proto_tree *tree) { case ID_3GPP2_FLOW_DISCRIMINATOR: { - value = tvb_get_guint8(tvb,offset); + value = tvb_get_guint8(tvb,offset); proto_tree_add_item(attr_tree, hf_gre_3ggp2_flow_disc, tvb, offset, attrib_length, FALSE); proto_item_append_text(attr_item," - 0x%x",value); } @@ -263,7 +263,7 @@ dissect_gre_3gpp2_attribs(tvbuff_t *tvb, int offset, proto_tree *tree) break; case ID_3GPP2_FLOW_CTRL: { - value = tvb_get_guint8(tvb,offset); + value = tvb_get_guint8(tvb,offset); proto_tree_add_item(attr_tree, hf_gre_3ggp2_fci, tvb, offset, attrib_length, FALSE); proto_item_append_text(attr_item," - %s", (value & 0x80) ? "XON" : "XOFF"); @@ -275,7 +275,7 @@ dissect_gre_3gpp2_attribs(tvbuff_t *tvb, int offset, proto_tree *tree) } offset += attrib_length; - } + } proto_item_set_len(ti, offset - start_offset); return offset; @@ -329,7 +329,7 @@ dissect_gre(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) if (flags_and_ver & GRE_ACK) is_ppp = TRUE; break; - case ETHERTYPE_3GPP2: + case ETHERTYPE_3GPP2: case ETHERTYPE_CDMA2000_A10_UBS: is_ppp = TRUE; break; @@ -382,9 +382,9 @@ dissect_gre(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) } proto_tree_add_item(fv_tree, hf_gre_flags_version, tvb, offset, 2, FALSE); - + offset += 2; - + proto_tree_add_item(gre_tree, hf_gre_proto, tvb, offset, 2, FALSE); offset += 2; @@ -411,7 +411,7 @@ dissect_gre(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) proto_item_append_text(it_checksum," [incorrect, should be 0x%04x]",in_cksum_shouldbe(cksum, computed_cksum)); expert_add_info_format(pinfo, it_checksum, PI_MALFORMED, PI_WARN, "Incorrect GRE Checksum"); } - } + } offset += 2; @@ -463,7 +463,7 @@ dissect_gre(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) sre_length = tvb_get_guint8(tvb, offset); proto_tree_add_item(r_tree, hf_gre_routing_sre_length , tvb, offset, 1, FALSE); offset += 1; - + proto_item_set_len(it_routing, 2 + 1 +1 + sre_length); if (sre_af == 0 && sre_length == 0) break; @@ -506,7 +506,7 @@ proto_register_gre(void) { static hf_register_info hf[] = { { &hf_gre_proto, - { "Protocol Type", "gre.proto", + { "Protocol Type", "gre.proto", FT_UINT16, BASE_HEX, VALS(gre_typevals), 0x0, "The protocol that is GRE encapsulated", HFILL }}, { &hf_gre_flags_and_version, @@ -554,51 +554,51 @@ proto_register_gre(void) FT_UINT16, BASE_DEC, VALS(gre_version), GRE_VERSION, NULL, HFILL }}, { &hf_gre_checksum, - { "Checksum", "gre.checksum", + { "Checksum", "gre.checksum", FT_UINT16, BASE_HEX, NULL, 0x0, "The Checksum field contains the IP (one's complement) checksum of the GRE header and the payload packet", HFILL }}, { &hf_gre_offset, - { "Offset", "gre.offset", + { "Offset", "gre.offset", FT_UINT16, BASE_DEC, NULL, 0x0, "The offset field indicates the octet offset from the start of the Routing field to the first octet of the active Source Route Entry to be examined", HFILL }}, { &hf_gre_key, - { "Key", "gre.key", + { "Key", "gre.key", FT_UINT32, BASE_HEX, NULL, 0x0, "The Key field contains a four octet number which was inserted by the encapsulator", HFILL }}, { &hf_gre_key_payload_length, - { "Payload Length", "gre.key.payload_length", + { "Payload Length", "gre.key.payload_length", FT_UINT16, BASE_DEC, NULL, 0x0, "Size of the payload, not including the GRE header", HFILL }}, { &hf_gre_key_call_id, - { "Call ID", "gre.key.call_id", + { "Call ID", "gre.key.call_id", FT_UINT16, BASE_DEC, NULL, 0x0, "Contains the Peer's Call ID for the session to which this packet belongs.", HFILL }}, { &hf_gre_sequence_number, - { "Sequence Number", "gre.sequence_number", + { "Sequence Number", "gre.sequence_number", FT_UINT32, BASE_DEC, NULL, 0x0, "The Sequence Number field contains an unsigned 32 bit integer which is inserted by the encapsulator", HFILL }}, { &hf_gre_ack_number, - { "Acknowledgment Number", "gre.ack_number", + { "Acknowledgment Number", "gre.ack_number", FT_UINT32, BASE_DEC, NULL, 0x0, "Contains the sequence number of the highest numbered GRE packet received by the sending peer for this user session", HFILL }}, { &hf_gre_routing, - { "Routing", "gre.routing", + { "Routing", "gre.routing", FT_NONE, BASE_NONE, NULL, 0x0, "The Routing field is a list of Source Route Entries (SREs)", HFILL }}, { &hf_gre_routing_address_family, - { "Address Family", "gre.routing.address_family", + { "Address Family", "gre.routing.address_family", FT_UINT16, BASE_DEC, NULL, 0x0, "The Address Family field contains a two octet value which indicates the syntax and semantics of the Routing Information field", HFILL }}, { &hf_gre_routing_sre_offset, - { "SRE Offset", "gre.routing.sre_offset", + { "SRE Offset", "gre.routing.sre_offset", FT_UINT8, BASE_DEC, NULL, 0x0, "The Address Family field contains a two octet value which indicates the syntax and semantics of the Routing Information field", HFILL }}, { &hf_gre_routing_sre_length, - { "SRE Length", "gre.routing.src_length", + { "SRE Length", "gre.routing.src_length", FT_UINT8, BASE_DEC, NULL, 0x0, "The SRE Length field contains the number of octets in the SRE", HFILL }}, { &hf_gre_routing_information, - { "Routing Information", "gre.routing.information", + { "Routing Information", "gre.routing.information", FT_BYTES, BASE_NONE, NULL, 0x0, "The Routing Information field contains data which may be used in routing this packet", HFILL }}, { &hf_gre_3ggp2_attrib, @@ -614,19 +614,19 @@ proto_register_gre(void) FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL }}, { &hf_gre_3ggp2_sdi, - { "SDI/DOS", "gre.3ggp2_sdi", + { "SDI/DOS", "gre.3ggp2_sdi", FT_BOOLEAN, 16, TFS(&gre_3ggp2_sdi_val), 0x8000, "Short Data Indicator(SDI)/Data Over Signaling (DOS)", HFILL }}, { &hf_gre_3ggp2_fci, - { "Flow Control Indicator", "gre.3ggp2_fci", + { "Flow Control Indicator", "gre.3ggp2_fci", FT_BOOLEAN, 16, TFS(&gre_3ggp2_fci_val), 0x8000, NULL, HFILL }}, { &hf_gre_3ggp2_di, - { "Duration Indicator", "gre.3ggp2_di", + { "Duration Indicator", "gre.3ggp2_di", FT_BOOLEAN, 16, TFS(&gre_3ggp2_di_val), 0x4000, NULL, HFILL }}, { &hf_gre_3ggp2_flow_disc, - { "Flow ID", "gre.ggp2_flow_disc", + { "Flow ID", "gre.ggp2_flow_disc", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }}, { &hf_gre_3ggp2_seg, @@ -635,27 +635,27 @@ proto_register_gre(void) NULL, HFILL }}, { &hf_gre_wccp_redirect_header, - { "Redirect Header", "gre.wccp.redirect_header", + { "Redirect Header", "gre.wccp.redirect_header", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL }}, { &hf_gre_wccp_dynamic_service, - { "Dynamic Service", "gre.wccp.dynamic_service", + { "Dynamic Service", "gre.wccp.dynamic_service", FT_BOOLEAN, 8, TFS(&gre_wccp_dynamic_service_val), 0x80, NULL, HFILL }}, { &hf_gre_wccp_alternative_bucket_used, - { "Alternative bucket used", "gre.wccp.alternative_bucket_used", + { "Alternative bucket used", "gre.wccp.alternative_bucket_used", FT_BOOLEAN, 8, TFS(&gre_wccp_alternative_bucket_used_val), 0x40, NULL, HFILL }}, { &hf_gre_wccp_service_id, - { "Service ID", "gre.wccp.service_id", + { "Service ID", "gre.wccp.service_id", FT_UINT8, BASE_DEC, VALS(service_id_vals), 0x00, "Service Group identifier", HFILL }}, { &hf_gre_wccp_alternative_bucket, - { "Alternative Bucket", "gre.wccp.alternative_bucket", + { "Alternative Bucket", "gre.wccp.alternative_bucket", FT_UINT8, BASE_DEC, NULL, 0x0, "Alternative bucket index used to redirect the packet.", HFILL }}, { &hf_gre_wccp_primary_bucket, - { "Primary Bucket", "gre.wccp.primary_bucket", + { "Primary Bucket", "gre.wccp.primary_bucket", FT_UINT8, BASE_DEC, NULL, 0x0, "Primary bucket index used to redirect the packet.", HFILL }}, diff --git a/epan/dissectors/packet-gsm_a_dtap.c b/epan/dissectors/packet-gsm_a_dtap.c index 7aaa55d6c0..ec6bbc71c5 100644 --- a/epan/dissectors/packet-gsm_a_dtap.c +++ b/epan/dissectors/packet-gsm_a_dtap.c @@ -21,7 +21,7 @@ * Various updates, enhancements and fixes * Copyright 2009, Gerasimos Dimitriadis <dimeg [AT] intracom.gr> * In association with Intracom Telecom SA - * + * * Title 3GPP Other * * Reference [3] @@ -65,7 +65,7 @@ * Core network protocols; * Stage 3 * (3GPP TS 24.008 version 9.6.0 Release 9) - * + * * $Id$ * * Wireshark - Network traffic analyzer @@ -554,7 +554,7 @@ de_auth_param_autn(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 else expert_add_info_format(pinfo, item, PI_MALFORMED, PI_WARN, "AUTN length not equal to 16"); - + return(len); } @@ -603,7 +603,7 @@ de_auth_fail_param(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 else expert_add_info_format(pinfo, item, PI_MALFORMED, PI_WARN, "AUTS length not equal to 14"); - + return(len); } @@ -704,7 +704,7 @@ de_network_name(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 off { expert_add_info_format(pinfo, item, PI_MALFORMED, PI_WARN, "Value leads to a Text String whose length is not a multiple of 7 bits"); } - /* + /* * If the number of spare bits is 7, then we have unpacked one extra * character. Disregard this character. */ @@ -980,7 +980,7 @@ de_day_saving_time(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guin } /* - * 10.5.3.13 Emergency Number List + * 10.5.3.13 Emergency Number List */ static guint16 de_emerg_num_list(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_) @@ -997,8 +997,8 @@ de_emerg_num_list(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 o count = 1; while ((curr_offset - offset) < len){ - /* Length of 1st Emergency Number information note 1) octet 3 - * NOTE 1: The length contains the number of octets used to encode the + /* Length of 1st Emergency Number information note 1) octet 3 + * NOTE 1: The length contains the number of octets used to encode the * Emergency Service Category Value and the Number digits. */ en_len = tvb_get_guint8(tvb, curr_offset); @@ -1049,7 +1049,7 @@ de_emerg_num_list(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 o malformed_number = TRUE; if(malformed_number) - expert_add_info_format(pinfo, item, PI_MALFORMED, PI_WARN, "\'f\' end mark present in unexpected position"); + expert_add_info_format(pinfo, item, PI_MALFORMED, PI_WARN, "\'f\' end mark present in unexpected position"); curr_offset = curr_offset + en_len; count++; @@ -1059,7 +1059,7 @@ de_emerg_num_list(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 o } /* - * 10.5.3.14 Additional update parameters + * 10.5.3.14 Additional update parameters */ static const true_false_string gsm_a_dtap_csmt_vals = { "CS fallback mobile terminating call", @@ -1209,7 +1209,7 @@ de_bearer_cap(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 o * warning, bearer cap uses extended values that * are reversed from other parameters! */ - item = + item = proto_tree_add_text(tree, tvb, curr_offset, 1, "Octet 3"); @@ -1298,7 +1298,7 @@ de_bearer_cap(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 o "%s = Transfer mode: %s", a_bigbuf, (oct & 0x08) ? "packet" : "circuit"); - + proto_tree_add_item(subtree, hf_gsm_a_itc, tvb, curr_offset, 1, ENC_BIG_ENDIAN); if (add_string) @@ -2454,7 +2454,7 @@ de_bcd_num(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, malformed_number = TRUE; if(malformed_number) - expert_add_info_format(pinfo, item, PI_MALFORMED, PI_WARN, "\'f\' end mark present in unexpected position"); + expert_add_info_format(pinfo, item, PI_MALFORMED, PI_WARN, "\'f\' end mark present in unexpected position"); return(len); } @@ -2466,7 +2466,7 @@ const value_string gsm_a_type_of_sub_addr_values[] = { { 0x00, "NSAP (X.213/ISO 8348 AD2)" }, { 0x02, "User specified" }, { 0, NULL } -}; +}; const value_string gsm_a_odd_even_ind_values[] = { { 0x00, "even number of address signals" }, @@ -2532,7 +2532,7 @@ de_sub_addr(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, expert_add_info_format(pinfo, item, PI_MALFORMED, PI_WARN, "Invalid IA5 character(s) in string (value > 127)"); return(len); - } + } } proto_tree_add_text(tree, @@ -2798,7 +2798,7 @@ de_cause(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset * 69 - Requested facility not implemented * 87 - User not member of CUG */ - if ((cause == 17) || (cause == 29) || (cause == 34) || (cause == 50) || + if ((cause == 17) || (cause == 29) || (cause == 34) || (cause == 50) || (cause == 55) || (cause == 69) || (cause == 87)) { proto_tree_add_item(subtree, hf_gsm_a_extension, tvb, curr_offset, 1, ENC_BIG_ENDIAN); @@ -2808,7 +2808,7 @@ de_cause(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset else { diag_length = len - (curr_offset - offset); - proto_tree_add_text(subtree, tvb, curr_offset, diag_length, + proto_tree_add_text(subtree, tvb, curr_offset, diag_length, "Data: %s", tvb_bytes_to_str(tvb, curr_offset, diag_length)); curr_offset += diag_length; } @@ -2997,7 +2997,7 @@ de_notif_ind(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 of { proto_tree_add_item(tree, hf_gsm_a_extension, tvb, offset, 1, ENC_BIG_ENDIAN); proto_tree_add_item(tree, hf_gsm_a_notification_description, tvb, offset, 1, ENC_BIG_ENDIAN); - + return 1; } /* @@ -3044,7 +3044,7 @@ de_prog_ind(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 off oct = tvb_get_guint8(tvb, curr_offset); progress_description = oct & 0x7f; proto_tree_add_item(tree, hf_gsm_a_extension, tvb, curr_offset, 1, ENC_BIG_ENDIAN); - + switch (coding_standard) { case 0: @@ -3198,7 +3198,7 @@ static guint16 de_signal(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_) { proto_tree_add_item(tree, hf_gsm_a_dtap_signal_value, tvb, offset, 1, ENC_BIG_ENDIAN); - + return 1; } @@ -3242,7 +3242,7 @@ de_ss_ver_ind(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 o /* User-user protocol discriminator (octet 3) Bits -8 7 6 5 4 3 2 1 +8 7 6 5 4 3 2 1 0 0 0 0 0 0 0 0 User specific protocol (Note 1) 0 0 0 0 0 0 0 1 OSI high layer protocols 0 0 0 0 0 0 1 0 X.244 (Note 2) @@ -3250,20 +3250,20 @@ Bits 0 0 0 0 0 1 0 0 IA5 characters (Note 3) 0 0 0 0 0 1 1 1 Rec.V.120 rate adaption 0 0 0 0 1 0 0 0 Q.931 (I.451) user-network call control messages - + 0 0 0 1 0 0 0 0 Reserved for other network layer or through layer 3 protocols -0 0 1 1 1 1 1 1 - -0 1 0 0 0 0 0 0 +0 0 1 1 1 1 1 1 + +0 1 0 0 0 0 0 0 through National use -0 1 0 0 1 1 1 0 +0 1 0 0 1 1 1 0 0 1 0 0 1 1 1 1 3GPP capability exchange protocol (NOTE 4) - + 0 1 0 1 0 0 0 0 Reserved for other network through layer or layer 3 protocols -1 1 1 1 1 1 1 0 - +1 1 1 1 1 1 1 0 + All other values are reserved. */ static const range_string gsm_a_dtap_u2u_prot_discr_vals[] = { @@ -3294,7 +3294,7 @@ de_u2u(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, item = proto_tree_add_text(tree, tvb, curr_offset, len - 1, "User-user information"); subtree = proto_item_add_subtree(item, ett_gsm_dtap_elem[DE_USER_USER]); - proto_tree_add_text(subtree, tvb, curr_offset, len - 1, + proto_tree_add_text(subtree, tvb, curr_offset, len - 1, "Data: %s", tvb_bytes_to_str(tvb, curr_offset, len - 1)); return(len); @@ -3370,7 +3370,7 @@ de_stream_id(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 of "Stream Identifier: No Bearer (%u)", oct); if (add_string) - g_snprintf(add_string, string_len, " - (No Bearer)"); + g_snprintf(add_string, string_len, " - (No Bearer)"); } else { @@ -3426,7 +3426,7 @@ de_ca_of_no_cli(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 { guint32 curr_offset; guint8 oct; - + curr_offset = offset; oct = tvb_get_guint8(tvb, curr_offset); @@ -3451,7 +3451,7 @@ de_ca_of_no_cli(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 * 10.5.4.32 Supported codec list */ /* 6.1 System Identifiers for GSM and UMTS - * The system identifiers for the radio access technologies + * The system identifiers for the radio access technologies * supported by this specification are: * SysID for GSM: 0x0000.0000 (bit 8 .. bit 1) * SysID for UMTS: 0x0000.0100 (bit 8 .. bit 1) @@ -3473,7 +3473,7 @@ de_sup_codec_list(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint curr_offset = offset; - /* System Identification 1 (SysID 1) octet 3 + /* System Identification 1 (SysID 1) octet 3 * SysID indicates the radio access technology for which the subsequent Codec * Bitmap indicates the supported codec types. * Coding of this Octet is defined in 3GPP TS 26.103 @@ -3496,17 +3496,17 @@ de_sup_codec_list(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint * Bitmap as follows: * 8 7 6 5 4 3 2 bit 1 * TDMA UMTS UMTS HR AMR FR AMR GSM EFR GSM HR GSM FR Octet 1 - * EFR AMR 2 AMR + * EFR AMR 2 AMR * bit 16 15 14 13 12 11 10 bit 9 *(reserved) (reserved)OHR OFR OHR UMTS FR PDC EFR Octet 2 * AMR-WB AMR-WB AMR AMR-WB AMR-WB - * A Codec Type is supported, if the corresponding bit is set to "1". + * A Codec Type is supported, if the corresponding bit is set to "1". * All reserved bits shall be set to "0". - * - * NOTE: If the Codec Bitmap for a SysID is 1 octet, it is an indication that - * all codecs of the 2nd octet are not supported. - * If the Codec Bitmap for a SysID is more than 2 octets, the network shall - * ignore the additional octet(s) of the bitmap and process the rest of the + * + * NOTE: If the Codec Bitmap for a SysID is 1 octet, it is an indication that + * all codecs of the 2nd octet are not supported. + * If the Codec Bitmap for a SysID is more than 2 octets, the network shall + * ignore the additional octet(s) of the bitmap and process the rest of the * information element. * * Right now we are sure that at least the first octet of the bitmap is present @@ -3538,7 +3538,7 @@ de_sup_codec_list(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint length--; } } - + curr_offset = curr_offset + length; } @@ -5860,7 +5860,7 @@ dtap_tp_epc_close_ue_test_loop(tvbuff_t *tvb, proto_tree *tree, packet_info *pin curr_offset = offset; ELEM_MAND_V(GSM_A_PDU_TYPE_DTAP, DE_TP_EPC_UE_TEST_LOOP_MODE, NULL); - + if (epc_test_loop_mode == 0) { ELEM_MAND_LV(GSM_A_PDU_TYPE_DTAP, DE_TP_EPC_UE_TL_A_LB_SETUP, NULL); } else if (epc_test_loop_mode == 1) { @@ -6267,8 +6267,8 @@ dissect_dtap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) /* XXX */ } /* 3GPP TS 24.008 version 8.5.0 Release 8 - * Bits 5 to 8 of the first octet of every message belonging to the protocols "Call Control; - * call related SS messages" and "Session Management"contain the transaction identifier (TI). + * Bits 5 to 8 of the first octet of every message belonging to the protocols "Call Control; + * call related SS messages" and "Session Management"contain the transaction identifier (TI). * The transaction identifier and its use are defined in 3GPP TS 24.007 [20]. * 5 = Mobility Management messages * 3 = Call Control; call related SS messages diff --git a/epan/dissectors/packet-gsm_bssmap_le.c b/epan/dissectors/packet-gsm_bssmap_le.c index b234e4175e..22a2fa791a 100644 --- a/epan/dissectors/packet-gsm_bssmap_le.c +++ b/epan/dissectors/packet-gsm_bssmap_le.c @@ -333,7 +333,7 @@ de_bmaple_decihp_keys(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, g } /* * 10.9 Geographic Location - * contains an octet sequence identical to that for Geographical Information + * contains an octet sequence identical to that for Geographical Information * defined in 3GPP TS 23.032.. */ /* @@ -365,7 +365,7 @@ de_bmaple_req_gps_ass_data(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _ proto_tree_add_item(tree, hf_gsm_bssmap_le_almanac, tvb, curr_offset, 1, FALSE); curr_offset++; - /* Octet 4 P O N M L K J I + /* Octet 4 P O N M L K J I * bits L through P are Spare bits */ /* bit K Ephemeris Extension Check */ @@ -623,7 +623,7 @@ be_packet_meas_rep(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guin /* * 10.28 Cell Identity List - * coded as the value part of the Cell Identity List IE + * coded as the value part of the Cell Identity List IE * defined in 3GPP TS 48.071. */ /* Dissector for the Measured Cell Identity List element */ @@ -645,7 +645,7 @@ be_measured_cell_identity(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U */ /* * 10.30 Velocity Data - * contains an octet sequence identical to that for Description of + * contains an octet sequence identical to that for Description of * Velocity defined in 3GPP TS 23.032. */ /* @@ -676,16 +676,16 @@ typedef enum DE_BMAPLE_LCSQOS, / 10.16 LCS QoS / DE_BMAPLE_LCS_PRIO, / LCS Priority / DE_BMAPLE_LOC_TYPE, / 10.18 Location Type / - DE_BMAPLE_GANSS_LOC_TYPE, / GANSS Location Type / - DE_BMAPLE_GEO_LOC, / 10.9 Geographic Location / - DE_BMAPLE_POS_DATA, / 10.20 Positioning Data / + DE_BMAPLE_GANSS_LOC_TYPE, / GANSS Location Type / + DE_BMAPLE_GEO_LOC, / 10.9 Geographic Location / + DE_BMAPLE_POS_DATA, / 10.20 Positioning Data / DE_BMAPLE_GANSS_POS_DATA, / GANSS Positioning Data / DE_BMAPLE_VELOC_DATA, / Velocity Data / - DE_BMAPLE_LCS_CAUSE, / 10.13 LCS Cause / + DE_BMAPLE_LCS_CAUSE, / 10.13 LCS Cause / DE_BMAPLE_LCS_CLIENT_TYPE, / LCS Client Type / - DE_BMAPLE_APDU, / 10.3 APDU / + DE_BMAPLE_APDU, / 10.3 APDU / DE_BMAPLE_NETWORK_ELEM_ID, / Network Element Identity / - DE_BMAPLE_REQ_GPS_ASSIST_D, / 10.10 Requested GPS Assistance Data / + DE_BMAPLE_REQ_GPS_ASSIST_D, / 10.10 Requested GPS Assistance Data / DE_BMAPLE_REQ_GNSS_ASSIST_D,/ Requested GANSS Assistance Data / DE_BMAPLE_DECIPH_KEYS, / 10.8 Deciphering Keys / DE_BMAPLE_RETURN_ERROR_REQ, / Return Error Request / @@ -743,7 +743,7 @@ guint16 (*bssmap_le_elem_fcn[])(tvbuff_t *tvb, proto_tree *tree, packet_info *pi de_mid, /* IMEI (use same dissector as IMSI) */ NULL, /* NONE */ - + }; /* @@ -851,10 +851,10 @@ bssmap_le_connection_oriented(tvbuff_t *tvb, proto_tree *tree, packet_info *pinf * Network Element Identity (source) 3.2.2.69 Both M 3-n Network Element Identity (target) 3.2.2.69 Both M 3-n -APDU 3.2.2.68 Both M 3-n +APDU 3.2.2.68 Both M 3-n Segmentation 3.2,2,74 Both C (note 1) 5 Return Error Request 3.2.2.72 Both C (note 2) 3-n -Return Error Cause 3.2.2.73 Both C (note 3) 3-n +Return Error Cause 3.2.2.73 Both C (note 3) 3-n */ /* @@ -1036,23 +1036,23 @@ proto_register_gsm_bssmap_le(void) "APDU embedded protocol id", HFILL } }, { &hf_gsm_bssmap_le_spare, - { "Spare", "gsm_bssmap_le.spare", + { "Spare", "gsm_bssmap_le.spare", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL} }, { &hf_gsm_bssmap_le_ciphering_key_flag, - { "Ciphering Key Flag", "gsm_bssmap_le.decipheringKeys.flag", - FT_UINT8, BASE_DEC, NULL, 0x0, + { "Ciphering Key Flag", "gsm_bssmap_le.decipheringKeys.flag", + FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL} }, { &hf_gsm_bssmap_le_current_deciphering_key_value, - { "Current Deciphering Key Value", "gsm_bssmap_le.decipheringKeys.current", - FT_UINT8, BASE_DEC, NULL, 0x0, NULL, + { "Current Deciphering Key Value", "gsm_bssmap_le.decipheringKeys.current", + FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL} }, { &hf_gsm_bssmap_le_next_deciphering_key_value, - { "Next Deciphering Key Value", "gsm_bssmap_le.decipheringKeys.next", - FT_UINT8, BASE_DEC, NULL, 0x0, + { "Next Deciphering Key Value", "gsm_bssmap_le.decipheringKeys.next", + FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL} }, { &hf_gsm_bssmap_le_acq_ass, @@ -1111,52 +1111,52 @@ proto_register_gsm_bssmap_le(void) NULL, HFILL } }, { &hf_gsm_bssmap_le_lcs_cause_value, - { "Cause Value", "gsm_bssmap_le.lcsCauseValue", + { "Cause Value", "gsm_bssmap_le.lcsCauseValue", FT_UINT8, BASE_HEX, VALS(bssmap_le_lcs_cause_values), 0x0, NULL, HFILL} }, { &hf_gsm_bssmap_le_diagnostic_value, - { "Diagnostic Value", "gsm_bssmap_le.diagnosticValue", + { "Diagnostic Value", "gsm_bssmap_le.diagnosticValue", FT_UINT8, BASE_HEX, VALS(bssmap_le_position_method_failure_diagnostic_vals), 0x0, NULL, HFILL} }, { &hf_gsm_bssmap_le_client_category, - { "Client Category", "gsm_bssmap_le.lcsClientType.clientCategory", + { "Client Category", "gsm_bssmap_le.lcsClientType.clientCategory", FT_UINT8, BASE_HEX, VALS(bssmap_le_client_category), 0x0, NULL, HFILL} }, { &hf_gsm_bssmap_le_client_subtype, - { "Client Subtype", "gsm_bssmap_le.lcsClientType.clientSubtype", + { "Client Subtype", "gsm_bssmap_le.lcsClientType.clientSubtype", FT_UINT8, BASE_HEX, VALS(bssmap_le_client_subtype), 0x0, NULL, HFILL} }, { &hf_gsm_bssmap_le_velocity_requested, - { "Velocity Requested", "gsm_bssmap_le.lcsQos.velocityRequested", + { "Velocity Requested", "gsm_bssmap_le.lcsQos.velocityRequested", FT_UINT8, BASE_HEX, VALS(bssmap_le_velocity_requested_vals), 0x0, NULL, HFILL} }, { &hf_gsm_bssmap_le_vertical_coordinate_indicator, - { "Vertical Coordinate Indicator", "gsm_bssmap_le.lcsQos.verticalCoordinateIndicator", + { "Vertical Coordinate Indicator", "gsm_bssmap_le.lcsQos.verticalCoordinateIndicator", FT_UINT8, BASE_HEX, VALS(bssmap_le_vertical_coordinate_indicator_vals), 0x0, NULL, HFILL} }, { &hf_gsm_bssmap_le_horizontal_accuracy_indicator, - { "Horizontal Accuracy Indicator", "gsm_bssmap_le.lcsQos.horizontalAccuracyIndicator", + { "Horizontal Accuracy Indicator", "gsm_bssmap_le.lcsQos.horizontalAccuracyIndicator", FT_UINT8, BASE_HEX, VALS(bssmap_le_horizontal_accuracy_indicator_vals), 0x0, NULL, HFILL} }, { &hf_gsm_bssmap_le_horizontal_accuracy, - { "Horizontal Accuracy", "gsm_bssmap_le.lcsQos.horizontalAccuracy", + { "Horizontal Accuracy", "gsm_bssmap_le.lcsQos.horizontalAccuracy", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL} }, { &hf_gsm_bssmap_le_vertical_accuracy, - { "Vertical Accuracy", "gsm_bssmap_le.lcsQos.verticalAccuracy", + { "Vertical Accuracy", "gsm_bssmap_le.lcsQos.verticalAccuracy", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL} }, { &hf_gsm_bssmap_le_vertical_accuracy_indicator, - { "Vertical Accuracy Indicator", "gsm_bssmap_le.lcsQos.verticalAccuracyIndicator", + { "Vertical Accuracy Indicator", "gsm_bssmap_le.lcsQos.verticalAccuracyIndicator", FT_UINT8, BASE_HEX, VALS(bssmap_le_vertical_accuracy_indicator_vals), 0x0, NULL, HFILL} }, diff --git a/epan/dissectors/packet-ipvs-syncd.c b/epan/dissectors/packet-ipvs-syncd.c index 75743b57bf..647beba5ca 100644 --- a/epan/dissectors/packet-ipvs-syncd.c +++ b/epan/dissectors/packet-ipvs-syncd.c @@ -120,37 +120,37 @@ dissect_ipvs_syncd(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree) for (conn = 0; conn < cnt; conn++) { - proto_tree *ctree, *ti; + proto_tree *ctree, *ti; proto_tree *ftree, *fi; - guint16 flags; + guint16 flags; ti = proto_tree_add_text(tree, tvb, offset, 24, "Connection #%d", conn+1); ctree = proto_item_add_subtree(ti, ett_conn); proto_tree_add_item(ctree, hf_resv8, tvb, offset, 1, FALSE); offset += 1; - + proto_tree_add_item(ctree, hf_proto, tvb, offset, 1, FALSE); offset += 1; - + proto_tree_add_item(ctree, hf_cport, tvb, offset, 2, FALSE); offset += 2; - + proto_tree_add_item(ctree, hf_vport, tvb, offset, 2, FALSE); offset += 2; - + proto_tree_add_item(ctree, hf_dport, tvb, offset, 2, FALSE); offset += 2; - + proto_tree_add_item(ctree, hf_caddr, tvb, offset, 4, FALSE); offset += 4; - + proto_tree_add_item(ctree, hf_vaddr, tvb, offset, 4, FALSE); offset += 4; - + proto_tree_add_item(ctree, hf_daddr, tvb, offset, 4, FALSE); offset += 4; - + flags = tvb_get_ntohs(tvb, offset); fi = proto_tree_add_item(ctree, hf_flags, tvb, offset, 2, FALSE); ftree = proto_item_add_subtree(fi, ett_flags); @@ -173,7 +173,7 @@ dissect_ipvs_syncd(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree) } else { - proto_tree_add_text(ftree, tvb, offset+1, 1, "Connection Type: Unknown (%d)", + proto_tree_add_text(ftree, tvb, offset+1, 1, "Connection Type: Unknown (%d)", flags & IP_VS_CONN_F_FWD_MASK); } @@ -206,34 +206,34 @@ dissect_ipvs_syncd(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree) { proto_tree_add_text(ftree, tvb, offset, 1, "No Client Port Set"); } - + offset += 2; - + proto_tree_add_item(ctree, hf_state, tvb, offset, 2, FALSE); offset += 2; - + /* we have full connection info */ if ( flags & IP_VS_CONN_F_SEQ_MASK ) { proto_tree_add_item(ctree, hf_in_seq_init, tvb, offset, 4, FALSE); offset += 4; - + proto_tree_add_item(ctree, hf_in_seq_delta, tvb, offset, 4, FALSE); offset += 4; - + proto_tree_add_item(ctree, hf_in_seq_pdelta, tvb, offset, 4, FALSE); offset += 4; - + proto_tree_add_item(ctree, hf_out_seq_init, tvb, offset, 4, FALSE); offset += 4; - + proto_tree_add_item(ctree, hf_out_seq_delta, tvb, offset, 4, FALSE); offset += 4; - + proto_tree_add_item(ctree, hf_out_seq_pdelta, tvb, offset, 4, FALSE); offset += 4; } - + } } @@ -292,31 +292,31 @@ proto_register_ipvs_syncd(void) { &hf_state, { "State", "ipvs.state", FT_UINT16, BASE_HEX, VALS(state_strings), 0, NULL, HFILL }}, - + { &hf_in_seq_init, - { "Input Sequence (Initial)", "ipvs.in_seq.initial", FT_UINT32, + { "Input Sequence (Initial)", "ipvs.in_seq.initial", FT_UINT32, BASE_HEX, NULL, 0, NULL, HFILL }}, - + { &hf_in_seq_delta, - { "Input Sequence (Delta)", "ipvs.in_seq.delta", FT_UINT32, + { "Input Sequence (Delta)", "ipvs.in_seq.delta", FT_UINT32, BASE_HEX, NULL, 0, NULL, HFILL }}, - + { &hf_in_seq_pdelta, - { "Input Sequence (Previous Delta)", "ipvs.in_seq.pdelta", FT_UINT32, + { "Input Sequence (Previous Delta)", "ipvs.in_seq.pdelta", FT_UINT32, BASE_HEX, NULL, 0, NULL, HFILL }}, - + { &hf_out_seq_init, - { "Output Sequence (Initial)", "ipvs.out_seq.initial", FT_UINT32, + { "Output Sequence (Initial)", "ipvs.out_seq.initial", FT_UINT32, BASE_HEX, NULL, 0, NULL, HFILL }}, - + { &hf_out_seq_delta, - { "Output Sequence (Delta)", "ipvs.out_seq.delta", FT_UINT32, + { "Output Sequence (Delta)", "ipvs.out_seq.delta", FT_UINT32, BASE_HEX, NULL, 0, NULL, HFILL }}, - + { &hf_out_seq_pdelta, - { "Output Sequence (Previous Delta)", "ipvs.out_seq.pdelta", FT_UINT32, + { "Output Sequence (Previous Delta)", "ipvs.out_seq.pdelta", FT_UINT32, BASE_HEX, NULL, 0, NULL, HFILL }}, - + diff --git a/epan/dissectors/packet-jpeg.c b/epan/dissectors/packet-jpeg.c index 6d398b2354..4fa576617b 100644 --- a/epan/dissectors/packet-jpeg.c +++ b/epan/dissectors/packet-jpeg.c @@ -151,113 +151,113 @@ proto_register_jpeg(void) static hf_register_info hf[] = { - { &hf_rtp_jpeg_main_hdr, { + { &hf_rtp_jpeg_main_hdr, { "Main Header", "jpeg.main_hdr", FT_NONE, BASE_NONE, NULL, 0, - NULL, HFILL + NULL, HFILL }}, - { &hf_rtp_jpeg_main_hdr_ts, { + { &hf_rtp_jpeg_main_hdr_ts, { "Type Specific", "jpeg.main_hdr.ts", FT_UINT8, BASE_DEC, NULL, 0, - NULL, HFILL + NULL, HFILL }}, - { &hf_rtp_jpeg_main_hdr_offs, { + { &hf_rtp_jpeg_main_hdr_offs, { "Fragment Offset", "jpeg.main_hdr.offset", FT_UINT24, BASE_DEC, NULL, 0, - NULL, HFILL + NULL, HFILL }}, - { &hf_rtp_jpeg_main_hdr_type, { + { &hf_rtp_jpeg_main_hdr_type, { "Type", "jpeg.main_hdr.type", FT_UINT8, BASE_DEC, NULL, 0, - NULL, HFILL + NULL, HFILL }}, - { &hf_rtp_jpeg_main_hdr_q, { + { &hf_rtp_jpeg_main_hdr_q, { "Q", "jpeg.main_hdr.q", FT_UINT8, BASE_DEC, NULL, 0, - NULL, HFILL + NULL, HFILL }}, - { &hf_rtp_jpeg_main_hdr_width, { + { &hf_rtp_jpeg_main_hdr_width, { "Width", "jpeg.main_hdr.width", FT_UINT8, BASE_DEC, NULL, 0, - NULL, HFILL + NULL, HFILL }}, - { &hf_rtp_jpeg_main_hdr_height, { + { &hf_rtp_jpeg_main_hdr_height, { "Height", "jpeg.main_hdr.height", FT_UINT8, BASE_DEC, NULL, 0, - NULL, HFILL + NULL, HFILL }}, - { &hf_rtp_jpeg_restart_hdr, { + { &hf_rtp_jpeg_restart_hdr, { "Restart Marker Header", "jpeg.restart_hdr", FT_NONE, BASE_NONE, NULL, 0, - NULL, HFILL + NULL, HFILL }}, - { &hf_rtp_jpeg_restart_hdr_interval, { + { &hf_rtp_jpeg_restart_hdr_interval, { "Restart Interval", "jpeg.restart_hdr.interval", FT_UINT16, BASE_DEC, NULL, 0, - NULL, HFILL + NULL, HFILL }}, - { &hf_rtp_jpeg_restart_hdr_f, { + { &hf_rtp_jpeg_restart_hdr_f, { "F", "jpeg.restart_hdr.f", FT_UINT16, BASE_DEC, NULL, 0x8000, - NULL, HFILL + NULL, HFILL }}, - { &hf_rtp_jpeg_restart_hdr_l, { + { &hf_rtp_jpeg_restart_hdr_l, { "L", "jpeg.restart_hdr.l", FT_UINT16, BASE_DEC, NULL, 0x4000, - NULL, HFILL + NULL, HFILL }}, - { &hf_rtp_jpeg_restart_hdr_count, { + { &hf_rtp_jpeg_restart_hdr_count, { "Restart Count", "jpeg.restart_hdr.count", FT_UINT16, BASE_DEC, NULL, 0x3FFF, - NULL, HFILL + NULL, HFILL }}, - { &hf_rtp_jpeg_qtable_hdr, { + { &hf_rtp_jpeg_qtable_hdr, { "Quantization Table Header", "jpeg.qtable_hdr", FT_NONE, BASE_NONE, NULL, 0, - NULL, HFILL + NULL, HFILL }}, - { &hf_rtp_jpeg_qtable_hdr_mbz, { + { &hf_rtp_jpeg_qtable_hdr_mbz, { "MBZ", "jpeg.qtable_hdr.mbz", FT_UINT8, BASE_DEC, NULL, 0, - NULL, HFILL + NULL, HFILL }}, - { &hf_rtp_jpeg_qtable_hdr_prec, { + { &hf_rtp_jpeg_qtable_hdr_prec, { "Precision", "jpeg.qtable_hdr.precision", FT_UINT8, BASE_DEC, NULL, 0, - NULL, HFILL + NULL, HFILL }}, - { &hf_rtp_jpeg_qtable_hdr_length, { + { &hf_rtp_jpeg_qtable_hdr_length, { "Length", "jpeg.qtable_hdr.length", FT_UINT16, BASE_DEC, NULL, 0, - NULL, HFILL + NULL, HFILL }}, - { &hf_rtp_jpeg_qtable_hdr_data, { + { &hf_rtp_jpeg_qtable_hdr_data, { "Quantization Table Data", "jpeg.qtable_hdr.data", FT_BYTES, BASE_NONE, NULL, 0, - NULL, HFILL + NULL, HFILL }}, - { &hf_rtp_jpeg_payload, { + { &hf_rtp_jpeg_payload, { "Payload", "jpeg.payload", FT_BYTES, BASE_NONE, NULL, 0, - NULL, HFILL + NULL, HFILL }}, }; diff --git a/epan/dissectors/packet-linx.c b/epan/dissectors/packet-linx.c index 09a1e3cea5..aa0cd667b4 100644 --- a/epan/dissectors/packet-linx.c +++ b/epan/dissectors/packet-linx.c @@ -2,7 +2,7 @@ * Routines for LINX packet dissection * * Copyright 2006, Martin Peylo <martin.peylo@siemens.com> - * + * * $Id$ * * Wireshark - Network traffic analyzer @@ -24,10 +24,10 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/* The used document is: +/* The used document is: * ENEA Link Protocol Specification available at * http://linx.sourceforge.net - * + * * Fits currently to * Enea LINX for Linux * Version: 2.5.0, May 16, 2011 @@ -36,7 +36,7 @@ * Mattias Wallin, linx@enea.com, September 23, 2007 * * Added support for LINX TCP CM. - * Dejan Bucar, linx@enea.com, June 21, 2011 + * Dejan Bucar, linx@enea.com, June 21, 2011 * * Added support for LINX ETHCM Multicore header. * Dejan Bucar, linx@enea.com, June 21, 2011 @@ -306,7 +306,7 @@ dissect_linx(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) ti = proto_tree_add_item(tree, proto_linx, tvb, 0, -1, FALSE); linx_tree = proto_item_add_subtree(ti, ett_linx); - + dword = tvb_get_ntohl(tvb, offset); nexthdr = (dword >> 28) & 0xf; @@ -334,12 +334,12 @@ dissect_linx(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) /* read main header*/ dword = tvb_get_ntohl(tvb, offset); } - + version = (dword >> 25) & 0x7; nexthdr = (dword >> 28) & 0xf; pkgsize = dword & 0x3fff; linx_tvb = tvb_new_subset(tvb, 0, pkgsize, pkgsize); - tvb_set_reported_length(tvb, pkgsize); + tvb_set_reported_length(tvb, pkgsize); /* Supports version 2 and 3 so far */ if (version < 2 || version > 3) { @@ -366,12 +366,12 @@ dissect_linx(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) proto_tree_add_item(main_header_tree, hf_linx_main_bundle , linx_tvb, offset, 4, FALSE); proto_tree_add_item(main_header_tree, hf_linx_main_pkgsize , linx_tvb, offset, 4, FALSE); offset += 4; - + while (nexthdr != ETHCM_NONE) { dword = tvb_get_ntohl(linx_tvb, offset); thishdr = nexthdr; - nexthdr = (dword >>28) & 0xf; + nexthdr = (dword >>28) & 0xf; conntype = (dword >>24) & 0xf; /* Write non trivial header name to info column */ if ((thishdr != ETHCM_NONE) && (thishdr != ETHCM_MAIN)) { @@ -416,15 +416,15 @@ dissect_linx(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) proto_tree_add_item(conn_header_tree, hf_linx_conn_dstmac, linx_tvb, offset, 6, FALSE); proto_tree_add_item(conn_header_tree, hf_linx_conn_srcmac, linx_tvb, offset + 6, 6, FALSE); } - + offset += (2*size); /* Feature Negotiation String */ if(version > 2) { proto_tree_add_item(conn_header_tree, hf_linx_conn_feat_neg_str, linx_tvb, offset, -1, FALSE); - offset += tvb_strnlen(linx_tvb, offset, -1); + offset += tvb_strnlen(linx_tvb, offset, -1); } - break; - + break; + case ETHCM_NACK: /* Nack header */ /* @@ -464,9 +464,9 @@ dissect_linx(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Source | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ - + * User data / fragment header => Version 2 - + 0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ @@ -476,9 +476,9 @@ dissect_linx(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Dst | Src | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ - + - fragments (not first fragment) - + 0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ @@ -517,7 +517,7 @@ dissect_linx(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) /* (dstaddr == srcaddr == 0) -> RLNH Protocol Message */ dword = tvb_get_ntohl(linx_tvb, offset); - + /* Write to info column */ col_append_fstr(pinfo->cinfo, COL_INFO, "rlnh:%s ", val_to_str(dword, linx_short_rlnh_names, "unknown")); @@ -578,7 +578,7 @@ dissect_linx(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) offset += 4; proto_tree_add_item(rlnh_header_tree, hf_linx_rlnh_peer_linkaddr, linx_tvb, offset, -1, FALSE); offset += tvb_strnlen(linx_tvb, offset, -1); - break; + break; default: /* no known Message type... */ /* this could be done better */ @@ -642,7 +642,7 @@ dissect_linx(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) } } -} +} /* Protocol Initialisation */ @@ -764,7 +764,7 @@ proto_register_linx(void) { &hf_linx_nack_seqno, /* in ETHCM_NACK */ { "Sequence Number", "linx.nack_seqno", FT_UINT32, BASE_DEC, NULL, 0x00000fff, NULL, HFILL }, }, - + /* RLNH */ { &hf_linx_rlnh_msg_type32, /* in RLNH */ { "RLNH msg type", "linx.rlnh_msg_type", FT_UINT32, BASE_DEC, VALS(linx_long_rlnh_names), 0xffffffff, "RLNH message type", HFILL }, @@ -852,10 +852,10 @@ dissect_linx_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) /* Show name in protocol column */ col_set_str(pinfo->cinfo, COL_PROTOCOL, "LINX/TCP"); - + /* Clear out stuff in the info column */ col_clear(pinfo->cinfo, COL_INFO); - + dword = tvb_get_ntohl(tvb, 0); version = (dword >> 16) & 0xFF; type = (dword >> 24) & 0xFF; @@ -882,7 +882,7 @@ dissect_linx_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) item = proto_tree_add_text(linx_tcp_tree, linx_tcp_tvb, 0, 16, "TCP CM Header"); tcp_header_tree = proto_item_add_subtree(item, ett_linx_tcp); - + proto_tree_add_item(tcp_header_tree, hf_linx_tcp_type, linx_tcp_tvb, 0, 4, FALSE); proto_tree_add_item(tcp_header_tree, hf_linx_tcp_version, linx_tcp_tvb, 0, 4, FALSE); proto_tree_add_item(tcp_header_tree, hf_linx_tcp_oob, linx_tcp_tvb, 0, 4, FALSE); @@ -893,14 +893,14 @@ dissect_linx_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) offset += 16; if (type == 0x55) { /* UDATA */ - dword = tvb_get_ntohl(linx_tcp_tvb, 8); + dword = tvb_get_ntohl(linx_tcp_tvb, 8); if (dword == 0) { /* RLNH Message*/ dword = tvb_get_ntohl(linx_tcp_tvb, offset); /* Write to info column */ col_append_fstr(pinfo->cinfo, COL_INFO, "rlnh:%s ", val_to_str(dword, linx_short_rlnh_names, "unknown")); - + /* create new paragraph for RLNH */ item = proto_tree_add_text(linx_tcp_tree, linx_tcp_tvb, offset, 4, "RLNH"); rlnh_header_tree = proto_item_add_subtree(item, ett_linx_tcp); @@ -964,7 +964,7 @@ dissect_linx_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) /* No known Message type */ proto_tree_add_text(rlnh_header_tree, linx_tcp_tvb, offset, 0, "ERROR: Header \"%u\" not recognized", dword); break; - } + } } else { /* User payload */ payloadsize = size-offset; diff --git a/epan/dissectors/packet-ltp.c b/epan/dissectors/packet-ltp.c index 4be9fa85b1..1fa0449a8e 100644 --- a/epan/dissectors/packet-ltp.c +++ b/epan/dissectors/packet-ltp.c @@ -201,7 +201,7 @@ static const fragment_items ltp_frag_items = { "LTP fragments" }; -static int +static int dissect_data_segment(proto_tree *ltp_tree, tvbuff_t *tvb,packet_info *pinfo,int frame_offset,int ltp_type, guint64 session_num){ guint64 client_id; guint64 offset; @@ -297,7 +297,7 @@ dissect_data_segment(proto_tree *ltp_tree, tvbuff_t *tvb,packet_info *pinfo,int /* Create a subtree for data segment and add the other fields under it */ ltp_data_item = proto_tree_add_text(ltp_tree, tvb,frame_offset, segment_offset, "Data Segment"); ltp_data_tree = proto_item_add_subtree(ltp_data_item, ett_data_segm); - + proto_tree_add_uint64(ltp_data_tree,hf_ltp_data_clid, tvb, frame_offset,client_id_size,client_id); frame_offset += client_id_size; @@ -335,12 +335,12 @@ dissect_data_segment(proto_tree *ltp_tree, tvbuff_t *tvb,packet_info *pinfo,int { /* if the segment has not been fragmented, then no reassembly is needed */ if(!more_frags && offset == 0) - { + { new_tvb = tvb_new_subset(tvb,frame_offset,tvb_length(tvb)-frame_offset,-1); } else { - new_tvb = process_reassembled_data(tvb, frame_offset, pinfo, "Reassembled LTP Segment", + new_tvb = process_reassembled_data(tvb, frame_offset, pinfo, "Reassembled LTP Segment", frag_msg, <p_frag_items,NULL, ltp_data_tree); } @@ -376,14 +376,14 @@ dissect_data_segment(proto_tree *ltp_tree, tvbuff_t *tvb,packet_info *pinfo,int { col_append_str(pinfo->cinfo, COL_INFO, "[Unfinished LTP Segment] "); } - + } return segment_offset; } - -static int + +static int dissect_report_segment(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ltp_tree, int frame_offset) { guint64 rpt_sno; guint64 chkp_sno; @@ -392,7 +392,7 @@ dissect_report_segment(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ltp_tree, int rcpt_clm_cnt; guint64 offset; guint64 length; - + int rpt_sno_size; int chkp_sno_size; int upper_bound_size; @@ -406,14 +406,14 @@ dissect_report_segment(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ltp_tree, proto_item *ltp_rpt_item; proto_item *ltp_rpt_clm_item; - + proto_tree *ltp_rpt_tree; proto_tree *ltp_rpt_clm_tree; /* Create the subtree for report segment under the main LTP tree and all the report segment fields under it */ ltp_rpt_item = proto_tree_add_text(ltp_tree, tvb, frame_offset, -1, "Report Segment"); ltp_rpt_tree = proto_item_add_subtree(ltp_rpt_item, ett_rpt_segm); - + /* Extract the report segment info */ rpt_sno = evaluate_sdnv_64(tvb, frame_offset, &rpt_sno_size); proto_tree_add_uint64(ltp_rpt_tree, hf_ltp_rpt_sno, tvb, frame_offset + segment_offset, rpt_sno_size, rpt_sno); @@ -460,14 +460,14 @@ dissect_report_segment(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ltp_tree, return segment_offset; } - -static int + +static int dissect_report_ack_segment(proto_tree *ltp_tree, tvbuff_t *tvb,int frame_offset){ guint64 rpt_sno; int rpt_sno_size; int segment_offset = 0; - + proto_item *ltp_rpt_ack_item; proto_tree *ltp_rpt_ack_tree; @@ -482,19 +482,19 @@ dissect_report_ack_segment(proto_tree *ltp_tree, tvbuff_t *tvb,int frame_offset) /* Creating tree for the report ack segment */ ltp_rpt_ack_item = proto_tree_add_text(ltp_tree, tvb,frame_offset, segment_offset, "Report Ack Segment"); ltp_rpt_ack_tree = proto_item_add_subtree(ltp_rpt_ack_item, ett_rpt_ack_segm); - + proto_tree_add_uint64(ltp_rpt_ack_tree, hf_ltp_rpt_ack_sno, tvb, frame_offset,rpt_sno_size, rpt_sno); return segment_offset; } - -static int + +static int dissect_cancel_segment(proto_tree * ltp_tree, tvbuff_t *tvb,int frame_offset){ guint8 reason_code; proto_item *ltp_cancel_item; proto_tree *ltp_cancel_tree; - + /* The cancel segment has only one byte, which contains the reason code. */ reason_code = tvb_get_guint8(tvb,frame_offset); @@ -515,13 +515,13 @@ dissect_header_extn(proto_tree *ltp_tree, tvbuff_t *tvb,int frame_offset,int hdr int length_size[LTP_MAX_HDR_EXTN]; int value_size[LTP_MAX_HDR_EXTN]; - + int i; int extn_offset = 0; proto_item *ltp_hdr_extn_item; proto_tree *ltp_hdr_extn_tree; - + /* There can be more than one header extensions */ for(i = 0; i < hdr_extn_cnt; i++){ extn_type[i] = tvb_get_guint8(tvb,frame_offset); @@ -553,7 +553,7 @@ dissect_header_extn(proto_tree *ltp_tree, tvbuff_t *tvb,int frame_offset,int hdr proto_tree_add_uint64_format(ltp_hdr_extn_tree, hf_ltp_hdr_extn_val, tvb, frame_offset, value_size[i],value[i], "Value [%d]: %"G_GINT64_MODIFIER"d",i+1,value[i]); frame_offset += value_size[i]; } - return extn_offset; + return extn_offset; } static int @@ -564,7 +564,7 @@ dissect_trailer_extn(proto_tree *ltp_tree, tvbuff_t *tvb,int frame_offset,int tr int length_size[LTP_MAX_TRL_EXTN]; int value_size[LTP_MAX_TRL_EXTN]; - + int i; int extn_offset = 0; @@ -702,7 +702,7 @@ dissect_ltp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) col_set_str(pinfo->cinfo, COL_INFO, "Protocol Error"); return 0; } - + /* Check if there are any header extensions */ if(hdr_extn_cnt > 0){ hdr_extn_offset = dissect_header_extn(ltp_tree, tvb, frame_offset,hdr_extn_cnt); @@ -739,7 +739,7 @@ dissect_ltp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) col_set_str(pinfo->cinfo, COL_INFO, "Protocol Error"); return 0; } - } + } else if(ltp_type == 12 || ltp_type == 14){ segment_offset = dissect_cancel_segment(ltp_tree,tvb,frame_offset); if(segment_offset == 0){ @@ -775,7 +775,7 @@ void proto_register_ltp(void) { module_t *ltp_module; - + static hf_register_info hf[] = { {&hf_ltp_version, {"LTP Version","ltp.version", diff --git a/epan/dissectors/packet-mq-pcf.c b/epan/dissectors/packet-mq-pcf.c index 943fb9afbf..7fadb12fa0 100644 --- a/epan/dissectors/packet-mq-pcf.c +++ b/epan/dissectors/packet-mq-pcf.c @@ -27,8 +27,8 @@ /* MQ PCF in a nutshell * * The MQ Programmable Command Formats API allows remotely configuring a queue manager. -* -* MQ PCF documentation is called "WebSphere MQ Programmable Command Formats and Administration Interface" +* +* MQ PCF documentation is called "WebSphere MQ Programmable Command Formats and Administration Interface" */ #ifdef HAVE_CONFIG_H @@ -63,49 +63,49 @@ static gint ett_mqpcf_cfh = -1; #define MQ_ENC_INTEGER_REVERSED 0x00000002 #define MQ_CMD_NONE 0 -#define MQ_CMD_CHANGE_Q_MGR 1 -#define MQ_CMD_INQUIRE_Q_MGR 2 -#define MQ_CMD_CHANGE_PROCESS 3 -#define MQ_CMD_COPY_PROCESS 4 -#define MQ_CMD_CREATE_PROCESS 5 -#define MQ_CMD_DELETE_PROCESS 6 -#define MQ_CMD_INQUIRE_PROCESS 7 -#define MQ_CMD_CHANGE_Q 8 -#define MQ_CMD_CLEAR_Q 9 -#define MQ_CMD_COPY_Q 10 -#define MQ_CMD_CREATE_Q 11 -#define MQ_CMD_DELETE_Q 12 -#define MQ_CMD_INQUIRE_Q 13 -#define MQ_CMD_RESET_Q_STATS 17 -#define MQ_CMD_INQUIRE_Q_NAMES 18 -#define MQ_CMD_INQUIRE_PROCESS_NAMES 19 -#define MQ_CMD_INQUIRE_CHANNEL_NAMES 20 -#define MQ_CMD_CHANGE_CHANNEL 21 -#define MQ_CMD_COPY_CHANNEL 22 -#define MQ_CMD_CREATE_CHANNEL 23 -#define MQ_CMD_DELETE_CHANNEL 24 -#define MQ_CMD_INQUIRE_CHANNEL 25 -#define MQ_CMD_PING_CHANNEL 26 -#define MQ_CMD_RESET_CHANNEL 27 -#define MQ_CMD_START_CHANNEL 28 -#define MQ_CMD_STOP_CHANNEL 29 -#define MQ_CMD_START_CHANNEL_INIT 30 -#define MQ_CMD_START_CHANNEL_LISTENER 31 -#define MQ_CMD_CHANGE_NAMELIST 32 -#define MQ_CMD_COPY_NAMELIST 33 -#define MQ_CMD_CREATE_NAMELIST 34 -#define MQ_CMD_DELETE_NAMELIST 35 -#define MQ_CMD_INQUIRE_NAMELIST 36 -#define MQ_CMD_INQUIRE_NAMELIST_NAMES 37 -#define MQ_CMD_ESCAPE 38 -#define MQ_CMD_RESOLVE_CHANNEL 39 -#define MQ_CMD_PING_Q_MGR 40 -#define MQ_CMD_INQUIRE_Q_STATUS 41 -#define MQ_CMD_INQUIRE_CHANNEL_STATUS 42 -#define MQ_CMD_CONFIG_EVENT 43 -#define MQ_CMD_Q_MGR_EVENT 44 -#define MQ_CMD_PERFM_EVENT 45 -#define MQ_CMD_CHANNEL_EVENT 46 +#define MQ_CMD_CHANGE_Q_MGR 1 +#define MQ_CMD_INQUIRE_Q_MGR 2 +#define MQ_CMD_CHANGE_PROCESS 3 +#define MQ_CMD_COPY_PROCESS 4 +#define MQ_CMD_CREATE_PROCESS 5 +#define MQ_CMD_DELETE_PROCESS 6 +#define MQ_CMD_INQUIRE_PROCESS 7 +#define MQ_CMD_CHANGE_Q 8 +#define MQ_CMD_CLEAR_Q 9 +#define MQ_CMD_COPY_Q 10 +#define MQ_CMD_CREATE_Q 11 +#define MQ_CMD_DELETE_Q 12 +#define MQ_CMD_INQUIRE_Q 13 +#define MQ_CMD_RESET_Q_STATS 17 +#define MQ_CMD_INQUIRE_Q_NAMES 18 +#define MQ_CMD_INQUIRE_PROCESS_NAMES 19 +#define MQ_CMD_INQUIRE_CHANNEL_NAMES 20 +#define MQ_CMD_CHANGE_CHANNEL 21 +#define MQ_CMD_COPY_CHANNEL 22 +#define MQ_CMD_CREATE_CHANNEL 23 +#define MQ_CMD_DELETE_CHANNEL 24 +#define MQ_CMD_INQUIRE_CHANNEL 25 +#define MQ_CMD_PING_CHANNEL 26 +#define MQ_CMD_RESET_CHANNEL 27 +#define MQ_CMD_START_CHANNEL 28 +#define MQ_CMD_STOP_CHANNEL 29 +#define MQ_CMD_START_CHANNEL_INIT 30 +#define MQ_CMD_START_CHANNEL_LISTENER 31 +#define MQ_CMD_CHANGE_NAMELIST 32 +#define MQ_CMD_COPY_NAMELIST 33 +#define MQ_CMD_CREATE_NAMELIST 34 +#define MQ_CMD_DELETE_NAMELIST 35 +#define MQ_CMD_INQUIRE_NAMELIST 36 +#define MQ_CMD_INQUIRE_NAMELIST_NAMES 37 +#define MQ_CMD_ESCAPE 38 +#define MQ_CMD_RESOLVE_CHANNEL 39 +#define MQ_CMD_PING_Q_MGR 40 +#define MQ_CMD_INQUIRE_Q_STATUS 41 +#define MQ_CMD_INQUIRE_CHANNEL_STATUS 42 +#define MQ_CMD_CONFIG_EVENT 43 +#define MQ_CMD_Q_MGR_EVENT 44 +#define MQ_CMD_PERFM_EVENT 45 +#define MQ_CMD_CHANNEL_EVENT 46 #define MQ_CMD_DELETE_PUBLICATION 60 #define MQ_CMD_DEREGISTER_PUBLISHER 61 #define MQ_CMD_DEREGISTER_SUBSCRIBER 62 @@ -114,18 +114,18 @@ static gint ett_mqpcf_cfh = -1; #define MQ_CMD_REGISTER_SUBSCRIBER 65 #define MQ_CMD_REQUEST_UPDATE 66 #define MQ_CMD_BROKER_INTERNAL 67 -#define MQ_CMD_INQUIRE_CLUSTER_Q_MGR 70 -#define MQ_CMD_RESUME_Q_MGR_CLUSTER 71 -#define MQ_CMD_SUSPEND_Q_MGR_CLUSTER 72 -#define MQ_CMD_REFRESH_CLUSTER 73 -#define MQ_CMD_RESET_CLUSTER 74 -#define MQ_CMD_REFRESH_SECURITY 78 -#define MQ_CMD_CHANGE_AUTH_INFO 79 -#define MQ_CMD_COPY_AUTH_INFO 80 -#define MQ_CMD_CREATE_AUTH_INFO 81 -#define MQ_CMD_DELETE_AUTH_INFO 82 -#define MQ_CMD_INQUIRE_AUTH_INFO 83 -#define MQ_CMD_INQUIRE_AUTH_INFO_NAMES 84 +#define MQ_CMD_INQUIRE_CLUSTER_Q_MGR 70 +#define MQ_CMD_RESUME_Q_MGR_CLUSTER 71 +#define MQ_CMD_SUSPEND_Q_MGR_CLUSTER 72 +#define MQ_CMD_REFRESH_CLUSTER 73 +#define MQ_CMD_RESET_CLUSTER 74 +#define MQ_CMD_REFRESH_SECURITY 78 +#define MQ_CMD_CHANGE_AUTH_INFO 79 +#define MQ_CMD_COPY_AUTH_INFO 80 +#define MQ_CMD_CREATE_AUTH_INFO 81 +#define MQ_CMD_DELETE_AUTH_INFO 82 +#define MQ_CMD_INQUIRE_AUTH_INFO 83 +#define MQ_CMD_INQUIRE_AUTH_INFO_NAMES 84 #define MQ_TEXT_CFH "MQ Command Format Header" @@ -216,14 +216,14 @@ dissect_mqpcf(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) gboolean bLittleEndian; bLittleEndian = ((mqinfo->encoding & MQ_ENC_INTEGER_REVERSED) != 0) ? TRUE : FALSE; - col_set_str(pinfo->cinfo, COL_PROTOCOL, "MQ PCF"); - col_clear(pinfo->cinfo, COL_INFO); + col_set_str(pinfo->cinfo, COL_PROTOCOL, "MQ PCF"); + col_clear(pinfo->cinfo, COL_INFO); if (tvb_length(tvb) >= 36) { gint iSizeMQCFH = 36; guint32 iCommand = tvb_get_guint32_endian(tvb, offset + 12, bLittleEndian); - if (check_col(pinfo->cinfo, COL_INFO)) + if (check_col(pinfo->cinfo, COL_INFO)) { col_append_str(pinfo->cinfo, COL_INFO, val_to_str(iCommand, mqpcf_opcode_vals, "Unknown (0x%02x)")); } diff --git a/epan/dissectors/packet-mysql.c b/epan/dissectors/packet-mysql.c index 52553c8059..1197d762ae 100644 --- a/epan/dissectors/packet-mysql.c +++ b/epan/dissectors/packet-mysql.c @@ -759,7 +759,7 @@ mysql_dissect_greeting(tvbuff_t *tvb, packet_info *pinfo, int offset, col_append_fstr(pinfo->cinfo, COL_INFO, " proto=%d", protocol) ; } proto_tree_add_item(greeting_tree, hf_mysql_protocol, tvb, offset, 1, ENC_NA); - + offset += 1; /* version string */ @@ -790,7 +790,7 @@ mysql_dissect_greeting(tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree_add_item(greeting_tree, hf_mysql_server_language, tvb, offset, 1, ENC_NA); offset += 1; /* for charset */ - + offset = mysql_dissect_server_status(tvb, offset, greeting_tree); /* 13 bytes unused */ @@ -833,7 +833,7 @@ mysql_dissect_login(tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree_add_item(login_tree, hf_mysql_max_packet, tvb, offset, 4, ENC_LITTLE_ENDIAN); offset += 4; - + proto_tree_add_item(login_tree, hf_mysql_charset, tvb, offset, 1, ENC_NA); offset += 1; /* for charset */ @@ -999,7 +999,7 @@ mysql_dissect_request(tvbuff_t *tvb,packet_info *pinfo, int offset, strlen = my_tvb_strsize(tvb, offset); proto_tree_add_item(req_tree, hf_mysql_schema, tvb, offset, strlen, ENC_NA); offset += strlen; - + conn_data->state= RESPONSE_OK; break; @@ -1018,7 +1018,7 @@ mysql_dissect_request(tvbuff_t *tvb,packet_info *pinfo, int offset, proto_tree_add_item(rfsh_tree, hf_mysql_rfsh_threads, tvb, offset, 1, ENC_NA); proto_tree_add_item(rfsh_tree, hf_mysql_rfsh_slave, tvb, offset, 1, ENC_NA); proto_tree_add_item(rfsh_tree, hf_mysql_rfsh_master, tvb, offset, 1, ENC_NA); - + } offset += 1; conn_data->state= RESPONSE_OK; @@ -1093,14 +1093,14 @@ mysql_dissect_request(tvbuff_t *tvb,packet_info *pinfo, int offset, proto_tree_add_item(req_tree, hf_mysql_binlog_server_id, tvb, offset, 4, ENC_LITTLE_ENDIAN); offset += 4; - + /* binlog file name ? */ strlen = tvb_reported_length_remaining(tvb, offset); if (tree && strlen > 0) { proto_tree_add_item(req_tree, hf_mysql_binlog_file_name, tvb, offset, strlen, ENC_NA); } offset += strlen; - + conn_data->state = REQUEST; break; /* FIXME: implement replication packets */ @@ -1323,9 +1323,9 @@ mysql_dissect_caps_server(tvbuff_t *tvb, int offset, proto_tree *tree, guint16 * { proto_item *tf; proto_item *cap_tree; - + *caps= tvb_get_letohs(tvb, offset); - + if (tree) { tf = proto_tree_add_item(tree, hf_mysql_caps_server, tvb, offset, 2, ENC_LITTLE_ENDIAN); cap_tree= proto_item_add_subtree(tf, ett_caps); @@ -1356,9 +1356,9 @@ mysql_dissect_caps_client(tvbuff_t *tvb, int offset, proto_tree *tree, guint16 * { proto_item *tf; proto_item *cap_tree; - + *caps= tvb_get_letohs(tvb, offset); - + if (tree) { tf = proto_tree_add_item(tree, hf_mysql_caps_client, tvb, offset, 2, ENC_LITTLE_ENDIAN); cap_tree= proto_item_add_subtree(tf, ett_caps); @@ -1464,13 +1464,13 @@ mysql_dissect_field_packet(tvbuff_t *tvb, int offset, proto_tree *tree, mysql_co offset = mysql_field_add_lestring(tvb, offset, tree, hf_mysql_fld_name); offset = mysql_field_add_lestring(tvb, offset, tree, hf_mysql_fld_org_name); offset +=1; /* filler */ - + proto_tree_add_item(tree, hf_mysql_fld_charsetnr, tvb, offset, 2, ENC_LITTLE_ENDIAN); offset += 2; /* charset */ - + proto_tree_add_item(tree, hf_mysql_fld_length, tvb, offset, 4, ENC_LITTLE_ENDIAN); offset += 4; /* length */ - + proto_tree_add_item(tree, hf_mysql_fld_type, tvb, offset, 1, ENC_NA); offset += 1; /* type */ @@ -1592,7 +1592,7 @@ static int tvb_get_fle(tvbuff_t *tvb, int offset, guint64 *res, guint8 *is_null) { guint8 prefix; - + prefix = tvb_get_guint8(tvb, offset); if (is_null) @@ -1644,7 +1644,7 @@ void proto_register_mysql(void) { "Request Command", "mysql.request", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL }}, - + { &hf_mysql_command, { "Command", "mysql.command", FT_UINT8, BASE_DEC, VALS(mysql_command_vals), 0x0, @@ -1674,7 +1674,7 @@ void proto_register_mysql(void) { "Server Greeting", "mysql.server_greeting", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL }}, - + { &hf_mysql_protocol, { "Protocol", "mysql.protocol", FT_UINT8, BASE_DEC, NULL, 0x0, @@ -1694,7 +1694,7 @@ void proto_register_mysql(void) { "Client Capabilities", "mysql.caps.client", FT_UINT16, BASE_HEX, NULL, 0x0, "MySQL Capabilities", HFILL }}, - + { &hf_mysql_cap_long_password, { "Long Password","mysql.caps.lp", FT_BOOLEAN, 16, TFS(&tfs_set_notset), MYSQL_CAPS_LP, @@ -1794,7 +1794,7 @@ void proto_register_mysql(void) { "Login Request", "mysql.login_request", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL }}, - + { &hf_mysql_max_packet, { "MAX Packet", "mysql.max_packet", FT_UINT24, BASE_DEC, NULL, 0x0, @@ -1804,12 +1804,12 @@ void proto_register_mysql(void) { "Charset", "mysql.charset", FT_UINT8, BASE_DEC, VALS(mysql_collation_vals), 0x0, "MySQL Charset", HFILL }}, - + { &hf_mysql_table_name, { "Table Name", "mysql.table_name", FT_STRINGZ, BASE_NONE, NULL, 0x0, NULL, HFILL }}, - + { &hf_mysql_user, { "Username", "mysql.user", FT_STRINGZ, BASE_NONE, NULL, 0x0, @@ -1839,7 +1839,7 @@ void proto_register_mysql(void) { "Server Language", "mysql.server_language", FT_UINT8, BASE_DEC, VALS(mysql_collation_vals), 0x0, "MySQL Charset", HFILL }}, - + { &hf_mysql_server_status, { "Server Status", "mysql.server_status", FT_UINT16, BASE_HEX, NULL, 0x0, @@ -1989,7 +1989,7 @@ void proto_register_mysql(void) { "Shutdown Level", "mysql.shutdown", FT_UINT8, BASE_DEC, VALS(mysql_shutdown_vals), 0x0, NULL, HFILL }}, - + { &hf_mysql_option, { "Option", "mysql.option", FT_UINT16, BASE_DEC, VALS(mysql_option_vals), 0x0, @@ -2039,7 +2039,7 @@ void proto_register_mysql(void) { "Binlog file name", "mysql.binlog.file_name", FT_STRINGZ, BASE_NONE, NULL, 0x0, NULL, HFILL }}, - + { &hf_mysql_eof, { "EOF marker", "mysql.eof", FT_UINT8, BASE_DEC, NULL, 0x0, diff --git a/epan/dissectors/packet-nt-tpcp.c b/epan/dissectors/packet-nt-tpcp.c index f3b616e671..f68640a38c 100644 --- a/epan/dissectors/packet-nt-tpcp.c +++ b/epan/dissectors/packet-nt-tpcp.c @@ -7,23 +7,23 @@ * Wireshark - Network traffic analyzer * By Gerald Combs <gerald@wireshark.org> * Copyright 1998 Gerald Combs -* +* * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. -* +* * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. -* +* * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#ifdef HAVE_CONFIG_H +#ifdef HAVE_CONFIG_H # include "config.h" #endif @@ -38,7 +38,7 @@ #include <epan/packet.h> #include <epan/addr_resolv.h> /* this is for get_hostname and get_udp_port */ -#define UDP_PORT_TPCP 3121 +#define UDP_PORT_TPCP 3121 /* TPCP version1/2 PDU format */ typedef struct _tpcppdu_t { @@ -104,17 +104,17 @@ static gint ett_tpcp = -1; static gint ett_tpcp_flags = -1; -static void +static void dissect_tpcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { tpcpdu_t tpcph; proto_tree *tpcp_tree = NULL, *field_tree = NULL; proto_item *ti, *tf; guint8 length = TPCP_VER_1_LENGTH; - + col_set_str(pinfo->cinfo, COL_PROTOCOL, "TPCP"); col_clear(pinfo->cinfo, COL_INFO); - + /* need to find out which version!! */ tpcph.version = tvb_get_guint8(tvb, 0); /* as version 1 and 2 are so similar use the same structure, just don't use as much for version 1*/ @@ -127,12 +127,12 @@ dissect_tpcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) } else { memset (&tpcph, 0, sizeof (tpcph)); } - - + + tpcph.id = g_ntohs(tpcph.id); tpcph.flags = g_ntohs(tpcph.flags); tpcph.cport = g_ntohs(tpcph.cport); - + if (check_col(pinfo->cinfo, COL_INFO)) col_add_fstr(pinfo->cinfo, COL_INFO,"%s id %d CPort %s CIP %s SIP %s", val_to_str(tpcph.type, type_vals, "Unknown"), @@ -140,43 +140,43 @@ dissect_tpcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) get_udp_port(tpcph.cport), ip_to_str((guint8 *)&tpcph.caddr), ip_to_str((guint8 *)&tpcph.saddr)); - + if (tree) { ti = proto_tree_add_protocol_format(tree, proto_tpcp, tvb, 0, length, "Alteon WebSystems - Transparent Proxy Cache Protocol"); - + tpcp_tree = proto_item_add_subtree(ti, ett_tpcp); - + proto_tree_add_item(tpcp_tree, hf_tpcp_version, tvb, 0, 1, tpcph.version); - + proto_tree_add_uint_format(tpcp_tree, hf_tpcp_type, tvb, 1, 1, tpcph.type, - "Type: %s (%d)", - val_to_str(tpcph.type, type_vals, "Unknown"), tpcph.type); - + "Type: %s (%d)", + val_to_str(tpcph.type, type_vals, "Unknown"), tpcph.type); + /* flags next , i'll do that when I can work out how to do it :-( */ tf = proto_tree_add_text(tpcp_tree, tvb, 2, 2, "Flags: 0x%04x",tpcph.flags); - - field_tree = proto_item_add_subtree(tf, ett_tpcp_flags); + + field_tree = proto_item_add_subtree(tf, ett_tpcp_flags); proto_tree_add_boolean(field_tree, hf_tpcp_flags_tcp, tvb, 2, 2, tpcph.flags); proto_tree_add_boolean(field_tree, hf_tpcp_flags_redir, tvb, 2,2, tpcph.flags); proto_tree_add_boolean(field_tree, hf_tpcp_flags_xon, tvb, 2, 2, tpcph.flags); proto_tree_add_boolean(field_tree, hf_tpcp_flags_xoff, tvb, 2, 2, tpcph.flags); - + proto_tree_add_uint(tpcp_tree, hf_tpcp_id, tvb, 4, 2, tpcph.id); - + proto_tree_add_uint_format(tpcp_tree, hf_tpcp_cport, tvb, 6, 2, tpcph.cport, "Client Source port: %s", get_udp_port(tpcph.cport)); - - proto_tree_add_ipv4(tpcp_tree, hf_tpcp_caddr, tvb, 8, 4, tpcph.caddr); - - proto_tree_add_ipv4(tpcp_tree, hf_tpcp_saddr, tvb, 12, 4, tpcph.saddr); - + + proto_tree_add_ipv4(tpcp_tree, hf_tpcp_caddr, tvb, 8, 4, tpcph.caddr); + + proto_tree_add_ipv4(tpcp_tree, hf_tpcp_saddr, tvb, 12, 4, tpcph.saddr); + if (tpcph.version == TPCP_VER_2) { - proto_tree_add_ipv4(tpcp_tree, hf_tpcp_vaddr, tvb, 16, 4, tpcph.vaddr); - proto_tree_add_ipv4(tpcp_tree, hf_tpcp_rasaddr, tvb, 20, 4, tpcph.rasaddr); + proto_tree_add_ipv4(tpcp_tree, hf_tpcp_vaddr, tvb, 16, 4, tpcph.vaddr); + proto_tree_add_ipv4(tpcp_tree, hf_tpcp_rasaddr, tvb, 20, 4, tpcph.rasaddr); proto_tree_add_text(tpcp_tree, tvb, 24, 4, "Signature: %u", tpcph.signature); } - + } } @@ -187,59 +187,59 @@ proto_register_tpcp(void) { &hf_tpcp_version, { "Version", "tpcp.version", FT_UINT8, BASE_DEC, NULL, 0x0, "TPCP version", HFILL }}, - + { &hf_tpcp_type, { "Type", "tpcp.type", FT_UINT8, BASE_DEC,NULL, 0x0, "PDU type", HFILL }}, - + { &hf_tpcp_flags_tcp, { "UDP/TCP", "tpcp.flags.tcp", FT_BOOLEAN, 8, TFS(&tfs_set_notset), TF_TPCP_UDPTCP, "Protocol type", HFILL }}, - + { &hf_tpcp_flags_redir, { "No Redirect", "tpcp.flags.redir", FT_BOOLEAN, 8, TFS(&tfs_set_notset), TF_TPCP_DONTREDIRECT, "Don't redirect client", HFILL }}, - + { &hf_tpcp_flags_xon, { "XON", "tpcp.flags.xon", FT_BOOLEAN, 8, TFS(&tfs_set_notset), TF_TPCP_XON, NULL, HFILL }}, - + { &hf_tpcp_flags_xoff, { "XOFF", "tpcp.flags.xoff", FT_BOOLEAN, 8, TFS(&tfs_set_notset), TF_TPCP_XOFF, NULL, HFILL }}, - + { &hf_tpcp_id, { "Client indent", "tpcp.cid", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }}, - + { &hf_tpcp_cport, { "Client Source Port", "tpcp.cport", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }}, - + { &hf_tpcp_caddr, { "Client Source IP address", "tpcp.caddr", FT_IPv4, BASE_NONE, NULL, 0x0, NULL, HFILL }}, - + { &hf_tpcp_saddr, { "Server IP address", "tpcp.saddr", FT_IPv4, BASE_NONE, NULL, 0x0, NULL, HFILL }}, - + { &hf_tpcp_vaddr, { "Virtual Server IP address", "tpcp.vaddr", FT_IPv4, BASE_NONE, NULL, 0x0, NULL, HFILL }}, - + { &hf_tpcp_rasaddr, { "RAS server IP address", "tpcp.rasaddr", FT_IPv4, BASE_NONE, NULL, 0x0, NULL, HFILL }}, - + }; - - + + static gint *ett[] = { &ett_tpcp, &ett_tpcp_flags, }; - + proto_tpcp = proto_register_protocol("Alteon - Transparent Proxy Cache Protocol", "TPCP", "tpcp"); proto_register_field_array(proto_tpcp, hf, array_length(hf)); @@ -250,7 +250,7 @@ void proto_reg_handoff_tpcp(void) { dissector_handle_t tpcp_handle; - + tpcp_handle = create_dissector_handle(dissect_tpcp, proto_tpcp); dissector_add_uint("udp.port", UDP_PORT_TPCP, tpcp_handle); } diff --git a/epan/dissectors/packet-pktgen.c b/epan/dissectors/packet-pktgen.c index 3d34195624..f2caa4e372 100644 --- a/epan/dissectors/packet-pktgen.c +++ b/epan/dissectors/packet-pktgen.c @@ -1,6 +1,6 @@ /* packet-pktgen.c * Routines for "Linux pktgen" dissection - * Copyright 2006 _FF_ + * Copyright 2006 _FF_ * Francesco Fondelli <francesco dot fondelli, gmail dot com> * * $Id$ @@ -8,17 +8,17 @@ * Wireshark - Network traffic analyzer * By Gerald Combs <gerald@wireshark.org> * Copyright 1998 Gerald Combs - * + * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. @@ -73,30 +73,30 @@ static gboolean dissect_pktgen(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tr if(tvb_length(tvb) < 16) { /* Not a PKTGEN packet. */ return FALSE; } - + /* check for magic number */ if(tvb_memeql(tvb, 0, pktgen_magic, 4) == -1) { /* Not a PKTGEN packet. */ return FALSE; } - + /* Make entries in Protocol column and Info column on summary display */ - + col_set_str(pinfo->cinfo, COL_PROTOCOL, "PKTGEN"); - + if(check_col(pinfo->cinfo, COL_INFO)) { col_add_fstr(pinfo->cinfo, COL_INFO, "Seq: %u", tvb_get_ntohl(tvb, 4)); } - + if(tree) { - + /* create display subtree for the protocol */ - + ti = proto_tree_add_item(tree, proto_pktgen, tvb, 0, -1, FALSE); - + pktgen_tree = proto_item_add_subtree(ti, ett_pktgen); - + /* add items to the subtree */ - + proto_tree_add_item(pktgen_tree, hf_pktgen_magic, tvb, offset, 4, FALSE); offset+=4; @@ -112,9 +112,9 @@ static gboolean dissect_pktgen(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tr tmp = proto_tree_add_item(pktgen_tree, hf_pktgen_tvusec, tvb, offset, 4, FALSE); PROTO_ITEM_SET_GENERATED(tmp); offset+=4; - + proto_tree_add_time(pktgen_tree, hf_pktgen_timestamp, tvb, offset - 8, 8, &tstamp); - + #if 0 if(tvb_length_remaining(tvb, offset)) /* random data */ proto_tree_add_text(pktgen_tree, tvb, offset, -1, "Data (%u bytes)", @@ -132,64 +132,64 @@ static gboolean dissect_pktgen(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tr /* Register the protocol with Wireshark */ void proto_register_pktgen(void) -{ +{ /* Setup list of header fields */ - + static hf_register_info hf[] = { - + { &hf_pktgen_magic, - { - "Magic number", "pktgen.magic", - FT_UINT32, BASE_HEX, NULL, 0x0, + { + "Magic number", "pktgen.magic", + FT_UINT32, BASE_HEX, NULL, 0x0, "The pktgen magic number", HFILL } }, - + { &hf_pktgen_seqnum, - { - "Sequence number", "pktgen.seqnum", - FT_UINT32, BASE_DEC, NULL, 0x0, + { + "Sequence number", "pktgen.seqnum", + FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL } }, { &hf_pktgen_tvsec, - { - "Timestamp tvsec", "pktgen.tvsec", - FT_UINT32, BASE_DEC, NULL, 0x0, + { + "Timestamp tvsec", "pktgen.tvsec", + FT_UINT32, BASE_DEC, NULL, 0x0, "Timestamp tvsec part", HFILL } }, { &hf_pktgen_tvusec, - { - "Timestamp tvusec", "pktgen.tvusec", - FT_UINT32, BASE_DEC, NULL, 0x0, + { + "Timestamp tvusec", "pktgen.tvusec", + FT_UINT32, BASE_DEC, NULL, 0x0, "Timestamp tvusec part", HFILL } }, { &hf_pktgen_timestamp, - { - "Timestamp", "pktgen.timestamp", + { + "Timestamp", "pktgen.timestamp", FT_ABSOLUTE_TIME, ABSOLUTE_TIME_LOCAL, NULL, 0x0, NULL, HFILL } - } + } }; - + /* Setup protocol subtree array */ - + static gint *ett[] = { &ett_pktgen }; - + /* Register the protocol name and description */ - + proto_pktgen = proto_register_protocol("Linux Kernel Packet Generator", "PKTGEN", "pktgen"); - + /* Required function calls to register the header fields and subtrees used */ - + proto_register_field_array(proto_pktgen, hf, array_length(hf)); proto_register_subtree_array(ett, array_length(ett)); } diff --git a/epan/dissectors/packet-pppoe.c b/epan/dissectors/packet-pppoe.c index 4d8456264d..9ac71538ee 100644 --- a/epan/dissectors/packet-pppoe.c +++ b/epan/dissectors/packet-pppoe.c @@ -351,37 +351,37 @@ dissect_pppoe_subtags_dslf(tvbuff_t *tvb, packet_info *pinfo _U_, int offset, pr /* Show tag data */ switch (poe_tag) { - CASE_VSPEC_DSLF_TAG(PPPOE_TAG_VSPEC_DSLF_CIRCUIT_ID, <=, 63, + CASE_VSPEC_DSLF_TAG(PPPOE_TAG_VSPEC_DSLF_CIRCUIT_ID, <=, 63, hf_pppoed_tag_vspec_circuit_id) - CASE_VSPEC_DSLF_TAG(PPPOE_TAG_VSPEC_DSLF_REMOTE_ID, <=, 63, + CASE_VSPEC_DSLF_TAG(PPPOE_TAG_VSPEC_DSLF_REMOTE_ID, <=, 63, hf_pppoed_tag_vspec_remote_id) - CASE_VSPEC_DSLF_TAG(PPPOE_TAG_VSPEC_DSLF_ACT_DATA_RATE_UP, ==, 4, + CASE_VSPEC_DSLF_TAG(PPPOE_TAG_VSPEC_DSLF_ACT_DATA_RATE_UP, ==, 4, hf_pppoed_tag_vspec_act_data_rate_up) - CASE_VSPEC_DSLF_TAG(PPPOE_TAG_VSPEC_DSLF_ACT_DATA_RATE_DOWN, ==, 4, + CASE_VSPEC_DSLF_TAG(PPPOE_TAG_VSPEC_DSLF_ACT_DATA_RATE_DOWN, ==, 4, hf_pppoed_tag_vspec_act_data_rate_down) - CASE_VSPEC_DSLF_TAG(PPPOE_TAG_VSPEC_DSLF_MIN_DATA_RATE_UP, ==, 4, + CASE_VSPEC_DSLF_TAG(PPPOE_TAG_VSPEC_DSLF_MIN_DATA_RATE_UP, ==, 4, hf_pppoed_tag_vspec_min_data_rate_up) - CASE_VSPEC_DSLF_TAG(PPPOE_TAG_VSPEC_DSLF_MIN_DATA_RATE_DOWN, ==, 4, + CASE_VSPEC_DSLF_TAG(PPPOE_TAG_VSPEC_DSLF_MIN_DATA_RATE_DOWN, ==, 4, hf_pppoed_tag_vspec_min_data_rate_down) - CASE_VSPEC_DSLF_TAG(PPPOE_TAG_VSPEC_DSLF_ATTAINABLE_DATA_RATE_UP, ==, 4, + CASE_VSPEC_DSLF_TAG(PPPOE_TAG_VSPEC_DSLF_ATTAINABLE_DATA_RATE_UP, ==, 4, hf_pppoed_tag_vspec_attainable_data_rate_up) - CASE_VSPEC_DSLF_TAG(PPPOE_TAG_VSPEC_DSLF_ATTAINABLE_DATA_RATE_DOWN, ==, 4, + CASE_VSPEC_DSLF_TAG(PPPOE_TAG_VSPEC_DSLF_ATTAINABLE_DATA_RATE_DOWN, ==, 4, hf_pppoed_tag_vspec_attainable_data_rate_down) - CASE_VSPEC_DSLF_TAG(PPPOE_TAG_VSPEC_DSLF_MAX_DATA_RATE_UP, ==, 4, + CASE_VSPEC_DSLF_TAG(PPPOE_TAG_VSPEC_DSLF_MAX_DATA_RATE_UP, ==, 4, hf_pppoed_tag_vspec_max_data_rate_up) - CASE_VSPEC_DSLF_TAG(PPPOE_TAG_VSPEC_DSLF_MAX_DATA_RATE_DOWN, ==, 4, + CASE_VSPEC_DSLF_TAG(PPPOE_TAG_VSPEC_DSLF_MAX_DATA_RATE_DOWN, ==, 4, hf_pppoed_tag_vspec_max_data_rate_down) - CASE_VSPEC_DSLF_TAG(PPPOE_TAG_VSPEC_DSLF_MIN_DATA_RATE_UP_LP, ==, 4, + CASE_VSPEC_DSLF_TAG(PPPOE_TAG_VSPEC_DSLF_MIN_DATA_RATE_UP_LP, ==, 4, hf_pppoed_tag_vspec_min_data_rate_up_lp) - CASE_VSPEC_DSLF_TAG(PPPOE_TAG_VSPEC_DSLF_MIN_DATA_RATE_DOWN_LP, ==, 4, + CASE_VSPEC_DSLF_TAG(PPPOE_TAG_VSPEC_DSLF_MIN_DATA_RATE_DOWN_LP, ==, 4, hf_pppoed_tag_vspec_min_data_rate_down_lp) - CASE_VSPEC_DSLF_TAG(PPPOE_TAG_VSPEC_DSLF_MAX_INT_DELAY_UP, ==, 4, + CASE_VSPEC_DSLF_TAG(PPPOE_TAG_VSPEC_DSLF_MAX_INT_DELAY_UP, ==, 4, hf_pppoed_tag_vspec_max_int_delay_up) - CASE_VSPEC_DSLF_TAG(PPPOE_TAG_VSPEC_DSLF_ACT_INT_DELAY_UP, ==, 4, + CASE_VSPEC_DSLF_TAG(PPPOE_TAG_VSPEC_DSLF_ACT_INT_DELAY_UP, ==, 4, hf_pppoed_tag_vspec_act_int_delay_up) - CASE_VSPEC_DSLF_TAG(PPPOE_TAG_VSPEC_DSLF_MAX_INT_DELAY_DOWN, ==, 4, + CASE_VSPEC_DSLF_TAG(PPPOE_TAG_VSPEC_DSLF_MAX_INT_DELAY_DOWN, ==, 4, hf_pppoed_tag_vspec_max_int_delay_down) - CASE_VSPEC_DSLF_TAG(PPPOE_TAG_VSPEC_DSLF_ACT_INT_DELAY_DOWN, ==, 4, + CASE_VSPEC_DSLF_TAG(PPPOE_TAG_VSPEC_DSLF_ACT_INT_DELAY_DOWN, ==, 4, hf_pppoed_tag_vspec_act_int_delay_down) case PPPOE_TAG_VSPEC_DSLF_ACCESS_LOOP_ENCAPSULATION: ti = proto_tree_add_item(pppoe_tree, hf_pppoed_tag_vspec_access_loop_encapsulation, tvb, @@ -398,7 +398,7 @@ dissect_pppoe_subtags_dslf(tvbuff_t *tvb, packet_info *pinfo _U_, int offset, pr tvb, tagstart+3, 1, FALSE); proto_tree_add_item(encaps_tree, hf_pppoed_tag_vspec_access_loop_encap_encap_2, tvb, tagstart+4, 1, FALSE); - + break; default: if (poe_tag_length > 0 ) @@ -455,7 +455,7 @@ dissect_pppoe_tags(tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree *tr if (global_pppoe_show_tags_and_lengths) { proto_tree_add_item(pppoe_tree, hf_pppoed_tag, tvb, tagstart, 2, FALSE); - pppoe_tree_tag_length_item = + pppoe_tree_tag_length_item = proto_tree_add_item(pppoe_tree, hf_pppoed_tag_length, tvb, tagstart+2, 2, FALSE); } @@ -504,7 +504,7 @@ dissect_pppoe_tags(tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree *tr default: proto_tree_add_item(pppoe_tree, hf_pppoed_tag_vendor_unspecified, tvb, tagstart+4+4, poe_tag_length-4, FALSE); - + } } break; @@ -597,7 +597,7 @@ dissect_pppoe_tags(tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree *tr proto_registrar_get_name(hf_pppoed_tag_seq_num), poe_tag_length); } - expert_add_info_format(pinfo, item, PI_MALFORMED, PI_WARN, + expert_add_info_format(pinfo, item, PI_MALFORMED, PI_WARN, "Sequence Number tag: Wrong length: %u (expected 2)", poe_tag_length); } @@ -616,7 +616,7 @@ dissect_pppoe_tags(tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree *tr proto_registrar_get_name(hf_pppoed_tag_cred_scale), poe_tag_length); } - expert_add_info_format(pinfo, item, PI_MALFORMED, PI_WARN, + expert_add_info_format(pinfo, item, PI_MALFORMED, PI_WARN, "Credit Scale Factor tag: Wrong length: %u (expected 2)", poe_tag_length); } diff --git a/epan/dissectors/packet-pw-fr.c b/epan/dissectors/packet-pw-fr.c index c256f2a8e2..1105fb3ace 100644 --- a/epan/dissectors/packet-pw-fr.c +++ b/epan/dissectors/packet-pw-fr.c @@ -81,14 +81,14 @@ dissect_pw_fr( tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree ) ,PQ_CW_BAD_LEN_MUST_BE_NONZERO = 0x010 ,PQ_PAYLOAD_SIZE_ZERO = 0x020 } packet_quality; - + packet_size = tvb_reported_length_remaining(tvb, 0); if (packet_size < encaps_size) { if (tree) { proto_item *item; - item = proto_tree_add_item(tree, proto_encaps, tvb, 0, -1, FALSE); + item = proto_tree_add_item(tree, proto_encaps, tvb, 0, -1, FALSE); expert_add_info_format(pinfo, item, PI_MALFORMED, PI_ERROR, "PW packet (%d) is smaller than PW encapsulation header (%d)" ,(int)packet_size,(int)encaps_size); @@ -103,7 +103,7 @@ dissect_pw_fr( tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree ) return; } - /* check how "good" is this packet */ + /* check how "good" is this packet */ /* also decide payload length from packet size and CW */ packet_quality = 0; if (0 != (tvb_get_guint8(tvb, 0) & 0xf0 /*bits03*/)) @@ -115,28 +115,28 @@ dissect_pw_fr( tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree ) * [ If the frame's length (defined as the * length of the layer 2 payload plus the length of the control word) * is less than 64 octets, the length field MUST be set to the PW - * payload length. Otherwise, the length field MUST be set to zero. ] - * - * Note difference from RFC4385 which states that: - * [..the length field MUST be set to the length of the PW payload + * payload length. Otherwise, the length field MUST be set to zero. ] + * + * Note difference from RFC4385 which states that: + * [..the length field MUST be set to the length of the PW payload * *plus* the length of the *PWMCW*. ] */ int cw_len; gint payload_size_packet; /*derived from packet size*/ - cw_len = tvb_get_guint8(tvb, 1) & 0x3f; + cw_len = tvb_get_guint8(tvb, 1) & 0x3f; payload_size_packet = packet_size - encaps_size; - - /* + + /* * Initial assumptions. */ - payload_size = payload_size_packet; - payload_padding = 0; - + payload_size = payload_size_packet; + payload_padding = 0; + if (payload_size_packet < 64) { gint payload_size_cw; /*derived from cw*/ - payload_size_cw = cw_len; /*RFC4619-specific*/ + payload_size_cw = cw_len; /*RFC4619-specific*/ if (payload_size_cw == 0) { packet_quality |= PQ_CW_BAD + PQ_CW_BAD_LEN_MUST_BE_NONZERO; @@ -152,7 +152,7 @@ dissect_pw_fr( tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree ) } } else /* payload_size_packet >= 64 */ - { + { if (cw_len != 0) { packet_quality |= PQ_CW_BAD + PQ_CW_BAD_LEN_MUST_BE_ZERO; @@ -160,20 +160,20 @@ dissect_pw_fr( tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree ) } } if (payload_size == 0) - { + { packet_quality |= PQ_PAYLOAD_SIZE_ZERO; } - col_set_str(pinfo->cinfo, COL_PROTOCOL, "FR PW"); + col_set_str(pinfo->cinfo, COL_PROTOCOL, "FR PW"); if (check_col(pinfo->cinfo, COL_INFO)) { col_clear(pinfo->cinfo, COL_INFO); - if (packet_quality & PQ_CW_BAD) + if (packet_quality & PQ_CW_BAD) { col_append_str(pinfo->cinfo, COL_INFO, "CW:Malformed, "); } col_append_fstr(pinfo->cinfo, COL_INFO, "%d payload octets", (int)payload_size); - + if (payload_padding != 0) { col_append_fstr(pinfo->cinfo, COL_INFO, ", %d padding", (int)payload_padding); @@ -185,31 +185,31 @@ dissect_pw_fr( tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree ) proto_tree* subtree; proto_item* item_headline; proto_item* item; - - item_headline = proto_tree_add_item(tree, proto_encaps, tvb, 0, 4, FALSE); + + item_headline = proto_tree_add_item(tree, proto_encaps, tvb, 0, 4, FALSE); proto_item_append_text(item_headline, ": 0x%.8" G_GINT32_MODIFIER "x", tvb_get_ntohl(tvb, 0)); subtree = proto_item_add_subtree(item_headline, ett_encaps); - + if (packet_quality & PQ_CW_BAD_BITS03) /*display only if value is wrong*/ { item = proto_tree_add_item(subtree, hf_cw_bits03, tvb, 0, 1, FALSE); expert_add_info_format(pinfo, item, PI_MALFORMED, PI_ERROR, "Bits 0..3 of Control Word must be 0"); } - + (void)proto_tree_add_item( subtree, hf_cw_fecn, tvb, 0, 1, FALSE ); (void)proto_tree_add_item( subtree, hf_cw_becn, tvb, 0, 1, FALSE ); (void)proto_tree_add_item( subtree, hf_cw_de, tvb, 0, 1, FALSE ); (void)proto_tree_add_item( subtree, hf_cw_cr, tvb, 0, 1, FALSE ); (void)proto_tree_add_item( subtree, hf_cw_frg, tvb, 1, 1, FALSE ); - + item = proto_tree_add_item( subtree, hf_cw_len, tvb, 1, 1, FALSE ); if (packet_quality & PQ_CW_BAD_LEN_GT_PACKET) { expert_add_info_format(pinfo, item, PI_MALFORMED, PI_ERROR, - "Bad Length: greater than FR payload size (%d)", + "Bad Length: greater than FR payload size (%d)", (int)payload_size); - } + } if (packet_quality & PQ_CW_BAD_LEN_MUST_BE_NONZERO) { expert_add_info_format(pinfo, item, PI_MALFORMED, PI_ERROR, @@ -222,15 +222,15 @@ dissect_pw_fr( tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree ) "Bad Length: must be 0 if FR PW packet size (%d) is >= 64", (int)(payload_size+encaps_size)); } - + proto_tree_add_item( subtree, hf_cw_seq, tvb, 2, 2, FALSE ); if (payload_padding > 0) { - proto_tree_add_text(subtree, tvb, - encaps_size+payload_size, payload_padding, + proto_tree_add_text(subtree, tvb, + encaps_size+payload_size, payload_padding, "[Padding: %d octets]",(int)payload_padding); - } + } if (packet_quality & PQ_PAYLOAD_SIZE_ZERO) { @@ -244,7 +244,7 @@ dissect_pw_fr( tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree ) tvbuff_t *tvb_payload; tvb_payload = tvb_new_subset(tvb, encaps_size, payload_size, payload_size); call_dissector( fr_stripped_address_handle, tvb_payload, pinfo, tree ); - } + } return; } diff --git a/epan/dissectors/packet-rdp.c b/epan/dissectors/packet-rdp.c index 72766d611b..040b930576 100644 --- a/epan/dissectors/packet-rdp.c +++ b/epan/dissectors/packet-rdp.c @@ -239,11 +239,11 @@ static int hf_rdp_Key1 = -1; static int hf_rdp_Key2 = -1; /* FontList */ -#if 0 +#if 0 static int hf_rdp_numberFonts = -1; static int hf_rdp_totalNumFonts = -1; static int hf_rdp_listFlags = -1; -#endif +#endif static int hf_rdp_entrySize = -1; /* Confirm Active PDU */ @@ -518,9 +518,9 @@ static rdp_conv_info_t *rdp_conv_info_items; typedef struct rdp_field_info_t { int field; - guint32 fixedLength; + guint32 fixedLength; guint32 *variableLength; - int offsetOrTree; + int offsetOrTree; guint32 flags; struct rdp_field_info_t *subfields; } rdp_field_info_t; @@ -534,11 +534,11 @@ typedef struct rdp_field_info_t { static const value_string rdp_headerType_vals[] = { { CS_CORE, "clientCoreData" }, { CS_SECURITY, "clientSecurityData" }, - { CS_NET, "clientNetworkData" }, - { CS_CLUSTER, "clientClusterData" }, + { CS_NET, "clientNetworkData" }, + { CS_CLUSTER, "clientClusterData" }, { SC_CORE, "serverCoreData" }, { SC_SECURITY, "serverSecurityData" }, - { SC_NET, "serverNetworkData" }, + { SC_NET, "serverNetworkData" }, { 0, NULL } }; @@ -645,7 +645,7 @@ static const value_string rdp_wErrorCode_vals[] = { static const value_string rdp_wStateTransition_vals[] = { { ST_TOTAL_ABORT, "Total Abort" }, { ST_NO_TRANSITION, "No Transition" }, - { ST_RESET_PHASE_TO_START, "Reset Phase to Start" }, + { ST_RESET_PHASE_TO_START, "Reset Phase to Start" }, { ST_RESEND_LAST_MESSAGE, "Resend Last Message" }, { 0, NULL}, }; @@ -655,7 +655,7 @@ static const value_string rdp_wBlobType_vals[] = { { BB_RANDOM_BLOB, "Random" }, { BB_CERTIFICATE_BLOB, "Certificate" }, { BB_ERROR_BLOB, "Error" }, - { BB_ENCRYPTED_DATA_BLOB, "Encrypted Data" }, + { BB_ENCRYPTED_DATA_BLOB, "Encrypted Data" }, { BB_KEY_EXCHG_ALG_BLOB, "Key Exchange Algorithm" }, { BB_SCOPE_BLOB, "Scope" }, { BB_CLIENT_USER_NAME_BLOB, "Client User Name" }, @@ -792,7 +792,7 @@ static const value_string rdp_wMonth_vals[] = { }; -static int dissect_rdp_fields(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, rdp_field_info_t *fields) +static int dissect_rdp_fields(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, rdp_field_info_t *fields) { rdp_field_info_t *c; int base_offset = offset; @@ -813,12 +813,12 @@ static int dissect_rdp_fields(tvbuff_t *tvb _U_, int offset _U_, packet_info *pi len = c->fixedLength; if((c->variableLength) && ( c->fixedLength <= 4)) { - - if(c->fixedLength == 1) + + if(c->fixedLength == 1) *(c->variableLength) = (guint16)tvb_get_guint8(tvb, offset); - else if (c->fixedLength == 2) + else if (c->fixedLength == 2) *(c->variableLength) = tvb_get_letohs(tvb, offset); - else if (c->fixedLength == 4) + else if (c->fixedLength == 4) *(c->variableLength) = tvb_get_letohl(tvb, offset); *(c->variableLength) += c->offsetOrTree; @@ -826,8 +826,8 @@ static int dissect_rdp_fields(tvbuff_t *tvb _U_, int offset _U_, packet_info *pi } if(len) { - if(c->field != -1) - pi = proto_tree_add_item(tree, c->field, tvb, offset, len, TRUE); + if(c->field != -1) + pi = proto_tree_add_item(tree, c->field, tvb, offset, len, TRUE); else printf("Error!!!!!\n"); @@ -842,7 +842,7 @@ static int dissect_rdp_fields(tvbuff_t *tvb _U_, int offset _U_, packet_info *pi else printf("Tree Error!!\n"); - if(c->subfields) + if(c->subfields) dissect_rdp_fields(tvb, offset, pinfo, next_tree, c->subfields); } @@ -854,7 +854,7 @@ static int dissect_rdp_fields(tvbuff_t *tvb _U_, int offset _U_, packet_info *pi return offset; } -static int dissect_rdp_nyi(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, const char *info) +static int dissect_rdp_nyi(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, const char *info) { rdp_field_info_t nyi_fields[] = { {hf_rdp_notYetImplemented, 2, NULL, 0, 0, NULL }, @@ -870,7 +870,7 @@ static int dissect_rdp_nyi(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo return offset; } -static int dissect_rdp_encrypted(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, const char *info) +static int dissect_rdp_encrypted(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, const char *info) { rdp_field_info_t enc_fields[] = { {hf_rdp_encrypted, 2, NULL, 0, 0, NULL }, @@ -889,7 +889,7 @@ static int dissect_rdp_encrypted(tvbuff_t *tvb _U_, int offset _U_, packet_info } -static int dissect_rdp_clientNetworkData(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint16 length, rdp_conv_info_t *rdp_info) +static int dissect_rdp_clientNetworkData(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint16 length, rdp_conv_info_t *rdp_info) { proto_tree *next_tree = NULL; proto_item *pi = NULL; @@ -926,14 +926,14 @@ static int dissect_rdp_clientNetworkData(tvbuff_t *tvb _U_, int offset _U_, pack FI_TERMINATOR }; - pi = proto_tree_add_item(tree, hf_rdp_clientNetworkData, tvb, offset, length, FALSE); + pi = proto_tree_add_item(tree, hf_rdp_clientNetworkData, tvb, offset, length, FALSE); next_tree = proto_item_add_subtree(pi, ett_rdp_clientNetworkData); offset = dissect_rdp_fields(tvb, offset, pinfo, next_tree, net_fields); if(channelCount > 0) { - pi = proto_tree_add_item(next_tree, hf_rdp_channelDefArray, tvb, offset, channelCount * 12, FALSE); + pi = proto_tree_add_item(next_tree, hf_rdp_channelDefArray, tvb, offset, channelCount * 12, FALSE); next_tree = proto_item_add_subtree(pi, ett_rdp_channelDefArray); if(rdp_info) @@ -948,14 +948,14 @@ static int dissect_rdp_clientNetworkData(tvbuff_t *tvb _U_, int offset _U_, pack } rdp_info->channels[i].strptr = NULL; - rdp_info->channels[i].value = -1; + rdp_info->channels[i].value = -1; } return offset; } -static int +static int dissect_rdp_basicSecurityHeader(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint32 *flags_ptr) { guint32 flags = 0; @@ -979,16 +979,16 @@ dissect_rdp_basicSecurityHeader(tvbuff_t *tvb, int offset, packet_info *pinfo, p offset = dissect_rdp_fields(tvb, offset, pinfo, tree, flags_fields); - if(flags_ptr) + if(flags_ptr) *flags_ptr = flags; - + return offset; } -static int +static int dissect_rdp_securityHeader(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, rdp_conv_info_t *rdp_info, gboolean alwaysBasic, guint32 *flags_ptr) { - + rdp_field_info_t fips_fields[] = { {hf_rdp_fipsLength, 2, NULL, 0, 0, NULL }, {hf_rdp_fipsVersion, 1, NULL, 0, 0, NULL }, @@ -1001,18 +1001,18 @@ dissect_rdp_securityHeader(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo FI_TERMINATOR }; rdp_field_info_t *fields = NULL; - + if(rdp_info) { if(alwaysBasic || (rdp_info->encryptionLevel != ENCRYPTION_LEVEL_NONE)) offset = dissect_rdp_basicSecurityHeader(tvb, offset, pinfo, tree, flags_ptr); - if(rdp_info->encryptionMethod & - (ENCRYPTION_METHOD_40BIT | - ENCRYPTION_METHOD_128BIT | + if(rdp_info->encryptionMethod & + (ENCRYPTION_METHOD_40BIT | + ENCRYPTION_METHOD_128BIT | ENCRYPTION_METHOD_56BIT)) { fields = enc_fields; - } else if(rdp_info->encryptionMethod == ENCRYPTION_METHOD_FIPS) { + } else if(rdp_info->encryptionMethod == ENCRYPTION_METHOD_FIPS) { fields = fips_fields; } @@ -1020,10 +1020,10 @@ dissect_rdp_securityHeader(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo offset = dissect_rdp_fields(tvb, offset, pinfo, tree, fields); } return offset; -} +} static int dissect_rdp_channelPDU(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_) { - + guint32 length = 0; rdp_field_info_t flag_fields[] = { @@ -1050,12 +1050,12 @@ dissect_rdp_channelPDU(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_ FI_FIXEDLEN(hf_rdp_virtualChannelData, 0), FI_TERMINATOR }; - + /* length is the uncompressed length, and the PDU may be compressed */ channelPDU_fields[1].fixedLength = tvb_length_remaining(tvb, offset) - 8; offset = dissect_rdp_fields(tvb, offset, pinfo, tree, channelPDU_fields); - + return offset; } @@ -1191,8 +1191,8 @@ dissect_rdp_shareDataHeader(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinf offset = dissect_rdp_fields(tvb, offset, pinfo, tree, fields); } - if(pduType2 == PDUTYPE2_CONTROL) - col_append_sep_str(pinfo->cinfo, COL_INFO, ", ", val_to_str(action, rdp_action_vals, "Unknown")); + if(pduType2 == PDUTYPE2_CONTROL) + col_append_sep_str(pinfo->cinfo, COL_INFO, ", ", val_to_str(action, rdp_action_vals, "Unknown")); return offset; } @@ -1215,7 +1215,7 @@ dissect_rdp_capabilitySets(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo FI_SUBTREE(hf_rdp_capabilitySet, 0 , ett_rdp_capabilitySet, cs_fields), FI_TERMINATOR }; - + length = tvb_length_remaining(tvb, offset); for(i = 0; (i < numberCapabilities) && (offset - base_offset < length); i++) { @@ -1390,13 +1390,13 @@ dissect_rdp_SendData(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree }; rdp_field_info_t error_fields[] = { {hf_rdp_wErrorCode, 4, NULL, 0, 0, NULL }, - {hf_rdp_wStateTransition, 4, NULL, 0, 0, NULL }, + {hf_rdp_wStateTransition, 4, NULL, 0, 0, NULL }, {hf_rdp_wBlobType, 2, NULL, 0, 0, NULL }, {hf_rdp_wBlobLen, 2, &wBlobLen, 0, 0, NULL }, {hf_rdp_blobData, 0, &wBlobLen, 0, 0, NULL }, FI_TERMINATOR }; - + rdp_field_info_t pdu_fields[] = { {hf_rdp_pduTypeType, 2, &pduType, 0, RDP_FI_NOINCOFFSET, NULL }, {hf_rdp_pduTypeVersionLow, 2, NULL, 0, RDP_FI_NOINCOFFSET, NULL }, @@ -1405,7 +1405,7 @@ dissect_rdp_SendData(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree }; rdp_field_info_t ctrl_fields[] = { {hf_rdp_totalLength, 2, NULL, 0, 0, NULL }, - {hf_rdp_pduType, 2, NULL, ett_rdp_pduType, RDP_FI_SUBTREE, + {hf_rdp_pduType, 2, NULL, ett_rdp_pduType, RDP_FI_SUBTREE, pdu_fields }, {hf_rdp_pduSource, 2, NULL, 0, 0, NULL }, FI_TERMINATOR @@ -1430,8 +1430,8 @@ dissect_rdp_SendData(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree conversation = find_or_create_conversation(pinfo); rdp_info = conversation_get_proto_data(conversation, proto_rdp); - if(rdp_info && - ((rdp_info->licenseAgreed == 0) || + if(rdp_info && + ((rdp_info->licenseAgreed == 0) || (pinfo->fd->num <= rdp_info->licenseAgreed))) { /* licensing stage hasn't been completed */ @@ -1444,12 +1444,12 @@ dissect_rdp_SendData(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree col_append_sep_str(pinfo->cinfo, COL_INFO, " ", "SecurityExchange"); - offset = dissect_rdp_fields(tvb, offset, pinfo, next_tree, se_fields); - + offset = dissect_rdp_fields(tvb, offset, pinfo, next_tree, se_fields); + break; - + case SEC_INFO_PKT: - pi = proto_tree_add_item(tree, hf_rdp_clientInfoPDU, tvb, offset, length, FALSE); + pi = proto_tree_add_item(tree, hf_rdp_clientInfoPDU, tvb, offset, length, FALSE); next_tree = proto_item_add_subtree(pi, ett_rdp_clientInfoPDU); col_append_sep_str(pinfo->cinfo, COL_INFO, " ", "ClientInfo"); @@ -1457,14 +1457,14 @@ dissect_rdp_SendData(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree if(!(flags & SEC_ENCRYPT)) { - offset = dissect_rdp_fields(tvb, offset, pinfo, next_tree, ue_fields); + offset = dissect_rdp_fields(tvb, offset, pinfo, next_tree, ue_fields); } else { offset = dissect_rdp_encrypted(tvb, offset, pinfo, next_tree, NULL); } break; case SEC_LICENSE_PKT: - pi = proto_tree_add_item(tree, hf_rdp_validClientLicenseData, tvb, offset, length, FALSE); + pi = proto_tree_add_item(tree, hf_rdp_validClientLicenseData, tvb, offset, length, FALSE); next_tree = proto_item_add_subtree(pi, ett_rdp_validClientLicenseData); offset = dissect_rdp_securityHeader(tvb, offset, pinfo, next_tree, rdp_info, TRUE, NULL); @@ -1513,14 +1513,14 @@ dissect_rdp_SendData(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree offset = dissect_rdp_securityHeader(tvb, offset, pinfo, tree, rdp_info, FALSE, &flags); if(!(flags & SEC_ENCRYPT)) { - pi = proto_tree_add_item(tree, hf_rdp_shareControlHeader, tvb, offset, length, FALSE); + pi = proto_tree_add_item(tree, hf_rdp_shareControlHeader, tvb, offset, length, FALSE); next_tree = proto_item_add_subtree(pi, ett_rdp_shareControlHeader); offset = dissect_rdp_fields(tvb, offset, pinfo, next_tree, ctrl_fields); - + pduType &= PDUTYPE_TYPE_MASK; /* mask out just the type */ - - if(pduType != PDUTYPE_DATAPDU) + + if(pduType != PDUTYPE_DATAPDU) col_append_sep_str(pinfo->cinfo, COL_INFO, ", ", val_to_str(pduType, rdp_pduTypeType_vals, "Unknown")); switch(pduType) { @@ -1547,7 +1547,7 @@ dissect_rdp_SendData(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree /* we may get multiple control headers in a single frame */ col_set_fence(pinfo->cinfo, COL_INFO); - + offset = base_offset + length; } else { @@ -1555,11 +1555,11 @@ dissect_rdp_SendData(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree col_append_sep_str(pinfo->cinfo, COL_INFO, " ", "Virtual Channel PDU"); offset = dissect_rdp_securityHeader(tvb, offset, pinfo, tree, rdp_info, FALSE, &flags); - - if(!(flags & SEC_ENCRYPT)) - offset = dissect_rdp_channelPDU(tvb, offset, pinfo, tree); - else - offset = dissect_rdp_encrypted(tvb, offset, pinfo, next_tree, "Channel PDU"); + + if(!(flags & SEC_ENCRYPT)) + offset = dissect_rdp_channelPDU(tvb, offset, pinfo, tree); + else + offset = dissect_rdp_encrypted(tvb, offset, pinfo, next_tree, "Channel PDU"); } } @@ -1576,13 +1576,13 @@ dissect_rdp_ClientData(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tr rdp_conv_info_t *rdp_info = NULL; rdp_field_info_t header_fields[] = { - {hf_rdp_headerType, 2, NULL, 0, 0, NULL }, - {hf_rdp_headerLength, 2, NULL, 0, 0, NULL }, + {hf_rdp_headerType, 2, NULL, 0, 0, NULL }, + {hf_rdp_headerLength, 2, NULL, 0, 0, NULL }, FI_TERMINATOR }; rdp_field_info_t core_fields[] = { - {hf_rdp_headerType, 2, NULL, 0, 0, NULL }, - {hf_rdp_headerLength, 2, NULL, 0, 0, NULL }, + {hf_rdp_headerType, 2, NULL, 0, 0, NULL }, + {hf_rdp_headerLength, 2, NULL, 0, 0, NULL }, {hf_rdp_versionMajor, 2, NULL, 0, 0, NULL }, {hf_rdp_versionMinor, 2, NULL, 0, 0, NULL }, {hf_rdp_desktopWidth, 2, NULL, 0, 0, NULL }, @@ -1625,9 +1625,9 @@ dissect_rdp_ClientData(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tr }; /* OK - we try and dissect as many of the data blocks as we can - As soon as we find one we don't recognise, we have to give up parsing + As soon as we find one we don't recognise, we have to give up parsing the rest of the data block. */ - + tree = dissect_rdp(tvb, pinfo, tree); length = tvb_length_remaining(tvb, offset); @@ -1659,7 +1659,7 @@ dissect_rdp_ClientData(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tr type = tvb_get_letohs(tvb, offset); length = tvb_get_letohs(tvb, offset+2); - /* printf("offset=%d, type=%x, length=%d, remaining=%d\n", + /* printf("offset=%d, type=%x, length=%d, remaining=%d\n", offset, type, length, tvb_length_remaining(tvb, offset)); */ if(length == 0) @@ -1669,7 +1669,7 @@ dissect_rdp_ClientData(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tr case CS_CORE: if(tvb_length_remaining(tvb, offset) >= length) { - + pi = proto_tree_add_item(tree, hf_rdp_clientCoreData, tvb, offset, length, FALSE); \ next_tree = proto_item_add_subtree(pi, ett_rdp_clientCoreData); @@ -1682,7 +1682,7 @@ dissect_rdp_ClientData(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tr break; case CS_SECURITY: if(tvb_length_remaining(tvb, offset) >= length) { - + pi = proto_tree_add_item(tree, hf_rdp_clientSecurityData, tvb, offset, length, FALSE); \ next_tree = proto_item_add_subtree(pi, ett_rdp_clientSecurityData); @@ -1698,9 +1698,9 @@ dissect_rdp_ClientData(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tr case CS_NET: if(tvb_length_remaining(tvb, offset) >= length) { - offset = dissect_rdp_clientNetworkData(tvb, offset, pinfo, tree, + offset = dissect_rdp_clientNetworkData(tvb, offset, pinfo, tree, length, rdp_info); - + } else { /* not enough data */ return; @@ -1709,7 +1709,7 @@ dissect_rdp_ClientData(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tr break; case CS_CLUSTER: if(tvb_length_remaining(tvb, offset) >= length) { - + pi = proto_tree_add_item(tree, hf_rdp_clientClusterData, tvb, offset, length, FALSE); \ next_tree = proto_item_add_subtree(pi, ett_rdp_clientClusterData); @@ -1723,7 +1723,7 @@ dissect_rdp_ClientData(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tr break; default: if(tvb_length_remaining(tvb, offset) >= length) { - + pi = proto_tree_add_item(tree, hf_rdp_clientUnknownData, tvb, offset, length, FALSE); \ next_tree = proto_item_add_subtree(pi, ett_rdp_clientUnknownData); @@ -1735,7 +1735,7 @@ dissect_rdp_ClientData(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tr } break; } - + } } @@ -1759,14 +1759,14 @@ dissect_rdp_ServerData(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tr rdp_conv_info_t *rdp_info = NULL; rdp_field_info_t header_fields[] = { - {hf_rdp_headerType, 2, NULL, 0, 0, NULL }, - {hf_rdp_headerLength, 2, NULL, 0, 0, NULL }, + {hf_rdp_headerType, 2, NULL, 0, 0, NULL }, + {hf_rdp_headerLength, 2, NULL, 0, 0, NULL }, FI_TERMINATOR }; rdp_field_info_t sc_fields[] = { {hf_rdp_headerType, 2, NULL, 0, 0, NULL }, {hf_rdp_headerLength, 2, NULL, 0, 0, NULL }, - {hf_rdp_versionMajor, 2, NULL, 0, 0, NULL }, + {hf_rdp_versionMajor, 2, NULL, 0, 0, NULL }, {hf_rdp_versionMinor, 2, NULL, 0, 0, NULL }, {hf_rdp_clientRequestedProtocols, 4, NULL, 0, 0, NULL }, FI_TERMINATOR @@ -1806,9 +1806,9 @@ dissect_rdp_ServerData(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tr }; /* OK - we try and dissect as many of the data blocks as we can - As soon as we find one we don't recognise, we have to give up parsing + As soon as we find one we don't recognise, we have to give up parsing the rest of the data block. */ - + tree = dissect_rdp(tvb, pinfo, tree); length = tvb_length_remaining(tvb, offset); @@ -1840,7 +1840,7 @@ dissect_rdp_ServerData(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tr type = tvb_get_letohs(tvb, offset); length = tvb_get_letohs(tvb, offset+2); - /* printf("offset=%d, type=%x, length=%d, remaining=%d\n", + /* printf("offset=%d, type=%x, length=%d, remaining=%d\n", offset, type, length, tvb_length_remaining(tvb, offset)); */ if(length == 0) @@ -1850,7 +1850,7 @@ dissect_rdp_ServerData(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tr case SC_CORE: if(tvb_length_remaining(tvb, offset) >= length) { - + pi = proto_tree_add_item(tree, hf_rdp_serverCoreData, tvb, offset, length, FALSE); \ next_tree = proto_item_add_subtree(pi, ett_rdp_serverCoreData); @@ -1863,14 +1863,14 @@ dissect_rdp_ServerData(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tr break; case SC_SECURITY: if(tvb_length_remaining(tvb, offset) >= length) { - + pi = proto_tree_add_item(tree, hf_rdp_serverSecurityData, tvb, offset, length, FALSE); \ next_tree = proto_item_add_subtree(pi, ett_rdp_serverSecurityData); offset = dissect_rdp_fields(tvb, offset, pinfo, next_tree, ss_fields); - col_append_sep_fstr(pinfo->cinfo, COL_INFO, " ", "Encryption: %s (%s)", + col_append_sep_fstr(pinfo->cinfo, COL_INFO, " ", "Encryption: %s (%s)", val_to_str(encryptionMethod, rdp_encryptionMethod_vals, "Unknown"), val_to_str(encryptionLevel, rdp_encryptionLevel_vals, "Unknown")); @@ -1878,7 +1878,7 @@ dissect_rdp_ServerData(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tr offset = dissect_rdp_fields(tvb, offset, pinfo, next_tree, encryption_fields); } - + rdp_info->encryptionMethod = encryptionMethod; rdp_info->encryptionLevel = encryptionLevel; @@ -1890,7 +1890,7 @@ dissect_rdp_ServerData(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tr break; case SC_NET: if(tvb_length_remaining(tvb, offset) >= length) { - + pi = proto_tree_add_item(tree, hf_rdp_serverNetworkData, tvb, offset, length, FALSE); \ next_tree = proto_item_add_subtree(pi, ett_rdp_serverNetworkData); @@ -1905,7 +1905,7 @@ dissect_rdp_ServerData(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tr dissect_rdp_fields(tvb, offset, pinfo, next_tree, array_fields); old_tree = next_tree; - if(next_tree) + if(next_tree) next_tree = proto_item_add_subtree(next_tree->last_child, ett_rdp_channelIdArray); for(i = 0; i < channelCount; i++) { offset = dissect_rdp_fields(tvb, offset, pinfo, next_tree, channel_fields); @@ -1929,7 +1929,7 @@ dissect_rdp_ServerData(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tr break; default: if(tvb_length_remaining(tvb, offset) >= length) { - + pi = proto_tree_add_item(tree, hf_rdp_serverUnknownData, tvb, offset, length, FALSE); \ next_tree = proto_item_add_subtree(pi, ett_rdp_serverUnknownData); @@ -1941,7 +1941,7 @@ dissect_rdp_ServerData(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tr } break; } - + } } @@ -2368,7 +2368,7 @@ void proto_register_rdp(void) { NULL, HFILL }}, { &hf_rdp_pduType, { "pduType", "rdp.pduType", - FT_UINT16, BASE_HEX, NULL, 0, + FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL }}, { &hf_rdp_pduTypeType, { "pduTypeType", "rdp.pduType.type", @@ -2412,7 +2412,7 @@ void proto_register_rdp(void) { NULL, HFILL }}, { &hf_rdp_compressedTypeType, { "compressedTypeType", "rdp.compressedType.type", - FT_UINT8, BASE_HEX ,VALS(rdp_compressionType_vals), + FT_UINT8, BASE_HEX ,VALS(rdp_compressionType_vals), PacketCompressionTypeMask, NULL, HFILL }}, { &hf_rdp_compressedTypeCompressed, @@ -2449,15 +2449,15 @@ void proto_register_rdp(void) { NULL, HFILL }}, { &hf_rdp_mapFlags, { "mapFlags", "rdp.mapFlags", - FT_UINT16, BASE_HEX, NULL, 0, + FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL }}, { &hf_rdp_fontMapFirst, { "fontMapFirst", "rdp.mapFlags.fontMapFirst", - FT_UINT16, BASE_HEX, NULL, FONTMAP_FIRST, + FT_UINT16, BASE_HEX, NULL, FONTMAP_FIRST, NULL, HFILL }}, { &hf_rdp_fontMapLast, { "fontMapLast", "rdp.mapFlags.fontMapLast", - FT_UINT16, BASE_HEX, NULL, FONTMAP_LAST, + FT_UINT16, BASE_HEX, NULL, FONTMAP_LAST, NULL, HFILL }}, { &hf_rdp_entrySize, { "entrySize", "rdp.entrySize", @@ -2465,8 +2465,8 @@ void proto_register_rdp(void) { NULL, HFILL }}, { &hf_rdp_action, { "action", "rdp.action", - FT_UINT16, BASE_HEX, VALS(rdp_action_vals), - 0, + FT_UINT16, BASE_HEX, VALS(rdp_action_vals), + 0, NULL, HFILL }}, { &hf_rdp_grantId, { "grantId", "rdp.grantId", @@ -2796,7 +2796,7 @@ void proto_register_rdp(void) { &ett_rdp_validClientLicenseData, &ett_rdp_StandardDate, &ett_rdp_DaylightDate, - &ett_rdp_clientTimeZone, + &ett_rdp_clientTimeZone, }; module_t *rdp_module; diff --git a/epan/dissectors/packet-rmp.c b/epan/dissectors/packet-rmp.c index 0f4d8a3326..27e14dd208 100644 --- a/epan/dissectors/packet-rmp.c +++ b/epan/dissectors/packet-rmp.c @@ -124,21 +124,21 @@ dissect_rmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) switch (type) { case RMP_BOOT_REQ: - proto_tree_add_item(rmp_tree, + proto_tree_add_item(rmp_tree, hf_rmp_retcode, tvb, 1, 1, FALSE); - proto_tree_add_item(rmp_tree, + proto_tree_add_item(rmp_tree, hf_rmp_seqnum, tvb, 2, 4, FALSE); - proto_tree_add_item(rmp_tree, + proto_tree_add_item(rmp_tree, hf_rmp_sessionid, tvb, 6, 2, FALSE); - proto_tree_add_item(rmp_tree, + proto_tree_add_item(rmp_tree, hf_rmp_version, tvb, 8, 2, FALSE); - proto_tree_add_item(rmp_tree, + proto_tree_add_item(rmp_tree, hf_rmp_machtype, tvb, 10, 20, FALSE); /* The remaining fields are optional */ if(!tvb_offset_exists(tvb, 30)) return; len = tvb_get_guint8(tvb, 30); - proto_tree_add_item(rmp_tree, + proto_tree_add_item(rmp_tree, hf_rmp_filename, tvb, 30, 1, FALSE); if(tvb_offset_exists(tvb, len+31)) call_dissector(data_handle, @@ -147,16 +147,16 @@ dissect_rmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) break; case RMP_BOOT_REPL: - proto_tree_add_item(rmp_tree, + proto_tree_add_item(rmp_tree, hf_rmp_retcode, tvb, 1, 1, FALSE); - proto_tree_add_item(rmp_tree, + proto_tree_add_item(rmp_tree, hf_rmp_seqnum, tvb, 2, 4, FALSE); - proto_tree_add_item(rmp_tree, + proto_tree_add_item(rmp_tree, hf_rmp_sessionid, tvb, 6, 2, FALSE); - proto_tree_add_item(rmp_tree, + proto_tree_add_item(rmp_tree, hf_rmp_version, tvb, 8, 2, FALSE); len = tvb_get_guint8(tvb, 10); - proto_tree_add_item(rmp_tree, + proto_tree_add_item(rmp_tree, hf_rmp_filename, tvb, 10, 1, FALSE); if(tvb_offset_exists(tvb, len+11)) call_dissector(data_handle, @@ -165,13 +165,13 @@ dissect_rmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) break; case RMP_READ_REQ: - proto_tree_add_item(rmp_tree, + proto_tree_add_item(rmp_tree, hf_rmp_retcode, tvb, 1, 1, FALSE); - proto_tree_add_item(rmp_tree, + proto_tree_add_item(rmp_tree, hf_rmp_offset, tvb, 2, 4, FALSE); - proto_tree_add_item(rmp_tree, + proto_tree_add_item(rmp_tree, hf_rmp_sessionid, tvb, 6, 2, FALSE); - proto_tree_add_item(rmp_tree, + proto_tree_add_item(rmp_tree, hf_rmp_size, tvb, 8, 2, FALSE); if(tvb_offset_exists(tvb, 10)) call_dissector(data_handle, @@ -180,22 +180,22 @@ dissect_rmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) break; case RMP_READ_REPL: - proto_tree_add_item(rmp_tree, + proto_tree_add_item(rmp_tree, hf_rmp_retcode, tvb, 1, 1, FALSE); - proto_tree_add_item(rmp_tree, + proto_tree_add_item(rmp_tree, hf_rmp_offset, tvb, 2, 4, FALSE); - proto_tree_add_item(rmp_tree, + proto_tree_add_item(rmp_tree, hf_rmp_sessionid, tvb, 6, 2, FALSE); call_dissector(data_handle, tvb_new_subset_remaining(tvb, 8), pinfo, rmp_tree); break; case RMP_BOOT_DONE: - proto_tree_add_item(rmp_tree, + proto_tree_add_item(rmp_tree, hf_rmp_retcode, tvb, 1, 1, FALSE); - proto_tree_add_text(rmp_tree, + proto_tree_add_text(rmp_tree, tvb, 2, 4, "Reserved"); - proto_tree_add_item(rmp_tree, + proto_tree_add_item(rmp_tree, hf_rmp_sessionid, tvb, 6, 2, FALSE); if(tvb_offset_exists(tvb, 8)) call_dissector(data_handle, diff --git a/epan/dissectors/packet-rpl.c b/epan/dissectors/packet-rpl.c index 4e9273c734..2c13da9584 100644 --- a/epan/dissectors/packet-rpl.c +++ b/epan/dissectors/packet-rpl.c @@ -109,7 +109,7 @@ dissect_rpl_container(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) proto_tree_add_text(tree, tvb, 0, 2, "Length: %u", len); type = tvb_get_ntohs(tvb, 2); - proto_tree_add_text(tree, tvb, 2, 2, "Type: %s", + proto_tree_add_text(tree, tvb, 2, 2, "Type: %s", val_to_str(type, rpl_type_vals, "Unknown Type")); offset = 4; @@ -138,9 +138,9 @@ dissect_rpl_container(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) if(subtyp == 0xc005) ett_type = ett_rpl_c005; if(subtyp == 0xc014) ett_type = ett_rpl_c014; ti = proto_tree_add_text(tree, tvb, - offset, sublen, "%s", val_to_str(subtyp, + offset, sublen, "%s", val_to_str(subtyp, rpl_type_vals, "Unknown Type")); - rpl_container_tree = proto_item_add_subtree(ti, + rpl_container_tree = proto_item_add_subtree(ti, ett_type); length = tvb_length_remaining(tvb, offset); if (length > sublen) @@ -149,7 +149,7 @@ dissect_rpl_container(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) if (reported_length > sublen) reported_length = sublen; if ( length > 0) { - dissect_rpl_container(tvb_new_subset(tvb, + dissect_rpl_container(tvb_new_subset(tvb, offset, length, reported_length), pinfo, rpl_container_tree); offset += reported_length; @@ -158,107 +158,107 @@ dissect_rpl_container(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) offset += reported_length; break; } - } + } break; case 0x4003: - proto_tree_add_item(tree, hf_rpl_corrval, + proto_tree_add_item(tree, hf_rpl_corrval, tvb, offset, 4, FALSE); offset += 4; break; case 0x4006: - proto_tree_add_item(tree, hf_rpl_lmac, + proto_tree_add_item(tree, hf_rpl_lmac, tvb, offset, 6, FALSE); offset += 6; break; case 0x4007: - proto_tree_add_item(tree, hf_rpl_sap, + proto_tree_add_item(tree, hf_rpl_sap, tvb, offset, 1, FALSE); offset ++; break; case 0x4009: - proto_tree_add_item(tree, hf_rpl_maxframe, + proto_tree_add_item(tree, hf_rpl_maxframe, tvb, offset, 2, FALSE); offset += 2; break; case 0x400a: - proto_tree_add_item(tree, hf_rpl_connclass, + proto_tree_add_item(tree, hf_rpl_connclass, tvb, offset, 2, FALSE); offset += 2; break; case 0x400b: - proto_tree_add_item(tree, hf_rpl_respval, + proto_tree_add_item(tree, hf_rpl_respval, tvb, offset, 1, FALSE); offset ++; break; case 0x400c: - proto_tree_add_item(tree, hf_rpl_smac, + proto_tree_add_item(tree, hf_rpl_smac, tvb, offset, 6, FALSE); offset += 6; break; case 0x4011: - proto_tree_add_item(tree, hf_rpl_sequence, + proto_tree_add_item(tree, hf_rpl_sequence, tvb, offset, 4, FALSE); offset += 4; break; case 0x4018: - proto_tree_add_item(tree, hf_rpl_data, + proto_tree_add_item(tree, hf_rpl_data, tvb, offset, len-4, FALSE); offset += len - 4; break; case 0xc005: - proto_tree_add_item(tree, hf_rpl_config, + proto_tree_add_item(tree, hf_rpl_config, tvb, offset, 8, FALSE); offset += 8; - proto_tree_add_item(tree, hf_rpl_equipment, + proto_tree_add_item(tree, hf_rpl_equipment, tvb, offset, 2, FALSE); offset += 2; - proto_tree_add_item(tree, hf_rpl_memsize, + proto_tree_add_item(tree, hf_rpl_memsize, tvb, offset, 2, FALSE); offset += 2; - proto_tree_add_item(tree, hf_rpl_bsmversion, + proto_tree_add_item(tree, hf_rpl_bsmversion, tvb, offset, 2, FALSE); offset += 2; - proto_tree_add_item(tree, hf_rpl_ec, + proto_tree_add_item(tree, hf_rpl_ec, tvb, offset, 6, FALSE); offset += 6; - proto_tree_add_item(tree, hf_rpl_adapterid, + proto_tree_add_item(tree, hf_rpl_adapterid, tvb, offset, 2, FALSE); offset += 2; - proto_tree_add_item(tree, hf_rpl_shortname, + proto_tree_add_item(tree, hf_rpl_shortname, tvb, offset, 10, FALSE); offset += 10; break; case 0xc014: - proto_tree_add_item(tree, hf_rpl_laddress, + proto_tree_add_item(tree, hf_rpl_laddress, tvb, offset, 4, FALSE); offset += 4; - proto_tree_add_item(tree, hf_rpl_xaddress, + proto_tree_add_item(tree, hf_rpl_xaddress, tvb, offset, 4, FALSE); offset += 4; - proto_tree_add_item(tree, hf_rpl_flags, + proto_tree_add_item(tree, hf_rpl_flags, tvb, offset, 1, FALSE); offset ++; break; default: - call_dissector(data_handle, + call_dissector(data_handle, tvb_new_subset_remaining(tvb, 4), pinfo, tree); break; } if (tvb_reported_length(tvb) > offset) - call_dissector(data_handle, + call_dissector(data_handle, tvb_new_subset_remaining(tvb, offset), pinfo, tree); } @@ -280,7 +280,7 @@ dissect_rpl(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) val_to_str_const(rpl_type, rpl_type_vals, "Unknown Type")); } if (tree) { - ti = proto_tree_add_item(tree, proto_rpl, tvb, 0, + ti = proto_tree_add_item(tree, proto_rpl, tvb, 0, rpl_len, FALSE); rpl_tree = proto_item_add_subtree(ti, ett_rpl); hidden_item = proto_tree_add_uint(rpl_tree, hf_rpl_type, tvb, 2, 2, @@ -289,9 +289,9 @@ dissect_rpl(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) next_tvb = tvb_new_subset_remaining(tvb, 0); set_actual_length(next_tvb, rpl_len); dissect_rpl_container(next_tvb, pinfo, rpl_tree); - + if (tvb_reported_length(tvb) > rpl_len) - call_dissector(data_handle, + call_dissector(data_handle, tvb_new_subset_remaining(tvb, rpl_len), pinfo, tree); } @@ -302,79 +302,79 @@ proto_register_rpl(void) { static hf_register_info hf[] = { { &hf_rpl_type, - { "Type", "rpl.type", + { "Type", "rpl.type", FT_UINT16, BASE_DEC, NULL, 0x0, "RPL Packet Type", HFILL }}, { &hf_rpl_corrval, - { "Correlator Value", "rpl.corrval", + { "Correlator Value", "rpl.corrval", FT_UINT32, BASE_HEX, NULL, 0x0, "RPL Correlator Value", HFILL }}, { &hf_rpl_respval, - { "Response Code", "rpl.respval", + { "Response Code", "rpl.respval", FT_UINT8, BASE_DEC, NULL, 0x0, "RPL Response Code", HFILL }}, { &hf_rpl_maxframe, - { "Maximum Frame Size", "rpl.maxframe", + { "Maximum Frame Size", "rpl.maxframe", FT_UINT16, BASE_DEC, NULL, 0x0, "RPL Maximum Frame Size", HFILL }}, { &hf_rpl_connclass, - { "Connection Class", "rpl.connclass", + { "Connection Class", "rpl.connclass", FT_UINT16, BASE_HEX, NULL, 0x0, "RPL Connection Class", HFILL }}, { &hf_rpl_lmac, - { "Loader MAC Address", "rpl.lmac", + { "Loader MAC Address", "rpl.lmac", FT_ETHER, BASE_NONE, NULL, 0x0, "RPL Loader MAC Address", HFILL }}, { &hf_rpl_smac, - { "Set MAC Address", "rpl.smac", + { "Set MAC Address", "rpl.smac", FT_ETHER, BASE_NONE, NULL, 0x0, "RPL Set MAC Address", HFILL }}, { &hf_rpl_sap, - { "SAP", "rpl.sap", + { "SAP", "rpl.sap", FT_UINT8, BASE_HEX, VALS(sap_vals), 0x0, "RPL SAP", HFILL }}, { &hf_rpl_equipment, - { "Equipment", "rpl.equipment", + { "Equipment", "rpl.equipment", FT_UINT16, BASE_HEX, NULL, 0x0, "RPL Equipment - AX from INT 11h", HFILL }}, { &hf_rpl_memsize, - { "Memory Size", "rpl.memsize", + { "Memory Size", "rpl.memsize", FT_UINT16, BASE_DEC, NULL, 0x0, "RPL Memory Size - AX from INT 12h MINUS 32k MINUS the Boot ROM Size", HFILL }}, { &hf_rpl_bsmversion, - { "BSM Version", "rpl.bsmversion", + { "BSM Version", "rpl.bsmversion", FT_UINT16, BASE_HEX, NULL, 0x0, "RPL Version of BSM.obj", HFILL }}, { &hf_rpl_adapterid, - { "Adapter ID", "rpl.adapterid", + { "Adapter ID", "rpl.adapterid", FT_UINT16, BASE_HEX, NULL, 0x0, "RPL Adapter ID", HFILL }}, { &hf_rpl_shortname, - { "Short Name", "rpl.shortname", + { "Short Name", "rpl.shortname", FT_BYTES, BASE_NONE, NULL, 0x0, "RPL BSM Short Name", HFILL }}, { &hf_rpl_laddress, - { "Locate Address", "rpl.laddress", + { "Locate Address", "rpl.laddress", FT_UINT32, BASE_HEX, NULL, 0x0, "RPL Locate Address", HFILL }}, { &hf_rpl_xaddress, - { "XFER Address", "rpl.xaddress", + { "XFER Address", "rpl.xaddress", FT_UINT32, BASE_HEX, NULL, 0x0, "RPL Transfer Control Address", HFILL }}, { &hf_rpl_sequence, - { "Sequence Number", "rpl.sequence", + { "Sequence Number", "rpl.sequence", FT_UINT32, BASE_HEX, NULL, 0x0, "RPL Sequence Number", HFILL }}, { &hf_rpl_config, - { "Configuration", "rpl.config", + { "Configuration", "rpl.config", FT_BYTES, BASE_NONE, NULL, 0x0, "RPL Configuration", HFILL }}, { &hf_rpl_flags, - { "Flags", "rpl.flags", + { "Flags", "rpl.flags", FT_UINT8, BASE_HEX, NULL, 0x0, "RPL Bit Significant Option Flags", HFILL }}, { &hf_rpl_data, - { "Data", "rpl.data", + { "Data", "rpl.data", FT_BYTES, BASE_NONE, NULL, 0x0, "RPL Binary File Data", HFILL }}, { &hf_rpl_ec, diff --git a/epan/dissectors/packet-scsi-osd.c b/epan/dissectors/packet-scsi-osd.c index 6ab6914ac6..267d3a07a7 100644 --- a/epan/dissectors/packet-scsi-osd.c +++ b/epan/dissectors/packet-scsi-osd.c @@ -269,7 +269,7 @@ dissect_osd_attributes_list(packet_info *pinfo, tvbuff_t *tvb, int offset, proto offset+=2; /* if type is 1 length will be zero and we have to cycle over - * all remaining bytes. 7.1.3.1 + * all remaining bytes. 7.1.3.1 */ if(type==1){ length=tvb_length_remaining(tvb, offset); @@ -465,7 +465,7 @@ dissect_osd_attribute_parameters(tvbuff_t *tvb, int offset, proto_tree *parent_t "Attribute Parameters"); tree = proto_item_add_subtree(item, ett_osd_attribute_parameters); } - + if(cdata && cdata->itlq && cdata->itlq->extra_data){ extra_data=cdata->itlq->extra_data; gsatype=extra_data->gsatype; @@ -655,7 +655,7 @@ dissect_osd_permissions(tvbuff_t *tvb, int offset, proto_tree *parent_tree) proto_item *it=NULL; guint16 permissions; - permissions=tvb_get_ntohs(tvb, offset); + permissions=tvb_get_ntohs(tvb, offset); if(parent_tree){ it=proto_tree_add_item(parent_tree, hf_scsi_osd_permissions, tvb, offset, 2, 0); @@ -720,7 +720,7 @@ dissect_osd_capability(tvbuff_t *tvb, int offset, proto_tree *parent_tree) "Capability"); tree = proto_item_add_subtree(item, ett_osd_capability); } - + /* capability format */ proto_tree_add_item(tree, hf_scsi_osd_capability_format, tvb, offset, 1, 0); offset++; @@ -787,7 +787,7 @@ dissect_osd_security_parameters(tvbuff_t *tvb, int offset, proto_tree *parent_tr "Security Parameters"); tree = proto_item_add_subtree(item, ett_osd_security_parameters); } - + /* request integrity check value */ proto_tree_add_item(tree, hf_scsi_osd_ricv, tvb, offset, 20, 0); offset+=20; @@ -864,7 +864,7 @@ dissect_osd_format_osd(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, /* no data in for format osd */ } - + } @@ -983,7 +983,7 @@ dissect_osd_create_partition(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree /* no data in for create partition */ } - + } static const value_string scsi_osd_sort_order_vals[] = { @@ -1156,7 +1156,7 @@ dissect_osd_list(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, offset+=8; } } - + } static void @@ -1245,7 +1245,7 @@ dissect_osd_create(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, /* no data in for create */ } - + } @@ -1308,7 +1308,7 @@ dissect_osd_remove_partition(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree /* no data in for remove partition */ } - + } static const value_string key_to_set_vals[] = { @@ -1409,7 +1409,7 @@ dissect_osd_set_key(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, /* no data in for set key */ } - + } static void @@ -1475,7 +1475,7 @@ dissect_osd_remove(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, /* no data in for remove */ } - + } static const true_false_string collection_fcr_tfs = { @@ -1561,7 +1561,7 @@ dissect_osd_remove_collection(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tre /* no data in for remove collection */ } - + } @@ -1653,7 +1653,7 @@ dissect_osd_write(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, /* no data in for WRITE */ } - + } @@ -1730,7 +1730,7 @@ dissect_osd_create_collection(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tre /* no data in for create collection */ } - + } @@ -1811,7 +1811,7 @@ dissect_osd_flush(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, /* no data in for flush */ } - + } @@ -1894,7 +1894,7 @@ dissect_osd_flush_collection(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree /* no data in for flush collection */ } - + } @@ -1968,7 +1968,7 @@ dissect_osd_append(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, /* no data in for append */ } - + } static void @@ -2042,7 +2042,7 @@ dissect_osd_create_and_write(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree /* no data in for create and write*/ } - + } @@ -2113,7 +2113,7 @@ dissect_osd_flush_osd(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, /* no data in for flush osd */ } - + } @@ -2192,7 +2192,7 @@ dissect_osd_flush_partition(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, /* no data in for flush partition */ } - + } @@ -2259,7 +2259,7 @@ dissect_osd_get_attributes(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, /* no data in for get attributes */ } - + } @@ -2334,7 +2334,7 @@ dissect_osd_list_collection(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, /* XXX dissect the data */ } - + } @@ -2410,7 +2410,7 @@ dissect_osd_read(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, /* xxx should dissect the data ? */ } - + } @@ -2477,7 +2477,7 @@ dissect_osd_set_attributes(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, /* no data in for set attributes */ } - + } /* OSD Service Actions */ @@ -2633,7 +2633,7 @@ dissect_osd_opcode(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, if(check_col(pinfo->cinfo, COL_INFO)){ - col_append_str(pinfo->cinfo, COL_INFO, + col_append_str(pinfo->cinfo, COL_INFO, val_to_str(svcaction, scsi_osd_svcaction_vals, "Unknown OSD Serviceaction")); } dissector=find_svcaction_dissector(svcaction); @@ -2651,7 +2651,7 @@ dissect_osd_opcode(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, svcaction=extra_data->svcaction; } if(check_col(pinfo->cinfo, COL_INFO)){ - col_append_str(pinfo->cinfo, COL_INFO, + col_append_str(pinfo->cinfo, COL_INFO, val_to_str(svcaction, scsi_osd_svcaction_vals, "Unknown OSD Serviceaction")); } if(svcaction){ diff --git a/epan/dissectors/packet-sgsap.c b/epan/dissectors/packet-sgsap.c index 2f438747f9..c513767cfa 100644 --- a/epan/dissectors/packet-sgsap.c +++ b/epan/dissectors/packet-sgsap.c @@ -72,7 +72,7 @@ static int hf_sgsap_imeisv = -1; static int ett_sgsap = -1; -/* +/* * 9.4 Information elements */ /* @@ -80,9 +80,9 @@ static int ett_sgsap = -1; */ /* - * Octets 3 to 14 contain the value part of the Calling party BCD number information element - * defined in subclause 10.5.4.9 of 3GPP TS 24.008 [8] (octets 3 to 14, i.e. not including - * 3GPP TS 24.008 IEI and 3GPP TS 24.008 length indicator) + * Octets 3 to 14 contain the value part of the Calling party BCD number information element + * defined in subclause 10.5.4.9 of 3GPP TS 24.008 [8] (octets 3 to 14, i.e. not including + * 3GPP TS 24.008 IEI and 3GPP TS 24.008 length indicator) * ( packet-gsm_a_dtap.c ) */ /* @@ -182,7 +182,7 @@ de_sgsap_g_cn_id(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint3 /* * 9.4.5 IMEISV * See subclause 18.4.9 in 3GPP TS 29.018 [16]. - * The IMEISV is coded as a sequence of BCD digits, compressed two into each octet. + * The IMEISV is coded as a sequence of BCD digits, compressed two into each octet. * The IMEISV consists of 16 digits * (see 3GPP TS 23.003). */ @@ -206,8 +206,8 @@ de_sgsap_imeisv(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 * 9.4.6 IMSI * See subclause 18.4.10 in 3GPP TS 29.018 [16]. */ -/* The IMSI is coded as a sequence of BCD digits, compressed two into each octet. - * This is a variable length element, and includes a length indicator. +/* The IMSI is coded as a sequence of BCD digits, compressed two into each octet. + * This is a variable length element, and includes a length indicator. * The IMSI is defined in 3GPP TS 23.003. It shall not exceed 15 digits (see 3GPP TS 23.003). */ /* @@ -261,7 +261,7 @@ de_sgsap_imsi_det_non_eps(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U } /* * 9.4.9 LCS client identity - * The coding of the LCS client identity value is according to LCS-ClientID + * The coding of the LCS client identity value is according to LCS-ClientID * as specified in subclause 17.7.13 of 3GPP TS 29.002 [15] * (packet-nas_eps.c) */ @@ -374,7 +374,7 @@ de_sgsap_nas_msg_container(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _ curr_offset = offset; - /* Octets 3 to 253 contain the SMS message (i.e. CP DATA, CP ACK or CP ERROR) + /* Octets 3 to 253 contain the SMS message (i.e. CP DATA, CP ACK or CP ERROR) * as defined in subclause 7.2 of 3GPP TS 24.011 [10] */ new_tvb = tvb_new_subset_remaining(tvb, curr_offset); @@ -466,7 +466,7 @@ de_sgsap_sgs_cause(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guin } /* * 9.4.19 SS code - * The coding of the SS code value is according to SS-Code as specified in + * The coding of the SS code value is according to SS-Code as specified in * subclause 17.7.5 of 3GPP TS 29.002 [15] * ( packet-nas_eps.c) */ @@ -524,9 +524,9 @@ de_sgsap_vlr_name(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint guint name_len, tmp; guint8 *fqdn = NULL; - /* The VLR name information element specifies the VLR name and is coded as shown in figure 9.4.22.1. - * Octets 3 through n contain the VLR name in the form of a fully qualified domain name (FQDN) - * as specified in IETF RFC 1035 [21]. + /* The VLR name information element specifies the VLR name and is coded as shown in figure 9.4.22.1. + * Octets 3 through n contain the VLR name in the form of a fully qualified domain name (FQDN) + * as specified in IETF RFC 1035 [21]. */ if (len > 0) { name_len = tvb_get_guint8(tvb, offset); @@ -749,7 +749,7 @@ sgsap_alert_rej(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 /* IMSI IMSI 9.4.6 M TLV 6-10 */ ELEM_MAND_TLV(0x01, GSM_A_PDU_TYPE_BSSMAP, BE_IMSI, NULL); - /* SGs Cause SGs cause 9.4.18 M TLV 3 */ + /* SGs Cause SGs cause 9.4.18 M TLV 3 */ ELEM_MAND_TLV(0x08, SGSAP_PDU_TYPE, DE_SGSAP_SGS_CAUSE, NULL); EXTRANEOUS_DATA_CHECK(curr_len, 0); @@ -1107,7 +1107,7 @@ sgsap_service_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint ELEM_OPT_TLV(0x23, NAS_PDU_TYPE_EMM, DE_EMM_TRAC_AREA_ID, NULL); /* E-CGI E-UTRAN Cell Global Identity 9.4.3a O TLV 9 */ ELEM_OPT_TLV(0x24, SGSAP_PDU_TYPE, DE_SGSAP_ECGI, NULL); - /* UE EMM Mode UE EMM mode 9.4.21c O TLV 3 */ + /* UE EMM Mode UE EMM mode 9.4.21c O TLV 3 */ ELEM_OPT_TLV(0x25, SGSAP_PDU_TYPE, DE_SGSAP_UE_EMM_MODE, NULL); EXTRANEOUS_DATA_CHECK(curr_len, 0); @@ -1147,8 +1147,8 @@ sgsap_tmsi_realloc_comp(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint curr_len; curr_offset = offset; - curr_len = len; - + curr_len = len; + /*IMSI IMSI 9.4.6 M TLV 6-10 */ ELEM_MAND_TLV(0x01, GSM_A_PDU_TYPE_BSSMAP, BE_IMSI, NULL); @@ -1166,7 +1166,7 @@ sgsap_ue_act_ind(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint3 guint curr_len; curr_offset = offset; - curr_len = len; + curr_len = len; /* IMSI IMSI 9.4.6 M TLV 6-10 */ ELEM_MAND_TLV(0x01, GSM_A_PDU_TYPE_BSSMAP, BE_IMSI, NULL); @@ -1185,7 +1185,7 @@ sgsap_ue_unreachable(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, gu guint curr_len; curr_offset = offset; - curr_len = len; + curr_len = len; /* IMSI IMSI 9.4.6 M TLV 6-10 */ @@ -1206,7 +1206,7 @@ sgsap_ue_ul_unitdata(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, gu guint curr_len; curr_offset = offset; - curr_len = len; + curr_len = len; /* IMSI IMSI 9.4.6 M TLV 6-10 */ ELEM_MAND_TLV(0x01, GSM_A_PDU_TYPE_BSSMAP, BE_IMSI, NULL); @@ -1236,7 +1236,7 @@ sgsap_release_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint guint curr_len; curr_offset = offset; - curr_len = len; + curr_len = len; /* IMSI IMSI 9.4.6 M TLV 6-10 */ ELEM_MAND_TLV(0x01, GSM_A_PDU_TYPE_BSSMAP, BE_IMSI, NULL); @@ -1251,7 +1251,7 @@ sgsap_release_req(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint */ /* No IE's */ -/* +/* * 9.2 Message type */ static const value_string sgsap_msg_strings[] = { @@ -1260,7 +1260,7 @@ static const value_string sgsap_msg_strings[] = { /* * 0 0 0 0 0 0 1 1 * to - * 0 0 0 0 0 1 0 1 + * 0 0 0 0 0 1 0 1 * Unassigned: treated as an unknown Message type */ { 0x03, "Unassigned"}, /* 7 */ @@ -1286,9 +1286,9 @@ static const value_string sgsap_msg_strings[] = { { 0x16, "SGsAP-RESET-ACK"}, /* 8.15 */ { 0x17, "SGsAP-SERVICE-ABORT-REQUEST"}, /* 8.24 */ /* - * 0 0 0 1 1 0 0 0 + * 0 0 0 1 1 0 0 0 * to - * 0 0 0 1 1 0 0 1 + * 0 0 0 1 1 0 0 1 * Unassigned: treated as an unknown Message type */ { 0x18, "Unassigned"}, @@ -1316,7 +1316,7 @@ static void (*sgsap_msg_fcn[])(tvbuff_t *tvb, proto_tree *tree, packet_info *pin /* * 0 0 0 0 0 0 1 1 * to - * 0 0 0 0 0 1 0 1 + * 0 0 0 0 0 1 0 1 * Unassigned: treated as an unknown Message type */ NULL, /* 0x03, "Unassigned" 7 */ @@ -1342,9 +1342,9 @@ static void (*sgsap_msg_fcn[])(tvbuff_t *tvb, proto_tree *tree, packet_info *pin sgsap_reset_ack, /* 0x16, "SGsAP-RESET-ACK" 8.15 */ NULL,/* No IE's */ /* 0x17, "SGsAP-SERVICE-ABORT-REQUEST" 8.24 */ /* - * 0 0 0 1 1 0 0 0 + * 0 0 0 1 1 0 0 0 * to - * 0 0 0 1 1 0 0 1 + * 0 0 0 1 1 0 0 1 * Unassigned: treated as an unknown Message type */ NULL, /* 0x18, "Unassigned" */ @@ -1487,7 +1487,7 @@ void proto_register_sgsap(void) { FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL} }, - { &hf_sgsap_imsi_det_eps, + { &hf_sgsap_imsi_det_eps, { "IMSI detach from EPS service type", "sgsap.imsi_det_eps", FT_UINT8, BASE_DEC, VALS(sgsap_imsi_det_from_eps_serv_type_values),0x0, NULL, HFILL } @@ -1541,7 +1541,7 @@ void proto_register_sgsap(void) { /* Register fields and subtrees */ proto_register_field_array(proto_sgsap, hf, array_length(hf)); proto_register_subtree_array(ett, array_length(ett)); - + /* Register dissector */ register_dissector(PFNAME, dissect_sgsap, proto_sgsap); } diff --git a/epan/dissectors/packet-sndcp-xid.c b/epan/dissectors/packet-sndcp-xid.c index b214e97204..ffa1610415 100644 --- a/epan/dissectors/packet-sndcp-xid.c +++ b/epan/dissectors/packet-sndcp-xid.c @@ -13,12 +13,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. @@ -68,7 +68,7 @@ typedef struct guint16 (**func_array_ptr) (tvbuff_t *, proto_tree *, guint16); } algo_parameters_t; -/* Initialize the protocol and registered fields +/* Initialize the protocol and registered fields */ static int proto_sndcp_xid = -1; @@ -76,13 +76,13 @@ static int proto_sndcp_xid = -1; * When the P bit is not set, try to decode the algo based on what whas stored. * Entity ranges from 0 to 31 (6.5.1.1.3) */ -static guint8 dcomp_entity_algo_id[32]={-1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, +static guint8 dcomp_entity_algo_id[32]={-1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}; -static guint8 pcomp_entity_algo_id[32]={-1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, +static guint8 pcomp_entity_algo_id[32]={-1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}; @@ -98,7 +98,7 @@ static int hf_sndcp_xid_comp_spare_byte2 = -1; static int hf_sndcp_xid_comp_algo_id = -1; static int hf_sndcp_xid_comp_len = -1; /* There is currently a maximum of 15 DCOMP/PCOMP: 6.5.1.1.5 */ -static int hf_sndcp_xid_comp[15] = {-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}; +static int hf_sndcp_xid_comp[15] = {-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}; static int hf_sndcp_xid_comp_spare = -1; static int hf_element_applicable_nsapi_15 = -1; @@ -148,7 +148,7 @@ static int hf_sndcp_xid_V44_p3r_msb = -1; static int hf_sndcp_xid_V44_p3r_lsb = -1; -/* Initialize the subtree pointers +/* Initialize the subtree pointers */ static gint ett_sndcp_xid = -1; static gint ett_sndcp_xid_version_field = -1; @@ -178,7 +178,7 @@ static guint16 parse_applicable_nsapi(tvbuff_t *tvb, proto_tree *tree, guint16 o proto_tree_add_uint(tree, hf_element_applicable_nsapi_5, tvb, offset+1, 1, nsapi_byte2); proto_tree_add_uint(tree, hf_element_applicable_nsapi_spare, tvb, offset+1, 1, nsapi_byte2); - return 2U; + return 2U; } static guint16 parse_rfc1144_s0(tvbuff_t *tvb, proto_tree *tree, guint16 offset) @@ -188,7 +188,7 @@ static guint16 parse_rfc1144_s0(tvbuff_t *tvb, proto_tree *tree, guint16 offset) proto_tree_add_uint(tree, hf_sndcp_xid_rfc1144_s0, tvb, offset, 1, s0); - return 1U; + return 1U; } static guint16 parse_rfc2507_f_max_period(tvbuff_t *tvb, proto_tree *tree, guint16 offset) @@ -200,7 +200,7 @@ static guint16 parse_rfc2507_f_max_period(tvbuff_t *tvb, proto_tree *tree, guint proto_tree_add_uint(tree, hf_sndcp_xid_rfc2507_f_max_period_msb, tvb, offset, 1, f_max_period_byte1); proto_tree_add_uint(tree, hf_sndcp_xid_rfc2507_f_max_period_lsb, tvb, offset, 1, f_max_period_byte2); - return 2U; + return 2U; } static guint16 parse_rfc2507_f_max_time(tvbuff_t *tvb, proto_tree *tree, guint16 offset) @@ -210,7 +210,7 @@ static guint16 parse_rfc2507_f_max_time(tvbuff_t *tvb, proto_tree *tree, guint16 proto_tree_add_uint(tree, hf_sndcp_xid_rfc2507_f_max_time, tvb, offset, 1, f_max_time); - return 1U; + return 1U; } static guint16 parse_rfc2507_max_header(tvbuff_t *tvb, proto_tree *tree, guint16 offset) @@ -220,7 +220,7 @@ static guint16 parse_rfc2507_max_header(tvbuff_t *tvb, proto_tree *tree, guint16 proto_tree_add_uint(tree, hf_sndcp_xid_rfc2507_max_header, tvb, offset, 1, max_header); - return 1U; + return 1U; } static guint16 parse_rfc2507_tcp_space(tvbuff_t *tvb, proto_tree *tree, guint16 offset) @@ -230,7 +230,7 @@ static guint16 parse_rfc2507_tcp_space(tvbuff_t *tvb, proto_tree *tree, guint16 proto_tree_add_uint(tree, hf_sndcp_xid_rfc2507_tcp_space, tvb, offset, 1, tcp_space); - return 1U; + return 1U; } static guint16 parse_rfc2507_non_tcp_space(tvbuff_t *tvb, proto_tree *tree, guint16 offset) @@ -242,7 +242,7 @@ static guint16 parse_rfc2507_non_tcp_space(tvbuff_t *tvb, proto_tree *tree, guin proto_tree_add_uint(tree, hf_sndcp_xid_rfc2507_non_tcp_space_msb, tvb, offset, 1, tcp_space_msb); proto_tree_add_uint(tree, hf_sndcp_xid_rfc2507_non_tcp_space_lsb, tvb, offset, 1, tcp_space_lsb); - return 2U; + return 2U; } static guint16 parse_rohc_max_cid(tvbuff_t *tvb, proto_tree *tree, guint16 offset) @@ -255,7 +255,7 @@ static guint16 parse_rohc_max_cid(tvbuff_t *tvb, proto_tree *tree, guint16 offse proto_tree_add_uint(tree, hf_sndcp_xid_rohc_max_cid_msb, tvb, offset, 1, max_cid_msb); proto_tree_add_uint(tree, hf_sndcp_xid_rohc_max_cid_lsb, tvb, offset+1, 1, max_cid_lsb); - return 2U; + return 2U; } static guint16 parse_rohc_max_header(tvbuff_t *tvb, proto_tree *tree, guint16 offset) { @@ -265,7 +265,7 @@ static guint16 parse_rohc_max_header(tvbuff_t *tvb, proto_tree *tree, guint16 of proto_tree_add_uint(tree, hf_sndcp_xid_rohc_max_header, tvb, offset+1, 1, max_header); - return 2U; + return 2U; } static guint16 parse_rohc_profile(tvbuff_t *tvb, proto_tree *tree, guint16 offset) @@ -277,7 +277,7 @@ static guint16 parse_rohc_profile(tvbuff_t *tvb, proto_tree *tree, guint16 offse proto_tree_add_uint(tree, hf_sndcp_xid_rohc_profile_msb, tvb, offset, 1, profile_msb); proto_tree_add_uint(tree, hf_sndcp_xid_rohc_profile_lsb, tvb, offset+1, 1, profile_lsb); - return 2U; + return 2U; } static guint16 parse_V42bis_p0(tvbuff_t *tvb, proto_tree *tree, guint16 offset) @@ -289,7 +289,7 @@ static guint16 parse_V42bis_p0(tvbuff_t *tvb, proto_tree *tree, guint16 offset) proto_tree_add_uint(tree, hf_sndcp_xid_V42bis_p0_spare, tvb, offset, 1, p0); proto_tree_add_uint(tree, hf_sndcp_xid_V42bis_p0, tvb, offset, 1, p0); - return 1U; + return 1U; } static guint16 parse_V42bis_p1(tvbuff_t *tvb, proto_tree *tree, guint16 offset) @@ -302,7 +302,7 @@ static guint16 parse_V42bis_p1(tvbuff_t *tvb, proto_tree *tree, guint16 offset) proto_tree_add_uint(tree, hf_sndcp_xid_V42bis_p1_msb, tvb, offset, 1, p1_msb); proto_tree_add_uint(tree, hf_sndcp_xid_V42bis_p1_lsb, tvb, offset+1, 1, p1_lsb); - return 2U; + return 2U; } static guint16 parse_V42bis_p2(tvbuff_t *tvb, proto_tree *tree, guint16 offset) @@ -313,7 +313,7 @@ static guint16 parse_V42bis_p2(tvbuff_t *tvb, proto_tree *tree, guint16 offset) proto_tree_add_uint(tree, hf_sndcp_xid_V42bis_p2, tvb, offset, 1, p2); - return 1U; + return 1U; } static guint16 parse_V44_c0(tvbuff_t *tvb, proto_tree *tree, guint16 offset) @@ -324,7 +324,7 @@ static guint16 parse_V44_c0(tvbuff_t *tvb, proto_tree *tree, guint16 offset) proto_tree_add_uint(tree, hf_sndcp_xid_V44_c0_spare, tvb, offset, 1, c0); proto_tree_add_uint(tree, hf_sndcp_xid_V44_c0, tvb, offset, 1, c0); - return 1U; + return 1U; } static guint16 parse_V44_p0(tvbuff_t *tvb, proto_tree *tree, guint16 offset) @@ -336,7 +336,7 @@ static guint16 parse_V44_p0(tvbuff_t *tvb, proto_tree *tree, guint16 offset) proto_tree_add_uint(tree, hf_sndcp_xid_V44_p0_spare, tvb, offset, 1, p0); proto_tree_add_uint(tree, hf_sndcp_xid_V44_p0, tvb, offset, 1, p0); - return 1U; + return 1U; } @@ -350,7 +350,7 @@ static guint16 parse_V44_p1t(tvbuff_t *tvb, proto_tree *tree, guint16 offset) proto_tree_add_uint(tree, hf_sndcp_xid_V44_p1t_msb, tvb, offset, 1, p1t_msb); proto_tree_add_uint(tree, hf_sndcp_xid_V44_p1t_lsb, tvb, offset+1, 1, p1t_lsb); - return 2U; + return 2U; } static guint16 parse_V44_p1r(tvbuff_t *tvb, proto_tree *tree, guint16 offset) @@ -363,7 +363,7 @@ static guint16 parse_V44_p1r(tvbuff_t *tvb, proto_tree *tree, guint16 offset) proto_tree_add_uint(tree, hf_sndcp_xid_V44_p1r_msb, tvb, offset, 1, p1r_msb); proto_tree_add_uint(tree, hf_sndcp_xid_V44_p1r_lsb, tvb, offset+1, 1, p1r_lsb); - return 2U; + return 2U; } static guint16 parse_V44_p3t(tvbuff_t *tvb, proto_tree *tree, guint16 offset) @@ -376,7 +376,7 @@ static guint16 parse_V44_p3t(tvbuff_t *tvb, proto_tree *tree, guint16 offset) proto_tree_add_uint(tree, hf_sndcp_xid_V44_p3t_msb, tvb, offset, 1, p3t_msb); proto_tree_add_uint(tree, hf_sndcp_xid_V44_p3t_lsb, tvb, offset+1, 1, p3t_lsb); - return 2U; + return 2U; } static guint16 parse_V44_p3r(tvbuff_t *tvb, proto_tree *tree, guint16 offset) @@ -389,7 +389,7 @@ static guint16 parse_V44_p3r(tvbuff_t *tvb, proto_tree *tree, guint16 offset) proto_tree_add_uint(tree, hf_sndcp_xid_V44_p3r_msb, tvb, offset, 1, p3r_msb); proto_tree_add_uint(tree, hf_sndcp_xid_V44_p3r_lsb, tvb, offset+1, 1, p3r_lsb); - return 2U; + return 2U; } @@ -471,19 +471,19 @@ static algo_parameters_t dcomp_algo_pars[] = { }; -/* Code to actually dissect the packets +/* Code to actually dissect the packets */ static void dissect_sndcp_xid(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree) { - /* Set up structures needed to add the protocol subtree and manage it + /* Set up structures needed to add the protocol subtree and manage it */ proto_item *ti, *version_item, *dcomp_item, *pcomp_item; proto_tree *sndcp_tree, *version_tree, *dcomp_tree, *pcomp_tree; guint16 offset = 0, l3_param_len; guint8 parameter_type, parameter_len; - /* create display subtree for the protocol + /* create display subtree for the protocol */ ti = proto_tree_add_item(tree, proto_sndcp_xid, tvb, 0, -1, FALSE); sndcp_tree = proto_item_add_subtree(ti, ett_sndcp_xid); @@ -499,7 +499,7 @@ dissect_sndcp_xid(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree) guint8 value = tvb_get_guint8(tvb, offset+2); version_item = proto_tree_add_text(sndcp_tree, tvb, offset, parameter_len+2, "Version (SNDCP version number) - Value %d", value); - + version_tree = proto_item_add_subtree(version_item, ett_sndcp_xid_version_field); proto_tree_add_uint(version_tree, hf_sndcp_xid_type, tvb, offset, 1, parameter_type); @@ -593,7 +593,7 @@ static void parse_compression_parameters(tvbuff_t *tvb, proto_tree *tree, gboole dcomp_entity_algo_id[entity] = algo_id; comp_algo_str = sndcp_xid_dcomp_algo_str; } - else return; + else return; } else { @@ -712,7 +712,7 @@ static void parse_compression_parameters(tvbuff_t *tvb, proto_tree *tree, gboole /* Else if length is lower than 3, the packet is not correctly formatted */ } -/* Register the protocol with Wireshark +/* Register the protocol with Wireshark this format is required because a script is used to build the C function that calls all the protocol registration. */ diff --git a/epan/dissectors/packet-ssl.c b/epan/dissectors/packet-ssl.c index d5413c641a..3d38f0ed7a 100644 --- a/epan/dissectors/packet-ssl.c +++ b/epan/dissectors/packet-ssl.c @@ -474,7 +474,7 @@ static void dissect_ssl3_hnd_srv_keyex_dh(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint32 length); -static void dissect_ssl3_hnd_cli_keyex_dh(tvbuff_t *tvb, +static void dissect_ssl3_hnd_cli_keyex_dh(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint32 length); @@ -1888,7 +1888,7 @@ dissect_ssl3_handshake(tvbuff_t *tvb, packet_info *pinfo, (server key exchange is optional and appears to be rare for RSA) */ { - if (conv_cipher == 0x39 || conv_cipher == 0x33) { + if (conv_cipher == 0x39 || conv_cipher == 0x33) { dissect_ssl3_hnd_srv_keyex_dh(tvb, ssl_hand_tree, offset, length); } } @@ -2732,7 +2732,7 @@ dissect_ssl3_hnd_cert_req(tvbuff_t *tvb, } static void -dissect_ssl3_hnd_srv_keyex_dh(tvbuff_t *tvb, proto_tree *tree, +dissect_ssl3_hnd_srv_keyex_dh(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint32 length) { gint p_len, p_len_offset; @@ -2742,30 +2742,30 @@ dissect_ssl3_hnd_srv_keyex_dh(tvbuff_t *tvb, proto_tree *tree, proto_item *ti_dh; proto_tree *ssl_dh_tree; guint32 orig_offset; - + orig_offset = offset; - + p_len_offset = offset; p_len = tvb_get_ntohs(tvb, offset); offset += 2 + p_len; if ((offset - orig_offset) > length) { return; } - + g_len_offset = offset; g_len = tvb_get_ntohs(tvb, offset); offset += 2 + g_len; if ((offset - orig_offset) > length) { return; } - + ys_len_offset = offset; ys_len = tvb_get_ntohs(tvb, offset); offset += 2 + ys_len; if ((offset - orig_offset) > length) { return; } - + sig_len_offset = offset; sig_len = tvb_get_ntohs(tvb, offset); offset += 2 + sig_len; @@ -2773,66 +2773,66 @@ dissect_ssl3_hnd_srv_keyex_dh(tvbuff_t *tvb, proto_tree *tree, /* Lengths don't line up (wasn't what we expected?) */ return; } - - ti_dh = proto_tree_add_text(tree, tvb, orig_offset, + + ti_dh = proto_tree_add_text(tree, tvb, orig_offset, (offset - orig_offset), "Diffie-Hellman Server Params"); ssl_dh_tree = proto_item_add_subtree(ti_dh, ett_ssl_keyex_params); - + /* p */ proto_tree_add_uint(ssl_dh_tree, hf_ssl_handshake_server_keyex_p_len, tvb, p_len_offset, 2, p_len); proto_tree_add_item(ssl_dh_tree, hf_ssl_handshake_server_keyex_p, tvb, p_len_offset + 2, p_len, ENC_BIG_ENDIAN); - + /* g */ proto_tree_add_uint(ssl_dh_tree, hf_ssl_handshake_server_keyex_g_len, tvb, g_len_offset, 2, g_len); proto_tree_add_item(ssl_dh_tree, hf_ssl_handshake_server_keyex_g, tvb, g_len_offset + 2, g_len, ENC_BIG_ENDIAN); - + /* Ys */ proto_tree_add_uint(ssl_dh_tree, hf_ssl_handshake_server_keyex_ys_len, tvb, ys_len_offset, 2, ys_len); proto_tree_add_item(ssl_dh_tree, hf_ssl_handshake_server_keyex_ys, tvb, ys_len_offset + 2, ys_len, ENC_BIG_ENDIAN); - + /* Sig */ proto_tree_add_uint(ssl_dh_tree, hf_ssl_handshake_server_keyex_sig_len, tvb, sig_len_offset, 2, sig_len); proto_tree_add_item(ssl_dh_tree, hf_ssl_handshake_server_keyex_sig, tvb, sig_len_offset + 2, sig_len, ENC_BIG_ENDIAN); - + } static void -dissect_ssl3_hnd_cli_keyex_dh(tvbuff_t *tvb, proto_tree *tree, +dissect_ssl3_hnd_cli_keyex_dh(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint32 length) { gint yc_len, yc_len_offset; proto_item *ti_dh; proto_tree *ssl_dh_tree; guint32 orig_offset; - + orig_offset = offset; - + yc_len_offset = offset; yc_len = tvb_get_ntohs(tvb, offset); offset += 2 + yc_len; if ((offset - orig_offset) != length) { return; } - - ti_dh = proto_tree_add_text(tree, tvb, orig_offset, + + ti_dh = proto_tree_add_text(tree, tvb, orig_offset, (offset - orig_offset), "Diffie-Hellman Client Params"); ssl_dh_tree = proto_item_add_subtree(ti_dh, ett_ssl_keyex_params); - + /* Yc */ proto_tree_add_uint(ssl_dh_tree, hf_ssl_handshake_client_keyex_yc_len, tvb, yc_len_offset, 2, yc_len); proto_tree_add_item(ssl_dh_tree, hf_ssl_handshake_client_keyex_yc, tvb, yc_len_offset + 2, yc_len, ENC_BIG_ENDIAN); } - + static void diff --git a/epan/dissectors/packet-synergy.c b/epan/dissectors/packet-synergy.c index 02931f183e..6c6605948a 100644 --- a/epan/dissectors/packet-synergy.c +++ b/epan/dissectors/packet-synergy.c @@ -8,17 +8,17 @@ * By Gerald Combs <gerald@wireshark.org> * Copyright 1998 Gerald Combs * - * + * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. @@ -169,11 +169,11 @@ dissect_synergy(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) else if(strncmp(buffer,"CBYE",4)==0) proto_tree_add_item(synergy_tree,hf_synergy_cbye,tvb,offset+4,-1,FALSE); else if(strncmp(buffer,"CINN",4)==0) - dissect_synergy_cinn(tvb,pinfo,synergy_tree,offset+4); + dissect_synergy_cinn(tvb,pinfo,synergy_tree,offset+4); else if(strncmp(buffer,"COUT",4)==0) proto_tree_add_item(synergy_tree,hf_synergy_cout,tvb,offset+4,-1,FALSE); else if(strncmp(buffer,"CCLP",4)==0) - dissect_synergy_cclp(tvb,pinfo,synergy_tree,offset+4); + dissect_synergy_cclp(tvb,pinfo,synergy_tree,offset+4); else if(strncmp(buffer,"CSEC",4)==0) proto_tree_add_item(synergy_tree,hf_synergy_csec,tvb,offset+4,1,FALSE); else if(strncmp(buffer,"CROP",4)==0) @@ -223,10 +223,10 @@ static void dissect_synergy_handshake( tvbuff_t *tvb, packet_info *pinfo _U_, pr proto_tree *sub_tree = NULL; ti = proto_tree_add_item(tree, hf_synergy_handshake, tvb, offset, -1, FALSE); sub_tree = proto_item_add_subtree(ti, ett_synergy); - + proto_tree_add_item(sub_tree, hf_synergy_handshake_majorversion, tvb, offset + 7, 2, FALSE); proto_tree_add_item(sub_tree, hf_synergy_handshake_minorversion, tvb, offset + 9, 2, FALSE); - + if (tvb_length_remaining(tvb, offset + 11) != 0) { proto_tree_add_item(sub_tree, hf_synergy_unknown, tvb, offset + 11, 4, FALSE); @@ -240,7 +240,7 @@ static void dissect_synergy_cinn( tvbuff_t *tvb, packet_info *pinfo _U_, proto_t proto_tree *sub_tree = NULL; ti = proto_tree_add_item(tree, hf_synergy_cinn, tvb, offset, -1, FALSE); sub_tree = proto_item_add_subtree(ti, ett_synergy); - + proto_tree_add_item(sub_tree, hf_synergy_cinn_x, tvb, offset + 4, 2, FALSE); proto_tree_add_item(sub_tree, hf_synergy_cinn_y, tvb, offset + 6, 2, FALSE); proto_tree_add_item(sub_tree, hf_synergy_cinn_sequence, tvb, offset + 8, 4, FALSE); @@ -253,7 +253,7 @@ static void dissect_synergy_cclp( tvbuff_t *tvb, packet_info *pinfo _U_, proto_t proto_tree *sub_tree = NULL; ti = proto_tree_add_item(tree, hf_synergy_cclp, tvb, offset, -1, FALSE); sub_tree = proto_item_add_subtree(ti, ett_synergy); - + proto_tree_add_item(sub_tree, hf_synergy_cclp_clipboardidentifier, tvb, offset + 4, 1, FALSE); proto_tree_add_item(sub_tree, hf_synergy_cclp_sequencenumber, tvb, offset + 5, 4, FALSE); } @@ -264,10 +264,10 @@ static void dissect_synergy_dkdn( tvbuff_t *tvb, packet_info *pinfo _U_, proto_t proto_tree *sub_tree = NULL; ti = proto_tree_add_item(tree, hf_synergy_dkdn, tvb, offset, -1, FALSE); sub_tree = proto_item_add_subtree(ti, ett_synergy); - + proto_tree_add_item(sub_tree, hf_synergy_dkdn_keyid, tvb, offset + 4, 2, FALSE); proto_tree_add_item(sub_tree, hf_synergy_dkdn_keymodifiermask, tvb, offset + 6, 2, FALSE); - + if (tvb_length_remaining(tvb, offset + 8) != 0) proto_tree_add_item(sub_tree, hf_synergy_dkdn_keybutton, tvb, offset + 8, 2, FALSE); } @@ -278,11 +278,11 @@ static void dissect_synergy_dkrp( tvbuff_t *tvb, packet_info *pinfo _U_, proto_t proto_tree *sub_tree = NULL; ti = proto_tree_add_item(tree, hf_synergy_dkrp, tvb, offset, -1, FALSE); sub_tree = proto_item_add_subtree(ti, ett_synergy); - + proto_tree_add_item(sub_tree, hf_synergy_dkrp_keyid, tvb, offset + 4, 2, FALSE); proto_tree_add_item(sub_tree, hf_synergy_dkrp_keymodifiermask, tvb, offset + 6, 2, FALSE); proto_tree_add_item(sub_tree, hf_synergy_dkrp_numberofrepeats, tvb, offset + 8, 2, FALSE); - + if (tvb_length_remaining(tvb, offset + 10) != 0) proto_tree_add_item(sub_tree, hf_synergy_dkrp_keybutton, tvb, offset + 10, 2, FALSE); } @@ -293,10 +293,10 @@ static void dissect_synergy_dkup( tvbuff_t *tvb, packet_info *pinfo _U_, proto_t proto_tree *sub_tree = NULL; ti = proto_tree_add_item(tree, hf_synergy_dkup, tvb, offset, -1, FALSE); sub_tree = proto_item_add_subtree(ti, ett_synergy); - + proto_tree_add_item(sub_tree, hf_synergy_dkup_keyid, tvb, offset + 4, 2, FALSE); proto_tree_add_item(sub_tree, hf_synergy_dkup_keymodifiermask, tvb, offset + 6, 2, FALSE); - + if (tvb_length_remaining(tvb, offset + 8) != 0) proto_tree_add_item(sub_tree, hf_synergy_dkup_keybutton, tvb, offset + 8, 2, FALSE); } @@ -307,7 +307,7 @@ static void dissect_synergy_dmmv( tvbuff_t *tvb, packet_info *pinfo _U_, proto_t proto_tree *sub_tree = NULL; ti = proto_tree_add_item(tree, hf_synergy_dmmv, tvb, offset, -1, FALSE); sub_tree = proto_item_add_subtree(ti, ett_synergy); - + proto_tree_add_item(sub_tree, hf_synergy_dmmv_x, tvb, offset + 4, 2, FALSE); proto_tree_add_item(sub_tree, hf_synergy_dmmv_y, tvb, offset + 6, 2, FALSE); } @@ -318,7 +318,7 @@ static void dissect_synergy_dmrm( tvbuff_t *tvb, packet_info *pinfo _U_, proto_t proto_tree *sub_tree = NULL; ti = proto_tree_add_item(tree, hf_synergy_dmrm, tvb, offset, -1, FALSE); sub_tree = proto_item_add_subtree(ti, ett_synergy); - + proto_tree_add_item(sub_tree, hf_synergy_dmrm_x, tvb, offset + 4, 2, FALSE); proto_tree_add_item(sub_tree, hf_synergy_dmrm_y, tvb, offset + 6, 2, FALSE); } @@ -329,7 +329,7 @@ static void dissect_synergy_dclp( tvbuff_t *tvb, packet_info *pinfo _U_, proto_t proto_tree *sub_tree = NULL; ti = proto_tree_add_item(tree, hf_synergy_dclp, tvb, offset, -1, FALSE); sub_tree = proto_item_add_subtree(ti, ett_synergy); - + proto_tree_add_item(sub_tree, hf_synergy_dclp_clipboardidentifier, tvb, offset + 4, 1, FALSE); proto_tree_add_item(sub_tree, hf_synergy_dclp_sequencenumber, tvb, offset + 5, 4, FALSE); proto_tree_add_item(sub_tree, hf_synergy_dclp_clipboarddata, tvb, offset + 9, -1, FALSE); @@ -341,7 +341,7 @@ static void dissect_synergy_dinf( tvbuff_t *tvb, packet_info *pinfo _U_, proto_t proto_tree *sub_tree = NULL; ti = proto_tree_add_item(tree, hf_synergy_dinf, tvb, offset, -1, FALSE); sub_tree = proto_item_add_subtree(ti, ett_synergy); - + proto_tree_add_item(sub_tree, hf_synergy_dinf_clp, tvb, offset + 4, 2, FALSE); proto_tree_add_item(sub_tree, hf_synergy_dinf_ctp, tvb, offset + 6, 2, FALSE); proto_tree_add_item(sub_tree, hf_synergy_dinf_wsp, tvb, offset + 8, 2, FALSE); @@ -357,7 +357,7 @@ static void dissect_synergy_eicv( tvbuff_t *tvb, packet_info *pinfo _U_, proto_t proto_tree *sub_tree = NULL; ti = proto_tree_add_item(tree, hf_synergy_eicv, tvb, offset, -1, FALSE); sub_tree = proto_item_add_subtree(ti, ett_synergy); - + proto_tree_add_item(sub_tree, hf_synergy_eicv_majorversion, tvb, offset + 4, 2, FALSE); proto_tree_add_item(sub_tree, hf_synergy_eicv_minorversion, tvb, offset + 6, 2, FALSE); } @@ -365,7 +365,7 @@ static void dissect_synergy_eicv( tvbuff_t *tvb, packet_info *pinfo _U_, proto_t void proto_register_synergy(void) -{ +{ static hf_register_info hf[] = { { &hf_synergy_unknown, @@ -570,7 +570,7 @@ proto_register_synergy(void) proto_register_field_array(proto_synergy, hf, array_length(hf)); proto_register_subtree_array(ett, array_length(ett)); register_dissector("synergy", dissect_synergy, proto_synergy); - + } diff --git a/epan/dissectors/packet-usb-masstorage.c b/epan/dissectors/packet-usb-masstorage.c index 7b08e0ed11..c89a616fd4 100644 --- a/epan/dissectors/packet-usb-masstorage.c +++ b/epan/dissectors/packet-usb-masstorage.c @@ -19,7 +19,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ - + #ifdef HAVE_CONFIG_H # include "config.h" @@ -117,12 +117,12 @@ static const usb_setup_dissector_table_t setup_dissectors[] = { {USB_SETUP_RESET, dissect_usb_ms_reset}, {USB_SETUP_GET_MAX_LUN, dissect_usb_ms_get_max_lun}, {0, NULL} -}; +}; static const value_string setup_request_names_vals[] = { {USB_SETUP_RESET, "RESET"}, {USB_SETUP_GET_MAX_LUN, "GET MAX LUN"}, {0, NULL} -}; +}; /* Dissector for mass storage control . * Returns TRUE if a class specific dissector was found @@ -220,8 +220,8 @@ dissect_usb_ms_bulk(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree) signature=tvb_get_letohl(tvb, offset); - /* - * SCSI CDB inside CBW + /* + * SCSI CDB inside CBW */ if(is_request&&(signature==0x43425355)&&(tvb_length(tvb)==31)){ tvbuff_t *cdb_tvb; @@ -303,8 +303,8 @@ dissect_usb_ms_bulk(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree) } - /* - * SCSI RESPONSE inside CSW + /* + * SCSI RESPONSE inside CSW */ if((!is_request)&&(signature==0x53425355)&&(tvb_length(tvb)==13)){ guint8 status; @@ -331,12 +331,12 @@ dissect_usb_ms_bulk(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree) return; } itlq->last_exchange_frame=pinfo->fd->num; - + itl=(itl_nexus_t *)se_tree_lookup32(usb_ms_conv_info->itl, itlq->lun); if(!itl){ return; } - + if(!status){ dissect_scsi_rsp(tvb, pinfo, parent_tree, itlq, itl, 0); } else { @@ -353,7 +353,7 @@ dissect_usb_ms_bulk(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree) if(!itlq){ return; } - + itl=(itl_nexus_t *)se_tree_lookup32(usb_ms_conv_info->itl, itlq->lun); if(!itl){ return; @@ -368,39 +368,39 @@ proto_register_usb_ms(void) { static hf_register_info hf[] = { { &hf_usb_ms_dCBWSignature, - { "Signature", "usbms.dCBWSignature", FT_UINT32, BASE_HEX, + { "Signature", "usbms.dCBWSignature", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL }}, { &hf_usb_ms_dCBWTag, - { "Tag", "usbms.dCBWTag", FT_UINT32, BASE_HEX, + { "Tag", "usbms.dCBWTag", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL }}, { &hf_usb_ms_dCBWDataTransferLength, - { "DataTransferLength", "usbms.dCBWDataTransferLength", FT_UINT32, BASE_DEC, + { "DataTransferLength", "usbms.dCBWDataTransferLength", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }}, { &hf_usb_ms_dCBWFlags, - { "Flags", "usbms.dCBWFlags", FT_UINT8, BASE_HEX, + { "Flags", "usbms.dCBWFlags", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL }}, { &hf_usb_ms_dCBWLUN, - { "LUN", "usbms.dCBWLUN", FT_UINT8, BASE_HEX, + { "LUN", "usbms.dCBWLUN", FT_UINT8, BASE_HEX, NULL, 0x0f, NULL, HFILL }}, { &hf_usb_ms_dCBWCBLength, - { "CDB Length", "usbms.dCBWCBLength", FT_UINT8, BASE_HEX, + { "CDB Length", "usbms.dCBWCBLength", FT_UINT8, BASE_HEX, NULL, 0x1f, NULL, HFILL }}, { &hf_usb_ms_dCSWSignature, - { "Signature", "usbms.dCSWSignature", FT_UINT32, BASE_HEX, + { "Signature", "usbms.dCSWSignature", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL }}, { &hf_usb_ms_dCSWDataResidue, - { "DataResidue", "usbms.dCSWDataResidue", FT_UINT32, BASE_DEC, + { "DataResidue", "usbms.dCSWDataResidue", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }}, { &hf_usb_ms_dCSWStatus, - { "Status", "usbms.dCSWStatus", FT_UINT8, BASE_HEX, + { "Status", "usbms.dCSWStatus", FT_UINT8, BASE_HEX, VALS(status_vals), 0x0, NULL, HFILL }}, { &hf_usb_ms_request, @@ -418,18 +418,18 @@ proto_register_usb_ms(void) { &hf_usb_ms_length, { "wLength", "usbms.setup.wLength", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }}, - + { &hf_usb_ms_maxlun, { "Max LUN", "usbms.setup.maxlun", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }}, - + }; - + static gint *usb_ms_subtrees[] = { &ett_usb_ms, }; - + proto_usb_ms = proto_register_protocol("USB Mass Storage", "USBMS", "usbms"); proto_register_field_array(proto_usb_ms, hf, array_length(hf)); proto_register_subtree_array(usb_ms_subtrees, array_length(usb_ms_subtrees)); |