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 /epan/dissectors/packet-ff.c | |
parent | c9b2ee3768abb730b49fc4fc779e77578a1c4971 (diff) |
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 'epan/dissectors/packet-ff.c')
-rw-r--r-- | epan/dissectors/packet-ff.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/epan/dissectors/packet-ff.c b/epan/dissectors/packet-ff.c index a1a276b579..0bd5e27fc5 100644 --- a/epan/dissectors/packet-ff.c +++ b/epan/dissectors/packet-ff.c @@ -11913,8 +11913,8 @@ dissect_ff_msg_hdr(tvbuff_t *tvb, -static void -dissect_ff(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) +static int +dissect_ff(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) { proto_tree *sub_tree = NULL; proto_item *ti = NULL; @@ -11983,8 +11983,9 @@ dissect_ff(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) offset, trailer_len, sub_tree, Options); /*offset += trailer_len;*/ } -} + return tvb_length(tvb); +} static guint @@ -11996,7 +11997,7 @@ get_ff_pdu_len(packet_info *pinfo _U_, tvbuff_t *tvb, int offset) static int -dissect_ff_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_) +dissect_ff_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data) { /* * @@ -12015,7 +12016,7 @@ dissect_ff_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _ */ tcp_dissect_pdus(tvb, pinfo, tree, ff_desegment, - 12, get_ff_pdu_len, dissect_ff); + 12, get_ff_pdu_len, dissect_ff, data); return tvb_reported_length(tvb); } @@ -12023,7 +12024,7 @@ dissect_ff_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _ static int -dissect_ff_udp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_) +dissect_ff_udp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data) { guint32 length; @@ -12038,7 +12039,7 @@ dissect_ff_udp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _ (length < 12)) return 0; - dissect_ff(tvb, pinfo, tree); + dissect_ff(tvb, pinfo, tree, data); return tvb_reported_length(tvb); } |