aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-x25.c
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2015-11-14 09:23:33 -0500
committerMichael Mann <mmann78@netscape.net>2015-11-14 21:54:27 +0000
commit28ea58251c04562cc0670e57bf073dc6966e73e6 (patch)
treeabe57292f17b280056a73ee7cfdc94abdcaaaaf3 /epan/dissectors/packet-x25.c
parent13101020e12eb21e8464a3c4eb4fc2fe51409235 (diff)
register_dissector -> new_register_dissector
Picking off "easy" dissectors that only have one or two exit points at most. This concludes a "first pass" over the dissector directory. Change-Id: If5ce5484214be50fe541cba478da1de62e354297 Reviewed-on: https://code.wireshark.org/review/11830 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'epan/dissectors/packet-x25.c')
-rw-r--r--epan/dissectors/packet-x25.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/epan/dissectors/packet-x25.c b/epan/dissectors/packet-x25.c
index 8b87902765..f02f1f858f 100644
--- a/epan/dissectors/packet-x25.c
+++ b/epan/dissectors/packet-x25.c
@@ -1998,21 +1998,22 @@ dissect_x25_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
* X.25 dissector for use when "pinfo->pseudo_header" points to a
* "struct x25_phdr".
*/
-static void
-dissect_x25_dir(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
+static int
+dissect_x25_dir(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
dissect_x25_common(tvb, pinfo, tree,
(pinfo->pseudo_header->x25.flags & FROM_DCE) ? X25_FROM_DCE :
X25_FROM_DTE,
pinfo->pseudo_header->x25.flags & FROM_DCE);
+ return tvb_captured_length(tvb);
}
/*
* X.25 dissector for use when "pinfo->pseudo_header" doesn't point to a
* "struct x25_phdr".
*/
-static void
-dissect_x25(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
+static int
+dissect_x25(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
int direction;
@@ -2026,6 +2027,7 @@ dissect_x25(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
if (direction == 0)
direction = (pinfo->srcport > pinfo->destport)*2 - 1;
dissect_x25_common(tvb, pinfo, tree, X25_UNKNOWN, direction > 0);
+ return tvb_captured_length(tvb);
}
static void
@@ -2371,8 +2373,8 @@ proto_register_x25(void)
"X.25 secondary protocol identifier", FT_UINT8, BASE_HEX, DISSECTOR_TABLE_NOT_ALLOW_DUPLICATE);
x25_heur_subdissector_list = register_heur_dissector_list("x.25");
- register_dissector("x.25_dir", dissect_x25_dir, proto_x25);
- register_dissector("x.25", dissect_x25, proto_x25);
+ new_register_dissector("x.25_dir", dissect_x25_dir, proto_x25);
+ new_register_dissector("x.25", dissect_x25, proto_x25);
/* Preferences */
x25_module = prefs_register_protocol(proto_x25, NULL);