IPv6: Minor rename, cleanup (Shim6)

Change-Id: Ia799910f72674702c98f146525171d29f1b35432
Reviewed-on: https://code.wireshark.org/review/13006
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
This commit is contained in:
João Valverde 2016-01-02 12:18:18 +00:00 committed by Michael Mann
parent 305a4f72cb
commit 6326894a40
1 changed files with 9 additions and 6 deletions

View File

@ -1403,7 +1403,9 @@ dissect_dstopts(tvbuff_t *tvb, packet_info * pinfo, proto_tree *tree, void *data
}
/* START SHIM6 PART */
static guint16 shim_checksum(tvbuff_t *tvb, int offset, int len)
static guint16
shim6_checksum(tvbuff_t *tvb, int offset, int len)
{
vec_t cksum_vec[1];
@ -1814,8 +1816,9 @@ static const value_string shimctrlvals[] = {
{ 0, NULL }
};
static void ipv6_shim6_checkum_additional_info(tvbuff_t * tvb, packet_info * pinfo,
proto_item * it_cksum, int offset, gboolean is_cksum_correct)
static void
add_shim6_checksum_additional_info(tvbuff_t * tvb, packet_info * pinfo,
proto_item * it_cksum, int offset, gboolean is_cksum_correct)
{
proto_tree *checksum_tree;
proto_item *item;
@ -1905,17 +1908,17 @@ dissect_shim6(tvbuff_t *tvb, packet_info * pinfo, proto_tree *tree, void* data _
p++;
/* Checksum */
csum = shim_checksum(tvb, offset, len);
csum = shim6_checksum(tvb, offset, len);
if (csum == 0) {
ti = proto_tree_add_uint_format_value(shim_tree, hf_ipv6_shim6_checksum, tvb, p, 2,
tvb_get_ntohs(tvb, p), "0x%04x [correct]", tvb_get_ntohs(tvb, p));
ipv6_shim6_checkum_additional_info(tvb, pinfo, ti, p, TRUE);
add_shim6_checksum_additional_info(tvb, pinfo, ti, p, TRUE);
} else {
ti = proto_tree_add_uint_format_value(shim_tree, hf_ipv6_shim6_checksum, tvb, p, 2,
tvb_get_ntohs(tvb, p), "0x%04x [incorrect: should be 0x%04x]",
tvb_get_ntohs(tvb, p), in_cksum_shouldbe(tvb_get_ntohs(tvb, p), csum));
ipv6_shim6_checkum_additional_info(tvb, pinfo, ti, p, FALSE);
add_shim6_checksum_additional_info(tvb, pinfo, ti, p, FALSE);
}
p += 2;