diff options
author | Michael Mann <mmann78@netscape.net> | 2016-07-10 23:47:28 -0400 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2016-07-21 12:35:22 +0000 |
commit | ad6fc87d64de30cdcdca18168a117d2ec24591da (patch) | |
tree | b5df109654ae6806db7544933f8bf1a848a02ae7 /epan/dissectors/packet-asap.c | |
parent | 1e19f55f0c44b850bc6304be28d5b272a3553204 (diff) |
Add proto_tree_add_checksum.
This is an attempt to standardize display/handling of checksum fields for all dissectors.
The main target is for dissectors that do validation, but dissectors that just report the
checksum were also included just to make them easier to find in the future.
Bug: 10620
Bug: 12058
Ping-Bug: 8859
Change-Id: Ia8abd86e42eaf8ed50de6b173409e914b17993bf
Reviewed-on: https://code.wireshark.org/review/16380
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Jeff Morriss <jeff.morriss.ws@gmail.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'epan/dissectors/packet-asap.c')
-rw-r--r-- | epan/dissectors/packet-asap.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/epan/dissectors/packet-asap.c b/epan/dissectors/packet-asap.c index 579e15ebb4..fa860996a1 100644 --- a/epan/dissectors/packet-asap.c +++ b/epan/dissectors/packet-asap.c @@ -567,13 +567,12 @@ dissect_pe_identifier_parameter(tvbuff_t *parameter_tvb, proto_tree *parameter_t proto_item_append_text(parameter_item, " (0x%x)", tvb_get_ntohl(parameter_tvb, PE_IDENTIFIER_OFFSET)); } -#define PE_CHECKSUM_LENGTH 2 #define PE_CHECKSUM_OFFSET PARAMETER_VALUE_OFFSET static void dissect_pe_checksum_parameter(tvbuff_t *parameter_tvb, proto_tree *parameter_tree, proto_item *parameter_item) { - proto_tree_add_item(parameter_tree, hf_pe_checksum, parameter_tvb, PE_CHECKSUM_OFFSET, PE_CHECKSUM_LENGTH, ENC_BIG_ENDIAN); + proto_tree_add_checksum(parameter_tree, parameter_tvb, PE_CHECKSUM_OFFSET, hf_pe_checksum, -1, NULL, NULL, 0, ENC_BIG_ENDIAN, PROTO_CHECKSUM_NO_FLAGS); proto_item_append_text(parameter_item, " (0x%x)", tvb_get_ntohs(parameter_tvb, PE_CHECKSUM_OFFSET)); } @@ -893,7 +892,7 @@ proto_register_asap(void) { &hf_reg_life, { "Registration Life", "asap.pool_element_registration_life", FT_INT32, BASE_DEC, NULL, 0x0, NULL, HFILL } }, { &hf_cookie, { "Cookie", "asap.cookie", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL } }, { &hf_pe_identifier, { "PE Identifier", "asap.pe_identifier", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL } }, - { &hf_pe_checksum, { "PE Checksum", "asap.pe_checksum", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL } }, + { &hf_pe_checksum, { "PE Checksum", "asap.pe_checksum", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL } }, { &hf_hropt_items, { "Items", "asap.hropt_items", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL } }, { &hf_server_identifier, { "Server Identifier", "asap.server_identifier", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL } }, { &hf_home_enrp_server_bit, { "H Bit", "asap.h_bit", FT_BOOLEAN, 8, TFS(&home_enrp_server_bit_value), HOME_ENRP_SERVER_BIT_MASK, NULL, HFILL } }, |