aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-hartip.c
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2013-11-09 17:46:28 +0000
committerMichael Mann <mmann78@netscape.net>2013-11-09 17:46:28 +0000
commit8081cf1d90397cbbb4404f9720595e1537ed5e14 (patch)
tree353220f46e08be1f0020603538f501b65bea8f3b /epan/dissectors/packet-hartip.c
parentc9b2ee3768abb730b49fc4fc779e77578a1c4971 (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-hartip.c')
-rw-r--r--epan/dissectors/packet-hartip.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/epan/dissectors/packet-hartip.c b/epan/dissectors/packet-hartip.c
index c33cd8ccc0..7aab582c57 100644
--- a/epan/dissectors/packet-hartip.c
+++ b/epan/dissectors/packet-hartip.c
@@ -950,21 +950,21 @@ get_dissect_hartip_len(packet_info *pinfo _U_, tvbuff_t *tvb, int offset)
return tvb_get_ntohs(tvb, offset+6);
}
-static void
-dissect_hartip_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
+static int
+dissect_hartip_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
- dissect_hartip_common(tvb, pinfo, tree, 0);
+ return dissect_hartip_common(tvb, pinfo, tree, 0);
}
static int
dissect_hartip_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
- void *data _U_)
+ void *data)
{
if (!tvb_bytes_exist(tvb, 0, HARTIP_HEADER_LENGTH))
return 0;
tcp_dissect_pdus(tvb, pinfo, tree, hartip_desegment, HARTIP_HEADER_LENGTH,
- get_dissect_hartip_len, dissect_hartip_pdu);
+ get_dissect_hartip_len, dissect_hartip_pdu, data);
return tvb_reported_length(tvb);
}