From ceb8d954d25211d5cb4766ece277c15aa53578d5 Mon Sep 17 00:00:00 2001 From: Hadriel Kaplan Date: Sun, 25 Jan 2015 14:30:13 -0500 Subject: Lua: Expose tcp_dissect_pdus() to Lua Provide a way for Lua-based dissectors to invoke tcp_dissect_pdus() to make TCP-based dissection easier. Bug: 9851 Change-Id: I91630ebf1f1fc1964118b6750cc34238e18a8ad3 Reviewed-on: https://code.wireshark.org/review/6778 Reviewed-by: Alexis La Goutte Reviewed-by: Hadriel Kaplan Tested-by: Hadriel Kaplan --- epan/dissectors/packet-s5066dts.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'epan/dissectors/packet-s5066dts.c') diff --git a/epan/dissectors/packet-s5066dts.c b/epan/dissectors/packet-s5066dts.c index 62b1cf64af..2484b548e6 100644 --- a/epan/dissectors/packet-s5066dts.c +++ b/epan/dissectors/packet-s5066dts.c @@ -736,7 +736,8 @@ static guint dissect_s5066dts_warning(tvbuff_t *tvb, guint offset, proto_tree *t return offset; } -static guint calculate_s5066dts_dpdu_len(packet_info *pinfo _U_, tvbuff_t *tvb, int offset _U_) +static guint calculate_s5066dts_dpdu_len(packet_info *pinfo _U_, tvbuff_t *tvb, + int offset _U_, void *data _U_) { guint pdu_type; guint address_size; @@ -744,6 +745,7 @@ static guint calculate_s5066dts_dpdu_len(packet_info *pinfo _U_, tvbuff_t *tvb, guint pdu_size; guint segmented_cpdu_size; + /* XXX: why is the offset not used to get this value? */ if (tvb_get_guint8(tvb, 0) != 0x90) return 1; else if (tvb_get_guint8(tvb, 1) != 0xEB) @@ -912,7 +914,7 @@ static int dissect_s5066dts_raw(tvbuff_t *tvb, packet_info *pinfo, proto_tree *t /* Cannot find sync pattern at dissect_s5066dts_raw()! */ return 0; } - calculate_s5066dts_dpdu_len(pinfo, tvb, 0); + calculate_s5066dts_dpdu_len(pinfo, tvb, 0, NULL); dissect_s5066dts(tvb, pinfo, tree, NULL); return b_length; -- cgit v1.2.3