Commit Graph

2328 Commits

Author SHA1 Message Date
Guy Harris 02a67d4e1e Report the file name in the "#if/#endif mismatch" error.
Change-Id: I54d2b98e471e04a2ad0a8ecc036180af04bb8359
Reviewed-on: https://code.wireshark.org/review/27394
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-05-08 09:15:34 +00:00
Gerald Combs 230d7d4e90 Test: Integrate ftsanity directly into our tests.
Move tools/ftsanity.py to test/suite_unittests.py.

Change-Id: I8582b19c0544d032eb0566bc1e82be385e904c11
Reviewed-on: https://code.wireshark.org/review/27341
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-05-05 16:10:24 +00:00
Guy Harris 15cfc41e94 Don't use dladdr() to get a pathname for the current executable().
Change-Id: I24ad11a659c2cb936f873339dc2b36ac9944280a
Reviewed-on: https://code.wireshark.org/review/27359
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-05-05 08:06:35 +00:00
Gerald Combs 7591ed848e Test: Add dftest to our tests.
Move the dfilter tests and captures from tools to test.

Change-Id: I2e6a6cc1d383c985ba07c76c93ae1c57d3c8f84c
Reviewed-on: https://code.wireshark.org/review/27339
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-05-04 22:44:32 +00:00
Dario Lombardo 12613415ef travis: use ninja for building.
Change-Id: I18cf4c79e6073955d8224c7a37f906ec54a8edbc
Reviewed-on: https://code.wireshark.org/review/27324
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2018-05-04 08:30:07 +00:00
Dario Lombardo 3dce4ea3d3 tools: add missing optional packages in debian/rpm setup.
Change-Id: Ie84f8d6e9ebdff0b760bc71ec227358ce23f427d
Reviewed-on: https://code.wireshark.org/review/27307
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Dario Lombardo <lomato@gmail.com>
2018-05-03 14:24:34 +00:00
Dario Lombardo d431863e70 tools: add ninja to debian/rpm additional packages.
Change-Id: I56c1af8a5a4bdd4f9c2276a6e246a1b76a003049
Reviewed-on: https://code.wireshark.org/review/27302
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Dario Lombardo <lomato@gmail.com>
2018-05-03 14:23:32 +00:00
Gerald Combs f4378d70dd Windows: Upgrade WinSparkle to 0.5.7.
Bug: 14642
Change-Id: Iac5e417f05eb7a5f0acb36c3588352ceefb8bf6e
Reviewed-on: https://code.wireshark.org/review/27276
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-05-02 20:15:43 +00:00
Gerald Combs cd94b1cb8e Force textify.ps1 to read files as UTF-8.
Prior to the switch from AsciiDoc to Asciidoctor we converted
release_notes.html to NEWS using elinks or lynx, which in turn generated
ASCII output. It was sufficient to read NEWS in PowerShell using
Get-Content, which defaults to ASCII.

We now use tools/html2text.py, which generates UTF-8. Switch Get-Content's
encoding to match. Note that Notepad detects file encodings heuristically,
and that we might want to use a BOM.

Bug: 14636
Change-Id: Ibd92ef7ad642631a938bb4d75a2d83f479099032
Reviewed-on: https://code.wireshark.org/review/27240
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-05-02 04:06:30 +00:00
Stig Bjørlykke 14720ace06 Fix comment end after SPDX identifier
Move */ to a separate line below the SPDX identifier.

Change-Id: Id1032215449cfccae0933147b45e04b65e0b727f
Reviewed-on: https://code.wireshark.org/review/27211
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-05-01 06:56:37 +00:00
Peter Wu 4694c7acf0 checkAPIs.pl: fix false positive with C++ method names
Fix false positives due to method names that are considered deprecated:

    int CaptureFileDialog::open(...
    first_elapsed = QString().sprintf(
    int open(QString &file_name, unsigned int &type);

Change-Id: Ib3c255a9f17b2cb44cd441e5277a97db63afaa72
Reviewed-on: https://code.wireshark.org/review/27189
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2018-04-30 10:37:35 +00:00
Peter Wu 1a26b56c26 Ensure test directories are included with git archive
"make dist" will currently fail with "git archive" archives because
dftestfiles and dftestlib is missing. To encourage distributors to run
tests, ensure that these files (1.64MiB uncompressed, 688KiB
gzip-compressed) are bundled.

Change-Id: I1fc2bd6df45db40e64e7691235f716bbf3562f87
Reviewed-on: https://code.wireshark.org/review/27158
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-04-26 15:09:12 +00:00
Guy Harris f23a934492 Don't install autotools or GTK+, but do install CMake.
We no longer use autotools/libtool, so we don't need to install
automake, autoconf, or libtool; we only support CMake, so we *do* need
to install it.

We no longer support GTK+, so we don't need to install it.

Change-Id: I41df9f67c8aba486220e77f7c8c67efa7784a7f2
Reviewed-on: https://code.wireshark.org/review/27152
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-04-25 17:57:42 +00:00
Peter Wu 6144951380 dfilter: fix memleaks with functions and slice operator
Running tools/dfilter-test.py with LSan enabled resulted in 38 test
failures due to memory leaks from "fvalue_new". Problematic dfilters:
- Return values from functions, e.g. `len(data.data) > 8` (instruction
  CALL_FUNCTION invoking functions from epan/dfilter/dfunctions.c)
- Slice operator: `data.data[1:2] == aa:bb` (function mk_range)

These values end up in "registers", but as some values (from READ_TREE)
reference the proto tree, a new tracking flag ("owns_memory") is added.

Add missing tests for some functions and try to improve documentation.

Change-Id: I28e8cf872675d0a81ea7aa5fac7398257de3f47b
Reviewed-on: https://code.wireshark.org/review/27132
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-04-25 06:57:00 +00:00
Guy Harris 372b820255 Get rid of more .libs stuff.
Again, no more autotools/libtool, so no more .libs, as that's a
libtoolism.

Change-Id: I909c18b969ca8e04a252ff45f7f3e6bc9d0c8476
Reviewed-on: https://code.wireshark.org/review/27138
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-04-25 04:24:21 +00:00
Peter Wu ecb04e4076 vg-suppressions: suppress more GLib-related memleaks
g_get_charset, g_get_filename_charsets, g_strerror, g_get_home_dir all
return a const char pointer. get_global_random is internally called by
g_random_int, g_random_int_range, etc.

On Arch Linux with glibc 2.26-11 and glib2 2.56.0+7+g66948ae23-1,
"call_init" is not visible in the stack trace, so replace it by "...".
It also has "possibly lost" entries due to GLib types initialization
(gobject_init -> _g_enum_types_init). Finally "g_private_set" internally
leaks after calling "g_private_get_impl".

Change-Id: Ifb2be3188add7bdd060d1e7321c8126e5924a738
Reviewed-on: https://code.wireshark.org/review/27118
Reviewed-by: Dario Lombardo <lomato@gmail.com>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2018-04-24 21:12:49 +00:00
Dario Lombardo 0202bc995b tools: make rpm and debian setup scripts more similar.
Change-Id: Ie46d56aff91694a3b8c4c62b4b03e38d3fb1e68a
Reviewed-on: https://code.wireshark.org/review/27116
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2018-04-24 20:28:34 +00:00
Dario Lombardo 47b6bb6fb1 tools: remove install_rpms_for_devel.sh.
Obsoleted by tools/rpm_setup.sh.

Change-Id: I2d13f4ae96970802b2edfe3e4028ec37b9cb6269
Reviewed-on: https://code.wireshark.org/review/27113
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-04-24 10:56:48 +00:00
chinarulezzz dfb92c2a1d tools/cppcheck/cppcheck.sh: improve script; add new option: colorize html output
Change-Id: I34dad2fa9ea80529997103491219027edaf3ac41
Reviewed-on: https://code.wireshark.org/review/27080
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-04-24 03:51:17 +00:00
Jakub Zawadzki 4a488919e3 oss-fuzzshark: use install directory for headers. Install missing one.
From compilation log:
  epan/ipv4.h:19:10: fatal error: 'wsutil/inet_ipv4.h' file not found
  tools/oss-fuzzshark/fuzzshark.c:27:10: fatal error: 'version_info.h' file not found

Change-Id: I3e147e014ae398ae07e64aec5a6535a8f9e357a3
Reviewed-on: https://code.wireshark.org/review/27076
Petri-Dish: Jakub Zawadzki <darkjames-ws@darkjames.pl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-04-24 03:49:15 +00:00
Joerg Mayer 7853d0e354 Remove a few obsolete references to gtk from checkapi and faq.py
Change-Id: Ice9aec64fddbed94c7be96575c6e1bc800e8ac9e
Reviewed-on: https://code.wireshark.org/review/27067
Petri-Dish: Jörg Mayer <jmayer@loplof.de>
Tested-by: Petri Dish Buildbot
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2018-04-21 23:34:40 +00:00
Pascal Quantin 4704b89aa1 Windows: add JSON-GLib library
Change-Id: I9b266bffc74779f9d28eabb5642644a2b0afa7cf
Reviewed-on: https://code.wireshark.org/review/27049
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-04-20 10:46:19 +00:00
Pascal Quantin 2b65e9e74b Windows: upgrade GLib to 2.52.2
Change-Id: If54ec9f8c62d95697a5703ea24cf3ad7c2d6112c
Reviewed-on: https://code.wireshark.org/review/27048
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-04-20 10:46:06 +00:00
Dario Lombardo 511c2e166a tshark: add -G elastic-mapping report.
This option generates an ElasticSearch mapping file as described here:
https://www.elastic.co/blog/analyzing-network-packets-with-wireshark-elasticsearch-and-kibana

It leverages the Glib-json library.

Change-Id: Iff25f991e87d3da07bf06654e353fb785799dde9
Reviewed-on: https://code.wireshark.org/review/26848
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Dario Lombardo <lomato@gmail.com>
2018-04-18 08:57:39 +00:00
Peter Wu 699ee5dc52 dfilter: make spaces around ".." optional in display filter
For numeric values such as port numbers, "4430..4434" looks more
natural than "4430 .. 4434", so support that.

To make this possible, the display filter syntax needs to be restricted.
Assume that neither field names nor values can contain "..". The display
filter `data contains ..` will now be considered a syntax error and must
be written as `data contains ".."` instead. More generally, all values
that contain ".." must be quoted.

Other than the ".." restriction, the scanner deliberately accepts more
characters that can potentially form invalid input. This is to prevent
accidentally splitting input in multiple tokens.  For example, "9.2." in
"frame.time_delta in {9.2.}" is currently parsed as one token and then
rejected because it cannot be parsed as time. If the scanner was made
stricter, it could treat it as two tokens (floats), "9." and "2." which
has different meaning for the set membership operator.

An unhandled edge case is "1....2" which is parsed as "1 .. ..  2" but
could have been parsed as "1. .. .2" instead. A float with trailing dots
followed by ".." seems sufficiently weird, so rejection is fine.

Ping-Bug: 14180
Change-Id: Ibad8e851b49346c9d470f09d5d6a54defa21bcb9
Reviewed-on: https://code.wireshark.org/review/26960
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-04-18 03:47:31 +00:00
Peter Wu 1ff82572ca dfilter: add range support to set membership operator ("f in {x .. y}")
Allow "tcp.srcport in {1662 1663 1664}" to be abbreviated to
"tcp.srcport in {1662 .. 1664}". The range operator is supported for any
field value which supports the "<=" and "=>" operators and thus works
for integers, IP addresses, etc.

The naive mapping "tcp.srcport >= 1662 and tcp.srcport <= 1664" is not
used because it does not have the intended effect with fields that have
multiple occurrences (e.g. tcp.port). Each condition could be satisfied
by an other value. Therefore a new DVFM instruction (ANY_IN_RANGE) is
added to test the range condition against each individual field value.

Bug: 14180
Change-Id: I53c2d0f9bc9d4f0ffaabde9a83442122965c95f7
Reviewed-on: https://code.wireshark.org/review/26945
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-04-18 03:47:02 +00:00
Dario Lombardo 4a156da068 Remove autotools build system.
It has been replaced by cmake.

Change-Id: I83a5eddb8645dbbf6bca9f026066d2e995d8e87a
Reviewed-on: https://code.wireshark.org/review/26969
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-04-18 03:46:17 +00:00
Gerald Combs 1d030928ef Remove some GTK+-only code.
Change-Id: Ic2498c7acd6a1a522be45094148402ee34a6b4d1
Reviewed-on: https://code.wireshark.org/review/26958
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-04-17 03:44:47 +00:00
Gerald Combs c8cf127375 Add a destination directory flag to git-export-release.
Add a destination directory flag to git-export-release.sh. Use it to
replace the current "dist" target. Use it in the RPM section to avoid a
symlink.

Change-Id: I30ae76b3ab1a995d232e748b79aa37440f90f854
Reviewed-on: https://code.wireshark.org/review/26974
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-04-17 03:43:38 +00:00
Gerald Combs 129d574d96 Add some notes to git-export-release.sh.
Add some notes about avoiding the use of git stash.

Change-Id: I441adef099e5d64834a73e9f0f260d00c21be585
Reviewed-on: https://code.wireshark.org/review/26973
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-04-16 18:17:23 +00:00
Gerald Combs 80256442af More PortAudio removal.
Change-Id: Ib56212e09d41fc76494d8186c77541302700104c
Reviewed-on: https://code.wireshark.org/review/26952
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-04-15 16:49:53 +00:00
Joerg Mayer d1ee982115 Provide alternative paths for the macosx-support-libs.
That way I won't have to restore the dir after a "git -dfX"
Also Update CMake to 1.11.0 (current) and Qt to 5.9.5 (LTS)

Change-Id: Idcc481b517d6379f97fa5d30ce3b886cfcf3c9d4
Reviewed-on: https://code.wireshark.org/review/26951
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2018-04-15 13:06:53 +00:00
Peter Wu 82e8aa33a7 dfilter-test.py: document parallelization support
Tests are independent and can be run in parallel using pytest-xdist
(https://github.com/pytest-dev/pytest-xdist), document it.

While at it, allow running the tests from other directories.

Change-Id: I3e55c549669f7d59d35cd64eca53680cea6dec2d
Reviewed-on: https://code.wireshark.org/review/26943
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-04-15 05:34:41 +00:00
Peter Wu 4adaa3a4b1 dftestlib: remove unnecessary execute bit
tools/dfilter-test.py is the main script, others are imported as needed.

Change-Id: I5ce7bd298b90d3e16c83c6b219c2717ccbcf2a10
Reviewed-on: https://code.wireshark.org/review/26944
Reviewed-by: Jeff Morriss <jeff.morriss.ws@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-04-15 05:32:27 +00:00
Dario Lombardo afbdd66fc2 tools: add openSUSE asciidoctor to rpm_setup.sh.
Change-Id: I939110047739ac9b7a5c6984a84351d4fdfbf556
Reviewed-on: https://code.wireshark.org/review/26860
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-04-11 00:10:16 +00:00
Joerg Mayer 2c7b678d7e macos-setup.sh: More GTK and minimum supported version cleanups
Change-Id: Ia2992fe65c2c16e4b42d252ba0f08266a95f4b10
Reviewed-on: https://code.wireshark.org/review/26840
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2018-04-10 05:02:17 +00:00
Joerg Mayer 25f925840d Remove GTK-related stuff from macos-setup.sh
Change-Id: Iaf6298a5f810c9fa0c2a3c31cce50af8856d8d14
Reviewed-on: https://code.wireshark.org/review/26818
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2018-04-09 05:07:38 +00:00
Dario Lombardo 35c83b22c0 lemon: remove leaks in main().
Change-Id: If6693d2ad87fcd1dcceb137d76d890663f83a827
Reviewed-on: https://code.wireshark.org/review/26705
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2018-04-05 18:52:28 +00:00
Dario Lombardo c95e18333c lemon: remove leak in tplt_open().
Change-Id: I6a13c89e27797f8c8d1e187aef8923b9df0c8ee4
Reviewed-on: https://code.wireshark.org/review/26706
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2018-04-05 18:51:57 +00:00
Dario Lombardo 02ef13fac7 lemon: remove scan-build warning in errline().
Warning: Argument with 'nonnull' attribute passed null.

Change-Id: Ie46733ae8663161b957acaabbaa2da539018693d
Reviewed-on: https://code.wireshark.org/review/26704
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2018-04-05 18:51:34 +00:00
Guy Harris c4da7ed843 Don't install PortAudio if we're not installing GTK+.
Change-Id: I99bad59b34ff0688cf527ae69b5e48e4c14e7380
Reviewed-on: https://code.wireshark.org/review/26758
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-04-05 18:48:41 +00:00
Darius Davis 5c2eade45d Tweak ws_cpuid so that Valgrind is happy.
Valgrind considers the "cpuid" instruction to always depend on inputs from eax
and ecx, even though it's only a subset of values of eax for which ecx is
relevant.  If ecx is undefined when cpuid is executed, the outputs of cpuid
will be considered undefined.

Instead of suppressing the resulting uninitialised-value warning (the
suppression for which is now out-of-date anyway, now that
register_all_protocols is moved to a worker thread), let's simply set ecx to
zero in ws_cpuid.

Testing done: Built Wireshark on Linux amd64.  Before this change, running
   "tools/valgrind-wireshark.sh ./test/captures/dhcp.pcap" with
   valgrind-3.12.0.SVN on Debian 9.4 amd64 would yield the following Valgrind
   error:

   ==2416== Thread 2:
   ==2416== Conditional jump or move depends on uninitialised value(s)
   ==2416==    at 0xACB8B22: ws_mempbrk_sse42_compile (ws_mempbrk_sse42.c:58)
   ==2416==    by 0x74F4960: register_all_protocols_worker (register.c:37)
   ==2416==    by 0xB1403D4: g_thread_proxy (gthread.c:784)
   ==2416==    by 0xD438493: start_thread (pthread_create.c:333)
   ==2416==    by 0xB4CAACE: clone (clone.S:97)

   With the change, the above message is gone.  Inspected the disassembly of
   function ws_cpuid, and it looks sane -- just an added "xor ecx, ecx" at the
   top.

Change-Id: I2fb382309cac234c400286a6e9fac7d922912c63
Reviewed-on: https://code.wireshark.org/review/26733
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-04-05 07:34:01 +00:00
Pascal Quantin 5a9d0caa11 extract_asn1_from_spec.pl: fix parsing of END tag
Change-Id: I2eb73f74b456ffb5a9bae50e78f7edb4204912e0
Reviewed-on: https://code.wireshark.org/review/26740
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2018-04-04 17:52:47 +00:00
Dario Lombardo 60d5edb41c lemon: make some functions static.
Change-Id: I41a78d6cb87223d13854ca4aad4ffdf70daecaf3
Reviewed-on: https://code.wireshark.org/review/26687
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-04-04 10:00:49 +00:00
Dario Lombardo 8131922b26 lemon: comment out unused OptErr function.
Change-Id: I889c2f0df721d93752c77e6b31ddaa8702ab47bf
Reviewed-on: https://code.wireshark.org/review/26703
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-04-04 04:12:52 +00:00
Dario Lombardo d7c98ddde7 lemon: skip clang analyzer for more code.
Change-Id: I3c2c0e1581c759fb4eef48008a7d905701958913
Reviewed-on: https://code.wireshark.org/review/26688
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2018-03-30 19:02:13 +00:00
Dario Lombardo 072e24fa0a lemon: remove unneeded assignment.
Change-Id: Id7bd4b5f7db1c9c797a2f50e7896799a0ad64532
Reviewed-on: https://code.wireshark.org/review/26690
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2018-03-30 19:02:04 +00:00
Dario Lombardo 4feb47dca2 lemon: remove clang scan warnings.
Add assert and remove some code from scan builds.

Change-Id: I32747d1a61f183e4c918d9f50ec8337eaef47f0d
Reviewed-on: https://code.wireshark.org/review/26483
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-03-30 07:30:41 +00:00
Anders 653af0f6d0 lemon: Sync with latest trunk.
Change-Id: Iab0d64f675b482eee97b300d419ffa1e8090632e
Reviewed-on: https://code.wireshark.org/review/26676
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-03-28 16:20:24 +00:00
Anders 85a0646490 lemon: Sync with upstream, Jun 28, 2017
Change-Id: I4c6dbd018302fdf176e955e0e5e735a7aee22b10
Reviewed-on: https://code.wireshark.org/review/26669
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-03-28 07:10:47 +00:00
Anders 5ef22d4a4b lemon: Align struct s_options with upstream.
Change-Id: I87ce8123a625a643a7c3d9e426f5ce103a670f2a
Reviewed-on: https://code.wireshark.org/review/26666
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-03-28 04:09:39 +00:00
Anders 036c5a4e6a lemon: Trivial changes to make it easier to compare with upstream.
Change-Id: I1bfac3d39a50b3d2093c66a77280b355e678d427
Reviewed-on: https://code.wireshark.org/review/26664
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-03-27 20:04:59 +00:00
Gerald Combs 1cd92c4961 CMake: Add an rpm-package target.
Copy the current wireshark.spec.in and update it for use with CMake.
Remove the Qt4, GTK+2, and GTK+3 options. Add Ninja and mmdbresolve
options.

The rpm-package target builds a tarball using git-export-release.sh and
therefore must be run from a git checkout. The RPM _prefix macro is set
to CMAKE_INSTALL_PREFIX, so you'll probably want to run

cmake -DCMAKE_INSTALL_PREFIX=/usr ...

Change-Id: Ib014494d8858a0059126404cd91528ded5d8a9f6
Reviewed-on: https://code.wireshark.org/review/26579
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Jaap Keuter <jaap.keuter@xs4all.nl>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-03-26 14:00:35 +00:00
Gerald Combs 4bff0e6dd1 html2text: Wrap at 72 characters.
Change-Id: Id8c9d74b71cabce6bbfb25fd857f71c4b2a4e8ea
Reviewed-on: https://code.wireshark.org/review/26556
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-03-20 15:46:08 +00:00
Pascal Quantin d1c1348601 Windows: use c-ares 1.14.0
Change-Id: Iefe3caf1856fd322c657a31d1eefe9a645a13070
Reviewed-on: https://code.wireshark.org/review/26495
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2018-03-16 10:05:04 +00:00
Gerald Combs 0874b8bac6 Remove popcount in favor of ws_count_ones.
Remove our popcount implementation in favor of ws_count_ones, which
is our other popcount implementation. This required updating and
running process-x11-xcb.pl.

Change-Id: I8634c55242113b338c5b0173837c35f98b148b4f
Reviewed-on: https://code.wireshark.org/review/26454
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-03-13 17:18:01 +00:00
Michael Mann 7e842fa551 F5ETHTRAILER: Initial cleanup from submission
The dissector had been a plugin since at least 1.3 (based on comments in the
dissector).  Not all of the most current APIs were used for functionality
and there was some cruft left over.
Also disable F5ETHTRAILER by default since it doesn't have a discriminating
heuristic.

Change-Id: I8c977167a906eafd6fbb663d2fe6c44f080f2209
Reviewed-on: https://code.wireshark.org/review/26428
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2018-03-11 15:08:16 +00:00
Joerg Mayer 68efae8588 Adapt to current WS code base to make it compile and run without warnings or errors
Change-Id: I135df8b0e49346e32a19620d52cd1a9a44b4ac08
Reviewed-on: https://code.wireshark.org/review/26426
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2018-03-11 11:17:47 +00:00
Dario Lombardo fe2355e061 licensecheck: handle multiple licenses.
Change-Id: I1df4406e4bfcdcea99dc1c1446f1863c0a4522a0
Reviewed-on: https://code.wireshark.org/review/26386
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-03-09 11:50:15 +00:00
Pascal Quantin 4e6d989df4 Add MaxMindDB 1.3.2 library to Windows
Change-Id: I328b6a05cc356be59ac63e80eae55a832bf76a47
Reviewed-on: https://code.wireshark.org/review/26347
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2018-03-09 11:20:41 +00:00
Dario Lombardo e7ab7a907c spdx: more licenses converted.
Change-Id: I8f6693108c43959e54911d35b4fbf730c59add60
Reviewed-on: https://code.wireshark.org/review/26361
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-03-09 04:50:23 +00:00
Dario Lombardo fdd426e410 spdx: more licenses converted.
Change-Id: Ia1650bc02511f7bd47fb90be91b623177f05bcbd
Reviewed-on: https://code.wireshark.org/review/26337
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-03-09 04:48:20 +00:00
Dario Lombardo fe71e26af2 spdx: more licenses converted.
Change-Id: I3861061ec261e63b23621799e020e811ed78a343
Reviewed-on: https://code.wireshark.org/review/26333
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-03-07 15:56:44 +00:00
Dario Lombardo 71f36379ae licensecheck: add BSD licenses.
Change-Id: I764d03e4dc6d8925e656f37c98ece3da1fb1f001
Reviewed-on: https://code.wireshark.org/review/26335
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-03-07 15:41:50 +00:00
Dario Lombardo 8a5385b9c9 More licenses converted to SPDX.
Change-Id: Id4f987dcdacf06622d70263f4659a4400e30dc39
Reviewed-on: https://code.wireshark.org/review/26332
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-03-07 13:35:49 +00:00
Gerald Combs a1da75c554 Transition from GeoIP Legacy to MaxMindDB.
MaxMind is discontinuing its legacy databases in April in favor of
GeoIP2, which use a newer database format (MaxMind DB). The reference C
library (libmaxminddb) is available under the Apache 2.0 license which
isn't quite compatible with ours.

Add mmdbresolve, a utility that reads IPv4 and IPv6 addresses on stdin
and prints resolved information on stdout. Place it under a liberal
license (MIT) so that we can keep libmaxminddb at arm's length. Add
epan/maxmind_db.[ch], which spawns mmdbresolve and communicates with it
via stdio.

Migrate the preferences and documentation to MaxMindDB.

Change the IPv4 and IPv6 asnum fields to FT_UINT32s. Change the
geographic coordinate fields to FT_DOUBLEs.

Bug: 10658
Change-Id: I24aeed637bea1b41d173270bda413af230f4425f
Reviewed-on: https://code.wireshark.org/review/26214
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-03-06 18:02:21 +00:00
Gerald Combs 184ef02111 Fuzz-test: Handle ABRT.
Trap ABRT and try to pass it on to our runners.

Change-Id: I6e5a9fd63822c9bc84e116b3574abc4ccca448f5
Reviewed-on: https://code.wireshark.org/review/26227
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-03-02 18:03:48 +00:00
Jaap Keuter 0fb38879af L16_mono: Add L16 monaural codec plugin as functional example
This codec plugin serves a dual purpose.
First it is to add L16 codec suppport to Wireshark.
Second it is an illustration of a basic codec plugin module.

Change-Id: I64394dab3257ae49dece0257b16cd969503918e2
Reviewed-on: https://code.wireshark.org/review/26131
Reviewed-by: Jaap Keuter <jaap.keuter@xs4all.nl>
Petri-Dish: Jaap Keuter <jaap.keuter@xs4all.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-02-28 12:04:29 +00:00
Gerald Combs e73e3580f6 Rename airpdcap to dot11decrypt.
Our 802.11 decryption code isn't tied to any specific product. Change
the file and API names to dot11decrypt.

Change-Id: I14fd951be3ae9b656a4e1959067fc0bdcc681ee2
Reviewed-on: https://code.wireshark.org/review/26058
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2018-02-24 11:56:18 +00:00
Dario Lombardo d0b07245ec tools: add git to optional pkgs in debian-setup script.
Change-Id: I2931ee2bee9a719596318615d2cba7973e30e082
Reviewed-on: https://code.wireshark.org/review/25921
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2018-02-21 05:50:32 +00:00
Jakub Zawadzki bc43d687f0 fuzzshark: don't fuzz udplite.
Don't fuzz IP->udplite protocol. It's using most of UDP code,
but cause udplite calls also udp dissectors it duplicates
work of UDP fuzzer.

This should also decrease IP corpus size, cause in IP corpus
~7.6% (9 165 out of 119 780) is udplite ip.proto

Change-Id: I1d3bde6dd34f76696a34b1c728ce36f3c802e6c9
Link: https://github.com/google/oss-fuzz/issues/1087
Reviewed-on: https://code.wireshark.org/review/25950
Petri-Dish: Jakub Zawadzki <darkjames-ws@darkjames.pl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Jakub Zawadzki <darkjames-ws@darkjames.pl>
2018-02-20 23:02:38 +00:00
Guy Harris 459bd4646d Don't have CLEAN_FILES variables for the "clean" source files.
Except for the one directory that (currently) has "not yet clean" files,
epan/dissectors, we don't need a separate variable to keep track of the
"clean" source files.

In the cases where not all files were in CLEAN_FILES, put them into the
variable used to enable -Werror or its equivalent.

Change-Id: Ic4119861c1d9e381adfe31e9977e1ac71d623f5b
Reviewed-on: https://code.wireshark.org/review/25830
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-02-17 02:50:24 +00:00
Your Name a660215dea fuzzshark: disable reassembly for few protocols
Reassembly (or in general being stateful) doesn't help when fuzzing,
even if wireshark will crash oss-fuzz will try to reproduce the crash
with just single sample.

Single sample will not reproduce the crash, so being stateful makes
wireshark 'buggy target'.

I hope change will also make IP corpus a little bit smaller.

Change-Id: I01ba8177a653d220c4cfe8a56a5836c96010c6fe
Reviewed-on: https://code.wireshark.org/review/25799
Reviewed-by: Jakub Zawadzki <darkjames-ws@darkjames.pl>
2018-02-15 06:03:34 +00:00
Gerald Combs 048c4373e1 Asciidoctor macro fixups.
Fix a few errors in the Asciidoctor macros. Use the new macro names in
the release notes and gen-bugnote.

Change-Id: I2ca672949c59ca3da8a6b963cb5bd9abd66c348d
Reviewed-on: https://code.wireshark.org/review/25774
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-02-13 18:32:56 +00:00
Dario Lombardo 7650151311 more SPDX convertions.
Change-Id: I6b8404c28b31a81767a3b64ffe9ba96156c4c217
Reviewed-on: https://code.wireshark.org/review/25757
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-02-13 13:57:30 +00:00
Dario Lombardo 3db1c06404 tools: fix zlib check in licensecheck.pl.
Change-Id: I0b1708c6e4530115698d050e41b691af2a948578
Reviewed-on: https://code.wireshark.org/review/25766
Reviewed-by: Dario Lombardo <lomato@gmail.com>
2018-02-13 12:25:29 +00:00
Dario Lombardo 7fd6abc1eb tools: remove extra spaces from licensecheck.pl.
Change-Id: Iab25373f047cc084efaf751cb9a3cfbf62fd1f7a
Reviewed-on: https://code.wireshark.org/review/25767
Reviewed-by: Dario Lombardo <lomato@gmail.com>
2018-02-13 09:46:18 +00:00
Gerald Combs 045c48e81e html2text: Prefix lists with a bullet.
Prefix lists with a bullet symbol (U+2022) instead on an asterisk.

Skip the <head> tag while we're here so that we don't print the title
twice.

Change-Id: I1dfad1fc70aa05319e14c55b663dd2183ab87d79
Reviewed-on: https://code.wireshark.org/review/25762
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-02-12 23:35:00 +00:00
Gerald Combs 8ebbf99173 Remove Lynx.
Use tools/html2text.py to convert HTML to text.

Remove some now-obsolete documentation.

Change-Id: Ib21a1ab10c789182da5fcc68e98917a00f2fa650
Reviewed-on: https://code.wireshark.org/review/25733
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-02-12 19:19:11 +00:00
Jakub Zawadzki a958533c6a fuzzshark: disable protocol in fuzzer if it's used by other fuzzer.
Change-Id: I4dcc38b2ac9711660c8cf27cbbabd879c2eee930
Link: https://github.com/google/oss-fuzz/issues/1087
Reviewed-on: https://code.wireshark.org/review/25738
Petri-Dish: Jakub Zawadzki <darkjames-ws@darkjames.pl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-02-12 06:39:04 +00:00
Gerald Combs 94a0f7c641 Switch from AsciiDoc to Asciidoctor.
Switch the markup text processor for files in the docbook directory from
AsciiDoc to Asciidoctor. Asciidoctor has several useful features (such
as direct PDF output) and is actively developed. It's written in Ruby
but that dependency can be sidestepped with AsciidoctorJ, a
self-contained bundle that only depends on the JRE.

The current toolchain targets require Python, AsciiDoc, DocBook XML,
DocBook XSL, Java, FOP, xsltproc, lynx, and the HTMLHelp compiler:

HTML: AsciiDoc → DocBook XML → xsltproc + DocBook XSL
Chunked HTML: AsciiDoc → DocBook XML → xsltproc + DocBook XSL
PDF: AsciiDoc → DocBook XML → xsltproc + DocBook XSL → FOP
HTMLHelp: AsciiDoc → DocBook XML → xsltproc + DocBook XSL → HHC

This change removes the AsciiDoc and FOP requirements and adds either
AsciidoctorJ or Asciidoctor + Ruby:

HTML: Asciidoctor → DocBook XML → xsltproc + DocBook XSL
Chunked HTML: Asciidoctor → DocBook XML → xsltproc + DocBook XSL
PDF: Asciidoctor
HTMLHelp: Asciidoctor → DocBook XML → xsltproc + DocBook XSL → HHC

Ideally we could generate all of these using AsciidoctorJ, Java, and
lynx. Unfortunately we're not there yet.

The release notes depend on several macros (ws-buglink, ws-salink,
cve-idlink, sort-and-group). Add Asciidoctor (Ruby) equivalents.

Remove the BUILD_xxx_GUIDES CMake options and add various output targets
automatically. This means that you have to build the various documentation
targets explicitly.

Change-Id: I31930677a656b99b1c6839bb6c33a13db951eb9a
Reviewed-on: https://code.wireshark.org/review/25668
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-02-11 18:22:09 +00:00
Dario Lombardo be38102eea caputils/tools: more SPDX convertions.
Change-Id: I44a8d1848f768acf4c3b31a68c845264c74e4bba
Reviewed-on: https://code.wireshark.org/review/25709
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-02-09 15:20:05 +00:00
Dario Lombardo a9733b5cd5 tools: fix BSD license name in licensecheck.pl.
Change-Id: I401efcbb4f8f9eec5ef38f3788e979a3752c4a7f
Reviewed-on: https://code.wireshark.org/review/25714
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-02-09 14:13:12 +00:00
Gerald Combs b511312633 html2text: Skip some tags and add references.
Skip the contents of <style> and <script> tags. Add URL footnotes
similar to `lynx -dump`.

Change-Id: I721bdfabeacc000d604aa8475f13be1d797ad0fb
Reviewed-on: https://code.wireshark.org/review/25697
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-02-09 05:30:14 +00:00
Guy Harris 1f5f63f8ef Generalize wtap_pkthdr into a structure for packet and non-packet records.
Separate the stuff that any record could have from the stuff that only
particular record types have; put the latter into a union, and put all
that into a wtap_rec structure.

Add some record-type checks as necessary.

Change-Id: Id6b3486858f826fce4b096c59231f463e44bfaa2
Reviewed-on: https://code.wireshark.org/review/25696
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-02-09 00:29:51 +00:00
Dario Lombardo 8cd389e161 replace SPDX identifier GPL-2.0+ with GPL-2.0-or-later.
The first is deprecated, as per https://spdx.org/licenses/.

Change-Id: I8e21e1d32d09b8b94b93a2dc9fbdde5ffeba6bed
Reviewed-on: https://code.wireshark.org/review/25661
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-02-08 14:57:36 +00:00
Dario Lombardo bfd2dbcf25 tools: remove garbage from licensecheck.pl.
Change-Id: I9a0e00c9e033618ee2ced94dadf1a98640e0d914
Reviewed-on: https://code.wireshark.org/review/25684
Reviewed-by: Dario Lombardo <lomato@gmail.com>
2018-02-08 13:37:17 +00:00
Dario Lombardo f814c40ad3 tools: add new SPDX GPL format to licensecheck.pl.
Change-Id: Ie148f8a660027df8194bd3890a108c0639a18823
Reviewed-on: https://code.wireshark.org/review/25680
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-02-08 11:45:50 +00:00
Dario Lombardo 8eed71f539 tools: remake the indentation of licencecheck.pl.
Change-Id: Ib1b320e5b99e8842df61fd3dc584b6df4fc461f8
Reviewed-on: https://code.wireshark.org/review/25639
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-02-08 11:44:58 +00:00
Gerald Combs 8ae0467e61 tools: Add SPDX MIT to licensecheck.pl.
Add a check for "SPDX-License-Identifier: MIT".

Change-Id: Id69c87e7d8d7fd3904a02f9fb410bae8e9d99d10
Reviewed-on: https://code.wireshark.org/review/25669
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-02-07 19:55:34 +00:00
Dario Lombardo c1f37d25c3 tools: add files from wsutil and caputils to checklicense whitelist.
Change-Id: I35b6df8fbb31c209e7e79d5c002568d5194f3485
Reviewed-on: https://code.wireshark.org/review/25641
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-02-07 05:33:17 +00:00
Dario Lombardo c4a6016be2 tools: add licenses to licensecheck.pl.
Include the following licenses in licensecheck.pl
1. LGPL-2.0-or-later
2. Zlib
3. BSD-3-Clause

Change-Id: I65f0ca1f957ee072ed595ab56d20ec200bd7047e
Reviewed-on: https://code.wireshark.org/review/25638
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-02-07 05:24:04 +00:00
Dario Lombardo d9368545f4 fuzzshark: use SPDX identifier.
Change-Id: I9c786b8bbb96a4bfa1560536c3929b844aa8afb7
Reviewed-on: https://code.wireshark.org/review/25562
Reviewed-by: Michael Mann <mmann78@netscape.net>
2018-02-02 13:38:48 +00:00
Jakub Zawadzki d1b1575f6d oss-fuzzshark: try to fix oss-fuzz assert fails.
Change-Id: Ic4ff70dfc55b2694f761cdadcac1962242fca753
Reviewed-on: https://code.wireshark.org/review/25551
Reviewed-by: Jakub Zawadzki <darkjames-ws@darkjames.pl>
2018-02-01 17:35:16 +00:00
Jakub Zawadzki dd3b82ebc8 oss-fuzzshark: test code to debug some oss-fuzz assert fails.
Change-Id: I5dbe899ca8a4f9107d62667ca107a4d3a48fe51b
Reviewed-on: https://code.wireshark.org/review/25545
Reviewed-by: Jakub Zawadzki <darkjames-ws@darkjames.pl>
2018-02-01 07:08:59 +00:00
Martin Mathieson 9972110f31 valgrind-wireshark.sh: fix typo in usage
Change-Id: If9210c6f71d4e258a489d254482cf5543b818e11
Reviewed-on: https://code.wireshark.org/review/25491
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-01-27 23:10:57 +00:00
Lazar Sumar 0d5cbc7303 Added the Proconx CAN-ETH protocol dissector
Change-Id: I306341c7cddf8facb4a9ca62254a465a1da22174
Reviewed-on: https://code.wireshark.org/review/25423
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2018-01-26 03:19:50 +00:00
Gerald Combs 00a528f123 Qt: Translate files in subdirectories.
Make sure we pass ui/qt/*/*.{cpp,h} to lupdate. Make update-tx a
bash script and make sure it passes ShellCheck. Add a -n flag, which
disables pushing back to Transifex.

Change-Id: Ia7d6564bbdbf69285f1f9b88cde09e37da4f916c
Reviewed-on: https://code.wireshark.org/review/25382
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-01-21 20:16:58 +00:00
Dario Lombardo 43833239fc Qt: change obsolete qVariantFromValue into QVariant::fromValue.
Change-Id: I767b06c0e316347cdb28b769f1032e6d44cba45b
Reviewed-on: https://code.wireshark.org/review/25321
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Roland Knall <rknall@gmail.com>
Reviewed-by: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-01-15 12:20:32 +00:00
Pascal Quantin 88abff68df NR RRC: add initial dissector based on v15.0.0
ASN.1 prose imported from the specification and heavily modified
manually to workaround its poor quality.
Some of them are marked with -- WS modification comment, some are not.
Probably useless as-is, but it is an initial start until an updated
version is available.

Change-Id: I19ab6cedb6aa23c8ed57bae525ee4a3391494e32
Reviewed-on: https://code.wireshark.org/review/25235
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-01-10 05:31:33 +00:00
Pascal Quantin fc9af81a13 wiretap: add a parameter to wtap_init() indicating whether plugins must be loaded
g995812c5f1 moved wiretap plugins registration from applications to
wiretap library init function.
As we do not want to load plugins for all users of libwiretap, let's
make it configurable.

Bug: 14314
Change-Id: Id8fdcc484e2d0d31d3ab0bd357d3a6678570f700
Reviewed-on: https://code.wireshark.org/review/25194
Reviewed-by: Dario Lombardo <lomato@gmail.com>
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-01-09 21:25:06 +00:00
Nathaniel Clark 958374f352 [lustre] Initial Lustre support
This interperates the main body of Lustre traffic.
This dissects all current Lustre OPCODES (as of Lustre 2.10.2)
This dissects MDS REINT sub-opcodes
This dissects LDLM Intent opcodes
This dissects LLOG EADATA

Conversation matching is just IP based and not IP/port based.
Only one lustre "instance" can be running on a given host at a given time,
and request / reply pairs aren't don't always match by port numbers.

Add exception for lustre_* structure names in PROTOABBREV.
We have several lustre.lustre_* because the internal lustre structre is
named lustre_ (i.e. lustre_handle or lustre_msg_v2)

This is still a work in progress, as there are missing FLAG values
and some LLOG EADATA structures that aren't fully decoded.

Change-Id: If57085e2692565336e49f40fb475ca1035da7a35
Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Reviewed-on: https://code.wireshark.org/review/24800
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-01-09 06:38:05 +00:00
Gerald Combs 0f3aa8522e Qt: Move sized toolbar images to stock_icons.
The sized (WWxHH) icons in the toolbar directory aren't limited to
toolbars. Create a "stock_icons" directory and move them and their
related SVGs there.

Change-Id: I2c1852499594aa738371c79542f24bd3351653bb
Reviewed-on: https://code.wireshark.org/review/25133
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2018-01-05 03:27:15 +00:00
Gerald Combs 8bf24f51cb Pre-commit: Don't force whitespace checks everywhere.
Move the whitespace check (git diff-index --check --cached) inside the
CHECK_FILES loop, otherwise editing SVGs with Inkscape will be much less
convenient.

Change-Id: I2b9e3575d54091572caa89e3e317e5e121984010
Reviewed-on: https://code.wireshark.org/review/25144
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2018-01-04 21:32:27 +00:00
Alexis La Goutte 65276a4ebb plugins: fix no previous prototype for function 'plugin_register' [-Wmissing-prototypes]
Change-Id: I84f1fd02f99e7d4757e418539f932c550e409f92
Reviewed-on: https://code.wireshark.org/review/24920
Petri-Dish: João Valverde <j@v6e.pt>
Reviewed-by: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2017-12-23 13:09:25 +00:00
Alexis La Goutte 917867c432 fuzzshark: fix no previous prototype for function 'LLVMFuzzerTestOneInput/LLVMFuzzerInitialize' [-Wmissing-prototypes]
Change-Id: If5f425dda3cd793a63a69680c12aba12a20ed12e
Reviewed-on: https://code.wireshark.org/review/24917
Petri-Dish: Jakub Zawadzki <darkjames-ws@darkjames.pl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-12-21 00:04:18 +00:00
Alexis La Goutte 12e25c1a86 plugin: fix extra ';' outside of a function [-Wextra-semi]
Change-Id: I923e4a4f84e8786523333daf372fc5d7cc7ad729
Reviewed-on: https://code.wireshark.org/review/24897
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: João Valverde <j@v6e.pt>
2017-12-19 15:39:57 +00:00
João Valverde f3444ed0f9 plugins: Remove moduleinfo.h
Micro version bump for mate to homogenize it between CMake and autotools.
The cmake macro doesn't handle the "a" suffix and it doesn't seem worth
implementing.

Change-Id: Ib022c6aa170623b83a9700e4fa098c60a9cddfab
Reviewed-on: https://code.wireshark.org/review/24847
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot
Reviewed-by: João Valverde <j@v6e.pt>
2017-12-17 11:47:17 +00:00
Pascal Quantin afc6e773dc Fix registration of wiretap plugins
Change-Id: I1277870cab348feda7e23cffb277410bd4b10a0e
Reviewed-on: https://code.wireshark.org/review/24832
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2017-12-14 22:59:10 +00:00
João Valverde 995812c5f1 Refactor plugin registration and loading
Put different types of plugins (libwiretap, libwireshark) in different
subdirectories, give libwiretap and libwireshark init routines that
load the plugins, and have them scan the appropriate subdirectories
so that we don't even *try* to, for example, load libwireshark plugins
in programs that only use libwiretap.

Compiled plugins are stored in subfolders of the plugin folders, with
the subfolder name being the Wireshark minor version number (X.Y). There is
another hierarchical level for each Wireshark library (libwireshark, libwscodecs
and libwiretap).

The folder names are respectively plugins/X.Y/{epan,codecs,wiretap}.

Currently we only distribute "epan" (libwireshark) plugins.

Change-Id: I3438787a6f45820d64ba4ca91cbe3c8864708acb
Reviewed-on: https://code.wireshark.org/review/23983
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot
Reviewed-by: João Valverde <j@v6e.pt>
2017-12-14 08:43:57 +00:00
Guy Harris 7539469d79 Fix types.
ftell() returns a long; assign its value to a variable of that type.
size_t is unsigned, so checking that it's >= 0 always succeeds.

We can cast the variable's value to size_t once we've determined that it's
non-negative; do so, to avoid other warnings.

Change-Id: I0da6a220ce140ebf073df5f5bcd0c9526bf9c3c3
Reviewed-on: https://code.wireshark.org/review/24817
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-12-14 02:44:51 +00:00
Dario Lombardo 326591ef6d fuzzer: add check for ftell return value (CID: 1426073).
Change-Id: I9b619c79433f267d87f6680eeb78a25daa169f4d
Reviewed-on: https://code.wireshark.org/review/24778
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-12-12 14:56:54 +00:00
João Valverde 0d5ad701b4 Fix make distcheck
Change-Id: Ie0e6ef4595be4f981b919ed609cc62a0595c3320
Reviewed-on: https://code.wireshark.org/review/24764
Reviewed-by: João Valverde <j@v6e.pt>
2017-12-11 03:38:28 +00:00
João Valverde 5fc43fe63a Rewrite make-tap-reg.py in C
Change-Id: Ief5b1fffecc9712c01ff10292c403b7c84a5908a
Reviewed-on: https://code.wireshark.org/review/24756
Reviewed-by: João Valverde <j@v6e.pt>
2017-12-11 02:52:28 +00:00
Jakub Zawadzki 157ea91f2e oss-fuzzshark: fix compilation.
/src/wireshark/tools/oss-fuzzshark/fuzzshark.c:268:58: error: too few arguments to function call, expected 2, have 1
        fuzz_handle = get_dissector_handle(FUZZ_DISSECTOR_TARGET);
                      ~~~~~~~~~~~~~~~~~~~~                      ^
/src/wireshark/tools/oss-fuzzshark/fuzzshark.c:133:1: note: 'get_dissector_handle' declared here

Change-Id: I6c6e25017f0045b833d9249c9648145893fe0439
Reviewed-on: https://code.wireshark.org/review/24742
Petri-Dish: Jakub Zawadzki <darkjames-ws@darkjames.pl>
Reviewed-by: Jakub Zawadzki <darkjames-ws@darkjames.pl>
2017-12-08 19:39:37 +00:00
Guy Harris 48e65c4af4 Hand the packet provider functions to epan_new().
Have separate packet_provider_data structures and packet_provider_funcs
structures; the latter holds a table of functions that libwireshark can
call for information about packets, the latter holds the data that those
functions use.

This means we no longer need to expose the structure of an epan_t
outside epan/epan.c; get rid of epan/epan-int.h.

Change-Id: I381b88993aa19e55720ce02c42ad33738e3f51f4
Reviewed-on: https://code.wireshark.org/review/24732
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-12-08 04:33:55 +00:00
Guy Harris 797d2f6a87 Move the frame_set stuff back into the capture_file structure.
libwireshark now expects an epan_t to be created with a pointer to a
"packet provider" structure; that structure is opaque within
libwireshark, and a pointer to it is passed to the callbacks that
provide interface names, interface, descriptions, user comments, and
packet time stamps, and that set user comments.  The code that calls
epan_new() is expected to provide those callbacks, and to define the
structure, which can be used by the providers.  If none of the callbacks
need that extra information, the "packet provider" structure can be
null.

Have a "file" packet provider for all the programs that provide packets
from a file.

Change-Id: I4b5709a3dd7b098ebd7d2a7d95bcdd7b5903c1a0
Reviewed-on: https://code.wireshark.org/review/24731
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-12-08 03:32:25 +00:00
Jakub Zawadzki 038aa2a616 Add fuzzshark to cmake/autotools.
Add fuzzshark target to make sure that oss-fuzzshark always build.

Change-Id: I802b679c18023daa1475a54bae722b5e90c72a59
Reviewed-on: https://code.wireshark.org/review/24716
Petri-Dish: Jakub Zawadzki <darkjames-ws@darkjames.pl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2017-12-07 23:26:52 +00:00
Jakub Zawadzki 038fe4c2d4 oss-fuzzshark: fix handler of epan->get_frame_ts to fix build.
Fix oss-fuzzshark build after [1834dca365]: Move the parts of a capture_file used by libwireshark to a new structure.

I really need to integrate oss-fuzzshark with build system...

Change-Id: I75595db392acfbdb7885975e458d8b434830cfec
Reviewed-on: https://code.wireshark.org/review/24713
Petri-Dish: Jakub Zawadzki <darkjames-ws@darkjames.pl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Jakub Zawadzki <darkjames-ws@darkjames.pl>
2017-12-06 18:41:31 +00:00
Guy Harris eb8ffb74e2 Use cfile.h to define the capture_file type.
Have cfile-int.h declare the structure, and use it in files that
directly access the structure.

Have cfile.h just incompletely declare the structure and include it
rather than explicitly declaring it in source files or other header
files.

Never directly refer to struct _capture_file except when typedeffing
capture_file.

Add #includes as necessary, now that cfile.h doesn't drag in a ton of

Change-Id: I7931c8039d75ff7c980b0f2a6e221f20e602a556
Reviewed-on: https://code.wireshark.org/review/24686
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-12-03 18:54:37 +00:00
Gerald Combs 28b6616ea0 Get rid of some void pointers.
Explictly struct _capture_file * in epan_session and its callbacks.

Change-Id: I63703015c661a08f3350a7448a7bcdaf98f119dc
Reviewed-on: https://code.wireshark.org/review/24675
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-12-01 21:09:24 +00:00
Gerald Combs 2fdbeb0d78 Gen-bugnote: Replace backslashes with {backslash}.
Change-Id: I12b479fedf9ca54b600919a4586c4b4c43464589
Reviewed-on: https://code.wireshark.org/review/24626
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2017-11-28 22:42:23 +00:00
João Valverde 944a3c3a58 make-plugin-reg: Update modification time to plugin.c
Let the build system handle the dependencies. Make sure to update the file
even if nothing has changed to avoid re-running the script every time.

Change-Id: I2229c13578a6278a04152825c98d8b889081dcb7
Reviewed-on: https://code.wireshark.org/review/24597
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot
Reviewed-by: João Valverde <j@v6e.pt>
2017-11-27 07:56:51 +00:00
João Valverde 121654beb2 checkAPIs: Skip make-dissectors.c
Change-Id: Ief976c2958b98dc2a5b637bc20dd5f7f993b7124
Reviewed-on: https://code.wireshark.org/review/24551
Reviewed-by: João Valverde <j@v6e.pt>
2017-11-23 16:59:04 +00:00
João Valverde 7540ac6938 Move the protocol registration routines back into libwireshark
Follow-up to b695b3e2f7.

Change-Id: I7e36519f2c3806c1205d05437671325080974257
Reviewed-on: https://code.wireshark.org/review/24524
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot
Reviewed-by: João Valverde <j@v6e.pt>
2017-11-21 20:21:50 +00:00
Jakub Zawadzki 2ad1507344 oss-fuzzshark: fix linking issues due to register_all_protocols() removed from -lepan
During compilation of oss-fuzzshark (https://github.com/google/oss-fuzz/issues/1003):
Step #3: /src/wireshark/tools/oss-fuzzshark/fuzzshark.c:213: undefined reference to `register_all_protocols'
Step #3: /src/wireshark/tools/oss-fuzzshark/fuzzshark.c:213: undefined reference to `register_all_protocol_handoffs'

After cleanup of make-dissector-reg.py [b695b3e2f7]
these functions are no longer part of epan library (I really wonder why...).
oss-fuzzshark need to compile and link register.c on their own.

Change-Id: I79adf5c1513a0934f140bbf501c181bf14d7619b
Reviewed-on: https://code.wireshark.org/review/24523
Petri-Dish: Jakub Zawadzki <darkjames-ws@darkjames.pl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Jakub Zawadzki <darkjames-ws@darkjames.pl>
2017-11-21 18:23:35 +00:00
João Valverde fe0c2b0485 Rewrite make-dissector-reg.py in C
The output compares equal to make-dissector-reg.py and the regex
should be more robust (multiline, complete start of function definition).

The primary motivation is to clean up the python script. This small
binary results in much cleaner code. The python script is used only
to generate plugin code, therefore it is renamed.

Also in my casual measurements the C code is much faster (without cache)
than the python script with the cache.

Change-Id: Id4e8cac3c836d56775aba4819357a95ef19bcb85
Reviewed-on: https://code.wireshark.org/review/24497
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-11-20 06:03:08 +00:00
João Valverde 262a84c384 Fix (and chop) static build option
This sets the scope of the static build option to Wireshark support
libraries only.

Before the patch:

Static plugins don't work with CMake and autotools.

autotools static build is broken, and most likely will always be, as
building Wireshark all-static is difficult and time-consuming.

After the patch:

For CMake Wireshark will be built with static or shared libraries and
dynamic plugins. Everything just works. CMake apparently doesn't want
you building static and shared libraries at the same time.

For autotools Wireshark will be built with shared libraries by default.
--disable-shared and --enable-static options work as usual. Dlopened
plugins are not built if --disable-shared is given to configure (to
disable shared libraries). This is a limitations imposed by libtool.

Tested on Linux. This removes broken support for building plugins
statically.

Change-Id: Ib8e8176976f136eea93a2ce8f9857b6cf9bec64c
Reviewed-on: https://code.wireshark.org/review/24241
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot
Reviewed-by: João Valverde <j@v6e.pt>
2017-11-19 20:16:50 +00:00
João Valverde 1097e8020a autotools: Library build products don't need explicit cleaning
Change-Id: I5d68c05f2844d6c9ae486531b189dbf10bc09cff
Reviewed-on: https://code.wireshark.org/review/24484
Reviewed-by: João Valverde <j@v6e.pt>
2017-11-18 22:29:41 +00:00
João Valverde b695b3e2f7 Begin cleanup of make-dissector-reg.py
Move registration code to a new register.c file so it is readable.
Dissector load points are stored in a generated function pointer
array instead.

Simplify python script somewhat by not interleaving the plugin and
dissector logic.

Change-Id: I5ec21270f4e1550a5c911efa7f0dc4fc7fcb13a5
Reviewed-on: https://code.wireshark.org/review/24474
Reviewed-by: João Valverde <j@v6e.pt>
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-11-18 14:43:10 +00:00
Graham Bloice 252ea22b97 WSDG: Improve VS2015 chocolatey install
Created an AdminDeployment.xml file for use with the chocolatey
package for VS2015 Community Edition and updated the WSDG to
include it.

Bug: 14147
Change-Id: Id2a701067bf38874cf0bf534cca55dba9cfd30d4
Reviewed-on: https://code.wireshark.org/review/24464
Petri-Dish: Graham Bloice <graham.bloice@trihedral.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
2017-11-17 12:56:52 +00:00
Gerald Combs ac1d52aff5 Register protocols and handoffs in separate threads.
Instead of interleaving protocol registrations and status callbacks in
the main thread, move protocol registrations to a worker thread. Do the
same with protocol handoffs. This *should* be safe since the status
callbacks only update the UI.

This reduces startup time by about 200ms on my laptop:

Run     OS    Thread?    Time
  1   macOS      N      340 ms
  2   macOS      N      260 ms
  3   macOS      N      252 ms
  4   macOS      Y      147 ms
  5   macOS      Y      146 ms
  6   macOS      Y      142 ms
  7   Win 7      N       80 samples
  8   Win 7      N       56 samples
  9   Win 7      N       75 samples
 10   Win 7      Y       31 samples
 11   Win 7      Y        2 samples
 12   Win 7      Y        0 samples

macOS was sampled using Instruments. Windows 7 was sampled using the
Visual Studio 2015 profiler.

We should do the same thing with our capture and tap event loops, but
that will likely require quite a bit more work.

Change-Id: Iac9a81d8f71668f5979b524744a03f6d80aee893
Reviewed-on: https://code.wireshark.org/review/24447
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-11-16 06:11:55 +00:00
Gerald Combs 775bbbcded Start using SPDX license identifiers.
A while back Graham pointed out the SPDX project (spdx.org), which is
working on standardizing license specifications:

https://www.wireshark.org/lists/wireshark-dev/201509/msg00119.html

Appendix V of the specification describes a short identifier
(SPDX-License-Identifier) that you can use in place of boilerplate in
your source files:

https://spdx.org/spdx-specification-21-web-version#h.twlc0ztnng3b

Start the conversion process with our top-level C and C++ files.

Change-Id: Iba1d835776714deb6285e2181e8ca17f95221878
Reviewed-on: https://code.wireshark.org/review/24302
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Balint Reczey <balint@balintreczey.hu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-11-09 20:03:51 +00:00
Martin Kacer 156a0b62eb Tools: json2pcap script update
Updated script to support duplicated json fields
and --no-duplicate-keys tshark flag.

Bug: 12958
Change-Id: Id20885baacbfd26124cb82716df6829225be6de8
Reviewed-on: https://code.wireshark.org/review/24236
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-11-06 06:17:49 +00:00
João Valverde ba6dd97081 Remove epan win32 x86 assembly
Not used. Remove also weird pre-hash hash optimization in proto.c.

Change-Id: Ibebc12dbe90ac1d05fb1ba601d32fe98797fbd56
Reviewed-on: https://code.wireshark.org/review/24254
Reviewed-by: Michael Mann <mmann78@netscape.net>
Reviewed-by: João Valverde <j@v6e.pt>
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-11-05 23:20:20 +00:00
Michael Mann 1741b6b23c oss-fuzzshark: force direct malloc
Set two environment variables (needs to be done before epan_init and
before the first g_slice_alloc call) to force direct memory allocation
without another layer that could hide bugs.

Change-Id: I0d72092c239e2e7f42b0b7849c01471407e785e2
Reviewed-on: https://code.wireshark.org/review/21195
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-11-04 13:14:23 +00:00
Gerald Combs 1e8e9a807f make-manuf: Fix a comment.
make-manuf lives in the "tools" directory.

Change-Id: I9be2d44178f27d46629c439ff61f624d8d99e681
Reviewed-on: https://code.wireshark.org/review/24168
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-10-29 18:25:31 +00:00
Jakub Zawadzki b4a6f4e244 oss-fuzzshark: add missing include to fix implicit declaration of color_filters_init()
/src/wireshark/tools/oss-fuzzshark/fuzzshark.c:218:7: warning: implicit declaration of function 'color_filters_init' is invalid in C99 [-Wimplicit-function-declaration]
        if (!color_filters_init(&err_msg, NULL))
             ^
1 warning generated.

Change-Id: I37dbc4521b6a3cda271e6e33a290ed35911e7dda
Reviewed-on: https://code.wireshark.org/review/24086
Petri-Dish: Jakub Zawadzki <darkjames-ws@darkjames.pl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-10-26 19:52:56 +00:00
Pavel Strnad 93fba33e95 asn2wrs.py: use 64 bits variant for constrained integers using MIN or MAX keywords
Change-Id: Iffc7c81e9653e8c1cd938de8f4fc26c5912eceec
Reviewed-on: https://code.wireshark.org/review/24049
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-10-25 21:10:11 +00:00
João Valverde eae216ef1d Remove replacement inet_pton/inet_ntop
Should be available on every platform we support.

Change-Id: Ib65d78e351d22d581b427e5e93fc8d5e5348b260
Reviewed-on: https://code.wireshark.org/review/24047
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-10-25 21:03:56 +00:00
João Valverde 90644c8372 Remove inet_aton() usage everywhere
Including where it says not to in comments. Use IPv4 dotted-decimal
notation.

Change-Id: Iafe1f6fbd2bd5867c41642dc27411f47dff8ce6a
Reviewed-on: https://code.wireshark.org/review/24044
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot
Reviewed-by: João Valverde <j@v6e.pt>
2017-10-25 19:10:57 +00:00
Eliot Lear 6014bfe6fc Get program to the right working directory.
Otherwise patches breaks.

Change-Id: Ief735dc949eaefa3515cc0a5936e0a2735cb0241
Reviewed-on: https://code.wireshark.org/review/24035
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-10-23 18:31:22 +00:00
João Valverde 1d238ec636 autotools: Remove setuid-root.pl
It seems to be some sort of development helper, and since CMake doesn't
use it presumably it is not useful anymore.

Change-Id: I23e4ab24199f21310ebd09064c3ae53e48673e4d
Reviewed-on: https://code.wireshark.org/review/23945
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Petri-Dish: João Valverde <j@v6e.pt>
Reviewed-by: João Valverde <j@v6e.pt>
2017-10-17 18:48:46 +00:00
João Valverde 46f4664b29 checkAPI: error out on empty filelist
This will help detect some bogus checkapi runs in the future.

Change-Id: I43345e3a0a5471e9655f34e36ccf1562d6526758
Reviewed-on: https://code.wireshark.org/review/23946
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-10-16 23:07:09 +00:00
João Valverde 9764cd0a83 autotools: make maintainer-clean should allow rerunning 'configure'
Change-Id: Iedae94ffefe27b13b1967d69cacb757b5aa4576d
Reviewed-on: https://code.wireshark.org/review/23928
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: João Valverde <j@v6e.pt>
2017-10-15 14:17:20 +00:00
João Valverde 2563f9dd79 plugins: Fix -Wmissing-prototype for plugin_register()
Change-Id: I03d5ca01fb3bc8fdae86b44e857a4b9a3c7f48d2
Reviewed-on: https://code.wireshark.org/review/23927
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: João Valverde <j@v6e.pt>
2017-10-15 12:47:34 +00:00
Ahmad Fatoum 9d49e13166 Remove superfluous null-checks before strdup/free
NULL checks were removed for following free functions:

- g_free "If mem is NULL it simply returns"
  https://developer.gnome.org/glib/stable/glib-Memory-Allocation.html#g-free

- g_slist_free(_full)? "NULL is considered to be the empty list"
  https://developer.gnome.org/glib/stable/glib-Singly-Linked-Lists.html

- g_strfreev "If str_array is NULL, this function simply returns."
  https://developer.gnome.org/glib/stable/glib-String-Utility-Functions.html#g-strfreev

- g_slice_free "If mem is NULL, this macro does nothing."
  https://developer.gnome.org/glib/stable/glib-Memory-Slices.html#g-slice-free

- g_match_info_free "not NULL... otherwise does nothing"
  https://developer.gnome.org/glib/stable/glib-Perl-compatible-regular-expressions.html#g-match-info-free

- dfilter_free defined in Wireshark code. Returns early when passed NULL
  epan/dfilter/dfilter.c

They were also removed around calls to g_strdup where applicable:

- g_strdup "If str is NULL it returns NULL."
  https://developer.gnome.org/glib/stable/glib-String-Utility-Functions.html#g-strdup

Change-Id: Ie80c2db89bef531edc3aed7b7c9f654e1d654d04
Reviewed-on: https://code.wireshark.org/review/23406
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: João Valverde <j@v6e.pt>
2017-10-15 12:38:51 +00:00
João Valverde 9bba3866ff CMake: Allow user build flags to override default build flags
Autotools has the very useful feature by design of allowing the user
to override the default build flags (you break it you keep it).

Apparently CMake applies COMPILE_OPTIONS target property after
CMAKE_{C,CXX}_FLAGS so that doesn't work here. Prepend our flags to those
variables instead to make it work then.

Specific target flag overrides can still be added with COMPILER_OPTIONS
(e.g: generated files with -Wno-warning) but this is less effective and
then we're back at the point where this overrides user flags. It's less
of a concern though.

Change-Id: I44761a79be4289238e02d4e781fef0099628817b
Reviewed-on: https://code.wireshark.org/review/23675
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: João Valverde <j@v6e.pt>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2017-10-13 21:32:18 +00:00
Gerald Combs f3ba040479 win-setup: Don't bother downloading UPX.
We haven't used UPX since g85eec7f603 (2014). Don't bother downloading it.

Change-Id: Id86ca6ae8f29adab3eb40a2ea3bd1de5ff45d868
Reviewed-on: https://code.wireshark.org/review/23894
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2017-10-12 20:45:04 +00:00
Gerald Combs d72a18faad Fuzz: Limit the number of packets we process with Valgrind.
Estimating the effort required to process a capture based on its size
isn't very reliable. Instead of rejecting files that are too large, just
limit Valgrind fuzzing to the first 100,000 packets in each file. This
should fix a timeout issue we're seeing on the master fuzzer.

Change-Id: I0117735341d3a183c6131f5f05dbd1d559fc4b3f
Reviewed-on: https://code.wireshark.org/review/23872
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2017-10-09 22:19:39 +00:00
Gerald Combs e8dbf386d8 Fuzz: Write memory leak info to the error log.
When we exit due to excessive memory leaks make sure we say so in the
error log.

Change-Id: I03f60271f3e4bb467fbaa5b9ac17431eed96f300
Reviewed-on: https://code.wireshark.org/review/23870
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2017-10-09 19:23:06 +00:00
João Valverde 2777003e12 Add version check for plugin compatibility
Only plugins built for the same feature release (X.Y) are assured binary
compatibility. Make sure we don't try to run unsuitable code and, if so,
warn the user. This might happen for example if the user manually copies
a binary plugin to the wrong folder, intentionally or by accident.

I'm using "release version" to loosely mean not a patch release
(i.e: a feature release).

Change-Id: I896e9cbbd2d3843623fff6af8ef51002ec06f1f8
Reviewed-on: https://code.wireshark.org/review/23807
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: João Valverde <j@v6e.pt>
2017-10-03 10:09:24 +00:00
João Valverde bf580c066a Make make-dissector-reg.py pay attention to word boundaries
Change-Id: Ia96c7b86994b9b5ab58735722f97e2c46cdfb54e
Reviewed-on: https://code.wireshark.org/review/23787
Reviewed-by: João Valverde <j@v6e.pt>
2017-09-30 11:29:54 +00:00
João Valverde 73504255fb Fix typo in make-dissector-reg.py
Change-Id: Ia4c0cd07e1a0e570db440bd05877fc760aae5f54
Reviewed-on: https://code.wireshark.org/review/23786
Reviewed-by: João Valverde <j@v6e.pt>
2017-09-30 11:29:24 +00:00
João Valverde f0e12f0fd3 Remove TPG plugin and dependencies
It doesn't build with autotools and CMake.

Under-documented and unmaintained. Seems to be a work-in-progress
that stalled.

Introduces spurious CMake dependency on yapp.

Change-Id: I0dca1ccbdfd683586c05765437d4b7804ab5cc70
Reviewed-on: https://code.wireshark.org/review/23758
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-09-28 12:26:01 +00:00
João Valverde a269ae1b6a Rename "ws_version_info.h", also .c
It's not installed so like most other files it doesn't need or benefit
from the prefix.

Change-Id: I01517e06f12b3101fee21b68cba3bc6842bbef5c
Reviewed-on: https://code.wireshark.org/review/23751
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: João Valverde <j@v6e.pt>
2017-09-26 17:32:08 +00:00
Guy Harris dc011cc53e pidl: fix field2name wireshark dissector test.
Pick up change from Samba:

    commit 82778a6d04580fc05f3f83d44f57f221ad4e8ac4
    Author: Günther Deschner <gd@samba.org>
    Date:   Tue Sep 6 22:37:12 2016 +0200

        pidl: fix field2name wireshark dissector test.

        Guenther

        Signed-off-by: Guenther Deschner <gd@samba.org>
        Reviewed-by: Stefan Metzmacher <metze@samba.org>

        Autobuild-User(master): Günther Deschner <gd@samba.org>
        Autobuild-Date(master): Wed Sep  7 16:05:26 CEST 2016 on sn-devel-144

Change-Id: Ia02de7d36b2fcb0e7a5145361548acae844f73ed
Reviewed-on: https://code.wireshark.org/review/23724
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-09-25 07:21:00 +00:00
Guy Harris c1a5531b71 pidl: Fix array range checks in python output
Pick up change from Samba:

    commit 67040cf61232dd1cdcc820237919ac1e073c31c2
    Author: Volker Lendecke <vl@samba.org>
    Date:   Tue Jun 20 15:31:18 2017 +0200

        pidl: Fix array range checks in python output

        Without this, we generated code like

        if (ndr_table_dnsserver.num_calls < 0) {
                PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_DnssrvOperation_ndr_pack");
                return NULL;
        }
        call = &ndr_table_dnsserver.calls[0];

        This does not really make sense, and Coverity found comparing the unsigned
        num_calls against <0 a bit pointless.

        Should fix 138 Coverity findings and make the code a bit more correct.

        Signed-off-by: Volker Lendecke <vl@samba.org>
        Reviewed-by: Jeremy Allison <jra@samba.org>

Change-Id: I401e3771e6f3c1125ff847749073693af23884fc
Reviewed-on: https://code.wireshark.org/review/23723
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-09-25 07:18:22 +00:00
Guy Harris a98d108916 python3: Use "y#" instead of "s#" for binary data in PyArg_ParseTuple
Pick up change from Samba:

    commit 40e409bf9e89a163c771b2a58493d2c1b496fae7
    Author: Petr Viktorin <pviktori@redhat.com>
    Date:   Wed May 3 16:57:07 2017 +0200

        python3: Use "y#" instead of "s#" for binary data in PyArg_ParseTuple

        The "s#" format code for PyArg_ParseTupleAndKeywords and Py_BuildValue
        converts a char* and size to/from Python str (with utf-8 encoding under
        Python 3).
        In some cases, we want bytes (str on Python 2, bytes on 3) instead. The
        code for this is "y#" in Python 3, but that is not available in 2.

        Introduce a PYARG_BYTES_LEN macro that expands to "s#" or "y#", and use
        that in:
        - credentials.get_ntlm_response (for input and output)
        - ndr_unpack argument in PIDL generated code

        Signed-off-by: Petr Viktorin <pviktori@redhat.com>
        Reviewed-by: Andreas Schneider <asn@samba.org>
        Reviewed-by: Andrew Bartlett <abartlet@samba.org>

Change-Id: If4d9cdabc5016127f60682caf300f6801a360083
Reviewed-on: https://code.wireshark.org/review/23722
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-09-25 07:15:09 +00:00
Guy Harris 141637d327 pidl: Fix Coverity warnings from duplicate NULL checks.
Pick up change from Samba:

    commit 9703464b942fdddbf7bc4380cbd26d1803f9bc00
    Author: Jeremy Allison <jra@samba.org>
    Date:   Tue May 2 08:10:40 2017 -0700

        pidl: Fix Coverity warnings from duplicate NULL checks.

        Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>

        Signed-off-by: Jeremy Allison <jra@samba.org>
        Signed-off-by: Stefan Metzmacher <metze@samba.org>
        Reviewed-by: Andrew Bartlett <abartlet@samba.org>

        Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
        Autobuild-Date(master): Sat May  6 16:03:17 CEST 2017 on sn-devel-144

Change-Id: I25c6ae984c6a963c05f33d9a649b64f9795c7292
Reviewed-on: https://code.wireshark.org/review/23721
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-09-25 07:13:00 +00:00
Guy Harris 5ea8c70c05 python: pidl: Port Python interface generator
Pick up change from Samba:

    commit 2de5fa45e0abfdb50f604f87e494bf334c39003a
    Author: Lumir Balhar <lbalhar@redhat.com>
    Date:   Mon Jan 23 21:03:17 2017 +0100

        python: pidl: Port Python interface generator

        Port PIDL generator of Python interfaces to generate interfaces in
        Python 3 compatible form.

        Python 2.7 is now required, so we can use PyCapsule in both versions.

        Signed-off-by: Lumir Balhar <lbalhar@redhat.com>
        Reviewed-by: Andrew Bartlett <abartlet@samba.org>
        Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
        Pair-programmed-by: Andrew Bartlett <abartlet@samba.org>

Change-Id: I981993e326132a1911bfbb686ca5ae033dd1df49
Reviewed-on: https://code.wireshark.org/review/23720
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-09-25 05:11:02 +00:00
Guy Harris 097de92cfb pidl:Python: use of pytalloc_GenericObject_reference*() for pyrpc_{ex,im}port_union() wrapping
Pick up change from Samba:

    commit 2170f556299c6ab4ce33f22169ca26ecad3440e3
    Author: Stefan Metzmacher <metze@samba.org>
    Date:   Mon Feb 20 18:02:09 2017 +0100

        pidl:Python: use of pytalloc_GenericObject_reference*() for pyrpc_{ex,im}port_union() wrapping

        BUG: https://bugzilla.samba.org/show_bug.cgi?id=12601

        Signed-off-by: Stefan Metzmacher <metze@samba.org>
        Reviewed-by: Andrew Bartlett <abartlet@samba.org>

        Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
        Autobuild-Date(master): Sat Feb 25 06:33:33 CET 2017 on sn-devel-144

Change-Id: I4d3cb70c79531e5faf5249b67948cc6d354c1bd0
Reviewed-on: https://code.wireshark.org/review/23719
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-09-25 05:09:23 +00:00
Guy Harris 4861fbe121 pidl:Python: replace pytalloc_CObject_FromTallocPtr() with pytalloc_GenericObject_reference_ex()
Pick up change from Samba:

    commit 1ee0c0f8280393c708f23361ebcba0776e8b4d33
    Author: Stefan Metzmacher <metze@samba.org>
    Date:   Wed Feb 22 09:07:54 2017 +0100

        pidl:Python: replace pytalloc_CObject_FromTallocPtr() with pytalloc_GenericObject_reference_ex()

        BUG: https://bugzilla.samba.org/show_bug.cgi?id=12601

        Signed-off-by: Stefan Metzmacher <metze@samba.org>
        Reviewed-by: Andrew Bartlett <abartlet@samba.org>

Change-Id: I19d04a1a248d35799ec41a79113fe588cd05e3de
Reviewed-on: https://code.wireshark.org/review/23718
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-09-25 05:03:30 +00:00
Guy Harris 75f78cd49a BUG: https://bugzilla.samba.org/show_bug.cgi?id=12601
Pick up change from Samba:

    commit d62eb3cc9f97b203d21ec6e75c48c739a43bc163
    Author: Stefan Metzmacher <metze@samba.org>
    Date:   Wed Feb 22 10:08:46 2017 +0100

        pidl:Python: make sure print HASH references for STRUCT types

        BUG: https://bugzilla.samba.org/show_bug.cgi?id=12601

        Signed-off-by: Stefan Metzmacher <metze@samba.org>
        Reviewed-by: Andrew Bartlett <abartlet@samba.org>

Change-Id: Ieef766844ce66160eaaacecc73a51f94f69319fb
Reviewed-on: https://code.wireshark.org/review/23717
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-09-25 05:02:04 +00:00
Guy Harris 5bda9bd4cb pidl:Python: add PyTypeObject objects for function structs
Pick up change from Samba:

    commit 57539c84416aeb8fc8e3a8653f790b329e6fa9a1
    Author: Stefan Metzmacher <metze@samba.org>
    Date:   Mon Sep 12 09:20:44 2016 +0200

        pidl:Python: add PyTypeObject objects for function structs

        They provide get/set methods for the in_* and out_* elements
        and the magic __ndr_{push,pull,print}_{in,out}__ hooks to enable
        the marshalling via ndr_{push,pull,print}_{in,out}().

        This provides an easy way to generate and parse the payload of
        DCERPC requests and responses, which is very useful for writing
        tests.

        Signed-off-by: Stefan Metzmacher <metze@samba.org>
        Reviewed-by: Andreas Schneider <asn@samba.org>

Change-Id: I8f0e70fb771a91ba9590e2e92b5713b48313d2de
Reviewed-on: https://code.wireshark.org/review/23716
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-09-25 04:58:01 +00:00
Guy Harris fd81dea208 pidl:Python: split out a PythonElementGetSet() helper function
Pick up a change from Samba:

    commit a546124f10d1e2bee29bc06c0b8754257d2bdc23
    Author: Stefan Metzmacher <metze@samba.org>
    Date:   Mon Sep 12 09:20:04 2016 +0200

        pidl:Python: split out a PythonElementGetSet() helper function

        Signed-off-by: Stefan Metzmacher <metze@samba.org>
        Reviewed-by: Andreas Schneider <asn@samba.org>

Change-Id: Ica8b699189b69833abfa6049dd3c4e489788ce54
Reviewed-on: https://code.wireshark.org/review/23715
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-09-25 04:52:41 +00:00
Guy Harris 1dd1a13e9f pidl:Python: the py_{import,export}_*() functions can be static now.
Pick up change from Samba:

    commit 40175613519e7405a16e8f896dfdc2949430bc4b
    Author: Stefan Metzmacher <metze@samba.org>
    Date:   Tue Sep 13 01:06:18 2016 +0200

        pidl:Python: the py_{import,export}_*() functions can be static now.

        Signed-off-by: Stefan Metzmacher <metze@samba.org>
        Reviewed-by: Andreas Schneider <asn@samba.org>

Change-Id: I6e06c97b44a04cab36d134916eddf4c501ccc35d
Reviewed-on: https://code.wireshark.org/review/23714
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-09-25 04:51:19 +00:00
Guy Harris 484d114b36 pidl:Python: make use of the pyrpc_{import,export}_union() functions
Pick up a change from Samba:

    commit f7707c04a5e039e757b288ad67a0c3cac9c6466a
    Author: Stefan Metzmacher <metze@samba.org>
    Date:   Mon Sep 12 16:33:38 2016 +0200

        pidl:Python: make use of the pyrpc_{import,export}_union() functions

        This avoids the linking problems at C shared object level.

        Signed-off-by: Stefan Metzmacher <metze@samba.org>
        Reviewed-by: Andreas Schneider <asn@samba.org>

Change-Id: I62c1d03b10e965552a4d598fa2370692ee0cd12a
Reviewed-on: https://code.wireshark.org/review/23713
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-09-25 04:49:57 +00:00
Guy Harris 0517a05b54 pidl:Python: provide a PyTypeObject with METH_CLASS __import__() and __export__() hooks
Pick up a change from Samba:

    commit e0324c0cf7e7c363a5791c2e35c8820b79640a47
    Author: Stefan Metzmacher <metze@samba.org>
    Date:   Mon Sep 12 16:33:38 2016 +0200

        pidl:Python: provide a PyTypeObject with METH_CLASS __import__() and __export__() hooks

        These are wrappers around the currently public C functions
        'py_import_*() and 'py_export_*().

        In order to let other python module use these function, we should
        resolve the needed type object and call the __import__() or __export__()
        hooks instead of linking to the other shared module at C level.

        We already do the same for structs.

        Signed-off-by: Stefan Metzmacher <metze@samba.org>
        Reviewed-by: Andreas Schneider <asn@samba.org>

Change-Id: I47813a544365085407a31d174ee180778674e42b
Reviewed-on: https://code.wireshark.org/review/23712
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-09-25 04:48:37 +00:00
Guy Harris 1373f619f9 pidl:Python: provide the abstract syntax as <module>.<interface>_abstract_syntax
Pick up change from Samba:

    commit 3a0ce3e41d9fdab58273c239955862b03396ea19
    Author: Stefan Metzmacher <metze@samba.org>
    Date:   Sun Sep 25 00:48:29 2016 +0200

        pidl:Python: provide the abstract syntax as <module>.<interface>_abstract_syntax

        The <module>.abstract_syntax alias is only kept as legacy for
        the first interface in a module.

        Signed-off-by: Stefan Metzmacher <metze@samba.org>
        Reviewed-by: Andreas Schneider <asn@samba.org>

Change-Id: Ie6d3d48ea3012bd328eb20e2e6693928fe24ead8
Reviewed-on: https://code.wireshark.org/review/23711
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-09-25 04:46:58 +00:00
Guy Harris aff94cf8f5 pidl:Python: prettify names of constants
Pick up change from Samba:

    commit 1bebccaeb93f7fb7b6e2538d63223f01587ed14d
    Author: Stefan Metzmacher <metze@samba.org>
    Date:   Fri Sep 23 06:49:13 2016 +0200

        pidl:Python: prettify names of constants

        Signed-off-by: Stefan Metzmacher <metze@samba.org>
        Reviewed-by: Andreas Schneider <asn@samba.org>

Change-Id: If9905b914c0d559bd6e7808fadbd154ae56ae2b1
Reviewed-on: https://code.wireshark.org/review/23710
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-09-25 04:45:35 +00:00
Guy Harris d7311431b2 pidl:Python: improve the .doc string for the get/set elements
Pick up change from Samba:

    commit a560116aa5228885e5f52fc46fa92151357de69c
    Author: Stefan Metzmacher <metze@samba.org>
    Date:   Tue Sep 13 09:07:32 2016 +0200

        pidl:Python: improve the .doc string for the get/set elements

        Signed-off-by: Stefan Metzmacher <metze@samba.org>
        Reviewed-by: Andreas Schneider <asn@samba.org>

Change-Id: I8ecb22fd88298ecd4e350b1815d8720b493aac27
Reviewed-on: https://code.wireshark.org/review/23709
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-09-25 04:43:53 +00:00
Guy Harris 1cbb04eaf1 pidl:Python: make use of NDR_ERR_CODE_IS_SUCCESS()
Pick up change from Samba:

    commit 47b40ac96afbd4fb28e519b9658256ecaa304e71
    Author: Stefan Metzmacher <metze@samba.org>
    Date:   Mon Sep 12 15:12:24 2016 +0200

        pidl:Python: make use of NDR_ERR_CODE_IS_SUCCESS()

        Signed-off-by: Stefan Metzmacher <metze@samba.org>
        Reviewed-by: Andreas Schneider <asn@samba.org>

Change-Id: I550b83596fe27bad5ba4f7d91eb0ac62380f4eac
Reviewed-on: https://code.wireshark.org/review/23708
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-09-25 04:42:30 +00:00
Guy Harris e3acb2e3eb pidl:Python: __ndr_print__ functions don't get arguments and need METH_NOARGS
Pick up change from Samba:

    commit d4660e869790c7da1cb97e9d95a995e5a32b34ef
    Author: Stefan Metzmacher <metze@samba.org>
    Date:   Sun Sep 25 01:07:14 2016 +0200

        pidl:Python: __ndr_print__ functions don't get arguments and need METH_NOARGS

        Signed-off-by: Stefan Metzmacher <metze@samba.org>
        Reviewed-by: Andreas Schneider <asn@samba.org>

Change-Id: Ic0648f65b8c3f60e614361778d2c0bf72d61be35
Reviewed-on: https://code.wireshark.org/review/23707
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-09-25 04:41:05 +00:00
Guy Harris 856ce75060 pidl:Python: check the return values of talloc_ptrtype()
Pick up change from Samba:

    commit b728c63bcb5860aed2db43139d191bc149ceba83
    Author: Stefan Metzmacher <metze@samba.org>
    Date:   Mon Sep 12 15:12:50 2016 +0200

        pidl:Python: check the return values of talloc_ptrtype()

        Signed-off-by: Stefan Metzmacher <metze@samba.org>
        Reviewed-by: Andreas Schneider <asn@samba.org>

Change-Id: Icfe8837b5b998e3c5c4ea98df21cf620f53cdcd7
Reviewed-on: https://code.wireshark.org/review/23706
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-09-25 04:17:59 +00:00
Guy Harris da01add662 lib: modules: Change XXX_init interface from XXX_init(void) to XXX_init(TALLOC_CTX *)
Pick up change from Samba:

    commit 306783d6f5d577a0b8bd31d659d8c802f22f0333
    Author: Jeremy Allison <jra@samba.org>
    Date:   Thu Apr 20 12:24:43 2017 -0700

        lib: modules: Change XXX_init interface from XXX_init(void) to XXX_init(TALLOC_CTX *)

        Not currently used - no logic changes inside.

        This will make it possible to pass down a long-lived talloc
        context from the loading function for modules to use instead
        of having them internally all use talloc_autofree_context()
        which is a hidden global.

        Updated all known module interface numbers, and added a
        WHATSNEW.

        Signed-off-by: Jeremy Allison <jra@samba.org>
        Signed-off-by: Ralph Böhme <slow@samba.org>

        Autobuild-User(master): Jeremy Allison <jra@samba.org>
        Autobuild-Date(master): Sat Apr 22 01:17:00 CEST 2017 on sn-devel-144

Change-Id: I549e24e2e1fec12d8e7d3f3304cdac29882892a5
Reviewed-on: https://code.wireshark.org/review/23705
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-09-25 04:13:30 +00:00
Guy Harris 3183465351 s4-rpc_server: Allow each interface to declare if it uses handles
Pick up change from Samba:

    commit ffb8b50e3c07c833fb7b1a583d21f9dc1166a0a6
    Author: Andrew Bartlett <abartlet@samba.org>
    Date:   Mon Nov 14 11:24:03 2016 +1300

        s4-rpc_server: Allow each interface to declare if it uses handles

        This will allow the NETLOGON server in the AD DC to declare that it does not use
        handles, and so allow some more flexibility with association groups

        Signed-off-by: Andrew Bartlett <abartlet@samba.org>
        Reviewed-by: Stefan Metzmacher <metze@samba.org>

Change-Id: Ic09452d27493ff913f5a5c064a038e3783e91df2
Reviewed-on: https://code.wireshark.org/review/23704
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-09-25 04:10:12 +00:00
Guy Harris 07a21ba6f6 s4-rpc_server: Add back support for lsa over \\pipe\\netlogon optionally
Pick up change from Samba:

    commit 31d625bcd2b0cb33dd98a37c202f5b371b871362
    Author: Andrew Bartlett <abartlet@samba.org>
    Date:   Tue Dec 13 09:06:25 2016 +1300

        s4-rpc_server: Add back support for lsa over \\pipe\\netlogon optionally

        The idea here is that perhaps some real client relies on this (and not just Samba torture
        commands), so we need a way to support it for the 4.6 release.

        If no such client emerges, it can be deprecated and removed in the normal way.

        Signed-off-by: Andrew Bartlett <abartlet@samba.org>
        Reviewed-by: Stefan Metzmacher <metze@samba.org>

Change-Id: Id20f98ffbc5eb4752bebee455e7b2b2c0f5017e0
Reviewed-on: https://code.wireshark.org/review/23703
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-09-25 04:08:05 +00:00
Guy Harris dc7a03486c pidl: Make dcesrv\_$name\_interface "static const"
Pick up change from Samba:

    commit 50dff7e094d48793b432992a28571a6f7e5cc73c
    Author: Andrew Bartlett <abartlet@samba.org>
    Date:   Mon Nov 21 11:21:50 2016 +1300

        pidl: Make dcesrv\_$name\_interface "static const"

        This moves it out of the global namespace

        Signed-off-by: Andrew Bartlett <abartlet@samba.org>
        Reviewed-by: Stefan Metzmacher <metze@samba.org>

        Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
        Autobuild-Date(master): Thu Dec  8 13:25:57 CET 2016 on sn-devel-144

Change-Id: Ifa9fca377dc217b131f87cef4463624a679660f9
Reviewed-on: https://code.wireshark.org/review/23702
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-09-25 04:06:14 +00:00
Guy Harris a19fdccf51 pidl: Use a static const initialised struct in dcerpc_server_$name_init(void)
Pick up change from Samba:

    commit 778fc58eb281e38eb1a3346b58cfdf9682f104c4
    Author: Andrew Bartlett <abartlet@samba.org>
    Date:   Mon Nov 21 11:38:24 2016 +1300

        pidl: Use a static const initialised struct in dcerpc_server_$name_init(void)

        Signed-off-by: Andrew Bartlett <abartlet@samba.org>
        Reviewed-by: Andreas Schneider <asn@samba.org>
        Reviewed-by: Garming Sam <garming@catalyst.net.nz>

Change-Id: I5bbc8cfdd94f4c13250fc3b1cb0a61351220116c
Reviewed-on: https://code.wireshark.org/review/23701
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-09-25 04:04:34 +00:00
Guy Harris ad0417cb78 libndr/compression: pass down compressed length in ndr_pull_compression_start
Pick up change from Samba:

    commit a44bce6dfab59a6440ccc30ef0968d59b9f43fd3
    Author: Günther Deschner <gd@samba.org>
    Date:   Tue Sep 20 00:18:43 2016 +0200

        libndr/compression: pass down compressed length in ndr_pull_compression_start

        Guenther

        Signed-off-by: Guenther Deschner <gd@samba.org>
        Reviewed-by: Jeremy Allison <jra@samba.org>

Change-Id: I038c28cafce1248f4208119ba47f1c94ce970067
Reviewed-on: https://code.wireshark.org/review/23700
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-09-25 03:59:07 +00:00
Guy Harris 7c56a5affb pidl:NDR/Parser: add missing {start,end}_flags() to ParseElementPrint()
Pick up change from Samba:

    commit 81bbfb010599b65308aca89cc50532372ca4cb00
    Author: Stefan Metzmacher <metze@samba.org>
    Date:   Mon Jun 12 18:58:49 2017 +0200

        pidl:NDR/Parser: add missing {start,end}_flags() to ParseElementPrint()

        BUG: https://bugzilla.samba.org/show_bug.cgi?id=12782

        Signed-off-by: Stefan Metzmacher <metze@samba.org>
        Reviewed-by: Andreas Schneider <asn@samba.org>

Change-Id: Iaf4192083c49a15eaf722da1a3b55ad987bdbc82
Reviewed-on: https://code.wireshark.org/review/23699
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-09-25 03:52:56 +00:00
Guy Harris 8fdcc95456 pidl:NDR/Parser: initialize [skip] values in ndr_pull_*
Pick up change from Samba:

    commit 823bc4c07add242a5a1d0cd25942ebaab3cd0e23
    Author: Stefan Metzmacher <metze@samba.org>
    Date:   Tue Jun 13 09:57:33 2017 +0200

        pidl:NDR/Parser: initialize [skip] values in ndr_pull_*

        It's too dangerous to leave values uninitialzed!
        [skip_noinit] can be used if required.

        Signed-off-by: Stefan Metzmacher <metze@samba.org>
        Reviewed-by: Volker Lendecke <vl@samba.org>

Change-Id: I85a173e21fca509fc417ff2532097fd9a220ccd9
Reviewed-on: https://code.wireshark.org/review/23698
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-09-25 03:05:57 +00:00
Guy Harris 67522b6130 pidl:NDR/Parser: add "skip_noinit" element
Pick up change from Samba:

    commit b922472fd683235fde3abc69ee09d9d8bfdb8644
    Author: Stefan Metzmacher <metze@samba.org>
    Date:   Wed Jun 21 15:05:35 2017 +0200

        pidl:NDR/Parser: add "skip_noinit" element

        In future "skip" will be changed to initialize the element
        with ZERO_STRUCT() on ndr_pull_*.

        Signed-off-by: Stefan Metzmacher <metze@samba.org>
        Reviewed-by: Volker Lendecke <vl@samba.org>

Change-Id: I4b886c18c9eff27ae446e68fb7220e812721c4e0
Reviewed-on: https://code.wireshark.org/review/23697
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-09-25 03:04:04 +00:00
Guy Harris d037bc66c1 pidl:NDR/Parser: fix "skip" for pointers
Pick up change from Samba:

    commit 3bc6b55385894691792962ecc15978a3b158eca4
    Author: Stefan Metzmacher <metze@samba.org>
    Date:   Mon Jun 19 12:15:21 2017 +0200

        pidl:NDR/Parser: fix "skip" for pointers

        We should handle the "skip" at the element level before
        we traverse trough the element levels.

        Signed-off-by: Stefan Metzmacher <metze@samba.org>
        Reviewed-by: Volker Lendecke <vl@samba.org>

Change-Id: I8b52e1ad0e0ad2c8a4fc20b94f07441b458e5638
Reviewed-on: https://code.wireshark.org/review/23696
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-09-25 03:01:18 +00:00
Guy Harris 7bb3df70b1 pidl: use ndr_push_charset_to_null() when [to_null] keyword is used in IDL
Pick up change from Samba:

    commit d30b008a642c9bb0d85519f42aef56a53e44cc77
    Author: Günther Deschner <gd@samba.org>
    Date:   Mon Jan 23 14:50:45 2017 +0100

        pidl: use ndr_push_charset_to_null() when [to_null] keyword is used in IDL

        Guenther

        Signed-off-by: Guenther Deschner <gd@samba.org>
        Reviewed-by: Stefan Metzmacher <metze@samba.org>

Change-Id: I26d53e3c4d0aa9fc959f2d9f0455e480c6cd45e2
Reviewed-on: https://code.wireshark.org/review/23695
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-09-25 02:58:36 +00:00
Guy Harris 2558728ff9 s4: COM: Remove talloc_autofree_context() from (unused) COM code.
Pick up change from Samba:

    commit fe2ac3e304201d18ca15d388b622a4f15f72ad0a
    Author: Jeremy Allison <jra@samba.org>
    Date:   Mon Jul 24 12:00:21 2017 -0700

        s4: COM: Remove talloc_autofree_context() from (unused) COM code.

        BUG: https://bugzilla.samba.org/show_bug.cgi?id=12932

        Signed-off-by: Jeremy Allison <jra@samba.org>
        Reviewed-by: Andrew Bartlett <abartlet@samba.org>

Change-Id: I44a4e3794569957c3cdf0721e78e73972ba06085
Reviewed-on: https://code.wireshark.org/review/23694
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-09-25 02:56:14 +00:00
Guy Harris c73e940526 pidl: Make static struct api_struct also const
Pick up change from Samba:

    commit c6c1463852533ed8234911835b8b1fce29b2d3d8
    Author: Andrew Bartlett <abartlet@samba.org>
    Date:   Mon Nov 21 11:58:07 2016 +1300

        pidl: Make static struct api_struct also const

        This moves the table to read-only memory

        Signed-off-by: Andrew Bartlett <abartlet@samba.org>
        Reviewed-by: Andreas Schneider <asn@samba.org>
        Reviewed-by: Garming Sam <garming@catalyst.net.nz>

Change-Id: I2a7ce154dff4584c5db445cfd789a8c4f928a338
Reviewed-on: https://code.wireshark.org/review/23693
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-09-25 02:46:43 +00:00
Guy Harris 18d258ac46 pidl: Change *_get_pipe_fns() to return const struct api_struct *
Pick up change from Samba:

    commit d368ee2298bc472caca940a3db7a4f855df6ca21
    Author: Andrew Bartlett <abartlet@samba.org>
    Date:   Mon Nov 21 11:57:48 2016 +1300

        pidl: Change *_get_pipe_fns() to return const struct api_struct *

        This will allow the table to be made static const in the next commit

        Signed-off-by: Andrew Bartlett <abartlet@samba.org>
        Reviewed-by: Andreas Schneider <asn@samba.org>
        Reviewed-by: Garming Sam <garming@catalyst.net.nz>

Change-Id: Ib8cecaf695ccf70a78f97152e3286723cbc233ec
Reviewed-on: https://code.wireshark.org/review/23692
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-09-25 02:44:42 +00:00
Guy Harris f6d956cf92 pidl:NDR: add ReturnTypeElement() helper function
Pick up change from Samba:

    commit d5e4707e98f3613acebb9d0de7e6f944f0b1efaf
    Author: Stefan Metzmacher <metze@samba.org>
    Date:   Tue Sep 13 09:06:50 2016 +0200

        pidl:NDR: add ReturnTypeElement() helper function

        Signed-off-by: Stefan Metzmacher <metze@samba.org>
        Reviewed-by: Andreas Schneider <asn@samba.org>

Change-Id: I3f4c8fb9b18ee10b031d9c58209d1c6c45bbec63
Reviewed-on: https://code.wireshark.org/review/23691
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-09-25 01:34:49 +00:00
Guy Harris 9ab7b538f0 pidl:NDR: keep interface->{ORIGINAL}
Pick up change from Samba:

    commit 7423d8106ef08b94821f5fc666892234feff6f05
    Author: Stefan Metzmacher <metze@samba.org>
    Date:   Tue Sep 13 07:57:25 2016 +0200

        pidl:NDR: keep interface->{ORIGINAL}

        Signed-off-by: Stefan Metzmacher <metze@samba.org>
        Reviewed-by: Andreas Schneider <asn@samba.org>

Change-Id: I8f088a7bbbdbd756a0d28169f8ed00f99d9a8cc3
Reviewed-on: https://code.wireshark.org/review/23690
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-09-25 01:33:13 +00:00
Peter Wu ed15895221 cmake: look for Qt5 from Homebrew on macOS
When Qt5 is installed using Homebrew on macOS, Qt5 is not available in
the default prefix. Remove the hack from macos-setup-brew.sh and adjust
the search path instead. Note that is needed for development, "brew
install" has already set this option in the environment.

See https://github.com/Homebrew/homebrew-core/issues/8392

Change-Id: I57ea09b649a94c9a4cb18b1b2d334808e47ec27e
Reviewed-on: https://code.wireshark.org/review/23232
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2017-09-21 00:49:01 +00:00
Gerald Combs ee4c70b92c Add version.conf to git-export-release.
Create and stash version.conf before archiving our repository. This
makes git-export-release behave more like the current Autotools dist
target.

Make sure the `git describe` command in git-export-release and
make-version.pl use the same match pattern and abbreviation length.
Abbreviate to 8 characters. That's our current unique minimum according
to the git-unique-abbrev script at
https://blog.cuviper.com/2013/11/10/how-short-can-git-abbreviate/ :

516409 objects
 4: 516194 / 65293
 5: 200900 / 92205
 6: 15979 / 7957
 7: 1038 / 519
 8: 74 / 37
 9: 0 / 0

Change-Id: Id2279a59a2e24a9ecd816458f399bcd2b4c94185
Reviewed-on: https://code.wireshark.org/review/23344
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-09-20 11:56:19 +00:00
Gerald Combs b9746b6833 Redirect to /dev/null, not /devnull.
Change-Id: I9d14244cc14fac4d8857177686b9fd869d8a3b3c
Reviewed-on: https://code.wireshark.org/review/23441
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2017-09-09 16:22:55 +00:00
João Valverde d0a91b27f2 plugins: config.h must not be included by public headers
For a sane plugin build environment. Include config.h as the first
header in the .c file instead.

Fix by moving required compiler attribute macros to a new
"ws_attributes.h" API header.

Change-Id: I34f58a927f68c1a0e59686c14d214825149749e1
Reviewed-on: https://code.wireshark.org/review/23400
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: João Valverde <j@v6e.pt>
2017-09-06 08:10:56 +00:00
Guy Harris e1a591fc74 Get rid of no-longer-needed patches to PortAudio.
The version of PortAudio we now specify has both of those problems
fixed.

Change-Id: I7364a5dfac1aac4799347a88f3e89fcb52f57d32
Reviewed-on: https://code.wireshark.org/review/23356
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-09-01 21:53:30 +00:00
Pascal Quantin fb1acc778d Update USBPcap to 1.2.0.3
Change-Id: Ie5dbe818e214738ea8e82fe7d72fc8a20b30691b
Reviewed-on: https://code.wireshark.org/review/23221
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-08-27 07:25:04 +00:00
Michael Mann 274bbd5fab Extract the "long name" out of the manuf file and use it for some resolution
Some places (like MAC resolution) want to keep a fixed length, but for places
that want to display "full organization name", save the long name that is
treated as a comment in the manuf file.

Have make-manuf convert companies with all caps to mixed case so we're not
screaming the company name at the user.

Convert the manuf.tmpl to be tab delimited without a comment for the "long name"
so it can match the format now created by make-manuf.

Remove uint_get_manuf_name as it was unnecessary.

Bug: 3666
Change-Id: If2af5a1ce64e2784fe3941eeae8d8093d4f1467b
Reviewed-on: https://code.wireshark.org/review/23150
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-08-24 05:00:06 +00:00
Gerald Combs 7e21263d0b Update WinSparkle to 0.5.6.
Change-Id: I93d95bba740bb3e0a4754ec71460f30ef1e45a9a
Reviewed-on: https://code.wireshark.org/review/23178
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2017-08-23 16:59:23 +00:00
Diederik de Groot a0b2a5989d [skinny]: minor changes to xml file
- Fix/syncronise spelling for similar field types
- Fix cog.py script invocation

Change-Id: Iab6d8ac6414c1ba9b97c49d7d0a4d2609eb1a55b
Reviewed-on: https://code.wireshark.org/review/23153
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-08-21 15:28:02 +00:00
Gerald Combs c09538e48c Tools: Check for ASan directly.
Check for ASan by testing tshark directly instead of trying to infer it
from the build environment.

Change-Id: I05813161cd8c20f0c105d976706f8b62fd360cb9
Reviewed-on: https://code.wireshark.org/review/23047
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2017-08-11 17:32:53 +00:00
Guy Harris b66b4a96e3 Handle older lz4 versions.
lz4 switched from sequentially numbered releases, named rN, to
vX.Y.Z-numbered releases.

The old sequentially-numbered releases were in tarballs at
https://github.com/lz4/lz4/archive/rN.tar.gz, which extract into an
lz4-rN directory.

THe new vX.Y.Z-numbered releases are in tarballs at
https://github.com/lz4/lz4/archive/vX.Y.Z.tar.gz, which extract into an
lz4-X.Y.Z directory - no, not lz4-vX.Y.Z, just lz4-X.Y.Z.

We expect LZ4_VERSION to be set to rN for the sequentially- numbered
releases and X.Y.Z - not vX.Y.Z - for the vX.Y.Z- numbered releases.

Change-Id: Icb0275aa69b96eea43bf3a8645748a86cec81c94
Reviewed-on: https://code.wireshark.org/review/23026
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-08-09 03:34:12 +00:00
Balint Reczey 5580b3beb7 debian: Add script for updating shared library package names
It should be run prior to major release after the new shared library
versions are set for cmake.

Change-Id: I5cf2a3a9121672c8be14e57a318c9eaf5105e622
Signed-off-by: Balint Reczey <balint.reczey@canonical.com>
Reviewed-on: https://code.wireshark.org/review/22967
Reviewed-by: Balint Reczey <balint@balintreczey.hu>
Petri-Dish: Balint Reczey <balint@balintreczey.hu>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-08-09 00:58:09 +00:00
Ahmad Fatoum 6d8f3ddc7c checkAPIs.pl: Don't check prefs.[ch] for duplicate registered variables
Change-Id: I389aa31db4da11b2b1e8d009a4cfeca03b587f45
Reviewed-on: https://code.wireshark.org/review/23014
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Ahmad Fatoum <ahmad@a3f.at>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-08-08 15:07:26 +00:00
Ahmad Fatoum a8b018b71c Bump versions of macOS dependencies
Versions were bumped to the newest available by Homebrew.

Change-Id: I8f3f405d3644dff91035353e6f83131a507602cd
Reviewed-on: https://code.wireshark.org/review/21224
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-08-08 03:59:29 +00:00
Ahmad Fatoum 1089bdb7d4 checkAPIs.pl: Detect multiple preferences with same variable
Catches mistakes where the same variable is populated by multiple preferences:
prefs_register_bool_preference(epl_module, "show_soc_flags", "text1", "desc1",
    &show_soc_flags);
prefs_register_bool_preference(epl_module, "show_soa_flags", "text2", "desc2",
    &show_soc_flags);

Change-Id: I77a9432d9b518e951166c93a890a948d3f228162
Reviewed-on: https://code.wireshark.org/review/22974
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-08-07 23:07:24 +00:00
Guy Harris 2ca4c5d756 Fix lz4 and libssh uninstall.
We have to remove the lz4 build tree as root.

We can't do "make uninstall" for libssh, so manually remove the stuff it
installs.  Also, remove the -done file, and remove the downloaded
tarball and build tree if we're supposed to do so.

Change-Id: If594ab241a9955229dfbc12e4f5e0c517add6daa
Reviewed-on: https://code.wireshark.org/review/22996
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-08-07 19:14:33 +00:00
Guy Harris f63b0241c9 Fix SpanDSP build with older versions of Xcode.
Older versions of Xcode don't support -Wunused-but-set-variable, so
remove it from the list of options with which to compile SpanDSP.

Change-Id: Idd298e19eaf770980da179412480e17a00514d36
Reviewed-on: https://code.wireshark.org/review/22991
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-08-07 17:09:23 +00:00
João Valverde c09f3ed774 Make the services dictionary ordering stable
Change-Id: I1d148fc5bc58998818043885615965eecc86b3de
Reviewed-on: https://code.wireshark.org/review/22965
Reviewed-by: João Valverde <j@v6e.pt>
2017-08-06 09:52:06 +00:00
João Valverde 733c19a072 Optimize the "services" dictionary
Remove assignee and other miscellaneous information that changes more
frequently than service name and can be consulted directly in the IANA
registry.

Allow merging identical transports into a single line for convenience
and size/speed optimization (a backward-compatible change).

Remove obsolete make-services.pl.

Change-Id: I3ecbd1a6a68d87c084d77498a0eeb44b7afdab67
Reviewed-on: https://code.wireshark.org/review/22872
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-08-04 05:55:08 +00:00
Guy Harris 1da9d28edc Distribute macos-setup-brew.sh in the source tarball.
Change-Id: I9521810d7e9d8b3b13f7949256fa409eafd1cc2c
Reviewed-on: https://code.wireshark.org/review/22920
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-08-02 07:44:39 +00:00
Guy Harris 2a17c33928 Move macosx-setup.sh to tools and remove the "x".
The OS is now called just macOS, and the rest of the setup scripts are
in tools, so move this one there as well.

Update the documentation to reflect the change.

Change-Id: I4d9ebf0797ffe8862e82c4bcfdeec1d2eabae6ae
Reviewed-on: https://code.wireshark.org/review/22918
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-08-02 07:40:34 +00:00
Pascal Quantin f24c1564bd Update USBPcap to 1.2.0.2
Change-Id: I0f318cdd3644ef4eb2195bed3d0bd561dde7f6dc
Reviewed-on: https://code.wireshark.org/review/22903
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-08-01 21:36:17 +00:00
Pascal Quantin 3e54cabf81 Add G.729 decoding based on bcg729 library
Bug: 13635
Change-Id: Ic22a0719a59da13e51425aeb747e88caca0d6512
Reviewed-on: https://code.wireshark.org/review/22808
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-07-30 05:22:35 +00:00
João Valverde 14d94e174a Put the well-known addresses into a separate file from OUIs
Having two distinct logical concepts (OUI and Well Known Address)
concatenated to a single "manuf" file is needlessly obfuscating
the WKA feature.

Have a distinct "wka" file instead and just skip the cat.

Change-Id: I46f53b0015a37331d65f8cfac7cbbd499dd0c5b8
Reviewed-on: https://code.wireshark.org/review/22742
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-07-23 17:14:19 +00:00
João Valverde 3e37292c38 Remove line numbers (locations) from .ts files
To make translation updates less noisy.

Change-Id: I3efee819ea10bb326862e0f818bfd3cd7eff48e3
Reviewed-on: https://code.wireshark.org/review/22654
Reviewed-by: João Valverde <j@v6e.pt>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2017-07-20 09:56:42 +00:00
Gerald Combs 07f27d8238 Update WinSparkle.
Change-Id: Ia0b717165b258fdc891b5d876b4acd31345ec00e
Reviewed-on: https://code.wireshark.org/review/22722
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2017-07-20 01:08:51 +00:00
João Valverde 279a2762dc Extend enterprises.tsv to accept spaces as separators
We can do so easily because the format is so simple. This makes it
more convenient for a user to hand-edit a dictionary in the personal
config folder. We still use tabs in the system file for a small space
gain.

Also add a brief description of the format as a comment.

Change-Id: If3f741bff16f1f42c8ef07d643dc6463caaad1a5
Reviewed-on: https://code.wireshark.org/review/22678
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-07-18 04:41:12 +00:00
Pascal Quantin aec147efa1 LPP: upgrade dissector to v14.2.0
Change-Id: I445c5ef34c1a688310042634eb38bed9b17cadaf
Reviewed-on: https://code.wireshark.org/review/22679
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-07-18 04:38:05 +00:00
Gerald Combs 76efb096d4 Rename enterprises to enterprises.tsv and ship it.
Rename "enterprises" to "enterprises.tsv" so that its format is a bit more
obvious and so that double-clicking the file might do something useful.

Add it to the Windows packages.

Change-Id: I5ef54a04ce1b4926aa4535e756e04b3e2a56d463
Reviewed-on: https://code.wireshark.org/review/22616
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-07-15 06:20:34 +00:00
Pascal Quantin a8ec8a3a6b Windows: update c-ares to v1.13.0 and zlib to v1.2.11
Change-Id: I17f92dd76dc53732d5d764c2a129acb7b69bbe08
Reviewed-on: https://code.wireshark.org/review/22440
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: Anders Broman <a.broman58@gmail.com>
2017-06-28 10:57:55 +00:00
João Valverde 7466880e8a Parse enterprise-numbers at run time
"enterprise-numbers" is converted to tab-separated values and renamed
"enterprises". Unused fields are stripped.

PENs are stored in a hash table loaded at run-time.

User "enterprises" file is loaded from the personal config dir.

Misc make-sminmpec.pl improvements and fixes.
Note: names of type "Entity (formerly ...)" have the formerly part commented out for a cleaner output.

Change-Id: I60c533afbe3e399077fbf432088064471ad3e1e2
Reviewed-on: https://code.wireshark.org/review/22246
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: João Valverde <j@v6e.pt>
2017-06-26 22:40:50 +00:00
Silvio Gissi c9c9d558b2 IPv4/IPv6 display filter fixes and testing
Removed 'len' from IPv4, not needed
Added more test coverage for IPv6 in dftestlib

Change-Id: I1ca80e2525f32f6095ad73352baba733f4694ced
Reviewed-on: https://code.wireshark.org/review/22260
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-06-20 13:56:28 +00:00
Silvio Gissi d386a6cfb1 Added IPv4 byte slicing
Change-Id: I3bdca418801305d71b33fa07396497d82ad06e33
Reviewed-on: https://code.wireshark.org/review/22212
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-06-19 10:08:14 +00:00
Guy Harris 60da2c96dd Just print the string color_filters_init() provides on an error.
It gives all the necessary details; no need to mention the name of a
routine the existence of which the user is probably unaware.

Change-Id: I66d372bc6650c84fbbc6be438be695eff1048413
Reviewed-on: https://code.wireshark.org/review/22055
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-06-09 22:38:35 +00:00
Alexis La Goutte dcba264a46 lemon: avoid redundant redeclaration of ‘memory_error’ [-Wredundant-decls]
Change-Id: I1fbc11dc433363b659ddba9a77e52ffd4e3968d7
Reviewed-on: https://code.wireshark.org/review/21850
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>
2017-05-31 11:33:19 +00:00
Brandon Enochs 1b02cb9b70 Added IEEE CID support to the make-manuf script. These prefixes are commonly used in IEEE 802.11 MAC address randomization.
Change-Id: I94ed29d31c81df0e4f514d7c354073182c116f75
Reviewed-on: https://code.wireshark.org/review/21737
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-05-25 23:14:10 +00:00
Michael Mann dd2b1d5880 checkAPIs.pl: Add check to make sure tvb_get_ function isn't used in proto_tree_add_xxx
Check for situations for things like proto_tree_add_uint, where the "uint" passed
is a call to tvb_get_ntohl().  For that, proto_tree_add_item should be used.

Change-Id: Ibe14678bd66b05f612b125ca289f671c499a2990
Reviewed-on: https://code.wireshark.org/review/21685
Petri-Dish: Anders Broman <a.broman58@gmail.com>
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-05-25 11:40:04 +00:00
Pascal Quantin 46ef2dabfd Windows: update LZ4 to 1.7.5 and USBPcap to 1.2.0.1
Change-Id: I02eb4c255a0794b650f566abdadcac16e97196af
Reviewed-on: https://code.wireshark.org/review/21609
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-05-12 03:07:31 +00:00
Michael Mann d2e7e0b519 Allow proto_register_protocol_in_name_only values to be used as valid hf_ field prefixes.
Change-Id: Ic9998d1f8c6719c7cba78966691295ff9ffbc12a
Reviewed-on: https://code.wireshark.org/review/21612
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-05-12 03:05:59 +00:00
Guy Harris 7321183716 Put the HAVE_REMOTE hack into wsutil/wspcap.h, and include that file.
Have a header file that defines HAVE_REMOTE if HAVE_PCAP_REMOTE is
defined, and then includes pcap.h.  Replace all other includes of
pcap.h, and the definition of HAVE_REMOTE, with includes of that file.
Check for anything other than wspcap.h including pcap.h in checkAPIs.pl.

Change-Id: I3cbee8208944ad6f006f568b3fe3134e10b2a883
Reviewed-on: https://code.wireshark.org/review/21605
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-05-11 19:58:15 +00:00
Björn Ruytenberg c25b4f2f3f debian-setup: Always install Libgcrypt
Libgcrypt is mandatory to build. Do not mark as optional.

Change-Id: Iafbe1cd93f4185e2a9492bb0a21c30a26d8883ce
Reviewed-on: https://code.wireshark.org/review/21575
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2017-05-09 18:22:21 +00:00
Alexis La Goutte 905e0c08ee lempar: set ParseInit/ParseFinalize static
grammar.c:471:6: warning: no previous prototype for ‘DfilterInit’ [-Wmissing-prototypes]
grammar.c:646:6: warning: no previous prototype for ‘DfilterFinalize’ [-Wmissing-prototypes]
dtd_grammar.c:502:6: warning: no previous prototype for ‘DtdParseInit’ [-Wmissing-prototypes]
dtd_grammar.c:637:6: warning: no previous prototype for ‘DtdParseFinalize’ [-Wmissing-prototypes]

Change-Id: I9c43fb4d5ad50992e8e55163333793b20319aa74
Reviewed-on: https://code.wireshark.org/review/21516
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-05-05 21:42:28 +00:00
Guy Harris dbd5902e76 Add terminating NULL to lists for proto_tree_add_bitmask().
Those lists require null terminators; fix the script to add them, and
re-run the script (with the current tip of the master branch for
xcbproto and mesa).

Change-Id: I76c156521e79753f5c19cae16e9caa031abd2496
Reviewed-on: https://code.wireshark.org/review/21471
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-05-03 02:52:37 +00:00
Alexis La Goutte 427c800a9f lemon: fix no previous prototype for ‘memory_error’ [-Wmissing-prototypes]
Change-Id: I5830581c843af41f48bc9645c2be7cf35fa00391
Reviewed-on: https://code.wireshark.org/review/21463
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>
2017-05-02 17:38:53 +00:00
Peter Wu 46b105d513 Remove runlex.sh script, just run lex directly
This removes the need for sh (and Cygwin) on Windows to build Wireshark.

runlex.sh (added in commits 5be4499a and 517d6d57) was added because
older flex had quirks with its options (and the --header(-file) option
was not available). The minimum required flex version for reentrant
scanners (2.5.6) does not have these issues though, so remove the step.

Change-Id: I73c82bb329e2130481efca94809dc60b86dcbafe
Reviewed-on: https://code.wireshark.org/review/21315
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2017-04-26 21:51:18 +00:00
Dario Lombardo 5b1a802c3e tools: improve debian-setup.
Change-Id: If547e0e1c821d3696eba0f303e8ab0769b1fabb4
Reviewed-on: https://code.wireshark.org/review/21245
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Dario Lombardo <lomato@gmail.com>
2017-04-25 21:07:23 +00:00
Jakub Zawadzki 13fbdfc1ba fuzzshark: try to fix oss-build, remove oss-fuzzshark.c in old location.
Step #3: /src/wireshark/tools/oss-fuzzshark.c:190:2: warning: implicit declaration of function 'wtap_init' is invalid in C99 [-Wimplicit-function-declaration]
(https://oss-fuzz-build-logs.storage.googleapis.com/log-472514ce-1a41-4f14-8798-d45084212a65.txt)

Change-Id: I47715bdf55c20124a80da51d3c8812db1d8d94cf
Reviewed-on: https://code.wireshark.org/review/21317
Reviewed-by: Jakub Zawadzki <darkjames-ws@darkjames.pl>
Petri-Dish: Jakub Zawadzki <darkjames-ws@darkjames.pl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
2017-04-24 20:50:53 +00:00
Jakub Zawadzki 9785aed5b6 oss-fuzzshark: Copy to separate directory, add build script.
(oss-fuzz part https://github.com/google/oss-fuzz/pull/544)

Change-Id: I54cf7a7b1aaa49582b5fff8bd034187aa6a9bdec
Reviewed-on: https://code.wireshark.org/review/21302
Petri-Dish: Jakub Zawadzki <darkjames-ws@darkjames.pl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Jakub Zawadzki <darkjames-ws@darkjames.pl>
2017-04-24 16:50:26 +00:00
Alexis La Goutte 9ccba0e605 Revert "Make the set of static routines match that in the current tip SQLite."
This reverts commit 96c72df2df.

Generated a lot of warning (-Wmissing-prototypes)
and i try to kept a sync branch on https://github.com/alagoutte/sqlite/tree/wireshark

Change-Id: I42252a6e736f96783a9fa9805b84e525fe11726e
Reviewed-on: https://code.wireshark.org/review/21182
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2017-04-24 07:30:05 +00:00
Michael Mann 89e0bdf36d X11: Replace VALUEXX macros and handle endianness "natively."
Change-Id: I45d4557377a445c981e6b7cfc1dbe57f586252e5
Reviewed-on: https://code.wireshark.org/review/21210
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-19 14:01:26 +00:00
Ahmad Fatoum cfab5ef035 Add libxml2 as optional dependency
This can be used by dissectors that need to parse out-of-band
configuration.

Change-Id: I13c0a2f408fb5c21bad7ab3d7971e0fa8ed7d783
Reviewed-on: https://code.wireshark.org/review/20912
Reviewed-by: Roland Knall <rknall@gmail.com>
2017-04-19 10:41:55 +00:00
Michael Mann 243da1fb3c X11: Replace UNUSED macro
Change-Id: Ieed2c672fd2acb76dba0ef1c3182eb9f00a04253
Reviewed-on: https://code.wireshark.org/review/21205
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-18 23:06:41 +00:00
Michael Mann c908846625 X11: Sort mesa_enum to allow for value_string_ext
Adjust the dissector generator to put mesa_enum values in
numerical order.  Remove comments about where the specific
values came from as sorting them means the comments aren't
always going to be in the right place.

Change-Id: I3c6b8252017c8a3ec379be49b3df069ec488cd1c
Reviewed-on: https://code.wireshark.org/review/21198
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-18 21:31:07 +00:00
Michael Mann 85d08e58cc X11: Use proto_tree_add_bitmask for generated bitmasks
Change-Id: Idc95500b74452911117be8903fe0bde0c8a6fefa
Reviewed-on: https://code.wireshark.org/review/21173
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-18 05:11:27 +00:00
Jakub Zawadzki 6d67dff656 oss-fuzzshark: disable setresgid(), it fails with -EINVAL
Change-Id: I28abb1d0beb89ce45e20414298b2046f5149a25b
Reviewed-on: https://code.wireshark.org/review/21166
Reviewed-by: Jakub Zawadzki <darkjames-ws@darkjames.pl>
Petri-Dish: Jakub Zawadzki <darkjames-ws@darkjames.pl>
2017-04-17 16:10:40 +00:00
Peter Wu 190350d732 Initial support for Linux 802.11 Netlink (nl80211) dissection
Only commands and top-level attributes are recognized, no specialization
is done (yet?) since it is a large protocol.

Fields are extracted from Linux v4.10-rc4-749-g8585989d146c using the
"tools/generate-nl80211-fields.py --update" command.
Depends on the Generic Netlink (genl) dissector.

Change-Id: I7f81b91e3beacca8ebcb853137212406004f65e8
Ping-Bug: 13561
Reviewed-on: https://code.wireshark.org/review/20914
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
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-17 02:10:45 +00:00
Michael Mann b1a41acb52 X11: Resolve filter differences between a "list" and its "item".
The "list" is of type FT_NONE and the "item" is not.  That can
cause type conflicts.

Change-Id: If62f7113bc120e392588724a0dd65b7ab32ccde7
Reviewed-on: https://code.wireshark.org/review/21146
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-16 18:55:10 +00:00
Jakub Zawadzki 4fa9c5f1f3 oss-fuzzshark: search for dissector in given table.
Change-Id: Ia02b0e6a92213599307e5b382e9fd7ba6c9833a3
Reviewed-on: https://code.wireshark.org/review/21145
Reviewed-by: Jakub Zawadzki <darkjames-ws@darkjames.pl>
Petri-Dish: Jakub Zawadzki <darkjames-ws@darkjames.pl>
2017-04-16 16:55:21 +00:00
Michael Mann f9b8e64e15 X11: Revert mesa_enum_ext back to mesa_enum
Values aren't numerically sorted in the XML, so they aren't put
in the value_string in numerical order.  That's a problem for
value_string_ext.

Change-Id: Ie40c5ab1083cc7be140d11dc131e3588759819b7
Reviewed-on: https://code.wireshark.org/review/21128
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-16 16:19:32 +00:00