Commit Graph

66852 Commits

Author SHA1 Message Date
Guy Harris c079255539 Add an API to let a postdissector specify fields whose values it needs.
Currently, this is only used to determine whether a protocol tree needs
to be built on the first pass or not - if there are postdissectors that
need fields, it does - but eventually we should be able to use it to
prime the dissection to deliver those fields in cases where we don't
need the *entire* protocol tree (rather than using a hack such as
cooking up a fake tap with a fake filter to do that).

Update MATE and TRANSUM to use it.

Clean up code to check whether we need a protocol tree, and add comments
before that code indicating, in each case, what the criteria are.

The array of postdissectors includes a length, so we don't need to
separately keep track of the number of postdissectors.

Clean up indentation while we're at it.

Change-Id: I71d4025848206d144bc54cc82941089a50e80ab7
Reviewed-on: https://code.wireshark.org/review/21029
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-04-12 04:31:19 +00:00
Peter Wu aa9a0b3bf8 cmake: fix sporadic WSDG build failure on Windows
The Windows builds (using msbuild) fail sporadically when building
documentation (target developer_guides). The problem is that the targets
"developer_guide_pdf_a4" and "developer_guide_html" both depend on
developer-guide.xml and msbuild does not notice that the file has
already been generated by the generate_developer-guide.xml target.

For a discussion of the problem, see
https://gitlab.kitware.com/cmake/cmake/issues/16767

To fix this, remove the "developer-guide.xml" dependency from
"developer_guide_xyz" (to prevent these targets from triggering building
"developer-guide.xml"). Instead, depend on a generated
"developer-guide.xml-stamp" file which is created by the
"generate_developer-guide.xml" target (but do *not* add it as output of
this target, otherwise we will have the original problem again).

This workaround is restricted to the MSVC generators because otherwise
it would trigger a CMP0058 policy warning when used with Ninja.

Change-Id: Idb3975cde35be2601b038a500d4886bbd3a684d7
Reviewed-on: https://code.wireshark.org/review/20812
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-04-12 04:18:18 +00:00
Michael Mann a71811af0d packet-wsp.c: Fix WSP dissector loop (add_capabilities)
Bug: 13581
Change-Id: I8b9f2df47fabb25d8851debc616fee1091d49f31
Reviewed-on: https://code.wireshark.org/review/21018
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-04-11 23:26:09 +00:00
Michael Mann a445efdd03 packet-sigcomp.c: Fix sigcomp dissector loop
Bug: 13578
Change-Id: I92892a74adea49b71670b4dca57dd52e13537bd5
Reviewed-on: https://code.wireshark.org/review/21019
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-04-11 23:25:13 +00:00
Michael Mann 9830eadad0 packet-slsk.c: Fix (many potential) SLSK long dissector loops
Bug: 13576
Change-Id: I9a0f6c6b682877ed7b5ce4b6b249d4aa4034096a
Reviewed-on: https://code.wireshark.org/review/21020
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-04-11 23:23:59 +00:00
Michael Mann 0d040f699c packet-asterix.c: Make hf_021_230_RA FT_DOUBLE type
Bug: 13580
Change-Id: I4861c9b69bafe72ecb44e57c9be393506fb9715b
Reviewed-on: https://code.wireshark.org/review/21021
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-04-11 23:22:48 +00:00
Peter Wu 73e24b31de Qt: mark bool and enum prefs as changed when modified via the menu
When preferences are modified, these must be marked to ensure that the
"prefs_changed" callback for Lua dissectors is invoked.

Bug: 13536
Change-Id: Ib93b2920ebefbc1532d3c6cd097f802a45ec6f35
Reviewed-on: https://code.wireshark.org/review/21016
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-04-11 19:28:08 +00:00
Nicolas Bertin 692461033b NOE: fix "EVT_DEVICE_PRESENCE" message decoding
Change-Id: Ib4c7cee28586a9506b94f4cd28ed6417809f76ce
Reviewed-on: https://code.wireshark.org/review/20952
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-04-11 19:06:37 +00:00
Jakub Zawadzki 14a1e1c9b4 Fix is_broadcast_bssid() for GCC.
This seems to be working for clang, but with gcc bssid_broadcast.data
don't have FFs, and is_broadcast_bssid() fails.

Change-Id: I69bdd91fe1838ab1f2a22a082a460c6cb3e34616
Reviewed-on: https://code.wireshark.org/review/20989
Petri-Dish: Jakub Zawadzki <darkjames-ws@darkjames.pl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-04-11 19:01:44 +00:00
Mathias Kurth 90c2e34cbd NB-IoT SRB1bis implementation
Change-Id: If0c9dd3f3ca2321aaf9176330299a32f611d34ce
Reviewed-on: https://code.wireshark.org/review/20990
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2017-04-11 12:33:37 +00:00
Pascal Quantin 87fc4cc5d7 GSM SMS: take into consideration TP-OA/TP-DA fields and direction for reassembly
Bug: 13572
Change-Id: Ieb1b972f95bc5c445597dd9aa2a0d8e7e9985238
Reviewed-on: https://code.wireshark.org/review/21013
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-04-11 11:40:24 +00:00
Peter Wu 5bcd2f681e Initial support for Generic Netlink (genl) dissection
For consistency with other netlink dissectors, the file is named
"netlink-generic", but the short protocol name is "genl" for brevity.

Ping-Bug: 13561
Change-Id: I6f94454f8366467fd833c3e57364c515aee9e86f
Reviewed-on: https://code.wireshark.org/review/20875
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-04-11 11:35:49 +00:00
Alexis La Goutte 4eed07af89 sctp: fix this condition has identical branches [-Werror=duplicated-branches] found by gcc7
Change-Id: Ia2cca91f03f312b0163848917f04bb5e17baf876
Reviewed-on: https://code.wireshark.org/review/20692
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-04-11 05:33:25 +00:00
Rémy Léone a265283f12 Simplify filter and 6Top commands
- Change internal variables to have shorter and explicit name
- Add extra item to perform filtering

Change-Id: I84a55540d552ffba6c935eb0bc2d24b7859be1b6
Reviewed-on: https://code.wireshark.org/review/20928
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-04-11 05:32:35 +00:00
Michael Mann 6b30fe1ce5 packet-icmp.c: Remove tree check that prevents expert info
proto_tree_add_checksum uses expert info and shouldn't be
"NULL tree protected"

Change-Id: If8a367c2be69252e9c6613329b7f78ad7e1e34eb
Ping-Bug: 13586
Reviewed-on: https://code.wireshark.org/review/21012
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: Anders Broman <a.broman58@gmail.com>
2017-04-11 05:30:23 +00:00
Uli Heilmeier 069c15ccb9 LDP: Add Entropy Label Capability TLV
s. https://tools.ietf.org/html/rfc6790#section-5.1

Bug: 13584
Change-Id: I1271b154960d7c46f9d0776a431beab3290c2871
Reviewed-on: https://code.wireshark.org/review/21007
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-04-10 21:12:01 +00:00
Robert Cragie 14ba81598d MLE and Thread: Additional dissectors
Additional dissectors for Mesh Link Establishment (MLE) and Thread CoAP
TMF messages. MLE is also used in ZigBee IP.

Change-Id: I5b9c224d7df48855b79ccac67dca7661a51d0a9b
Bug: 13495
Reviewed-on: https://code.wireshark.org/review/20594
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-04-10 20:34:34 +00:00
Alexis La Goutte 043df01c56 Add support for BASE_VALS_NO_UNKNOWN
BASE_VALS_NO_UNKNOWN is a special value_string value for only a single
(maybe 2) numerical value(s).  If a field has the numerical value
that doesn't match anything in the value_string, just the number
is supplied for the field (no "Unknown")

Dissectors that had this use case have been converted in the patch.

Change-Id: Ie63a36cceec2fe4436938ec7e3d7f9e690d2b8d9
Reviewed-on: https://code.wireshark.org/review/20736
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-04-10 20:31:37 +00:00
Robert Cragie ded9ad7017 IEEE 802.15.4: Add support for Thread, MLE and ZigBee IP
Enhancements to security processing add support for Thread, MLE and ZigBee
IP. Thread and ZigBee IP use a hash for key derivation for MAC and MLE
security processing. Thread additionally uses a sequence counter.

Ping-Bug: 13495
Change-Id: Ib8351b21e5615cd44880f5126f59fd0dc0a11742
Reviewed-on: https://code.wireshark.org/review/20585
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-04-10 20:26:25 +00:00
Pascal Quantin 2321a92ccc PacketBB: do not add more bytes to the protocol tree than the real addr array length
Bug: 13559
Change-Id: I612a7e2c104603a0aa14a0775bf9b8d247069398
Reviewed-on: https://code.wireshark.org/review/20992
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-04-10 20:10:58 +00:00
Pascal Quantin fa97a31dd4 RTPproxy: use tvb_format_text() to add text to info column
Otherwise you can have put multiple lines in the info column when a
packet is wrongly identified as RTPproxy (TCP connection using the
default RTPproxy port for example)

Bug: 13582
Change-Id: I817f67d5fc8c0d5f9d252f0f949af715bfc0ef56
Reviewed-on: https://code.wireshark.org/review/21000
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Peter Lemenkov <lemenkov@gmail.com>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2017-04-10 16:44:05 +00:00
AndersBroman 82442d788f [SGSAP] Add a cause value.
Change-Id: I62c04933fa0f80c2e4af8a885554328cc9fc50a7
Reviewed-on: https://code.wireshark.org/review/20995
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-04-10 14:16:56 +00:00
Pascal Quantin 2861b38153 NBAP: fix malformed packet error when having a single byte BindingID
The tvb length must be checked before trying to read 2 bytes

Bug: 13577
Change-Id: I8ba8320b3a0a96239e52a36bc09bb6b41e65a657
Reviewed-on: https://code.wireshark.org/review/20991
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-04-10 12:58:28 +00:00
Pascal Quantin d10421a39a WSP: fix addition of x-up-proxy-tod in tree
Regression introduced in gcf7979c

Bug: 13579
Change-Id: Ia2c0d95eec45937ffcdbee52022466a30ebab1f8
Reviewed-on: https://code.wireshark.org/review/20988
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-04-10 11:35:32 +00:00
Alexis La Goutte 77c580d30d dpnet: Fix Dead Store (Dead assignement/Dead increment) Warning found by Clang
Change-Id: I874ce616ef2b3d7eac0d7b034c83c0b7ac8ac731
Reviewed-on: https://code.wireshark.org/review/20987
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-04-10 11:34:41 +00:00
Alexis La Goutte 69ccb66581 noe: Fix Dead Store (Dead assignement/Dead increment) Warning found by Clang
Change-Id: I7a20dd07b378dbd27122b3a92b1bfa9bdb5b5d4d
Reviewed-on: https://code.wireshark.org/review/20986
Reviewed-by: Nicolas BERTIN <nicolas.bertin@al-enterprise.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-04-10 11:33:48 +00:00
Alexis La Goutte b8acaac91b bthci_cmd: fix this statement may fall through [-Werror=implicit-fallthrough] found by gcc7
Change-Id: Id18a0879114f11acb1db8dea8d94a1fb845b5e58
Reviewed-on: https://code.wireshark.org/review/20993
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-04-10 11:33:08 +00:00
Alexis La Goutte 8344f5a691 dns: fix this statement may fall through [-Werror=implicit-fallthrough] found by gcc7
and add also a missing (optional) break after default

Change-Id: I03d594db4702ccb4ebab3fca6b071d323e7f8d39
Reviewed-on: https://code.wireshark.org/review/20994
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2017-04-10 11:13:42 +00:00
Alistair Leslie-Hughes 6b802f3c26 dpnet: Use a bitfield for the Enum Reponse description flags
Change-Id: I296c032a48c103e32fe886a317fddf7a52bff6c9
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Reviewed-on: https://code.wireshark.org/review/20959
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: Anders Broman <a.broman58@gmail.com>
2017-04-10 04:19:22 +00:00
Uli Heilmeier 58406cf936 SSH: display protocol without carriage return / newline
Add protocol to tree without carriage return / newline bytes

Bug: 13574
Change-Id: I757a0a3b034943da7f42557a96cdb10a45627dc7
Reviewed-on: https://code.wireshark.org/review/20981
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-04-10 02:25:36 +00:00
Guy Harris 6b3714254d Pull all the "load settings" calls into a epan_load_settings() routine.
That way, nothing using libwireshark needs to know what settings need to
be loaded, they just call epan_load_settings().

Change-Id: I9390e259e286fc4f5acaeaac2767e4c3c4b656af
Reviewed-on: https://code.wireshark.org/review/20983
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-04-09 22:40:30 +00:00
Guy Harris 7d5ce06cbe Pull the error reporting into {read,save}_filter_list.
Change-Id: I4d9582661f2f1728d400eeb2a1b1dea98f32ce7f
Reviewed-on: https://code.wireshark.org/review/20982
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-04-09 17:57:52 +00:00
Peter Wu 1abbb503e4 cmake: fail if ENABLE_CHM_GUIDES but HTMLHelp is unavailable
While "cmake -DENABLE_CHM_GUIDES=ON" succeeds on Linux, the actual build
fails. Since the default for ENABLE_CHM_GUIDES is OFF, let's fail early
when ENABLE_CHM_GUIDES is requested.

When hcc.exe is found, do report the package as available.

Change-Id: If6fc3eb18f1150c251e2886f1f16277669f8ec25
Reviewed-on: https://code.wireshark.org/review/20811
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Petri-Dish: Graham Bloice <graham.bloice@trihedral.com>
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
2017-04-09 17:09:31 +00:00
Gerald Combs 05c501373d [Automatic update for 2017-04-09]
Update manuf, services enterprise-numbers, translations, and other items.

Change-Id: I147cbfa4c9cca70ad581d2e3c149473afd243086
Reviewed-on: https://code.wireshark.org/review/20978
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2017-04-09 17:00:54 +00:00
Guy Harris 1fd23e21a5 We use libui with dumpcap, which is built PIE, so libui should be, too.
Change-Id: Ic469517dc414e1eb62b27b6d2b0b0a7837790bf9
Reviewed-on: https://code.wireshark.org/review/20975
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-04-09 04:51:16 +00:00
Guy Harris 77cad8561c Move the filter file reading code to libui.
It doesn't belong in libwireshark, as it doesn't affect dissection, but
it *does* belong in libui, as it's helper code for the UIs.

Change-Id: I8a5e0640a299a08e9ec1917dd253197438ebfdbc
Reviewed-on: https://code.wireshark.org/review/20974
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-04-09 04:25:52 +00:00
Guy Harris 62b342443d Pull the error-reporting code for preference files into read_prefs().
No need to duplicate it in N different programs.

Update comments while we're at it.

Change-Id: I3096cbe5448a19363eff6303bdd54e522dae9336
Reviewed-on: https://code.wireshark.org/review/20973
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-04-09 03:03:25 +00:00
Guy Harris f0a24bee89 Have vwarning_alert_box() pop up a warning, not an error.
Change-Id: I993133931af222c94f4a8814583fef97e49542ca
Reviewed-on: https://code.wireshark.org/review/20972
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-04-09 02:54:36 +00:00
Guy Harris ed6f23406b Fix routine name.
Change-Id: I3c1e4080c28d0d14eaf7ecfb5540c53f8736703c
Reviewed-on: https://code.wireshark.org/review/20971
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-04-09 02:43:26 +00:00
Guy Harris 23a7890b6a Pull the code to save enabled/disabled lists into libwireshark.
It's identical in the GTK+ and Qt UIs, and it should just be done in
libwireshark.

Rename some routines to just speak of enabled_and_disabled_lists, so we
don't have to say enabled_and_disabled_protos_and_heuristic_dissectors
or something such as that.

Clean up indentation.

Change-Id: Ief2e612d9e1b60d8d0123b6bd3409dce5faf6495
Reviewed-on: https://code.wireshark.org/review/20970
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-04-09 02:00:37 +00:00
Peter Wu 92ebd63892 netlink: let subdissectors handle the netlink header
Let subdissectors handle parsing and addition of the Netlink header
instead of doing this before calling subdissectors. After this patch:

 - Protocol filters like "netlink-netfilter" can be used to match
   packets (previously only a text item was added to the tree).
 - Subdissectors have more freedom in modifying the type field, so now
   it shows the correct type directly rather than "Message type:
   Protocol-specific".
 - netfilter: the type fields are now actually linked to a tvb,
   previously it was linked to a NULL tvb.
 - netfilter: fix unintended rejection of packets (the length should
   have been added to the offset, otherwise it would fallback to the
   data dissector).
 - Now subdissectors will not be called for control messages (so the
   netlink-conntrack.pcap sample now shows "Netlink" instead of "Netlink
   route" for the "End of dump" control message).

Change-Id: I2ab1bef91fb0080664195b281a6a45c9702914e5
Reviewed-on: https://code.wireshark.org/review/20910
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-04-09 01:50:27 +00:00
Peter Wu 0add542dbf netlink: add helper for dissecting an array of attributes
From https://wiki.linuxfoundation.org/networking/generic_netlink_howto
"Arrays can be represented by using a single nested attribute as a
container with several of the same attribute type inside each
representing a spot in the array."

This patch adds a helper function to dissect such a type (it will be
used by Generic Netlink for CTRL_ATTR_OPS and CTRL_ATTR_MCAST_GROUPS).

Change-Id: I60537712f7fb0f9d4fb8850c6c8eef590635f49f
Reviewed-on: https://code.wireshark.org/review/20903
Petri-Dish: Jaap Keuter <jaap.keuter@xs4all.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-04-09 01:37:20 +00:00
Guy Harris 802479d237 Update symbol lists.
Change-Id: I5bd2aaaa28923a6fb5f0954e306cf0fc0c6dca5a
Reviewed-on: https://code.wireshark.org/review/20969
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-04-08 22:27:00 +00:00
Guy Harris a5fadc99ff Link dftest with libui.
No need to select one source file from libui and build it independently;
just go ahead and link.

Change-Id: I7ae5d8f9b83832518a4fb3430cb348e8c4d6b7ab
Reviewed-on: https://code.wireshark.org/review/20968
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-04-08 22:00:19 +00:00
Guy Harris 8f2b1bf9ca Link rawshark with libui.
No need to select one source file from libui and build it independently;
just go ahead and link.

Change-Id: Ie451b736411bcdac52ccde56f329c933a0065ead
Reviewed-on: https://code.wireshark.org/review/20967
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-04-08 21:44:36 +00:00
Guy Harris 2c44a7f930 Clean up handling of enabled/disabled protocols/heuristic dissectors.
Add a "report a warning message" routine to the "report_err" code in
libwsutil, and rename files and routines appropriately, as they don't
only handle errors any more.

Have a routine read_enabled_and_disabled_protos() that reads all the
files that enable or disable protocols or heuristic dissectors, enables
and disables them based on the contents of those files, and reports
errors itself (as warnings) using the new "report a warning message"
routine.  Fix that error reporting to report separately on the disabled
protocols, enabled protocols, and heuristic dissectors files.

Have a routine to set up the enabled and disabled protocols and
heuristic dissectors from the command-line arguments, so it's done the
same way in all programs.

If we try to enable or disable an unknown heuristic dissector via a
command-line argument, report an error.

Update a bunch of comments.

Update the name of disabled_protos_cleanup(), as it cleans up
information for disabled *and* enabled protocols and for heuristic
dissectors.

Support the command-line flags to enable and disable protocols and
heuristic dissectors in tfshark.

Change-Id: I9b8bd29947cccdf6dc34a0540b5509ef941391df
Reviewed-on: https://code.wireshark.org/review/20966
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-04-08 20:40:08 +00:00
Peter Wu f1751ef22f checkhf: handle C++-style comments
"tools/checkhf.pl epan/dissectors/packet-umts_fp.c" gave this error:

    Complex regular subexpression recursion limit (32766) exceeded at tools/checkhf.pl line 273.

This is caused by the comment "// ... Indicator's ..." which failed to
match the single-quoted string and caused "catastrophic backtracking".
Solution to fix this case is to disallow unescaped newlines (add "\n" to
the negated character class). Additionally, add logic to remove
C++-style comments for completeness.

Tested against all epan/dissectors/packet-*.c files, the only difference
in output is this umts_fp case, the running time has not regressed.

Change-Id: I7b43e01e1580acf831c0485513135b613bb02e8b
Reported-by: Joerg Mayer
Reviewed-on: https://code.wireshark.org/review/20965
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-04-08 19:14:00 +00:00
Uli Heilmeier 6d204e5152 ANCP: Update to RFC6320
Updates ANCP dissector to final RFC6320.
Additional updates types and codes to current IANA registry values:
https://www.iana.org/assignments/ancp/ancp.xhtml

Bug: 13532
Change-Id: I15d3e66e049d425350a528d04d4a5ff24d9b26bd
Reviewed-on: https://code.wireshark.org/review/20964
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-04-08 14:33:12 +00:00
Martin Mathieson 029c38d3fc Cope with spaces among options better, plus trivial cleanups
Change-Id: I3a00cf5dbcc0ee83a31f95ac74759cbc0aaa0e89
Reviewed-on: https://code.wireshark.org/review/20962
Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
Tested-by: Michael Mann <mmann78@netscape.net>
2017-04-08 14:31:32 +00:00
Marcelo Ricardo Leitner 8cfa57cdb5 Fix NR-SACK DuplicateTSN field
It was commented out because the loop reading it was filling using the
wrong header field, probably just due to a copy&paste issue.
Also, fix its width, which is actually 4-bytes long. The loop reading it
is reading it correctly already.

Change-Id: Ie1a3cb901ec578e51395ba110ea1792476919d75
Reviewed-on: https://code.wireshark.org/review/20961
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-04-08 13:52:12 +00:00