diff options
author | Michael Mann <mmann78@netscape.net> | 2015-11-15 08:00:10 -0500 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2015-11-16 03:50:05 +0000 |
commit | bbdd89b973353a0df1d98d884c38f3832670bfea (patch) | |
tree | 9b992f923f565af2fcab30902508a191de85ca53 /epan/dissectors/packet-cattp.c | |
parent | 6012ba8f008bfba24fd44ce7a2a3055572453dce (diff) |
create_dissector_handle -> new_create_dissector_handle
Picking off "easy" dissectors that only have one or two exit points at most.
Change-Id: Ie514f126352e7598acc4f7c38db9c61d105d5e48
Reviewed-on: https://code.wireshark.org/review/11850
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-cattp.c')
-rw-r--r-- | epan/dissectors/packet-cattp.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/epan/dissectors/packet-cattp.c b/epan/dissectors/packet-cattp.c index 3c85874cb1..d8e74fb09f 100644 --- a/epan/dissectors/packet-cattp.c +++ b/epan/dissectors/packet-cattp.c @@ -214,8 +214,8 @@ dissect_cattp_rstpdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *cattp_tree, } /* Dissection of the base header */ -static void -dissect_cattp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) +static int +dissect_cattp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) { const char *pdutype = "[Unknown PDU]"; proto_item *ti, *cattp_tree; @@ -334,6 +334,7 @@ dissect_cattp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) tvb = tvb_new_subset_remaining(tvb, offset); call_dissector(data_handle, tvb, pinfo, tree); } + return tvb_captured_length(tvb); } /* The heuristic dissector function checks if the UDP packet may be a cattp packet */ @@ -354,7 +355,7 @@ dissect_cattp_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *da if ( (flags & M_PDU_SYN) == F_SYN || (flags & M_PDU_RST) == F_RST || (flags & M_PDU_ACK) == F_ACK ) { /* check if flag combi is valid */ - dissect_cattp(tvb, pinfo, tree); + dissect_cattp(tvb, pinfo, tree, data); return TRUE; } } @@ -574,7 +575,7 @@ proto_reg_handoff_cattp(void) dissector_handle_t cattp_handle; /* Create dissector handle */ - cattp_handle = create_dissector_handle(dissect_cattp, proto_cattp); + cattp_handle = new_create_dissector_handle(dissect_cattp, proto_cattp); /* find data handle */ data_handle = find_dissector("data"); |