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 /asn1/cmp | |
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 'asn1/cmp')
-rw-r--r-- | asn1/cmp/packet-cmp-template.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/asn1/cmp/packet-cmp-template.c b/asn1/cmp/packet-cmp-template.c index 2281da2298..177ababbe3 100644 --- a/asn1/cmp/packet-cmp-template.c +++ b/asn1/cmp/packet-cmp-template.c @@ -192,11 +192,6 @@ static int dissect_cmp_tcp_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *pa return offset; } -static void dissect_cmp_tcp_pdu_no_return(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree) -{ - dissect_cmp_tcp_pdu(tvb, pinfo, parent_tree, NULL); -} - static guint get_cmp_pdu_len(packet_info *pinfo _U_, tvbuff_t *tvb, int offset) { guint32 plen; @@ -212,7 +207,7 @@ static guint get_cmp_pdu_len(packet_info *pinfo _U_, tvbuff_t *tvb, int offset) /* CMP over TCP: RFC2510 section 5.2 and "Transport Protocols for CMP" draft */ static int -dissect_cmp_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void *data _U_) +dissect_cmp_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void *data) { guint32 pdu_len; guint8 pdu_type; @@ -262,7 +257,7 @@ dissect_cmp_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void } tcp_dissect_pdus(tvb, pinfo, parent_tree, cmp_desegment, offset, get_cmp_pdu_len, - dissect_cmp_tcp_pdu_no_return); + dissect_cmp_tcp_pdu, data); return tvb_length(tvb); } |