diff options
author | Hadriel Kaplan <hadrielk@yahoo.com> | 2015-01-25 14:30:13 -0500 |
---|---|---|
committer | Hadriel Kaplan <hadrielk@yahoo.com> | 2015-01-27 15:14:12 +0000 |
commit | ceb8d954d25211d5cb4766ece277c15aa53578d5 (patch) | |
tree | 859ad1b08e44c140728311e9ed60fd3444cd2054 /doc | |
parent | 9bbc33730622e117d9edfa3f393da883624510f1 (diff) |
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 <alexis.lagoutte@gmail.com>
Reviewed-by: Hadriel Kaplan <hadrielk@yahoo.com>
Tested-by: Hadriel Kaplan <hadrielk@yahoo.com>
Diffstat (limited to 'doc')
-rw-r--r-- | doc/README.dissector | 15 | ||||
-rw-r--r-- | doc/README.heuristic | 2 |
2 files changed, 9 insertions, 8 deletions
diff --git a/doc/README.dissector b/doc/README.dissector index fabf5b96e5..3fdc91af17 100644 --- a/doc/README.dissector +++ b/doc/README.dissector @@ -2922,19 +2922,20 @@ The arguments to tcp_dissect_pdus are: a routine that takes as arguments a packet_info pointer, a tvbuff pointer and an offset value representing the offset into the tvbuff - at which a PDU begins and should return - *without* throwing an - exception (it is guaranteed that the number of bytes specified by the - previous argument to tcp_dissect_pdus is available, but more data - might not be available, so don't refer to any data past that) - the - total length of the PDU, in bytes; + at which a PDU begins, and a void pointer for user data, and should + return - *without* throwing an exception (it is guaranteed that the + number of bytes specified by the previous argument to + tcp_dissect_pdus is available, but more data might not be available, + so don't refer to any data past that) - the total length of the PDU, + in bytes; a new_dissector_t routine to dissect the pdu that's passed a tvbuff pointer, packet_info pointer, proto_tree pointer and a void pointer for user data, with the tvbuff containing a possibly-reassembled PDU. (The "reported_length" of the tvbuff will be the length of the PDU). - a void pointer to user data that is passed to the dissector routine - referenced in the previous parameter. + a void pointer to user data that is passed to the length-determining + routine, and the dissector routine referenced in the previous parameter. 2.7.2 Modifying the pinfo struct. diff --git a/doc/README.heuristic b/doc/README.heuristic index 02e8449efc..9a1a712b27 100644 --- a/doc/README.heuristic +++ b/doc/README.heuristic @@ -156,7 +156,7 @@ dissect_PROTOABBREV_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, voi /* For tcp_dissect_pdus() */ static guint -get_PROTOABBREV_len(packet_info *pinfo _U_, tvbuff_t *tvb, int offset) +get_PROTOABBREV_len(packet_info *pinfo _U_, tvbuff_t *tvb, int offset, void *data _U_) { return (guint) tvb_get_ntohs(tvb, offset+3); } |