aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore8
-rw-r--r--doc/README.dissector34
-rw-r--r--doc/packet-PROTOABBREV.c19
-rw-r--r--docbook/release-notes.asciidoc16
4 files changed, 36 insertions, 41 deletions
diff --git a/.gitignore b/.gitignore
index ac9b4146a6..7f694d2c9d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -135,6 +135,14 @@ docbook/*-guide-*.fo
docbook/*-guide-*.pdf
docbook/ws?g_html/
docbook/ws?g_html_chunked/
+docbook/git_version.xml
+docbook/release-notes-*.pdf
+docbook/release-notes.txt
+docbook/wsdg.validated
+docbook/wsluarm
+docbook/wsluarm_src/
+docbook/wsug.validated
+
# Qt #
######
diff --git a/doc/README.dissector b/doc/README.dissector
index 59b0900b48..2bc2d638cf 100644
--- a/doc/README.dissector
+++ b/doc/README.dissector
@@ -1959,6 +1959,10 @@ The syntax for creating a new TVBUFF_SUBSET is:
next_tvb = tvb_new_subset(tvb, offset, length, reported_length)
+or, in the common case where it should just run to the end of the packet,
+
+next_tvb = tvb_new_subset_remaining(tvb, offset)
+
Where:
tvb is the tvbuff that the dissector has been working on. It
can be a tvbuff of any type.
@@ -1977,36 +1981,6 @@ Where:
the protocol doesn't say anything about the size of its payload.
-An example from packet-ipx.c -
-
-void
-dissect_ipx(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
-{
- tvbuff_t *next_tvb;
- int reported_length, available_length;
-
-
- /* Make the next tvbuff */
-
-/* IPX does have a length value in the header, so calculate report_length */
- Set this to -1 if there isn't any length information in the protocol
-*/
- reported_length = ipx_length - IPX_HEADER_LEN;
-
-/* Calculate the available data in the packet,
- set this to -1 to use all the data in the tv_buffer
-*/
- available_length = tvb_captured_length(tvb) - IPX_HEADER_LEN;
-
-/* Create the tvbuffer for the next dissector */
- next_tvb = tvb_new_subset(tvb, IPX_HEADER_LEN,
- MIN(available_length, reported_length),
- reported_length);
-
-/* call the next dissector */
- dissector_next( next_tvb, pinfo, tree);
-
-
1.8 Editing Makefile.common and CMakeLists.txt to add your dissector.
To arrange that your dissector will be built as part of Wireshark, you
diff --git a/doc/packet-PROTOABBREV.c b/doc/packet-PROTOABBREV.c
index c1aaba8d36..b1fedfec41 100644
--- a/doc/packet-PROTOABBREV.c
+++ b/doc/packet-PROTOABBREV.c
@@ -96,17 +96,20 @@ dissect_PROTOABBREV(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
* For example:
*/
- /* Check that there's enough data */
+ /* Check that the packet is long enough for it to belong to us */
if (tvb_reported_length(tvb) < PROTOABBREV_MIN_LENGTH)
return 0;
- /* Fetch some values from the packet header using tvb_get_*(). If these
- * values are not valid/possible in your protocol then return 0 to give
- * some other dissector a chance to dissect it.
- */
- if ( TEST_HEURISTICS )
- /* these values are not possible in PROTONAME */
- return 0;
+ /* Check that there's enough data present to run the heuristics */
+ if (tvb_captured_length(tvb) > SOME_HEURISTIC_VALUE) {
+ /* Fetch some values from the packet header using tvb_get_*(). If these
+ * values are not valid/possible in your protocol then return 0 to give
+ * some other dissector a chance to dissect it.
+ */
+ if ( TEST_HEURISTICS )
+ /* these values are not possible in PROTONAME */
+ return 0;
+ }
/*** COLUMN DATA ***/
diff --git a/docbook/release-notes.asciidoc b/docbook/release-notes.asciidoc
index 9ca6ae0e0c..0dad4d769e 100644
--- a/docbook/release-notes.asciidoc
+++ b/docbook/release-notes.asciidoc
@@ -58,12 +58,10 @@ since version 1.10:
* Wireshark now uses the Qt application framework. The new UI should provide
a significantly better user experience, particularly on Mac OS X and Windows.
-* A more flexible, modular memory manger (wmem) has been added. It was available
- experimentally in 1.10 but is now mature and has mostly replaced the old API.
-* Expert info is now filterable and now requires a new API.
* The Windows installer now uninstalls the previous version of Wireshark
silently. You can still run the uninstaller manually beforehand if you wish
to run it interactively.
+* Expert information is now filterable when the new API is in use.
* The "Number" column shows related packets and protocol conversation spans
(Qt only).
* When manipulating packets with editcap using the -C <choplen> and/or
@@ -154,6 +152,18 @@ STANAG 5066 Data Transfer Sublayer
--sort-and-group--
+=== Major API Changes
+
+The libwireshark API has undergone some major changes:
+
+* A more flexible, modular memory manger (wmem) has been added. It was available
+ experimentally in 1.10 but is now mature and has mostly replaced the old emem
+ API (which is deprecated).
+* A new API for expert information has been added, replacing the old one.
+* The tvbuff API has been cleaned up: tvb_length has been renamed to
+ tvb_captured_length for clarity, and tvb_get_string has been deprecated in
+ favour of tvb_get_string_enc.
+
== Getting Wireshark
Wireshark source code and installation packages are available from