diff options
32 files changed, 191 insertions, 191 deletions
diff --git a/epan/dissectors/packet-asterix.c b/epan/dissectors/packet-asterix.c index c0961e284f..22034936aa 100644 --- a/epan/dissectors/packet-asterix.c +++ b/epan/dissectors/packet-asterix.c @@ -5027,7 +5027,7 @@ static const AsterixField *I062_v0_17_uap[] = { &I062_010, &I062_015, &I062_070, static const AsterixField **I062_v1_16[] = { I062_v1_16_uap, NULL }; static const AsterixField **I062_v0_17[] = { I062_v0_17_uap, NULL }; static const AsterixField ***I062[] = { I062_v1_16, I062_v0_17 }; - + static const enum_val_t I062_versions[] = { { "I062_v1_16", "Version 1.16", 0 }, { "I062_v0_17", "Version 0.17", 1 }, diff --git a/epan/dissectors/packet-ccsds.c b/epan/dissectors/packet-ccsds.c index b3e580d5fb..7b11cd3570 100644 --- a/epan/dissectors/packet-ccsds.c +++ b/epan/dissectors/packet-ccsds.c @@ -721,4 +721,4 @@ proto_reg_handoff_ccsds(void) * * vi: set shiftwidth=4 tabstop=4 noexpandtab: * :indentSize=4:tabSize=4:noTabs=false: - */ + */ diff --git a/epan/dissectors/packet-cfdp.c b/epan/dissectors/packet-cfdp.c index ccf99d5cb6..a9bf85fa64 100644 --- a/epan/dissectors/packet-cfdp.c +++ b/epan/dissectors/packet-cfdp.c @@ -32,7 +32,7 @@ /* The CFDP standard can be found here: * http://public.ccsds.org/publications/archive/727x0b4.pdf - * + * * The Store and Forward Overlay Operations are not included. */ @@ -468,13 +468,13 @@ dissect_cfdp_tseq_num(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint8 le /* Dissect the Filestore Request TLV */ static guint32 dissect_cfdp_filestore_req_tlv(tvbuff_t *tvb, proto_tree *tree, guint32 ext_offset){ - + guint8 aux_byte, tlv_len; proto_item *cfdp_filestore_req = NULL; proto_tree *cfdp_filestore_req_tree; - + guint32 offset = ext_offset; - + /* Get field length */ tlv_len = tvb_get_guint8(tvb, offset); offset += 1; @@ -838,7 +838,7 @@ static guint32 dissect_cfdp_msg_to_user_tlv(tvbuff_t *tvb, proto_tree *tree, gui len_ent_id = ((aux_byte & HDR_LEN_ENT_ID) >> 4) + 1; dissect_cfdp_src_entity_id(tvb, cfdp_msg_to_user_tree, offset, len_ent_id); offset += len_ent_id; - + len_tseq_num = (aux_byte & HDR_LEN_TSEQ_NUM) +1; dissect_cfdp_tseq_num(tvb, cfdp_msg_to_user_tree, offset, len_tseq_num); offset += len_tseq_num; @@ -1043,12 +1043,12 @@ static guint32 dissect_cfdp_metadata_pdu(tvbuff_t *tvb, proto_tree *tree, guint3 case FAULT_HDL_OVERR: offset = dissect_cfdp_fault_handler_overr_tlv(tvb, tree, offset); - break; + break; case FLOW_LABEL: offset = dissect_cfdp_flow_label_tlv(tvb, tree, offset); break; - + default: break; } @@ -1559,7 +1559,7 @@ proto_register_cfdp(void) NULL, HFILL} }, { &hf_cfdp_listing_resp_code, - {"Listing Response Code", "cfdp.listing_resp_code", + {"Listing Response Code", "cfdp.listing_resp_code", FT_UINT8, BASE_DEC, VALS(cfdp_listing_resp_code), 0x80, NULL, HFILL} }, @@ -1568,12 +1568,12 @@ proto_register_cfdp(void) NULL, HFILL} }, { &hf_cfdp_rep_resp_code, - {"Report Response Code", "cfdp.rep_resp_code", + {"Report Response Code", "cfdp.rep_resp_code", FT_UINT8, BASE_DEC, VALS(cfdp_rep_resp_code), 0x01, NULL, HFILL} }, { &hf_cfdp_suspension_ind, - {"Suspension indicator", "cfdp.suspension_ind", + {"Suspension indicator", "cfdp.suspension_ind", FT_UINT8, BASE_DEC, VALS(cfdp_suspension_ind), 0x80, NULL, HFILL} } @@ -1627,4 +1627,4 @@ proto_reg_handoff_cfdp(void) * * vi: set shiftwidth=4 tabstop=4 noexpandtab: * :indentSize=4:tabSize=4:noTabs=false: - */ + */ diff --git a/epan/dissectors/packet-cimd.c b/epan/dissectors/packet-cimd.c index 711d0517eb..879a249f6e 100644 --- a/epan/dissectors/packet-cimd.c +++ b/epan/dissectors/packet-cimd.c @@ -4,7 +4,7 @@ * * Copyright : 2005 Viorel Suman <vsuman[AT]avmob.ro>, Lucian Piros <lpiros[AT]avmob.ro> * In association with Avalanche Mobile BV, http://www.avmob.com - * + * * Updates : * Sub routines for further dissection of Status and Error codes added by Vineeth <vineethvijaysv@gmail.com> * @@ -757,7 +757,7 @@ static void dissect_cimd_error_code( tvbuff_t *tvb, proto_tree *tree, gint pinde proto_tree_add_item(param_tree, hf_cimd_pcode_indicator, tvb, startOffset + 1, CIMD_PC_LENGTH, ENC_ASCII|ENC_NA); err_code = (guint32) strtoul(tvb_get_string(wmem_packet_scope(), tvb, - startOffset + 1 + CIMD_PC_LENGTH + 1, endOffset - (startOffset + 1 + CIMD_PC_LENGTH + 1)), + startOffset + 1 + CIMD_PC_LENGTH + 1, endOffset - (startOffset + 1 + CIMD_PC_LENGTH + 1)), NULL, 10); proto_tree_add_uint(param_tree, (*vals_hdr_PC[pindex].hf_p), tvb, startOffset + 1 + CIMD_PC_LENGTH + 1, endOffset - (startOffset + 1 + CIMD_PC_LENGTH + 1), err_code); } @@ -1134,7 +1134,7 @@ proto_register_cimd(void) }, { &hf_index[35], { "Error Code Description", "cimd.errcode", - FT_UINT16, BASE_DEC|BASE_EXT_STRING, &cimd_error_vals_ext, 0x00, + FT_UINT16, BASE_DEC|BASE_EXT_STRING, &cimd_error_vals_ext, 0x00, NULL, HFILL } }, { &hf_index[36], diff --git a/epan/dissectors/packet-dcerpc.c b/epan/dissectors/packet-dcerpc.c index 6effeadb7e..a48ce6af04 100644 --- a/epan/dissectors/packet-dcerpc.c +++ b/epan/dissectors/packet-dcerpc.c @@ -6305,8 +6305,8 @@ proto_register_dcerpc(void) /* Decode As handling */ static build_valid_func dcerpc_da_build_value[1] = {dcerpc_value}; static decode_as_value_t dcerpc_da_values = {dcerpc_prompt, 1, dcerpc_da_build_value}; - static decode_as_t dcerpc_da = {"dcerpc", "DCE-RPC", - /* XXX - DCE/RPC doesn't have a true (sub)dissector table, so + static decode_as_t dcerpc_da = {"dcerpc", "DCE-RPC", + /* XXX - DCE/RPC doesn't have a true (sub)dissector table, so provide a "fake" one to fit the Decode As algorithm */ "dcerpc.fake", 1, 0, &dcerpc_da_values, NULL, NULL, diff --git a/epan/dissectors/packet-dmp.c b/epan/dissectors/packet-dmp.c index 2dd6e33f4a..d433e69836 100644 --- a/epan/dissectors/packet-dmp.c +++ b/epan/dissectors/packet-dmp.c @@ -3160,7 +3160,7 @@ static gint dissect_dmp_message (tvbuff_t *tvb, packet_info *pinfo, if (eit != EIT_BILATERAL && body_len > 0) { field_tree = proto_item_add_subtree (tf, ett_message_body); - proto_tree_add_item (field_tree, hf_message_body_plain, body_tvb, + proto_tree_add_item (field_tree, hf_message_body_plain, body_tvb, body_offset, body_len, ENC_ASCII|ENC_NA); } } diff --git a/epan/dissectors/packet-dtls.c b/epan/dissectors/packet-dtls.c index 13f29eeeea..b599f9af6e 100644 --- a/epan/dissectors/packet-dtls.c +++ b/epan/dissectors/packet-dtls.c @@ -3299,7 +3299,7 @@ proto_register_dtls(void) { "Reassembled DTLS length", "dtls.reassembled.length", FT_UINT32, BASE_DEC, NULL, 0x00, NULL, HFILL } }, - SSL_COMMON_HF_LIST(dissect_dtls_hf, "dtls") + SSL_COMMON_HF_LIST(dissect_dtls_hf, "dtls") }; /* Setup protocol subtree array */ diff --git a/epan/dissectors/packet-gadu-gadu.c b/epan/dissectors/packet-gadu-gadu.c index 28a61f661c..092d38953f 100644 --- a/epan/dissectors/packet-gadu-gadu.c +++ b/epan/dissectors/packet-gadu-gadu.c @@ -603,7 +603,7 @@ dissect_gadu_gadu_stringz_cp1250(tvbuff_t *tvb, header_field_info *hfi, proto_tr int len = gadu_gadu_strsize(tvb, offset); proto_tree_add_item(tree, hfi, tvb, offset, len, ENC_WINDOWS_1250 | ENC_NA); - + return offset + len; } diff --git a/epan/dissectors/packet-gsm_a_dtap.c b/epan/dissectors/packet-gsm_a_dtap.c index 044d20ebb9..d5ff36fd68 100644 --- a/epan/dissectors/packet-gsm_a_dtap.c +++ b/epan/dissectors/packet-gsm_a_dtap.c @@ -1778,7 +1778,7 @@ bc_octet_6: proto_tree_add_item(subtree, hf_gsm_a_dtap_negotiation, tvb, curr_offset, 1, ENC_NA); proto_tree_add_item(subtree, hf_gsm_a_dtap_number_of_data_bits, tvb, curr_offset, 1, ENC_NA); - proto_tree_add_uint_format_value(subtree, hf_gsm_a_dtap_user_rate, + proto_tree_add_uint_format_value(subtree, hf_gsm_a_dtap_user_rate, tvb, curr_offset, 1, oct, "%s", val_to_str_const(oct & 0xF, gsm_a_dtap_user_rate_vals, "Reserved")); curr_offset++; @@ -1919,7 +1919,7 @@ bc_octet_6: } else { - proto_tree_add_uint_format_value(subtree, hf_gsm_a_dtap_wanted_air_interface_user_rate, tvb, curr_offset, 1, + proto_tree_add_uint_format_value(subtree, hf_gsm_a_dtap_wanted_air_interface_user_rate, tvb, curr_offset, 1, oct, "Spare"); } @@ -3554,11 +3554,11 @@ de_tp_pdu_description(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, g proto_tree_add_uint_format_value(tree, hf_gsm_a_dtap_tp_pdu_description, tvb, curr_offset, 2, value, "Infinite number of PDUs to be transmitted in the TBF"); else - proto_tree_add_uint_format_value(tree, hf_gsm_a_dtap_tp_pdu_description, + proto_tree_add_uint_format_value(tree, hf_gsm_a_dtap_tp_pdu_description, tvb, curr_offset, 2, value & 0xfff, "%d PDUs to be transmitted in the TBF", value & 0xfff); } else - proto_tree_add_uint_format_value(tree, hf_gsm_a_dtap_tp_pdu_description, + proto_tree_add_uint_format_value(tree, hf_gsm_a_dtap_tp_pdu_description, tvb, curr_offset, 2, value, "reserved"); return(curr_offset - offset); @@ -3623,7 +3623,7 @@ de_tp_ms_positioning_technology(tvbuff_t *tvb, proto_tree *tree, packet_info *pi curr_offset = offset; oct = tvb_get_guint8(tvb, curr_offset); - proto_tree_add_uint_format_value(tree, hf_gsm_a_dtap_ms_positioning_technology, tvb, curr_offset, 1, + proto_tree_add_uint_format_value(tree, hf_gsm_a_dtap_ms_positioning_technology, tvb, curr_offset, 1, oct, "%s", val_to_str(oct, gsm_positioning_technology_vals, "Reserved (%d)")); curr_offset+= 1; @@ -3689,7 +3689,7 @@ de_tp_ue_positioning_technology(tvbuff_t *tvb, proto_tree *tree, packet_info *pi oct = tvb_get_guint8(tvb, curr_offset); - proto_tree_add_uint_format_value(tree, hf_gsm_a_dtap_ue_positioning_technology, tvb, curr_offset, 1, + proto_tree_add_uint_format_value(tree, hf_gsm_a_dtap_ue_positioning_technology, tvb, curr_offset, 1, oct, "%s", val_to_str(oct, gsm_positioning_technology_vals, "Reserved (%d)")); curr_offset+= 1; diff --git a/epan/dissectors/packet-gtp.c b/epan/dissectors/packet-gtp.c index ffb7967d65..1733333913 100644 --- a/epan/dissectors/packet-gtp.c +++ b/epan/dissectors/packet-gtp.c @@ -4505,7 +4505,7 @@ decode_qos_umts(tvbuff_t * tvb, int offset, proto_tree * tree, const gchar * qos if(length > 13 ||((type == 2) && (length == 13))) { proto_tree_add_uint(ext_tree_qos, hf_gtp_qos_src_stat_desc, tvb, offset + (12 - 1) * utf8_type + 1, utf8_type, src_stat_desc); proto_tree_add_boolean(ext_tree_qos, hf_gtp_qos_sig_ind, tvb, offset + (12 - 1) * utf8_type + 1, utf8_type, sig_ind); - } + } if(length > 14) { diff --git a/epan/dissectors/packet-hdmi.c b/epan/dissectors/packet-hdmi.c index f3034773a3..b70190f0f4 100644 --- a/epan/dissectors/packet-hdmi.c +++ b/epan/dissectors/packet-hdmi.c @@ -172,7 +172,7 @@ dissect_hdmi_edid(tvbuff_t *tvb, gint offset, packet_info *pinfo, proto_tree *tr return tvb_reported_length(tvb); } - + static int dissect_hdmi(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_) { diff --git a/epan/dissectors/packet-icmp.c b/epan/dissectors/packet-icmp.c index 1a081606dc..46255bee02 100644 --- a/epan/dissectors/packet-icmp.c +++ b/epan/dissectors/packet-icmp.c @@ -1076,9 +1076,9 @@ static icmp_transaction_t *transaction_start(packet_info * pinfo, it = proto_tree_add_item(tree, hf_icmp_no_resp, NULL, 0, 0, ENC_BIG_ENDIAN); PROTO_ITEM_SET_GENERATED(it); - + col_append_fstr(pinfo->cinfo, COL_INFO, " (no response found!)"); - + /* Expert info. TODO: add to _icmp_transaction_t type and sequence number so can report here (and in taps) */ expert_add_info_format(pinfo, it, &ei_icmp_resp_not_found, diff --git a/epan/dissectors/packet-ieee80211.c b/epan/dissectors/packet-ieee80211.c index d325801379..bc360afa23 100644 --- a/epan/dissectors/packet-ieee80211.c +++ b/epan/dissectors/packet-ieee80211.c @@ -9809,7 +9809,7 @@ dissect_mcs_set(proto_tree *tree, tvbuff_t *tvb, int offset, gboolean basic, gbo offset += 2; /* Bits 53 - 76 */ - value_mcs_53_76 = tvb_get_letohl(tvb, offset); + value_mcs_53_76 = tvb_get_letohl(tvb, offset); if ((value_mcs_53_76 & (0x1fffffe0))) { /* * At least one MCS from 53-76 is supported, so we have at least 4 @@ -9827,7 +9827,7 @@ dissect_mcs_set(proto_tree *tree, tvbuff_t *tvb, int offset, gboolean basic, gbo /* Follow table 8-126 from 802.11-2012 */ tx_mcs_set = tvb_get_letohs(tvb,offset); - if (!(tx_mcs_set & 0x0001) && !(tx_mcs_set & 0x0002)) + if (!(tx_mcs_set & 0x0001) && !(tx_mcs_set & 0x0002)) { /* TX MCS Set is not defined * so there is no interpretation for Max Tx Spatial Streams @@ -9835,10 +9835,10 @@ dissect_mcs_set(proto_tree *tree, tvbuff_t *tvb, int offset, gboolean basic, gbo tx_nss = 4; /* Not Defined*/ } - if ((tx_mcs_set & 0x0001) && !(tx_mcs_set & 0x0002)) + if ((tx_mcs_set & 0x0001) && !(tx_mcs_set & 0x0002)) { /* TX MCS Set is defined to be equal to Rx MCS Set - * So, get the Max Spatial Streams from Rx + * So, get the Max Spatial Streams from Rx * MCS set */ tx_nss = rx_nss; diff --git a/epan/dissectors/packet-ipv6.c b/epan/dissectors/packet-ipv6.c index 8e564efaae..be97bff8ad 100644 --- a/epan/dissectors/packet-ipv6.c +++ b/epan/dissectors/packet-ipv6.c @@ -2118,8 +2118,8 @@ again: /* COL_INFO was filled in by "dissect_frag6()" */ call_dissector(data_handle, tvb_new_subset_remaining(tvb, offset), pinfo, tree); return; - } - + } + /* First fragment, not fragmented, or already reassembled. Dissect what we have here. */ /* Get a tvbuff for the payload. */ diff --git a/epan/dissectors/packet-isis-hello.c b/epan/dissectors/packet-isis-hello.c index 5408f1560e..76ddc121b5 100644 --- a/epan/dissectors/packet-isis-hello.c +++ b/epan/dissectors/packet-isis-hello.c @@ -439,7 +439,7 @@ dissect_hello_mt_clv(tvbuff_t *tvb, packet_info* pinfo _U_, * void, will modify proto_tree if not null. */ static void -dissect_hello_ip_int_addr_clv(tvbuff_t *tvb, packet_info* pinfo, +dissect_hello_ip_int_addr_clv(tvbuff_t *tvb, packet_info* pinfo, proto_tree *tree, int offset, int id_length _U_, int length) { isis_dissect_ip_int_clv(tree, pinfo, tvb, &ei_isis_hello_short_packet, diff --git a/epan/dissectors/packet-isis-lsp.c b/epan/dissectors/packet-isis-lsp.c index 72569275ef..48184d2000 100644 --- a/epan/dissectors/packet-isis-lsp.c +++ b/epan/dissectors/packet-isis-lsp.c @@ -996,7 +996,7 @@ dissect_isis_rt_capable_clv(tvbuff_t *tvb, packet_info* pinfo _U_, while (len>0) { rt_block = tvb_get_ntohs(tvb, offset); - proto_tree_add_uint_format(rt_tree, hf_isis_lsp_rt_capable_vlan_group_nth_secondary_vlan_id, tvb, offset, 2, + proto_tree_add_uint_format(rt_tree, hf_isis_lsp_rt_capable_vlan_group_nth_secondary_vlan_id, tvb, offset, 2, rt_block, "%dth secondary vlan id: %x", sec_vlan_id, rt_block); length -= 2; diff --git a/epan/dissectors/packet-isis-snp.c b/epan/dissectors/packet-isis-snp.c index 713242cfa3..e95503f402 100644 --- a/epan/dissectors/packet-isis-snp.c +++ b/epan/dissectors/packet-isis-snp.c @@ -342,7 +342,7 @@ dissect_isis_csnp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offse "packet header length %d went beyond packet", header_length ); return; } - + isis_dissect_clvs(tvb, pinfo, csnp_tree, offset, opts, &ei_isis_csnp_short_packet, len, id_length, ett_isis_csnp_clv_unknown ); } diff --git a/epan/dissectors/packet-json.c b/epan/dissectors/packet-json.c index 0d67da312c..3092a10151 100644 --- a/epan/dissectors/packet-json.c +++ b/epan/dissectors/packet-json.c @@ -256,7 +256,7 @@ json_tvb_memcpy_utf8(char *buf, tvbuff_t *tvb, int offset, int offset_max) int len = ws_utf8_char_len((guint8) *buf); /* XXX, before moving to core API check if it's off-by-one safe. - * For JSON analyzer it's not a problem + * For JSON analyzer it's not a problem * (string always terminated by ", which is not valid UTF-8 continuation character) */ if (len == -1 || ((guint) (offset + len)) >= (guint) offset_max) { *buf = '?'; diff --git a/epan/dissectors/packet-knet.c b/epan/dissectors/packet-knet.c index 5966c30f02..eb13f16a86 100644 --- a/epan/dissectors/packet-knet.c +++ b/epan/dissectors/packet-knet.c @@ -377,7 +377,7 @@ dissect_messageid(tvbuff_t *buffer, int *offset, proto_tree *tree, packet_info * proto_tree_add_uint_format_value(tree, hf_knet_messageid, buffer, *offset, messageid_length, messageid, "%s (%d)", val_to_str_const(messageid, packettypenames, "AppData or Malformed Message ID"), messageid); - /* XXX - TCP reassembly disables writing columns which prevents populating COL_INFO if multiple KNET messages + /* XXX - TCP reassembly disables writing columns which prevents populating COL_INFO if multiple KNET messages appear in a single packet that needed to be reassembled. Force making columns writable. */ diff --git a/epan/dissectors/packet-llc.c b/epan/dissectors/packet-llc.c index 5b4a812309..e646967c9c 100644 --- a/epan/dissectors/packet-llc.c +++ b/epan/dissectors/packet-llc.c @@ -513,7 +513,7 @@ dissect_llc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) if (tree) { proto_item *dsap_item; gchar label[ITEM_LABEL_LENGTH]; - + ti = proto_tree_add_item(tree, proto_llc, tvb, 0, -1, ENC_NA); llc_tree = proto_item_add_subtree(ti, ett_llc); dsap_item = proto_tree_add_item(llc_tree, hf_llc_dsap, tvb, 0, 1, ENC_NA); @@ -528,7 +528,7 @@ dissect_llc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) if (tree) { proto_item *ssap_item; gchar label[ITEM_LABEL_LENGTH]; - + ssap_item = proto_tree_add_item(llc_tree, hf_llc_ssap, tvb, 1, 1, ENC_NA); field_tree = proto_item_add_subtree(ssap_item, ett_llc_ssap); proto_tree_add_text(field_tree, tvb, 1, 1, "%s", @@ -920,7 +920,7 @@ proto_register_llc(void) static gint *ett[] = { &ett_llc, &ett_llc_dsap, - &ett_llc_ssap, + &ett_llc_ssap, &ett_llc_ctrl, }; diff --git a/epan/dissectors/packet-mac-lte.c b/epan/dissectors/packet-mac-lte.c index e18ed94447..9ea4fbe5df 100644 --- a/epan/dissectors/packet-mac-lte.c +++ b/epan/dissectors/packet-mac-lte.c @@ -1889,7 +1889,7 @@ gboolean dissect_mac_lte_context_fields(struct mac_lte_info *p_mac_lte_info, tv offset++; break; case MAC_LTE_CARRIER_ID_TAG: - p_mac_lte_info->carrierId = + p_mac_lte_info->carrierId = (mac_lte_carrier_id)tvb_get_guint8(tvb, offset); offset++; break; @@ -1903,55 +1903,55 @@ gboolean dissect_mac_lte_context_fields(struct mac_lte_info *p_mac_lte_info, tv if (len < 10) goto next; p_mac_lte_info->detailed_phy_info.dl_info.present = TRUE; - p_mac_lte_info->detailed_phy_info.dl_info.dci_format = + p_mac_lte_info->detailed_phy_info.dl_info.dci_format = tvb_get_guint8(tvb, offset); offset++; - p_mac_lte_info->detailed_phy_info.dl_info.resource_allocation_type = + p_mac_lte_info->detailed_phy_info.dl_info.resource_allocation_type = tvb_get_guint8(tvb, offset); offset++; - p_mac_lte_info->detailed_phy_info.dl_info.aggregation_level = + p_mac_lte_info->detailed_phy_info.dl_info.aggregation_level = tvb_get_guint8(tvb, offset); offset++; - p_mac_lte_info->detailed_phy_info.dl_info.mcs_index = + p_mac_lte_info->detailed_phy_info.dl_info.mcs_index = tvb_get_guint8(tvb, offset); offset++; - p_mac_lte_info->detailed_phy_info.dl_info.redundancy_version_index = + p_mac_lte_info->detailed_phy_info.dl_info.redundancy_version_index = tvb_get_guint8(tvb, offset); offset++; - p_mac_lte_info->detailed_phy_info.dl_info.resource_block_length = + p_mac_lte_info->detailed_phy_info.dl_info.resource_block_length = tvb_get_guint8(tvb, offset); offset++; - p_mac_lte_info->detailed_phy_info.dl_info.harq_id = + p_mac_lte_info->detailed_phy_info.dl_info.harq_id = tvb_get_guint8(tvb, offset); offset++; - p_mac_lte_info->detailed_phy_info.dl_info.ndi = + p_mac_lte_info->detailed_phy_info.dl_info.ndi = tvb_get_guint8(tvb, offset); offset++; - p_mac_lte_info->detailed_phy_info.dl_info.transport_block = + p_mac_lte_info->detailed_phy_info.dl_info.transport_block = tvb_get_guint8(tvb, offset); offset++; - p_mac_lte_info->dl_retx = + p_mac_lte_info->dl_retx = (mac_lte_dl_retx)tvb_get_guint8(tvb, offset); } else { if (len < 6) goto next; p_mac_lte_info->detailed_phy_info.ul_info.present = TRUE; - p_mac_lte_info->detailed_phy_info.ul_info.modulation_type = + p_mac_lte_info->detailed_phy_info.ul_info.modulation_type = tvb_get_guint8(tvb, offset); offset++; - p_mac_lte_info->detailed_phy_info.ul_info.tbs_index = + p_mac_lte_info->detailed_phy_info.ul_info.tbs_index = tvb_get_guint8(tvb, offset); offset++; - p_mac_lte_info->detailed_phy_info.ul_info.resource_block_length = + p_mac_lte_info->detailed_phy_info.ul_info.resource_block_length = tvb_get_guint8(tvb, offset); offset++; - p_mac_lte_info->detailed_phy_info.ul_info.resource_block_start = + p_mac_lte_info->detailed_phy_info.ul_info.resource_block_start = tvb_get_guint8(tvb, offset); offset++; - p_mac_lte_info->detailed_phy_info.ul_info.harq_id = + p_mac_lte_info->detailed_phy_info.ul_info.harq_id = tvb_get_guint8(tvb, offset); offset++; - p_mac_lte_info->detailed_phy_info.ul_info.ndi = + p_mac_lte_info->detailed_phy_info.ul_info.ndi = tvb_get_guint8(tvb, offset); } next: diff --git a/epan/dissectors/packet-mpeg-dsmcc.c b/epan/dissectors/packet-mpeg-dsmcc.c index 5eec1e9e94..ba59ebe897 100644 --- a/epan/dissectors/packet-mpeg-dsmcc.c +++ b/epan/dissectors/packet-mpeg-dsmcc.c @@ -931,9 +931,9 @@ proto_register_dsmcc(void) { &hf_dsmcc_un_sess_uu_data, { "User data", "mpeg_dsmcc.un_sess.uu_data", - FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL + FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL } }, - + { &hf_dsmcc_un_sess_priv_data_len, { "Private data length", "mpeg_dsmcc.un_sess.priv_data_len", FT_UINT16, BASE_DEC, NULL, 0, NULL, HFILL @@ -941,14 +941,14 @@ proto_register_dsmcc(void) { &hf_dsmcc_un_sess_priv_data, { "Private data", "mpeg_dsmcc.un_sess.priv_data", - FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL + FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL } }, /* table 4-6 U-N user data format - end */ /* other tables in section 4.2 - start */ { &hf_dsmcc_un_sess_id, { "Session ID", "mpeg_dsmcc.un_sess.session_id", - FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL + FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL } }, { &hf_dsmcc_un_sess_response, { diff --git a/epan/dissectors/packet-mpls.c b/epan/dissectors/packet-mpls.c index ebc26a8e5e..6a569b279f 100644 --- a/epan/dissectors/packet-mpls.c +++ b/epan/dissectors/packet-mpls.c @@ -322,7 +322,7 @@ static dissector_table_t mpls_subdissector_table; static void mpls_prompt(packet_info *pinfo, gchar* result) { - g_snprintf(result, MAX_DECODE_AS_PROMPT_LEN, "Data after label %u as", + g_snprintf(result, MAX_DECODE_AS_PROMPT_LEN, "Data after label %u as", GPOINTER_TO_UINT(p_get_proto_data(pinfo->pool, pinfo, proto_mpls, 0))); } diff --git a/epan/dissectors/packet-netlink-route.c b/epan/dissectors/packet-netlink-route.c index 7e8eb5a09a..1fa75e5cc5 100644 --- a/epan/dissectors/packet-netlink-route.c +++ b/epan/dissectors/packet-netlink-route.c @@ -133,7 +133,7 @@ enum ws_ifla_attr_type { }; /* values for rta_type (ip address) from <linux/if_addr.h> */ -enum ws_ifa_attr_type { +enum ws_ifa_attr_type { WS_IFA_UNSPEC = 0, WS_IFA_ADDRESS = 1, WS_IFA_LOCAL = 2, @@ -305,7 +305,7 @@ static int dissect_netlink_route_attributes(tvbuff_t *tvb, header_field_info *hfi_type, struct netlink_route_info *info, proto_tree *tree, int offset, netlink_route_attributes_cb_t cb) { /* XXX, it's *almost* the same: - * - rtnetlink is using struct rtattr with shorts + * - rtnetlink is using struct rtattr with shorts * - generic netlink is using struct nlattr with __u16 */ @@ -782,7 +782,7 @@ dissect_netlink_route_ndmsg(tvbuff_t *tvb, struct netlink_route_info *info, prot { proto_tree_add_item(tree, &hfi_netlink_route_nd_family, tvb, offset, 1, ENC_NA); offset += 1; - + /* XXX, 3B padding */ offset += 3; diff --git a/epan/dissectors/packet-netlink-sock_diag.c b/epan/dissectors/packet-netlink-sock_diag.c index 29492f63f2..22129c3535 100644 --- a/epan/dissectors/packet-netlink-sock_diag.c +++ b/epan/dissectors/packet-netlink-sock_diag.c @@ -57,7 +57,7 @@ enum { WS_DCCPDIAG_GETSOCK = 19, /* <linux/sock_diag.h> */ - WS_SOCK_DIAG_BY_FAMILY = 20 + WS_SOCK_DIAG_BY_FAMILY = 20 }; enum { @@ -1170,8 +1170,8 @@ proto_register_netlink_sock_diag(void) &hfi_netlink_sock_diag_inet_interface, /* AF_NETLINK */ - &hfi_netlink_sock_diag_netlink_show, - &hfi_netlink_sock_diag_netlink_show_meminfo, + &hfi_netlink_sock_diag_netlink_show, + &hfi_netlink_sock_diag_netlink_show_meminfo, &hfi_netlink_sock_diag_netlink_show_groups, &hfi_netlink_sock_diag_netlink_show_ring_cfg, &hfi_netlink_sock_diag_netlink_proto, diff --git a/epan/dissectors/packet-openflow_v4.c b/epan/dissectors/packet-openflow_v4.c index 2fc1ff60f7..0b60f0fad5 100644 --- a/epan/dissectors/packet-openflow_v4.c +++ b/epan/dissectors/packet-openflow_v4.c @@ -4674,7 +4674,7 @@ dissect_openflow_v4(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *d return tvb_length(tvb); } -/* +/* * Register the protocol with Wireshark. */ void diff --git a/epan/dissectors/packet-openflow_v5.c b/epan/dissectors/packet-openflow_v5.c index cf23897e34..2f7dd2ad08 100644 --- a/epan/dissectors/packet-openflow_v5.c +++ b/epan/dissectors/packet-openflow_v5.c @@ -6001,7 +6001,7 @@ dissect_openflow_v5(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *d -/* +/* * Register the protocol with Wireshark. */ void diff --git a/epan/dissectors/packet-pdcp-lte.c b/epan/dissectors/packet-pdcp-lte.c index 2f6f42a34c..e7db78f93e 100644 --- a/epan/dissectors/packet-pdcp-lte.c +++ b/epan/dissectors/packet-pdcp-lte.c @@ -1373,7 +1373,7 @@ void set_pdcp_lte_security_algorithms_failed(guint16 ueid) /* Go back to previous state */ ue_security->configuration_frame = ue_security->previous_configuration_frame; ue_security->integrity = ue_security->previous_integrity; - ue_security->ciphering = ue_security->previous_ciphering; + ue_security->ciphering = ue_security->previous_ciphering; } } @@ -1440,32 +1440,32 @@ static tvbuff_t *decipher_payload(tvbuff_t *tvb, packet_info *pinfo, int *offset ctr_block[2] = (pdu_security_settings->count & 0x0000ff00) >> 8; ctr_block[3] = (pdu_security_settings->count & 0x000000ff); ctr_block[4] = (pdu_security_settings->bearer << 3) + (pdu_security_settings->direction << 2); - + /* Open gcrypt handle */ gcrypt_err = gcry_cipher_open(&cypher_hd, GCRY_CIPHER_AES128, GCRY_CIPHER_MODE_CTR, 0); if (gcrypt_err != 0) { return tvb; } - + /* Set the key */ gcrypt_err = gcry_cipher_setkey(cypher_hd, pdu_security_settings->cipherKey, 16); if (gcrypt_err != 0) { gcry_cipher_close(cypher_hd); return tvb; } - + /* Set the CTR */ gcrypt_err = gcry_cipher_setctr(cypher_hd, ctr_block, 16); if (gcrypt_err != 0) { gcry_cipher_close(cypher_hd); return tvb; } - + /* Extract the encrypted data into a buffer */ payload_length = tvb_length_remaining(tvb, *offset); decrypted_data = (guint8 *)g_malloc0(payload_length); tvb_memcpy(tvb, decrypted_data, *offset, payload_length); - + /* Decrypt the actual data */ gcrypt_err = gcry_cipher_decrypt(cypher_hd, decrypted_data, payload_length, @@ -1475,7 +1475,7 @@ static tvbuff_t *decipher_payload(tvbuff_t *tvb, packet_info *pinfo, int *offset g_free(decrypted_data); return tvb; } - + /* Close gcrypt handle */ gcry_cipher_close(cypher_hd); } @@ -1550,7 +1550,7 @@ static guint32 calculate_digest(pdu_security_settings_t *pdu_security_settings, pdu_security_settings->direction, message_data, (message_length+1)*8); - + *calculated = TRUE; g_free(message_data); return ((mac[0] << 24) | (mac[1] << 16) | (mac[2] << 8) | mac[3]); diff --git a/epan/dissectors/packet-rlc-lte.c b/epan/dissectors/packet-rlc-lte.c index 867e15b820..d9524e5dc4 100644 --- a/epan/dissectors/packet-rlc-lte.c +++ b/epan/dissectors/packet-rlc-lte.c @@ -2845,7 +2845,7 @@ static void dissect_rlc_lte_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree proto_item_append_text(top_ti, " UEId=%u", p_rlc_lte_info->ueid); col_append_fstr(pinfo->cinfo, COL_INFO, "UEId=%-4u ", p_rlc_lte_info->ueid); } - + /* Append context highlights to info column */ write_pdu_label_and_info(top_ti, NULL, pinfo, " [%s] [%s] ", diff --git a/epan/dissectors/packet-s5066dts.c b/epan/dissectors/packet-s5066dts.c index 8465d74a60..c4eb8b367c 100644 --- a/epan/dissectors/packet-s5066dts.c +++ b/epan/dissectors/packet-s5066dts.c @@ -10,8 +10,8 @@ * By Gerald Combs <gerald@wireshark.org> * Copyright 1998 Gerald Combs * - * $Id$ - * + * $Id$ + * * 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 @@ -407,7 +407,7 @@ static void dissect_s5066dts_eow_hdr_drc_request(tvbuff_t *tvb, packet_info * pi } /* {15, "HFTRP FRAME CONTROL"}, */ -static void dissect_s5066dts_eow_hftrp(tvbuff_t *tvb, packet_info * pinfo, guint offset, +static void dissect_s5066dts_eow_hftrp(tvbuff_t *tvb, packet_info * pinfo, guint offset, proto_tree *tree, guint pdu_type) { if (pdu_type != S5066_DPDU_MANAGEMENT) @@ -564,7 +564,7 @@ static guint dissect_s5066dts_data_only(tvbuff_t *tvb, guint offset, proto_tree return offset; } - + /* { 1, "ACK_ONLY"}, */ static guint dissect_s5066dts_ack_only(tvbuff_t *tvb, guint offset, proto_tree *tree, guint header_size) @@ -648,7 +648,7 @@ static guint dissect_s5066dts_management(tvbuff_t *tvb, guint offset, proto_tree guint8 eow_content; proto_item *hftrp_proto_item = NULL; proto_tree *hftrp_token_tree = NULL; - guint eow_type; + guint eow_type; guint extended_message_size; eow_type = tvb_get_guint8(tvb, offset) & 0x0F; diff --git a/epan/dissectors/packet-socketcan.c b/epan/dissectors/packet-socketcan.c index d416b0224e..79db4b077c 100644 --- a/epan/dissectors/packet-socketcan.c +++ b/epan/dissectors/packet-socketcan.c @@ -84,7 +84,7 @@ typedef enum { /* Structure that gets passed between dissectors. Since it's just a simple 32-bit value, no sense in creating a header file for it. Just expect subdissectors to provide their own. - */ + */ struct can_identifier { guint32 id; @@ -170,7 +170,7 @@ dissect_socketcan(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) call_dissector_with_data(canopen_handle, next_tvb, pinfo, tree, &can_id); break; case CAN_DEVICENET_DISSECTOR: - /* XXX - Not sure this is correct. But the capture provided in + /* XXX - Not sure this is correct. But the capture provided in * bug 8564 provides CAN ID in little endian format, so this makes it work */ can_id.id = GUINT32_SWAP_LE_BE(can_id.id); diff --git a/epan/dissectors/packet-zbee-zcl-general.c b/epan/dissectors/packet-zbee-zcl-general.c index e0bba9e6f4..02c81ed8d9 100644 --- a/epan/dissectors/packet-zbee-zcl-general.c +++ b/epan/dissectors/packet-zbee-zcl-general.c @@ -1778,7 +1778,7 @@ void proto_reg_handoff_zbee_zcl_part(void) #define ZBEE_ZCL_OTA_ZB_STACK_VER_IP 0x0003 /* ZigBee IP */ #define ZBEE_ZCL_OTA_ZB_STACK_VER_RESERVED_LO 0x0004 /* Reserved Low */ #define ZBEE_ZCL_OTA_ZB_STACK_VER_RESERVED_HI 0xffff /* Reserved High */ - + /* Image Upgrade Status */ #define ZBEE_ZCL_OTA_STATUS_NORMAL 0x00 /* Normal */ #define ZBEE_ZCL_OTA_STATUS_DOWNLOAD_IN_PROGRESS 0x01 /* Download in progress */ @@ -1786,7 +1786,7 @@ void proto_reg_handoff_zbee_zcl_part(void) #define ZBEE_ZCL_OTA_STATUS_WAITING_TO_UPGRADE 0x03 /* Waiting to upgrade */ #define ZBEE_ZCL_OTA_STATUS_COUNT_DOWN 0x04 /* Count down */ #define ZBEE_ZCL_OTA_STATUS_WAIT_FOR_MORE 0x05 /* Wait for more */ - /* 0x06-0xff - Reserved */ + /* 0x06-0xff - Reserved */ /* File Version mask */ #define ZBEE_ZCL_OTA_FILE_VERS_APPL_RELEASE 0x000000FF /* Application Release */ #define ZBEE_ZCL_OTA_FILE_VERS_APPL_BUILD 0x0000FF00 /* Application Build */ @@ -2031,7 +2031,7 @@ dissect_zcl_ota_file_version_field(tvbuff_t *tvb, proto_tree *tree, guint *offse proto_tree *sub_tree = NULL; proto_item *ti; guint32 file_version; - + /* 'File Version' field present, retrieves it */ file_version = tvb_get_ntohl(tvb, *offset); ti = proto_tree_add_text(tree, tvb, *offset, 4, "File Version: 0x%08x", file_version); @@ -2062,7 +2062,7 @@ dissect_zcl_ota_field_ctrl_field(tvbuff_t *tvb, proto_tree *tree, guint *offset) proto_tree *sub_tree = NULL; proto_item *ti; guint8 field_ctrl; - + /* Retrieve 'Field Control' field */ field_ctrl = tvb_get_guint8(tvb, *offset); ti = proto_tree_add_text(tree, tvb, *offset, 1, "Field Control: 0x%02x", field_ctrl); @@ -2070,7 +2070,7 @@ dissect_zcl_ota_field_ctrl_field(tvbuff_t *tvb, proto_tree *tree, guint *offset) proto_tree_add_item(sub_tree, hf_zbee_zcl_ota_field_ctrl_hw_ver_present, tvb, *offset, 1, ENC_NA); proto_tree_add_item(sub_tree, hf_zbee_zcl_ota_field_ctrl_reserved, tvb, *offset, 1, ENC_NA); *offset += 1; - + return field_ctrl; } /*dissect_zcl_ota_field_ctrl_field*/ @@ -2096,30 +2096,30 @@ dissect_zcl_ota_imagenotify(tvbuff_t *tvb, proto_tree *tree, guint *offset) payload_type = tvb_get_guint8(tvb, *offset); proto_tree_add_item(tree, hf_zbee_zcl_ota_payload_type, tvb, *offset, 1, ENC_NA); *offset += 1; - + /* Retrieve 'Query Jitter' field */ proto_tree_add_item(tree, hf_zbee_zcl_ota_query_jitter, tvb, *offset, 1, ENC_NA); *offset += 1; /* Check if there are optional fields */ - + if (payload_type >= ZBEE_ZCL_OTA_PAYLOAD_TYPE_QJ_MC) { /* 'Manufacturer Code' field present, retrieves it */ proto_tree_add_item(tree, hf_zbee_zcl_ota_manufacturer_code, tvb, *offset, 2, ENC_LITTLE_ENDIAN); *offset += 2; } - + if (payload_type >= ZBEE_ZCL_OTA_PAYLOAD_TYPE_QJ_MC_IT) { /* 'Image Type' field present, retrieves it */ proto_tree_add_item(tree, hf_zbee_zcl_ota_image_type, tvb, *offset, 2, ENC_LITTLE_ENDIAN); *offset += 2; } - + if (payload_type >= ZBEE_ZCL_OTA_PAYLOAD_TYPE_QJ_MC_IT_FV) { /* 'File Version' field present, retrieves it */ dissect_zcl_ota_file_version_field(tvb, tree, offset); } - + } /*dissect_zcl_ota_imagenotify*/ /*FUNCTION:------------------------------------------------------ @@ -2139,10 +2139,10 @@ static void dissect_zcl_ota_querynextimagereq(tvbuff_t *tvb, proto_tree *tree, guint *offset) { guint8 field_ctrl; - + /* Retrieve 'Field Control' field */ field_ctrl = dissect_zcl_ota_field_ctrl_field(tvb, tree, offset); - + /* Retrieve 'Manufacturer Code' field */ proto_tree_add_item(tree, hf_zbee_zcl_ota_manufacturer_code, tvb, *offset, 2, ENC_LITTLE_ENDIAN); *offset += 2; @@ -2150,18 +2150,18 @@ dissect_zcl_ota_querynextimagereq(tvbuff_t *tvb, proto_tree *tree, guint *offset /* Retrieve 'Image Type' field */ proto_tree_add_item(tree, hf_zbee_zcl_ota_image_type, tvb, *offset, 2, ENC_LITTLE_ENDIAN); *offset += 2; - + /* Retrieve 'File Version' field */ dissect_zcl_ota_file_version_field(tvb, tree, offset); - + /* Check if there are optional fields */ - - if (field_ctrl & ZBEE_ZCL_OTA_FIELD_CTRL_HW_VER_PRESENT) { + + if (field_ctrl & ZBEE_ZCL_OTA_FIELD_CTRL_HW_VER_PRESENT) { /* 'Hardware Version' field present, retrieves it */ proto_tree_add_item(tree, hf_zbee_zcl_ota_hw_version, tvb, *offset, 2, ENC_LITTLE_ENDIAN); *offset += 2; } - + } /*dissect_zcl_ota_querynextimagereq*/ /*FUNCTION:------------------------------------------------------ @@ -2186,7 +2186,7 @@ dissect_zcl_ota_querynextimagersp(tvbuff_t *tvb, proto_tree *tree, guint *offset status = tvb_get_guint8(tvb, *offset); proto_tree_add_item(tree, hf_zbee_zcl_ota_status, tvb, *offset, 1, ENC_NA); *offset += 1; - + /* Check if there are optional fields */ if (status == ZBEE_ZCL_STAT_SUCCESS) { /* Retrieve 'Manufacturer Code' field */ @@ -2196,7 +2196,7 @@ dissect_zcl_ota_querynextimagersp(tvbuff_t *tvb, proto_tree *tree, guint *offset /* Retrieve 'Image Type' field */ proto_tree_add_item(tree, hf_zbee_zcl_ota_image_type, tvb, *offset, 2, ENC_LITTLE_ENDIAN); *offset += 2; - + /* Retrieve 'File Version' field */ dissect_zcl_ota_file_version_field(tvb, tree, offset); @@ -2204,7 +2204,7 @@ dissect_zcl_ota_querynextimagersp(tvbuff_t *tvb, proto_tree *tree, guint *offset proto_tree_add_item(tree, hf_zbee_zcl_ota_image_size, tvb, *offset, 4, ENC_LITTLE_ENDIAN); *offset += 4; } - + } /*dissect_zcl_ota_querynextimagersp*/ /*FUNCTION:------------------------------------------------------ @@ -2224,10 +2224,10 @@ static void dissect_zcl_ota_imageblockreq(tvbuff_t *tvb, proto_tree *tree, guint *offset) { guint8 field_ctrl; - + /* Retrieve 'Field Control' field */ field_ctrl = dissect_zcl_ota_field_ctrl_field(tvb, tree, offset); - + /* Retrieve 'Manufacturer Code' field */ proto_tree_add_item(tree, hf_zbee_zcl_ota_manufacturer_code, tvb, *offset, 2, ENC_LITTLE_ENDIAN); *offset += 2; @@ -2235,26 +2235,26 @@ dissect_zcl_ota_imageblockreq(tvbuff_t *tvb, proto_tree *tree, guint *offset) /* Retrieve 'Image Type' field */ proto_tree_add_item(tree, hf_zbee_zcl_ota_image_type, tvb, *offset, 2, ENC_LITTLE_ENDIAN); *offset += 2; - + /* Retrieve 'File Version' field */ dissect_zcl_ota_file_version_field(tvb, tree, offset); /* Retrieve 'File Offset' field */ proto_tree_add_item(tree, hf_zbee_zcl_ota_file_offset, tvb, *offset, 4, ENC_LITTLE_ENDIAN); *offset += 4; - + /* Retrieve 'Maximum Data Size' field */ proto_tree_add_item(tree, hf_zbee_zcl_ota_max_data_size, tvb, *offset, 1, ENC_NA); *offset += 1; - + /* Check if there are optional fields */ - - if (field_ctrl & ZBEE_ZCL_OTA_FIELD_CTRL_IEEE_ADDR_PRESENT) { + + if (field_ctrl & ZBEE_ZCL_OTA_FIELD_CTRL_IEEE_ADDR_PRESENT) { /* 'Requerst Node Address' field present, retrieves it */ proto_tree_add_item(tree, hf_zbee_zcl_ota_req_node_addr, tvb, *offset, 8, ENC_LITTLE_ENDIAN); *offset += 8; } - + } /*dissect_zcl_ota_imageblockreq*/ /*FUNCTION:------------------------------------------------------ @@ -2274,10 +2274,10 @@ static void dissect_zcl_ota_imagepagereq(tvbuff_t *tvb, proto_tree *tree, guint *offset) { guint8 field_ctrl; - + /* Retrieve 'Field Control' field */ field_ctrl = dissect_zcl_ota_field_ctrl_field(tvb, tree, offset); - + /* Retrieve 'Manufacturer Code' field */ proto_tree_add_item(tree, hf_zbee_zcl_ota_manufacturer_code, tvb, *offset, 2, ENC_LITTLE_ENDIAN); *offset += 2; @@ -2285,34 +2285,34 @@ dissect_zcl_ota_imagepagereq(tvbuff_t *tvb, proto_tree *tree, guint *offset) /* Retrieve 'Image Type' field */ proto_tree_add_item(tree, hf_zbee_zcl_ota_image_type, tvb, *offset, 2, ENC_LITTLE_ENDIAN); *offset += 2; - + /* Retrieve 'File Version' field */ dissect_zcl_ota_file_version_field(tvb, tree, offset); /* Retrieve 'File Offset' field */ proto_tree_add_item(tree, hf_zbee_zcl_ota_file_offset, tvb, *offset, 4, ENC_LITTLE_ENDIAN); *offset += 4; - + /* Retrieve 'Maximum Data Size' field */ proto_tree_add_item(tree, hf_zbee_zcl_ota_max_data_size, tvb, *offset, 1, ENC_NA); *offset += 1; - + /* Retrieve 'Page Size' field */ proto_tree_add_item(tree, hf_zbee_zcl_ota_page_size, tvb, *offset, 2, ENC_LITTLE_ENDIAN); *offset += 2; - + /* Retrieve 'Response Spacing' field */ proto_tree_add_item(tree, hf_zbee_zcl_ota_rsp_spacing, tvb, *offset, 2, ENC_LITTLE_ENDIAN); *offset += 2; - + /* Check if there are optional fields */ - - if (field_ctrl & ZBEE_ZCL_OTA_FIELD_CTRL_IEEE_ADDR_PRESENT) { + + if (field_ctrl & ZBEE_ZCL_OTA_FIELD_CTRL_IEEE_ADDR_PRESENT) { /* 'Requerst Node Address' field present, retrieves it */ proto_tree_add_item(tree, hf_zbee_zcl_ota_req_node_addr, tvb, *offset, 8, ENC_LITTLE_ENDIAN); *offset += 8; } - + } /*dissect_zcl_ota_imagepagereq*/ /*FUNCTION:------------------------------------------------------ @@ -2339,7 +2339,7 @@ dissect_zcl_ota_imageblockrsp(tvbuff_t *tvb, proto_tree *tree, guint *offset) status = tvb_get_guint8(tvb, *offset); proto_tree_add_item(tree, hf_zbee_zcl_ota_status, tvb, *offset, 1, ENC_NA); *offset += 1; - + if (status == ZBEE_ZCL_STAT_SUCCESS) { /* Retrieve 'Manufacturer Code' field */ proto_tree_add_item(tree, hf_zbee_zcl_ota_manufacturer_code, tvb, *offset, 2, ENC_LITTLE_ENDIAN); @@ -2348,19 +2348,19 @@ dissect_zcl_ota_imageblockrsp(tvbuff_t *tvb, proto_tree *tree, guint *offset) /* Retrieve 'Image Type' field */ proto_tree_add_item(tree, hf_zbee_zcl_ota_image_type, tvb, *offset, 2, ENC_LITTLE_ENDIAN); *offset += 2; - + /* Retrieve 'File Version' field */ dissect_zcl_ota_file_version_field(tvb, tree, offset); - + /* Retrieve 'File Offset' field */ proto_tree_add_item(tree, hf_zbee_zcl_ota_file_offset, tvb, *offset, 4, ENC_LITTLE_ENDIAN); *offset += 4; - + /* Retrieve 'Data Size' field */ data_size = tvb_get_guint8(tvb, *offset); proto_tree_add_item(tree, hf_zbee_zcl_ota_data_size, tvb, *offset, 1, ENC_NA); *offset += 1; - + /* Retrieve 'Image Data' field */ image_data = tvb_bytes_to_ep_str_punct(tvb, *offset, data_size, ':'); proto_tree_add_string(tree, hf_zbee_zcl_ota_image_data, tvb, *offset, data_size, image_data); @@ -2370,7 +2370,7 @@ dissect_zcl_ota_imageblockrsp(tvbuff_t *tvb, proto_tree *tree, guint *offset) /* Retrieve 'Current Time' field */ proto_tree_add_item(tree, hf_zbee_zcl_ota_current_time, tvb, *offset, 4, ENC_LITTLE_ENDIAN); *offset += 4; - + /* Retrieve 'Request Time' field */ proto_tree_add_item(tree, hf_zbee_zcl_ota_request_time, tvb, *offset, 4, ENC_LITTLE_ENDIAN); *offset += 4; @@ -2378,7 +2378,7 @@ dissect_zcl_ota_imageblockrsp(tvbuff_t *tvb, proto_tree *tree, guint *offset) else { /* */ } - + } /*dissect_zcl_ota_imageblockrsp*/ /*FUNCTION:------------------------------------------------------ @@ -2396,11 +2396,11 @@ dissect_zcl_ota_imageblockrsp(tvbuff_t *tvb, proto_tree *tree, guint *offset) */ static void dissect_zcl_ota_upgradeendreq(tvbuff_t *tvb, proto_tree *tree, guint *offset) -{ +{ /* Retrieve 'Status' field */ proto_tree_add_item(tree, hf_zbee_zcl_ota_status, tvb, *offset, 1, ENC_NA); *offset += 1; - + /* Retrieve 'Manufacturer Code' field */ proto_tree_add_item(tree, hf_zbee_zcl_ota_manufacturer_code, tvb, *offset, 2, ENC_LITTLE_ENDIAN); *offset += 2; @@ -2408,7 +2408,7 @@ dissect_zcl_ota_upgradeendreq(tvbuff_t *tvb, proto_tree *tree, guint *offset) /* Retrieve 'Image Type' field */ proto_tree_add_item(tree, hf_zbee_zcl_ota_image_type, tvb, *offset, 2, ENC_LITTLE_ENDIAN); *offset += 2; - + /* Retrieve 'File Version' field */ dissect_zcl_ota_file_version_field(tvb, tree, offset); @@ -2429,7 +2429,7 @@ dissect_zcl_ota_upgradeendreq(tvbuff_t *tvb, proto_tree *tree, guint *offset) */ static void dissect_zcl_ota_upgradeendrsp(tvbuff_t *tvb, proto_tree *tree, guint *offset) -{ +{ /* Retrieve 'Manufacturer Code' field */ proto_tree_add_item(tree, hf_zbee_zcl_ota_manufacturer_code, tvb, *offset, 2, ENC_LITTLE_ENDIAN); *offset += 2; @@ -2437,10 +2437,10 @@ dissect_zcl_ota_upgradeendrsp(tvbuff_t *tvb, proto_tree *tree, guint *offset) /* Retrieve 'Image Type' field */ proto_tree_add_item(tree, hf_zbee_zcl_ota_image_type, tvb, *offset, 2, ENC_LITTLE_ENDIAN); *offset += 2; - + /* Retrieve 'File Version' field */ dissect_zcl_ota_file_version_field(tvb, tree, offset); - + /* Retrieve 'Current Time' field */ proto_tree_add_item(tree, hf_zbee_zcl_ota_current_time, tvb, *offset, 4, ENC_LITTLE_ENDIAN); *offset += 4; @@ -2466,11 +2466,11 @@ dissect_zcl_ota_upgradeendrsp(tvbuff_t *tvb, proto_tree *tree, guint *offset) */ static void dissect_zcl_ota_queryspecfilereq(tvbuff_t *tvb, proto_tree *tree, guint *offset) -{ +{ /* 'Requerst Node Address' field present, retrieves it */ proto_tree_add_item(tree, hf_zbee_zcl_ota_req_node_addr, tvb, *offset, 8, ENC_LITTLE_ENDIAN); *offset += 8; - + /* Retrieve 'Manufacturer Code' field */ proto_tree_add_item(tree, hf_zbee_zcl_ota_manufacturer_code, tvb, *offset, 2, ENC_LITTLE_ENDIAN); *offset += 2; @@ -2478,10 +2478,10 @@ dissect_zcl_ota_queryspecfilereq(tvbuff_t *tvb, proto_tree *tree, guint *offset) /* Retrieve 'Image Type' field */ proto_tree_add_item(tree, hf_zbee_zcl_ota_image_type, tvb, *offset, 2, ENC_LITTLE_ENDIAN); *offset += 2; - + /* Retrieve 'File Version' field */ dissect_zcl_ota_file_version_field(tvb, tree, offset); - + /* Retrieve 'ZigBee Stack Version' field */ proto_tree_add_item(tree, hf_zbee_zcl_ota_zb_stack_ver, tvb, *offset, 2, ENC_LITTLE_ENDIAN); *offset += 2; @@ -2505,12 +2505,12 @@ static void dissect_zcl_ota_queryspecfilersp(tvbuff_t *tvb, proto_tree *tree, guint *offset) { guint8 status; - + /* Retrieve 'Status' field */ status = tvb_get_guint8(tvb, *offset); proto_tree_add_item(tree, hf_zbee_zcl_ota_status, tvb, *offset, 1, ENC_NA); *offset += 1; - + if (status == ZBEE_ZCL_STAT_SUCCESS) { /* Retrieve 'Manufacturer Code' field */ proto_tree_add_item(tree, hf_zbee_zcl_ota_manufacturer_code, tvb, *offset, 2, ENC_LITTLE_ENDIAN); @@ -2519,15 +2519,15 @@ dissect_zcl_ota_queryspecfilersp(tvbuff_t *tvb, proto_tree *tree, guint *offset) /* Retrieve 'Image Type' field */ proto_tree_add_item(tree, hf_zbee_zcl_ota_image_type, tvb, *offset, 2, ENC_LITTLE_ENDIAN); *offset += 2; - + /* Retrieve 'File Version' field */ dissect_zcl_ota_file_version_field(tvb, tree, offset); - + /* Retrieve 'Image Size' field */ proto_tree_add_item(tree, hf_zbee_zcl_ota_image_size, tvb, *offset, 4, ENC_LITTLE_ENDIAN); - *offset += 4; + *offset += 4; } - + } /*dissect_zcl_ota_queryspecfilersp*/ /*FUNCTION:------------------------------------------------------ @@ -2588,17 +2588,17 @@ dissect_zcl_ota_attr_data(proto_tree *tree, tvbuff_t *tvb, guint *offset, guint1 proto_tree_add_item(tree, hf_zbee_zcl_ota_image_upgrade_status, tvb, *offset, 1, ENC_NA); *offset += 1; break; - + case ZBEE_ZCL_ATTR_ID_OTA_MANUFACTURER_ID: proto_tree_add_item(tree, hf_zbee_zcl_ota_manufacturer_code, tvb, *offset, 2, ENC_LITTLE_ENDIAN); *offset += 2; break; - + case ZBEE_ZCL_ATTR_ID_OTA_IMAGE_TYPE_ID: proto_tree_add_item(tree, hf_zbee_zcl_ota_image_type, tvb, *offset, 2, ENC_LITTLE_ENDIAN); *offset += 2; break; - + case ZBEE_ZCL_ATTR_ID_OTA_MIN_BLOCK_REQ_DELAY: default: dissect_zcl_attr_data(tvb, tree, offset, data_type); @@ -2681,7 +2681,7 @@ dissect_zbee_zcl_ota(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void * case ZBEE_ZCL_CMD_ID_OTA_QUERY_NEXT_IMAGE_REQ: dissect_zcl_ota_querynextimagereq(tvb, payload_tree, &offset); break; - + case ZBEE_ZCL_CMD_ID_OTA_IMAGE_BLOCK_REQ: dissect_zcl_ota_imageblockreq(tvb, payload_tree, &offset); break; @@ -2689,7 +2689,7 @@ dissect_zbee_zcl_ota(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void * case ZBEE_ZCL_CMD_ID_OTA_IMAGE_PAGE_REQ: dissect_zcl_ota_imagepagereq(tvb, payload_tree, &offset); break; - + case ZBEE_ZCL_CMD_ID_OTA_UPGRADE_END_REQ: dissect_zcl_ota_upgradeendreq(tvb, payload_tree, &offset); break; @@ -2697,7 +2697,7 @@ dissect_zbee_zcl_ota(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void * case ZBEE_ZCL_CMD_ID_OTA_QUERY_SPEC_FILE_REQ: dissect_zcl_ota_queryspecfilereq(tvb, payload_tree, &offset); break; - + default: break; } @@ -2723,7 +2723,7 @@ dissect_zbee_zcl_ota(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void * case ZBEE_ZCL_CMD_ID_OTA_IMAGE_NOTIFY: dissect_zcl_ota_imagenotify(tvb, payload_tree, &offset); break; - + case ZBEE_ZCL_CMD_ID_OTA_QUERY_NEXT_IMAGE_RSP: dissect_zcl_ota_querynextimagersp(tvb, payload_tree, &offset); break; @@ -2735,17 +2735,17 @@ dissect_zbee_zcl_ota(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void * case ZBEE_ZCL_CMD_ID_OTA_UPGRADE_END_RSP: dissect_zcl_ota_upgradeendrsp(tvb, payload_tree, &offset); break; - + case ZBEE_ZCL_CMD_ID_OTA_QUERY_SPEC_FILE_RSP: dissect_zcl_ota_queryspecfilersp(tvb, payload_tree, &offset); - break; + break; default: break; } } } - + return tvb_length(tvb); } /*dissect_zbee_zcl_ota*/ @@ -2780,36 +2780,36 @@ void proto_register_zbee_zcl_ota(void) { &hf_zbee_zcl_ota_srv_rx_cmd_id, { "Command", "zbee_zcl_general.ota.cmd.srv_rx.id", FT_UINT8, BASE_HEX, VALS(zbee_zcl_ota_srv_rx_cmd_names), 0x0, NULL, HFILL } }, - + { &hf_zbee_zcl_ota_image_upgrade_status, { "Image Upgrade Status", "zbee_zcl_general.ota.status_attr", FT_UINT8, BASE_HEX, VALS(zbee_zcl_ota_image_upgrade_attr_status_names), 0x0, NULL, HFILL } }, - + { &hf_zbee_zcl_ota_zb_stack_ver, - { "ZigBee Stack Version", "zbee_zcl_general.ota.zb_stack.ver", FT_UINT16, BASE_HEX | BASE_RANGE_STRING, + { "ZigBee Stack Version", "zbee_zcl_general.ota.zb_stack.ver", FT_UINT16, BASE_HEX | BASE_RANGE_STRING, RVALS(zbee_zcl_ota_zb_stack_ver_names), 0x0, NULL, HFILL } }, - + { &hf_zbee_zcl_ota_payload_type, { "Payload Type", "zbee_zcl_general.ota.payload.type", FT_UINT8, BASE_HEX, VALS(zbee_zcl_ota_paylaod_type_names), 0x0, NULL, HFILL } }, - + { &hf_zbee_zcl_ota_query_jitter, { "Query Jitter", "zbee_zcl_general.ota.query_jitter", FT_UINT16, BASE_CUSTOM, decode_zcl_time_in_seconds, - 0x0, NULL, HFILL } }, - + 0x0, NULL, HFILL } }, + { &hf_zbee_zcl_ota_manufacturer_code, { "Manufacturer Code", "zbee_zcl_general.ota.manufacturer_code", FT_UINT16, BASE_HEX, VALS(zbee_mfr_code_names), 0x0, NULL, HFILL } }, { &hf_zbee_zcl_ota_image_type, - { "Image Type", "zbee_zcl_general.ota.image.type", FT_UINT16, BASE_HEX | BASE_RANGE_STRING, + { "Image Type", "zbee_zcl_general.ota.image.type", FT_UINT16, BASE_HEX | BASE_RANGE_STRING, RVALS(zbee_zcl_ota_image_type_names), 0x0, NULL, HFILL } }, /* Begin FileVersion fields */ { &hf_zbee_zcl_ota_file_version_appl_release, { "Application Release", "zbee_zcl_general.ota.file.version.appl.release", FT_UINT32, BASE_DEC, NULL, ZBEE_ZCL_OTA_FILE_VERS_APPL_RELEASE, NULL, HFILL } }, - + { &hf_zbee_zcl_ota_file_version_appl_build, { "Application Build", "zbee_zcl_general.ota.file.version.appl.build", FT_UINT32, BASE_DEC, NULL, ZBEE_ZCL_OTA_FILE_VERS_APPL_BUILD, NULL, HFILL } }, @@ -2817,7 +2817,7 @@ void proto_register_zbee_zcl_ota(void) { &hf_zbee_zcl_ota_file_version_stack_release, { "Stack Release", "zbee_zcl_general.ota.file.version.stack.release", FT_UINT32, BASE_DEC, NULL, ZBEE_ZCL_OTA_FILE_VERS_STACK_RELEASE, NULL, HFILL } }, - + { &hf_zbee_zcl_ota_file_version_stack_build, { "Stack Build", "zbee_zcl_general.ota.file.version.stack.build", FT_UINT32, BASE_DEC, NULL, ZBEE_ZCL_OTA_FILE_VERS_STACK_BUILD, NULL, HFILL } }, @@ -2827,56 +2827,56 @@ void proto_register_zbee_zcl_ota(void) { &hf_zbee_zcl_ota_field_ctrl_hw_ver_present, { "Hardware Version", "zbee_zcl_general.ota.field_ctrl_hw_ver_present", FT_BOOLEAN, 8, TFS(&tfs_present_not_present), ZBEE_ZCL_OTA_FIELD_CTRL_HW_VER_PRESENT, NULL, HFILL } }, - - { &hf_zbee_zcl_ota_field_ctrl_reserved, - { "Reserved", "zbee_zcl_general.ota.field_ctrl_reserved", FT_UINT8, BASE_HEX, NULL, + + { &hf_zbee_zcl_ota_field_ctrl_reserved, + { "Reserved", "zbee_zcl_general.ota.field_ctrl_reserved", FT_UINT8, BASE_HEX, NULL, ZBEE_ZCL_OTA_FIELD_CTRL_RESERVED, NULL, HFILL } }, /* End FieldControl fields */ - + { &hf_zbee_zcl_ota_hw_version, - { "Hardware Version", "zbee_zcl_general.ota.hw_ver", FT_UINT16, BASE_HEX, NULL, + { "Hardware Version", "zbee_zcl_general.ota.hw_ver", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL } }, - + { &hf_zbee_zcl_ota_status, { "Status", "zbee_zcl_general.ota.status", FT_UINT8, BASE_HEX, VALS(zbee_zcl_status_names), - 0x0, NULL, HFILL } }, - + 0x0, NULL, HFILL } }, + { &hf_zbee_zcl_ota_image_size, { "Image Size", "zbee_zcl_general.ota.image.size", FT_UINT32, BASE_CUSTOM, decode_zcl_ota_size_in_bytes, 0x0, NULL, HFILL } }, - + { &hf_zbee_zcl_ota_file_offset, - { "File Offset", "zbee_zcl_general.ota.file.offset", FT_UINT32, BASE_HEX, NULL, + { "File Offset", "zbee_zcl_general.ota.file.offset", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL } }, - + { &hf_zbee_zcl_ota_max_data_size, { "Max Data Size", "zbee_zcl_general.ota.max_data_size", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL } }, - + { &hf_zbee_zcl_ota_req_node_addr, - { "Ieee Address", "zbee_zcl_general.ota.ieee_addr", FT_UINT64, BASE_HEX, NULL, + { "Ieee Address", "zbee_zcl_general.ota.ieee_addr", FT_UINT64, BASE_HEX, NULL, 0x0, NULL, HFILL } }, - + { &hf_zbee_zcl_ota_page_size, { "Page Size", "zbee_zcl_general.ota.page.size", FT_UINT16, BASE_CUSTOM, decode_zcl_ota_size_in_bytes, 0x0, NULL, HFILL } }, { &hf_zbee_zcl_ota_rsp_spacing, - { "Response Spacing", "zbee_zcl_general.ota.rsp_spacing", FT_UINT16, BASE_HEX, NULL, + { "Response Spacing", "zbee_zcl_general.ota.rsp_spacing", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL } }, - + { &hf_zbee_zcl_ota_current_time, { "Current Time", "zbee_zcl_general.ota.current_time", FT_UINT32, BASE_CUSTOM, decode_zcl_ota_curr_time, 0x0, NULL, HFILL }}, - + { &hf_zbee_zcl_ota_request_time, { "Request Time", "zbee_zcl_general.ota.request_time", FT_UINT32, BASE_CUSTOM, decode_zcl_ota_req_time, 0x0, NULL, HFILL }}, - + { &hf_zbee_zcl_ota_upgrade_time, { "Upgrade Time", "zbee_zcl_general.ota.upgrade_time", FT_UINT32, BASE_CUSTOM, decode_zcl_ota_upgr_time, 0x0, NULL, HFILL }}, - + { &hf_zbee_zcl_ota_data_size, { "Data Size", "zbee_zcl_general.ota.data_size", FT_UINT8, BASE_DEC, NULL, 0x00, NULL, HFILL } }, |