diff options
author | Michael Mann <mmann78@netscape.net> | 2014-11-15 20:35:51 -0500 |
---|---|---|
committer | Alexis La Goutte <alexis.lagoutte@gmail.com> | 2014-11-16 13:45:18 +0000 |
commit | f92ed4df2d4720720080d8013da124a0eb956de7 (patch) | |
tree | 2b3bf92972a849fe668f121e53e45bfe1b7c6451 /epan/dissectors/packet-ipv6.c | |
parent | 3b8ed366ddd149f2cc1428a713235c18afc192e7 (diff) | |
download | wireshark-f92ed4df2d4720720080d8013da124a0eb956de7.tar.gz |
Remove ipproto member of packet_info.
All situations can be handled with "shimmed" dissector functions.
Change-Id: Ic85483b32d99d3270b193c9f6b29574d8fad46a8
Reviewed-on: https://code.wireshark.org/review/5327
Reviewed-by: Michael Mann <mmann78@netscape.net>
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-ipv6.c')
-rw-r--r-- | epan/dissectors/packet-ipv6.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/epan/dissectors/packet-ipv6.c b/epan/dissectors/packet-ipv6.c index 4806040739..9dad84d6d0 100644 --- a/epan/dissectors/packet-ipv6.c +++ b/epan/dissectors/packet-ipv6.c @@ -123,6 +123,7 @@ void proto_reg_handoff_ipv6(void); /* Protocol specific data indices */ #define IPV6_PROTO_NXT_HDR 0 +#define IPV6_PROTO_VALUE 1 static int ipv6_tap = -1; @@ -342,12 +343,13 @@ static expert_field ei_ipv6_routing_hdr_rpl_segments_ge0 = EI_INIT; static void ipv6_prompt(packet_info *pinfo, gchar* result) { - g_snprintf(result, MAX_DECODE_AS_PROMPT_LEN, "IP protocol %u as", pinfo->ipproto); + g_snprintf(result, MAX_DECODE_AS_PROMPT_LEN, "IP protocol %u as", + GPOINTER_TO_UINT(p_get_proto_data(pinfo->pool, pinfo, proto_ipv6, IPV6_PROTO_VALUE))); } static gpointer ipv6_value(packet_info *pinfo) { - return GUINT_TO_POINTER(pinfo->ipproto); + return p_get_proto_data(pinfo->pool, pinfo, proto_ipv6, IPV6_PROTO_VALUE); } static void ipv6_next_header_prompt(packet_info *pinfo, gchar* result) @@ -2162,7 +2164,7 @@ again: proto_item_set_len (ipv6_item, offset); /* collect packet info */ - pinfo->ipproto = nxt; + p_add_proto_data(pinfo->pool, pinfo, proto_ipv6, IPV6_PROTO_VALUE, GUINT_TO_POINTER((guint)nxt)); tap_queue_packet(ipv6_tap, pinfo, &ipv6); if (offlg & IP6F_OFF_MASK || (ipv6_reassemble && offlg & IP6F_MORE_FRAG)) { |