aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-ipv6.c
diff options
context:
space:
mode:
authorBill Meier <wmeier@newsguy.com>2012-08-10 22:55:02 +0000
committerBill Meier <wmeier@newsguy.com>2012-08-10 22:55:02 +0000
commit638d74d43f9baf45dc3641939eec36f801414187 (patch)
tree5bfcabbb83a6e7359cfc302cdc604264560d66a0 /epan/dissectors/packet-ipv6.c
parente6ffe7b59b9f36c534d3b2d6cc78b05dfe517f67 (diff)
Use val_to_str_const() where appropriate;
Also (for a few files): - create/use some extended value strings; - remove unneeded #include files; - remove unneeded variable initialization; - re-order fcns slightly so prefs_reg_handoff...() at end, etc svn path=/trunk/; revision=44438
Diffstat (limited to 'epan/dissectors/packet-ipv6.c')
-rw-r--r--epan/dissectors/packet-ipv6.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/epan/dissectors/packet-ipv6.c b/epan/dissectors/packet-ipv6.c
index 9348ef75eb..85e30e819d 100644
--- a/epan/dissectors/packet-ipv6.c
+++ b/epan/dissectors/packet-ipv6.c
@@ -595,7 +595,7 @@ dissect_routing6(tvbuff_t *tvb, int offset, proto_tree *tree, packet_info *pinfo
ti = proto_tree_add_uint_format(tree, hf_ipv6_routing_hdr_opt, tvb,
offset, len, rt.ip6r_type,
"Routing Header, Type : %s (%u)",
- val_to_str(rt.ip6r_type, routing_header_type, "Unknown"),
+ val_to_str_const(rt.ip6r_type, routing_header_type, "Unknown"),
rt.ip6r_type);
rthdr_tree = proto_item_add_subtree(ti, ett_ipv6);
@@ -1288,7 +1288,7 @@ dissect_shimopts(tvbuff_t *tvb, int offset, proto_tree *tree, packet_info *pinfo
if (tree)
{
/* Option Type */
- ctype = val_to_str( (tvb_get_ntohs(tvb, offset) & SHIM6_BITMASK_OPT_TYPE) >> 1, shimoptvals, "Unknown Option Type");
+ ctype = val_to_str_const( (tvb_get_ntohs(tvb, offset) & SHIM6_BITMASK_OPT_TYPE) >> 1, shimoptvals, "Unknown Option Type");
ti = proto_tree_add_text(tree, tvb, offset, total_len, "%s", ctype);
opt_tree = proto_item_add_subtree(ti, ett_ipv6_shim6_option);
@@ -1498,7 +1498,7 @@ dissect_shimctrl(tvbuff_t *tvb, gint offset, guint type, proto_tree *shim_tree)
"Probes Received: %u", probes_rcvd);
p++;
- sta = val_to_str((tvb_get_guint8(tvb, p) & SHIM6_BITMASK_STA) >> 6,
+ sta = val_to_str_const((tvb_get_guint8(tvb, p) & SHIM6_BITMASK_STA) >> 6,
shimreapstates, "Unknown REAP State");
proto_tree_add_uint_format(shim_tree, hf_ipv6_shim6_reap, tvb,
p, 1, (tvb_get_guint8(tvb, p) & SHIM6_BITMASK_STA) >> 6,
@@ -2089,7 +2089,7 @@ again:
}
else {
col_append_fstr(pinfo->cinfo, COL_INFO, "Shim6 (%s)",
- val_to_str(stype & SHIM6_BITMASK_TYPE, shimctrlvals, "Unknown"));
+ val_to_str_const(stype & SHIM6_BITMASK_TYPE, shimctrlvals, "Unknown"));
}
}
} else