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-pvfs2.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-pvfs2.c')
-rw-r--r-- | epan/dissectors/packet-pvfs2.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/epan/dissectors/packet-pvfs2.c b/epan/dissectors/packet-pvfs2.c index a4314f0a8c..f37b689ce3 100644 --- a/epan/dissectors/packet-pvfs2.c +++ b/epan/dissectors/packet-pvfs2.c @@ -273,10 +273,10 @@ dissect_pvfs_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gboolean dissect_other_as_continuation); -static void dissect_pvfs_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) +static int dissect_pvfs_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) { dissect_pvfs_common(tvb, pinfo, tree, FALSE); - + return tvb_reported_length(tvb); } static guint get_pvfs_pdu_len(packet_info *pinfo _U_, tvbuff_t *tvb, int offset) @@ -292,7 +292,7 @@ static guint get_pvfs_pdu_len(packet_info *pinfo _U_, tvbuff_t *tvb, int offset) } static int -dissect_pvfs_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_) +dissect_pvfs_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data) { guint32 magic_nr, mode; guint64 size; @@ -331,7 +331,7 @@ dissect_pvfs_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *dat } tcp_dissect_pdus(tvb, pinfo, tree, pvfs_desegment, 24, get_pvfs_pdu_len, - dissect_pvfs_pdu); + dissect_pvfs_pdu, data); return tvb_reported_length(tvb); } |