summaryrefslogtreecommitdiff
path: root/doc/README.dissector
diff options
context:
space:
mode:
authorPeter Wu <peter@lekensteyn.nl>2015-02-20 19:33:16 +0100
committerEvan Huus <eapache@gmail.com>2015-03-06 04:02:00 +0000
commit4ca3dbae9440c202c9b2346010c1986ee8e8968e (patch)
treebefdcd4335978d9439b32574223f2004cb752d72 /doc/README.dissector
parent554c8fd7caf3987637aa00f7b6c27d0a7fedfb02 (diff)
downloadwireshark-4ca3dbae9440c202c9b2346010c1986ee8e8968e.tar.gz
tcp: support variable-length tcp_dissect_pdus
Originally suggested by Bill Meier for the MQTT protocol[1], but the Websocket protocol can also benefit from this. Since DESEGMENT_ONE_MORE_SEGMENT is a valid packet length, use the zero length instead as an indicator that the length is not yet known. Updated documentation too and remove the function documentation from packet-tcp.c since it is duplicated in packet-tcp.h. A noteworthy WSDG change is that the get_pdu_len parameter of tcp_dissect_pdus gained another void pointer since v1.99.2rc0-890-gceb8d95 ("Lua: Expose tcp_dissect_pdus() to Lua"). [1]: https://www.wireshark.org/lists/wireshark-dev/201405/msg00044.html Change-Id: I4eba380e00cd757635eb5639c2857356dae3171e Reviewed-on: https://code.wireshark.org/review/7279 Reviewed-by: Guy Harris <guy@alum.mit.edu> Reviewed-by: Michael Mann <mmann78@netscape.net> Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Evan Huus <eapache@gmail.com>
Diffstat (limited to 'doc/README.dissector')
-rw-r--r--doc/README.dissector9
1 files changed, 5 insertions, 4 deletions
diff --git a/doc/README.dissector b/doc/README.dissector
index 10ba4e6b3f..8eefc8b06f 100644
--- a/doc/README.dissector
+++ b/doc/README.dissector
@@ -2972,16 +2972,17 @@ 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 a void pointer for user data, and should
- return - *without* throwing an exception (it is guaranteed that the
+ return the total length of the PDU in bytes (or 0 if more bytes are
+ needed to determine the message length).
+ The routine must not throw exceptions (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;
+ so don't refer to any data past that);
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).
+ "reported_length" of the tvbuff will be the length of the PDU);
a void pointer to user data that is passed to the length-determining
routine, and the dissector routine referenced in the previous parameter.