diff options
author | Michael Mann <mmann78@netscape.net> | 2014-11-07 07:47:43 -0500 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2014-11-08 16:33:50 +0000 |
commit | 421913b721d5b12c1f6c8a09daec35d8bae58bb5 (patch) | |
tree | 1c039d5db023456f106d3bd1d221401463639daf /epan/dissectors/packet-dvmrp.c | |
parent | bd5384c84a53a88c64fb79094444c063756ca183 (diff) |
Create real subdissectors to the IGMP protocol.
Change-Id: I79ee9413b87722bfe4782342737cff03cfc34495
Reviewed-on: https://code.wireshark.org/review/5179
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>
Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'epan/dissectors/packet-dvmrp.c')
-rw-r--r-- | epan/dissectors/packet-dvmrp.c | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/epan/dissectors/packet-dvmrp.c b/epan/dissectors/packet-dvmrp.c index 067cd26e99..b4ef0af794 100644 --- a/epan/dissectors/packet-dvmrp.c +++ b/epan/dissectors/packet-dvmrp.c @@ -57,7 +57,6 @@ #include <epan/ipproto.h> #include <epan/prefs.h> #include "packet-igmp.h" -#include "packet-dvmrp.h" void proto_register_dvmrp(void); @@ -678,25 +677,17 @@ dissect_dvmrp_v1(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, int /* This function is only called from the IGMP dissector */ int -dissect_dvmrp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, int offset) +dissect_dvmrp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void* data _U_) { proto_tree *tree; proto_item *item; - - if (!proto_is_protocol_enabled(find_protocol_by_id(proto_dvmrp))) { - /* we are not enabled, skip entire packet to be nice - to the igmp layer. (so clicking on IGMP will display the data) - */ - return offset+tvb_length_remaining(tvb, offset); - } - - item = proto_tree_add_item(parent_tree, proto_dvmrp, tvb, offset, -1, ENC_NA); - tree = proto_item_add_subtree(item, ett_dvmrp); - + int offset = 0; col_set_str(pinfo->cinfo, COL_PROTOCOL, "DVMRP"); col_clear(pinfo->cinfo, COL_INFO); + item = proto_tree_add_item(parent_tree, proto_dvmrp, tvb, offset, -1, ENC_NA); + tree = proto_item_add_subtree(item, ett_dvmrp); if ((tvb_length_remaining(tvb, offset)>=8) && (((tvb_get_guint8(tvb, 6)==0xff) @@ -892,8 +883,7 @@ proto_register_dvmrp(void) }; module_t *module_dvmrp; - proto_dvmrp = proto_register_protocol("Distance Vector Multicast Routing Protocol", - "DVMRP", "dvmrp"); + proto_dvmrp = proto_register_protocol("Distance Vector Multicast Routing Protocol", "DVMRP", "dvmrp"); proto_register_field_array(proto_dvmrp, hf, array_length(hf)); proto_register_subtree_array(ett, array_length(ett)); @@ -904,6 +894,16 @@ proto_register_dvmrp(void) &strict_v3); } +void +proto_reg_handoff_dvmrp(void) +{ + dissector_handle_t dvmrp_handle; + + dvmrp_handle = new_create_dissector_handle(dissect_dvmrp, proto_dvmrp); + dissector_add_uint("igmp.type", IGMP_DVMRP, dvmrp_handle); +} + + /* * Editor modelines - http://www.wireshark.org/tools/modelines.html * |