diff options
author | Michael Mann <mmann78@netscape.net> | 2015-11-26 08:25:32 -0500 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2015-11-27 05:00:37 +0000 |
commit | 10261d120283cb739118fa7178b4e911ed72de14 (patch) | |
tree | 034d43a2eb1757d37cf9cc1453de9b815e0ad2bc /epan/dissectors/packet-arp.c | |
parent | e2d5089cb9ad555bc0361768a5eaf24b3bd1379c (diff) |
Remove manual setting of pinfo->current_proto.
Calling a protocol dissection function will properly set/restore pinfo->current_proto, so there's no need to duplicate it.
Change-Id: Ic2ec0b35fa4d46a98f3410bf238056425076e4a9
Reviewed-on: https://code.wireshark.org/review/12205
Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'epan/dissectors/packet-arp.c')
-rw-r--r-- | epan/dissectors/packet-arp.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/epan/dissectors/packet-arp.c b/epan/dissectors/packet-arp.c index c55b61901d..7274cc2b57 100644 --- a/epan/dissectors/packet-arp.c +++ b/epan/dissectors/packet-arp.c @@ -854,9 +854,6 @@ dissect_atmarp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _ const gchar *tha_str, *tsa_str, *tpa_str; proto_tree *tl_tree; - /* Override the setting to "ARP/RARP". */ - pinfo->current_proto = "ATMARP"; - ar_hrd = tvb_get_ntohs(tvb, ATM_AR_HRD); ar_pro = tvb_get_ntohs(tvb, ATM_AR_PRO); ar_shtl = tvb_get_guint8(tvb, ATM_AR_SHTL); @@ -1960,16 +1957,20 @@ proto_register_arp(void) module_t *arp_module; expert_module_t* expert_arp; + int proto_atmarp; proto_arp = proto_register_protocol("Address Resolution Protocol", "ARP/RARP", "arp"); + proto_atmarp = proto_register_protocol("ATM Address Resolution Protocol", + "ATMARP", "atmarp"); + proto_register_field_array(proto_arp, hf, array_length(hf)); proto_register_subtree_array(ett, array_length(ett)); expert_arp = expert_register_protocol(proto_arp); expert_register_field_array(expert_arp, ei, array_length(ei)); - atmarp_handle = new_create_dissector_handle(dissect_atmarp, proto_arp); + atmarp_handle = new_create_dissector_handle(dissect_atmarp, proto_atmarp); ax25arp_handle = new_create_dissector_handle(dissect_ax25arp, proto_arp); arp_handle = new_register_dissector( "arp" , dissect_arp, proto_arp ); |