aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-mip.c
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2015-11-13 20:18:34 -0500
committerMichael Mann <mmann78@netscape.net>2015-11-14 18:00:00 +0000
commit8faf5c80b3302247c32e1f5c492cb31a082ee0ad (patch)
treee9bac5673fc9a480fe1fa06fcc6d5d7d45b37389 /epan/dissectors/packet-mip.c
parent76dec3ba681da2c315efba4433d3b1f995defd91 (diff)
register_dissector -> new_register_dissector
Picking off "easy" dissectors that only have one or two exit points at most. Change-Id: I25fe6a0aac93980333217d007702799d16946563 Reviewed-on: https://code.wireshark.org/review/11816 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'epan/dissectors/packet-mip.c')
-rw-r--r--epan/dissectors/packet-mip.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/epan/dissectors/packet-mip.c b/epan/dissectors/packet-mip.c
index 72f437a365..f6a0a79674 100644
--- a/epan/dissectors/packet-mip.c
+++ b/epan/dissectors/packet-mip.c
@@ -513,9 +513,6 @@ dissect_mip_extensions( tvbuff_t *tvb, int offset, proto_tree *tree, packet_info
int cvse_local_offset= 0;
int nvse_local_offset= 0;
- /* None of this really matters if we don't have a tree */
- if (!tree) return;
-
/* Add our tree, if we have extensions */
exts_tree = proto_tree_add_subtree(tree, tvb, offset, -1, ett_mip_exts, NULL, "Extensions");
@@ -780,8 +777,8 @@ dissect_mip_extensions( tvbuff_t *tvb, int offset, proto_tree *tree, packet_info
} /* dissect_mip_extensions */
/* Code to actually dissect the packets */
-static void
-dissect_mip( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
+static int
+dissect_mip( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
/* Set up structures we will need to add the protocol subtree and manage it */
proto_item *ti;
@@ -1000,10 +997,10 @@ dissect_mip( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
break;
} /* End switch */
- if (tree) {
- if (tvb_reported_length_remaining(tvb, offset) > 0)
- dissect_mip_extensions(tvb, offset, mip_tree, pinfo);
- }
+ if (tvb_reported_length_remaining(tvb, offset) > 0)
+ dissect_mip_extensions(tvb, offset, mip_tree, pinfo);
+
+ return tvb_captured_length(tvb);
} /* dissect_mip */
/* Register the protocol with Wireshark */
@@ -1465,7 +1462,7 @@ void proto_register_mip(void)
proto_mip = proto_register_protocol("Mobile IP", "Mobile IP", "mip");
/* Register the dissector by name */
- register_dissector("mip", dissect_mip, proto_mip);
+ new_register_dissector("mip", dissect_mip, proto_mip);
/* Required function calls to register the header fields and subtrees used */
proto_register_field_array(proto_mip, hf, array_length(hf));