diff options
author | Michael Mann <mmann78@netscape.net> | 2016-07-21 10:21:25 -0400 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2016-07-27 03:40:02 +0000 |
commit | 8b0e9c66728f6a39bbe3ada1029e13ad1378013a (patch) | |
tree | c0c1b4da1845069520d4e131db96e6143e4ca772 /epan/dissectors/packet-xip-serval.c | |
parent | b7f1e99f7f4c75fa4bac1ccba77087fb0e50b8ac (diff) |
Follow up for proto_tree_add_checksum.
Fill in the "gaps" so that all dissectors that verify checksums have both a
status and expert info field.
Also address comments from original proto_tree_add_checksum patch that didn't make it.
Ping-Bug: 8859
Change-Id: I2e6640108fd6bb218cb959fe9e4ba98a13e43a2f
Reviewed-on: https://code.wireshark.org/review/16590
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-xip-serval.c')
-rw-r--r-- | epan/dissectors/packet-xip-serval.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/epan/dissectors/packet-xip-serval.c b/epan/dissectors/packet-xip-serval.c index ae1219ff1d..b8f458dd6c 100644 --- a/epan/dissectors/packet-xip-serval.c +++ b/epan/dissectors/packet-xip-serval.c @@ -41,6 +41,7 @@ static gint proto_xip_serval = -1; static gint hf_xip_serval_hl = -1; static gint hf_xip_serval_proto = -1; static gint hf_xip_serval_check = -1; +static gint hf_xip_serval_check_status = -1; /* XIP Serval general extension header. */ static gint hf_xip_serval_ext_type = -1; @@ -216,7 +217,7 @@ display_xip_serval(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) /* Compute checksum. */ SET_CKSUM_VEC_TVB(cksum_vec, tvb, 0, xsh_len); - proto_tree_add_checksum(xip_serval_tree, tvb, XSRVL_CHK, hf_xip_serval_check, -1, &ei_xip_serval_bad_checksum, pinfo, in_cksum(&cksum_vec, 1), + proto_tree_add_checksum(xip_serval_tree, tvb, XSRVL_CHK, hf_xip_serval_check, hf_xip_serval_check_status, &ei_xip_serval_bad_checksum, pinfo, in_cksum(&cksum_vec, 1), ENC_BIG_ENDIAN, PROTO_CHECKSUM_VERIFY|PROTO_CHECKSUM_IN_CKSUM); offset = XSRVL_EXT; @@ -293,6 +294,10 @@ proto_register_xip_serval(void) { "Checksum", "xip_serval.check", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL }}, + { &hf_xip_serval_check_status, + { "Checksum Status", "xip_serval.check.status", FT_UINT8, + BASE_NONE, VALS(proto_checksum_vals), 0x0, NULL, HFILL }}, + /* Serval Extension Header. */ { &hf_xip_serval_ext_type, |