aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-msnip.c
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2016-07-10 23:47:28 -0400
committerMichael Mann <mmann78@netscape.net>2016-07-21 12:35:22 +0000
commitad6fc87d64de30cdcdca18168a117d2ec24591da (patch)
treeb5df109654ae6806db7544933f8bf1a848a02ae7 /epan/dissectors/packet-msnip.c
parent1e19f55f0c44b850bc6304be28d5b272a3553204 (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-msnip.c')
-rw-r--r--epan/dissectors/packet-msnip.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/epan/dissectors/packet-msnip.c b/epan/dissectors/packet-msnip.c
index e1544a418e..46ea45e359 100644
--- a/epan/dissectors/packet-msnip.c
+++ b/epan/dissectors/packet-msnip.c
@@ -44,7 +44,7 @@ void proto_reg_handoff_msnip(void);
static int proto_msnip = -1;
static int hf_checksum = -1;
-static int hf_checksum_bad = -1;
+static int hf_checksum_status = -1;
static int hf_type = -1;
static int hf_count = -1;
static int hf_holdtime = -1;
@@ -89,7 +89,7 @@ dissect_msnip_rmr(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, in
offset += 1;
/* checksum */
- igmp_checksum(parent_tree, tvb, hf_checksum, hf_checksum_bad, pinfo, 0);
+ igmp_checksum(parent_tree, tvb, hf_checksum, hf_checksum_status, pinfo, 0);
offset += 2;
while (count--) {
@@ -135,7 +135,7 @@ dissect_msnip_is(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, int
offset += 1;
/* checksum */
- igmp_checksum(parent_tree, tvb, hf_checksum, hf_checksum_bad, pinfo, 0);
+ igmp_checksum(parent_tree, tvb, hf_checksum, hf_checksum_status, pinfo, 0);
offset += 2;
/* 16 bit holdtime */
@@ -161,7 +161,7 @@ dissect_msnip_gm(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, int
offset += 1;
/* checksum */
- igmp_checksum(parent_tree, tvb, hf_checksum, hf_checksum_bad, pinfo, 0);
+ igmp_checksum(parent_tree, tvb, hf_checksum, hf_checksum_status, pinfo, 0);
offset += 2;
/* holdtime */
@@ -264,9 +264,9 @@ proto_register_msnip(void)
{ "Checksum", "msnip.checksum", FT_UINT16, BASE_HEX,
NULL, 0, "MSNIP Checksum", HFILL }},
- { &hf_checksum_bad,
- { "Bad Checksum", "msnip.checksum_bad", FT_BOOLEAN, BASE_NONE,
- NULL, 0x0, "Bad MSNIP Checksum", HFILL }},
+ { &hf_checksum_status,
+ { "Checksum Status", "msnip.checksum.status", FT_UINT8, BASE_NONE,
+ VALS(proto_checksum_vals), 0x0, NULL, HFILL }},
{ &hf_count,
{ "Count", "msnip.count", FT_UINT8, BASE_DEC,