diff options
author | Michael Mann <mmann78@netscape.net> | 2013-11-09 17:46:28 +0000 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2013-11-09 17:46:28 +0000 |
commit | 8081cf1d90397cbbb4404f9720595e1537ed5e14 (patch) | |
tree | 353220f46e08be1f0020603538f501b65bea8f3b /plugins/gryphon/packet-gryphon.c | |
parent | c9b2ee3768abb730b49fc4fc779e77578a1c4971 (diff) | |
download | wireshark-8081cf1d90397cbbb4404f9720595e1537ed5e14.tar.gz wireshark-8081cf1d90397cbbb4404f9720595e1537ed5e14.tar.bz2 wireshark-8081cf1d90397cbbb4404f9720595e1537ed5e14.zip |
Add data parameter to tcp_dissect_pdus() as well as convert it to using "new" style dissectors.
Now that "bytes consumed" can be determined, should tcp_dissect_pdus() take advantage of that?
Should tcp_dissect_pdus return length (bytes consumed)? There are many dissectors that just call tcp_dissect_pdus() then return tvb_length(tvb). Seems like that could all be rolled into one.
svn path=/trunk/; revision=53198
Diffstat (limited to 'plugins/gryphon/packet-gryphon.c')
-rw-r--r-- | plugins/gryphon/packet-gryphon.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/plugins/gryphon/packet-gryphon.c b/plugins/gryphon/packet-gryphon.c index b061b52e66..1dbd53db3e 100644 --- a/plugins/gryphon/packet-gryphon.c +++ b/plugins/gryphon/packet-gryphon.c @@ -756,17 +756,19 @@ get_gryphon_pdu_len(packet_info *pinfo _U_, tvbuff_t *tvb, int offset) return padded_len + FRAME_HEADER_LEN; } -static void -dissect_gryphon_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) +static int +dissect_gryphon_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) { dissect_gryphon_message(tvb, pinfo, tree, FALSE); + return tvb_length(tvb); } -static void -dissect_gryphon(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) +static int +dissect_gryphon(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data) { tcp_dissect_pdus(tvb, pinfo, tree, gryphon_desegment, FRAME_HEADER_LEN, - get_gryphon_pdu_len, dissect_gryphon_pdu); + get_gryphon_pdu_len, dissect_gryphon_pdu, data); + return tvb_length(tvb); } static void @@ -2803,6 +2805,6 @@ proto_reg_handoff_gryphon(void) { dissector_handle_t gryphon_handle; - gryphon_handle = create_dissector_handle(dissect_gryphon, proto_gryphon); + gryphon_handle = new_create_dissector_handle(dissect_gryphon, proto_gryphon); dissector_add_uint("tcp.port", 7000, gryphon_handle); } |