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-aol.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-aol.c')
-rw-r--r-- | epan/dissectors/packet-aol.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/epan/dissectors/packet-aol.c b/epan/dissectors/packet-aol.c index a957255330..5882251a81 100644 --- a/epan/dissectors/packet-aol.c +++ b/epan/dissectors/packet-aol.c @@ -211,7 +211,7 @@ static guint get_aol_pdu_len(packet_info *pinfo _U_, tvbuff_t *tvb, int offset) /** * Dissect a PDU */ -static void dissect_aol_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { +static int dissect_aol_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) { proto_item *ti = NULL; proto_tree *aol_tree = NULL; guint offset = 0; @@ -296,18 +296,18 @@ static void dissect_aol_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) expert_add_info(pinfo,ti,&ei_aol_end_missing); } - return; + return tvb_length(tvb); } /** * Dissect a packet */ -static int dissect_aol(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_) { +static int dissect_aol(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data) { /* Ensure this really is an AOL packet */ if (tvb_length(tvb) >= 1 && tvb_get_guint8(tvb,0) != AOL_P3_FRAME_START) return 0; /* Dissect PDUs */ - tcp_dissect_pdus(tvb,pinfo,tree,aol_desegment,9,get_aol_pdu_len,dissect_aol_pdu); + tcp_dissect_pdus(tvb,pinfo,tree,aol_desegment,9,get_aol_pdu_len,dissect_aol_pdu,data); return tvb_length(tvb); } |