"redefined" to handle the same way as before.
In dissectors using the new API, add all currently used proto_tree_add_xxx
functions to the list of functions that take care of NEW_PROTO_TREE_API changes.
Modify the dissectors that worked around the missing change.
Change-Id: Ib6d6ec2c225d96c98c2a8f507648d7ad4bfb6c68
Reviewed-on: https://code.wireshark.org/review/28002
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
Before this patch, the dissector would assume that any data block type
that is unknown must be the trailer byte. Check explicitly if we have a
trailer byte and bring up an expert info for unknown data block types.
Change-Id: I4c3087eb403e2e668a22628062edd0240309a2bc
Reviewed-on: https://code.wireshark.org/review/21790
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
Petri-Dish: Martin Kaiser <wireshark@kaiser.cx>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
Increment offset as we go through the file.
Add a function to dissect a sequence of data blocks. Call this function
for extension blocks and images.
Change-Id: If156cb9cd4fe4ba6fdd3780c93087f2dd2ae8bf5
Reviewed-on: https://code.wireshark.org/review/21547
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
Petri-Dish: Martin Kaiser <wireshark@kaiser.cx>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
The length byte is now highlighted along with the actual data.
Change-Id: I93ce25ad2cd7c790cc23668d354e32c4f5e195c6
Reviewed-on: https://code.wireshark.org/review/21610
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
Petri-Dish: Martin Kaiser <wireshark@kaiser.cx>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
tvb_strneql() returns 0 if the two strings are equal.
Thanks to Ahmad Fatoum for reporting this bug.
Change-Id: Id6cde56623e18fe0a28f37b108dc1848cc58e1c3
Reviewed-on: https://code.wireshark.org/review/21554
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
Remove the global if(tree). We should not throw exceptions under if
(tree). Buf we may get exceptions while parsing the gif file.
Process the version string once as we go through the file. (Ok, we
already had to look at it to figure out that we have a gif file.)
Use tvb_reported_length_remaining() in the main loop.
Change-Id: Ie00594eebffc715676ffd5df8cbf7d43034aa68d
Reviewed-on: https://code.wireshark.org/review/21545
Petri-Dish: Martin Kaiser <wireshark@kaiser.cx>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
Generally, we should not throw an exception before we know that this is
our file/packet. Use tvb_strneql() to get the version string. This
function does not throw an exception if there are fewer bytes left than
we requested.
(I know that we check for reported len < 20. However, for captured
length > 6 and reported length < 20, the current code does not work.)
Change-Id: I5214c5c9dc9da616a94ae96269ec1c9e6f412e8e
Reviewed-on: https://code.wireshark.org/review/21544
Petri-Dish: Martin Kaiser <wireshark@kaiser.cx>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
The trailer byte is 0x3b, not 0xb3.
Change-Id: I9b2d21f369957fc0c4eb5ff376c4aa7fbdc28c9e
Reviewed-on: https://code.wireshark.org/review/21542
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
Change-Id: Ie39ef054a4a942687bd079f3a4d8c2cc55d5f22c
Reviewed-on: https://code.wireshark.org/review/12485
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Michael Mann <mmann78@netscape.net>
It ends up dragging in libwireshark headers, which programs not linking
with libwireshark shouldn't do. In particular, including
<epan/address.h> causes some functions that refer to libwireshark
functions to be defined if the compiler doesn't handle "static inline"
the way GCC does, and you end up requiring libwireshark even though you
shouldn't require it.
Move plurality() to wsutil/str_util.h, so that non-libwireshark code can
get it without include epan/packet.h. Fix includes as necessary.
Change-Id: Ie4819719da4c2b349f61445112aa419e99b977d3
Reviewed-on: https://code.wireshark.org/review/11545
Reviewed-by: Guy Harris <guy@alum.mit.edu>
The preferences are still supported for backwards compatibility, but the heuristic_protos file has final say on the "preference" to enable/disable a heuristic dissector.
Also add parameter to heur_dissector_add() for the "default" enable/disable of a heuristic dissector. With this parameter, a few more (presumably weak) heuristic dissectors have been "registered" but of course default to being disabled.
Change-Id: I51bebb2146ef3fbb8418d4f5c7f2cb2b58003a22
Reviewed-on: https://code.wireshark.org/review/9610
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Roland Knall <rknall@gmail.com>
Reviewed-by: Hadriel Kaplan <hadrielk@yahoo.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
This allows better presentation of heuristic dissectors to the end user.
Change-Id: I2ff3985ab914e83c2989880cc0c7b9904045b3f6
Reviewed-on: https://code.wireshark.org/review/9602
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Michael Mann <mmann78@netscape.net>
Specifically:
- Set packet.h to be the first wireshark #include after
config.h and "system" #includes.
packet.h added as an #include in some cases when missing.
- Remove some #includes included (directly/indirectly) in
packet.h. E.g., glib.h.
(Done only for those files including packet.h).
- As needed, move "system" #includes to be after config.h and
before wireshark #includes.
- Rework various #include file specifications for consistency.
- Misc.
Change-Id: Ifaa1a14b50b69fbad38ea4838a49dfe595c54c95
Reviewed-on: https://code.wireshark.org/review/5923
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Bill Meier <wmeier@newsguy.com>
Some other related cleanup.
Change-Id: I45f54032aa8318858f4ee784945b6f2ed163b6ea
Reviewed-on: https://code.wireshark.org/review/4328
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
(Using sed : sed -i '/^ \* \$Id\$/,+1 d')
Fix manually some typo (in export_object_dicom.c and crc16-plain.c)
Change-Id: I4c1ae68d1c4afeace8cb195b53c715cf9e1227a8
Reviewed-on: https://code.wireshark.org/review/497
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Change-Id: I1e827ad4d2cf64411c5a87f4710235dc4d6efc35
Reviewed-on: https://code.wireshark.org/review/250
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>