Wireshark mailing list archives
Re: Usage of BASE_CUSTOM
From: Juan Jose Martin Carrascosa <juanjo () rti com>
Date: Thu, 28 Aug 2014 13:59:35 +0200
Alexis, I finally decided to create the subtree with inner elements as you suggested. Thanks! Juanjo On Thu, Aug 28, 2014 at 12:39 PM, Alexis La Goutte < alexis.lagoutte () gmail com> wrote:
On Thu, Aug 28, 2014 at 11:45 AM, Juan Jose Martin Carrascosa <juanjo () rti com> wrote:Hi all, In a code review I was told to use proto_tree_add_item and BASE_CUSTOM to replace this deprecated call: proto_tree_add_text(rtps_parameter_tree, tvb, offset, param_length, "productVersion: %d.%d%c rev%d", major, minor, release, revision);It will be better to use a proto_tree_add_item for each value ? subtree= proto_tree_add_subtree_format(rtps_parameter_tree, tvb, off, 4, ett_rtps_locator_filter_channel, NULL"productVersion: %d.%d%c rev%d", major, minor, release, revision); proto_tree_add_item(subtree, hf_rtps_param_product_version_major , tvb, offset, ENC_NA); proto_tree_add_item(subtree, hf_rtps_param_product_version_minor, tvb, offset+1, ENC_NA); proto_tree_add_item(subtree, hf_rtps_param_product_version_release , tvb, offset+2, ENC_NA); proto_tree_add_item(subtree, hf_rtps_param_product_version_revision , tvb, offset+3, ENC_NA);I have been looking for documentation or guidelines but I can't find anything. Can anyone help me with this? What would be the change?Pointingme to any doc would be OK also.You can look packet-ieee80211.c, there is some case with BASE_CUSTOMThanks, Juanjo___________________________________________________________________________Sent via: Wireshark-dev mailing list <wireshark-dev () wireshark org> Archives: http://www.wireshark.org/lists/wireshark-dev Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev mailto:wireshark-dev-request () wireshark org?subject=unsubscribe ___________________________________________________________________________ Sent via: Wireshark-dev mailing list <wireshark-dev () wireshark org> Archives: http://www.wireshark.org/lists/wireshark-dev Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev mailto:wireshark-dev-request () wireshark org ?subject=unsubscribe
___________________________________________________________________________ Sent via: Wireshark-dev mailing list <wireshark-dev () wireshark org> Archives: http://www.wireshark.org/lists/wireshark-dev Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev mailto:wireshark-dev-request () wireshark org?subject=unsubscribe
Current thread:
- Usage of BASE_CUSTOM Juan Jose Martin Carrascosa (Aug 28)
- Re: Usage of BASE_CUSTOM Alexis La Goutte (Aug 28)
- Re: Usage of BASE_CUSTOM Juan Jose Martin Carrascosa (Aug 28)
- Re: Usage of BASE_CUSTOM Alexis La Goutte (Aug 28)