From 0fb9759eec09d886a79974e93c3e9e26a9dedf74 Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Fri, 11 May 2012 19:27:59 +0000 Subject: Get rid of remaining Booleans-as-encoding-arguments in proto_tree_add_item() calls. Add hf[] entries for some fields that didn't have them. svn path=/trunk/; revision=42588 --- plugins/wimax/msg_dsd.c | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) (limited to 'plugins/wimax/msg_dsd.c') diff --git a/plugins/wimax/msg_dsd.c b/plugins/wimax/msg_dsd.c index 29dbd1a507..d1b643bfd0 100644 --- a/plugins/wimax/msg_dsd.c +++ b/plugins/wimax/msg_dsd.c @@ -117,7 +117,7 @@ void dissect_mac_mgmt_msg_dsd_req_decoder(tvbuff_t *tvb, packet_info *pinfo, pro if(tlv_type == -1 || tlv_len > MAX_TLV_LEN || tlv_len < 1) { /* invalid tlv info */ col_append_sep_str(pinfo->cinfo, COL_INFO, NULL, "DSD-REQ TLV error"); - proto_tree_add_item(dsd_tree, hf_dsd_invalid_tlv, tvb, offset, (tvb_len - offset), FALSE); + proto_tree_add_item(dsd_tree, hf_dsd_invalid_tlv, tvb, offset, (tvb_len - offset), ENC_NA); break; } /* get the TLV value offset */ @@ -143,7 +143,7 @@ void dissect_mac_mgmt_msg_dsd_req_decoder(tvbuff_t *tvb, packet_info *pinfo, pro default: /* display the unknown tlv in hex */ tlv_tree = add_protocol_subtree(&tlv_info, ett_mac_mgmt_msg_dsd_req_decoder, dsd_tree, proto_mac_mgmt_msg_dsd_decoder, tvb, offset, tlv_len, "Unknown TLV (%u byte(s))", tlv_len); - proto_tree_add_item(tlv_tree, hf_dsd_unknown_type, tvb, (offset - tlv_value_offset), (tlv_len + tlv_value_offset), FALSE); + proto_tree_add_item(tlv_tree, hf_dsd_unknown_type, tvb, (offset - tlv_value_offset), (tlv_len + tlv_value_offset), ENC_NA); break; } offset += tlv_len; @@ -203,7 +203,7 @@ void dissect_mac_mgmt_msg_dsd_rsp_decoder(tvbuff_t *tvb, packet_info *pinfo, pro if(tlv_type == -1 || tlv_len > MAX_TLV_LEN || tlv_len < 1) { /* invalid tlv info */ col_append_sep_str(pinfo->cinfo, COL_INFO, NULL, "DSD RSP TLV error"); - proto_tree_add_item(dsd_tree, hf_dsd_invalid_tlv, tvb, offset, (tvb_len - offset), FALSE); + proto_tree_add_item(dsd_tree, hf_dsd_invalid_tlv, tvb, offset, (tvb_len - offset), ENC_NA); break; } /* get the TLV value offset */ @@ -229,7 +229,7 @@ void dissect_mac_mgmt_msg_dsd_rsp_decoder(tvbuff_t *tvb, packet_info *pinfo, pro default: /* display the unknown tlv in hex */ tlv_tree = add_protocol_subtree(&tlv_info, ett_mac_mgmt_msg_dsd_req_decoder, dsd_tree, proto_mac_mgmt_msg_dsd_decoder, tvb, offset, tlv_len, "Unknown TLV (%u byte(s))", tlv_len); - proto_tree_add_item(tlv_tree, hf_dsd_unknown_type, tvb, (offset - tlv_value_offset), (tlv_len + tlv_value_offset), FALSE); + proto_tree_add_item(tlv_tree, hf_dsd_unknown_type, tvb, (offset - tlv_value_offset), (tlv_len + tlv_value_offset), ENC_NA); break; } offset += tlv_len; @@ -277,6 +277,20 @@ void proto_register_mac_mgmt_msg_dsd(void) "Transaction ID", "wmx.dsd.transaction_id", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL } + }, + { + &hf_dsd_invalid_tlv, + { + "Invalid TLV", "wmx.dsd.invalid_tlv", + FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL + } + }, + { + &hf_dsd_unknown_type, + { + "Unknown type", "wmx.dsd.unknown_type", + FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL + } } }; -- cgit v1.2.3