Commit Graph

2662 Commits

Author SHA1 Message Date
Joerg Mayer ec65f1d9e2 macos-setup.sh: Update GNUTLS, NETTLE and GMP versions
Fix patch location for non-default build directory

Change-Id: I8454e77de1cec53609bd7ab7f565b06b1ad79923
Reviewed-on: https://code.wireshark.org/review/37325
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2020-06-13 09:22:56 +00:00
Moshe Kaplan 4d50fddfed cppcheck.sh: Add support for xml output with '-x'
Add an option of '-x' to tools/cppcheck.sh to support XML output.

Change-Id: I2921d7cd57ee9c925419247a0238b572f637c854
Reviewed-on: https://code.wireshark.org/review/37424
Reviewed-by: Jaap Keuter <jaap.keuter@xs4all.nl>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2020-06-11 16:55:03 +00:00
Gerald Combs f8d464f435 checklicenses: Add a --list-allowed option.
Add an option to list our allowed licenses.

Remove a couple of GTK+ entries while we're here.

Change-Id: I1c8cf3314cff369766f1ba25438f16c69f42a1ba
Reviewed-on: https://code.wireshark.org/review/37409
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2020-06-10 18:12:50 +00:00
Pascal Quantin 39845dcdc6 Windows: upgrade Npcap to 0.9993
Change-Id: Ibea3abb6e3938676ecaffa8279db22c9f78b81f8
Reviewed-on: https://code.wireshark.org/review/37408
Petri-Dish: Pascal Quantin <pascal@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Pascal Quantin <pascal@wireshark.org>
2020-06-08 20:23:41 +00:00
Gerald Combs 43b5c63aea Tools: Use better terminology.
"Allowed" is a perfectly fine, non-biased word for designating things
that are allowed.

Change-Id: Ia1e0642a073210f0475fba3d437eac654ec36cb5
Reviewed-on: https://code.wireshark.org/review/37397
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-06-08 05:06:10 +00:00
Pascal Quantin f94fed6010 Windows: upgrade USBPcap to 1.5.4.0
Change-Id: I1414b2f0550a8e498fbf8d688119ffc42837c0ee
Reviewed-on: https://code.wireshark.org/review/37281
Petri-Dish: Pascal Quantin <pascal@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Tomasz Moń <desowin@gmail.com>
Reviewed-by: Pascal Quantin <pascal@wireshark.org>
2020-05-22 16:19:35 +00:00
Jaap Keuter f399d135e0 IDL: Clean up IDL based dissector generation
Clean up the generators and generated dissectors a bit by updating
the header, removing unwanted includes and completing the modelines
block.

Change-Id: I8ff80b05bb598c3fa5a5f91a24d5caba87eb712e
Reviewed-on: https://code.wireshark.org/review/37154
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>
2020-05-06 03:49:52 +00:00
Jaap Keuter 5e4379f5b5 IDL: make code generation reproducible
The current state of generated code from the IDL specification is not
reproducible with the current omniidl backend. This change brings the
backend in line with the currently committed generated source code.

The exception to this is that the exceptions (no pun intended) were
collected in a dictionary of unspecified ordering, therefore inherently
non-reproducible. These thus differ from the previously committed source
code (packet-parlay.c), but do contain the same lines.

Also this rolls back commit 443df93896
because the committed generated source files were not created with the
backend with this change, nor do they fail to build, as claimed in that
commit.

Special thanks to Luke Mewburn for working on the dictionary problem.

Change-Id: I7707746d263c7556eb06883c877f70f0e9b357c5
Reviewed-on: https://code.wireshark.org/review/37153
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>
2020-05-05 20:12:29 +00:00
Pascal Quantin 5dabd51742 Windows: upgrade Npcap to 0.9991
Change-Id: I5c664a26ede1a5904d4f02a38c43af6c15dce5f9
Reviewed-on: https://code.wireshark.org/review/37152
Petri-Dish: Pascal Quantin <pascal@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Pascal Quantin <pascal@wireshark.org>
2020-05-05 19:35:29 +00:00
Peter Wu 44407c16fc travis: remove Windows support
The Windows builds have been stuck for a while because the Qt project
changed their installers which prevented the installers from finishing.
Remove support because 1) the Qt installer will most likely continue to
break over time as it did in the past, several times, 2) Travis CI uses
Bash which is a non-standard environment on Windows, and 3) other CI
platforms such as GitHub Actions started providing Windows support.

Remove Windows from the Travis CI builds and all related supporting
files as well. They can be restored once the Qt automation is fixed.

Bug: 16501
Change-Id: I911491587a23f339aa6d6ffcfb6faffe234e5e91
Reviewed-on: https://code.wireshark.org/review/36887
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Dario Lombardo <lomato@gmail.com>
2020-04-19 17:47:29 +00:00
Martin Mathieson d70a4a9321 Standardise IETF RFC and Draft URLs in dissectors.
Prefer:
- html (rather than txt)
- https

Also includes the script check_dissector_urls.py,
that can be used to find links in code and test them.

Change-Id: Iafd8bb8948674a38ad5232bf5b5432ffb2b1251b
Reviewed-on: https://code.wireshark.org/review/36821
Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2020-04-13 14:58:48 +00:00
Pascal Quantin 0d12aaf0d1 Windows: upgrade Npcap to 0.9990
Change-Id: I41fb7e78b688f6be0c3f93dafe3a651a41728288
Reviewed-on: https://code.wireshark.org/review/36727
Petri-Dish: Pascal Quantin <pascal@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Pascal Quantin <pascal@wireshark.org>
2020-04-06 19:18:01 +00:00
Pascal Quantin 42010a64a4 Windows: upgrade Npcap to 0.9989
Change-Id: I33b58029d2017cda090a55960089b048de7f9224
Reviewed-on: https://code.wireshark.org/review/36508
Petri-Dish: Pascal Quantin <pascal@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Pascal Quantin <pascal@wireshark.org>
2020-03-19 21:14:00 +00:00
Peter Wu 2b50d124ec tools: do not install doxygen
Most people will never generate API documentation by running the
'wsar_html' target and will not notice any feature degradation.

On Ubuntu 18.04, doxygen depends on libclang1-6.0 (and indirectly
libllvm6.0), 108M can be saved by not installing these.

Change-Id: I51b58f4106696b5475c48afcdaed256f9a97cc81
Reviewed-on: https://code.wireshark.org/review/36416
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2020-03-16 21:55:32 +00:00
Dario Lombardo d39e27ad96 tools: add additional params to macos-setup-brew.sh.
Change-Id: If43fe1344003d0a2d66cd30bcc701ea92054f9b7
Reviewed-on: https://code.wireshark.org/review/36267
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2020-03-08 19:01:12 +00:00
Pascal Quantin fd6490fa8e Windows: upgrade Npcap to 0.9988
Bug: 16329
Change-Id: I3348049369c55bf84380d90fc699c8d1d8604c58
Reviewed-on: https://code.wireshark.org/review/36323
Petri-Dish: Pascal Quantin <pascal@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Pascal Quantin <pascal@wireshark.org>
2020-03-07 12:57:40 +00:00
Dario Lombardo 0659802f5f tools: add missing packages to macos-setup-brew.
Change-Id: Ie3068a3f6fa64319d8a4d84e6f57b06e6fac3408
Reviewed-on: https://code.wireshark.org/review/36174
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Dario Lombardo <lomato@gmail.com>
2020-02-26 13:26:06 +00:00
Anders Broman 8953da8975 rpm-setup: Get rid of unary operator expected warning.
Change-Id: Id43f39c4d662d69a292ac433ee48fab72256a156
Reviewed-on: https://code.wireshark.org/review/36168
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-02-24 07:42:27 +00:00
Gerald Combs ae1d569322 macos-setup: Update Gcrypt to 1.8.5.
This is required for WireGuard decryption.

Change-Id: I8d27ac198a8bac161c1675e87c3685c8d73c9246
Reviewed-on: https://code.wireshark.org/review/36129
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2020-02-18 23:54:26 +00:00
Peter Wu b926d24b96 RPM: fix missing qt5-linguist dependency, simplify installed packages
Remove unnecessary Qt5SVG build dependency. Do not install Qt4 qt-devel.
qt5-qtbase-devel is big, try to avoid pulling unnecessary deps.

Change-Id: Id289bea10ea89de6b7a3ea77996d861ff7354560
Reviewed-on: https://code.wireshark.org/review/36058
Reviewed-by: Dario Lombardo <lomato@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-02-09 13:10:12 +00:00
Pascal Quantin a6614f995c Windows: upgrade Npcap to 0.9987
Change-Id: I6f1fcbb49b0002a4273fea449cd7346f4f0f1f58
Reviewed-on: https://code.wireshark.org/review/36031
Petri-Dish: Pascal Quantin <pascal@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Pascal Quantin <pascal@wireshark.org>
2020-02-04 21:05:27 +00:00
Dario Lombardo b5c629b62d tools: add lua to bsd-setup.sh.
Change-Id: I16a5aefa11f3c73ebdd69d972136980b630892e1
Reviewed-on: https://code.wireshark.org/review/36011
Reviewed-by: Dario Lombardo <lomato@gmail.com>
2020-02-02 19:52:23 +00:00
Peter Wu e0ca87cfb1 tls: update list of known CT logs to 2019-12-23
The old URL was gone and the JSON scheme has changed, so update the
generator accordingly.

Change-Id: I52ae27c7fc7dc0100e8abaa7b95b1769a7413bc6
Reviewed-on: https://code.wireshark.org/review/35983
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2020-01-29 15:50:19 +00:00
Dario Lombardo a4cb1c3234 tools: add missing package to bsd-setup.
Change-Id: I80da65063bdabc99a3ca0dd722df710be34f1285
Reviewed-on: https://code.wireshark.org/review/35955
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Dario Lombardo <lomato@gmail.com>
2020-01-26 17:41:59 +00:00
Dario Lombardo ece8da5ea6 tools: fix check in bsd-setup.
Change-Id: I3ad5793d6aeca54fc84c82b226311c0e6777c1df
Reviewed-on: https://code.wireshark.org/review/35922
Reviewed-by: Dario Lombardo <lomato@gmail.com>
2020-01-23 16:57:13 +00:00
Pascal Quantin 3442c76bc5 Windows: fix win32 libilbc package
Change-Id: Ia59556092bce0694ba74a25fb10fdca4ee540a57
Reviewed-on: https://code.wireshark.org/review/35893
Reviewed-by: Pascal Quantin <pascal@wireshark.org>
2020-01-21 21:21:13 +00:00
Dario Lombardo 23b91bdcd0 tools: minor changes in bsd-setup script.
Changes:
- use bash
- fix list checks

Change-Id: Idb933155035091974460d6957a9f6a223f6680dc
Reviewed-on: https://code.wireshark.org/review/35872
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Dario Lombardo <lomato@gmail.com>
2020-01-21 16:22:43 +00:00
Dario Lombardo 567991b8fb toold: add libilbc to bsd-setup.
Change-Id: I471b6936cef3df0ed9aaf6cc4421ac9fa47ad27c
Reviewed-on: https://code.wireshark.org/review/35873
Reviewed-by: Dario Lombardo <lomato@gmail.com>
Reviewed-by: Jirka Novak <j.novak@netsystem.cz>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-01-20 21:50:54 +00:00
Jirka Novak 12a13a6926 RTP: decode iLBC payload
It is possible to decode iLBC payload. It uses libilbc library (https://github.com/TimothyGu/libilbc).

Bug: 16314
Change-Id: Id4cad7ae32305a0e94ef32beb24e07733d7f834e
Reviewed-on: https://code.wireshark.org/review/35686
Reviewed-by: João Valverde <j@v6e.pt>
Petri-Dish: Pascal Quantin <pascal@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-01-20 07:50:08 +00:00
Joerg Mayer fc0cca0911 macos-setup.sh: Add SpeexDSP setup and install
Change-Id: I3558d398970d919b8e12992ad4c97789aac79129
Reviewed-on: https://code.wireshark.org/review/35785
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2020-01-17 13:11:44 +00:00
Joakim Karlsson 5ffeabc8ce pfcp: Update to 3GPP TS 29.244 V16.2.0 part3
Change-Id: Id6c50426a586405db9f15bf16bc6b6d503b9848e
Reviewed-on: https://code.wireshark.org/review/35844
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-01-17 09:04:04 +00:00
Gerald Combs 6e7f08781d Gen-bugnote: Another encoding fix.
Change-Id: Icf9fe7cd392cce2dac8ba45854c9f4c00a80dd38
Reviewed-on: https://code.wireshark.org/review/35791
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2020-01-13 22:12:44 +00:00
Gerald Combs 216c4b2673 Gen-bugnote: Fix an encoding issue.
Change-Id: I0b193bc2dfa68de98d53b2443773d121801271e8
Reviewed-on: https://code.wireshark.org/review/35786
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2020-01-13 21:55:33 +00:00
Andre Luyer dbfb204f48 ber: display x509af.utcTime year in 4 digits
Because:
- the 2-digit year can only be in the range 1950..2049 according to
https://tools.ietf.org/html/rfc5280#section-4.1.2.5.1
- to avoid confusion, interpreting the year/month/day in a different order may
still represent a valid date.
- now both utcTime and GeneralizedTime are displayed in exactly the same way.
- some tools, like Perl, apply a different date range when converting 2-digit years.

In packet-ber.c two parameters are added to the function dissect_ber_UTCTime:
datestrptr: if not NULL return datetime string instead of adding to tree
or NULL when packet is malformed
tvblen: if not NULL return consumed packet bytes
Also the memory allocation for outstr is now done using the recommended method
as described in the README.developer document.

The calling function in x509af/x509sat uses this to prepend the century.
Added generated files.

Change-Id: I714c2e8e7f899211caaa1f4136ca0d27cb1aba4a
Reviewed-on: https://code.wireshark.org/review/35414
Petri-Dish: Pascal Quantin <pascal@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
Reviewed-by: Pascal Quantin <pascal@wireshark.org>
2020-01-11 18:36:35 +00:00
Dario Lombardo 1e0fa912d4 AUTHORS: remove newlines.
The text is used in a Qt widget that handles the newlines itself.
The change makes the text appear with a better look in the about
dialog.

Change-Id: I1dc9fdd1f401384f4ce2d6c2c0764adaa810a654
Reviewed-on: https://code.wireshark.org/review/35662
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Reviewed-by: Dario Lombardo <lomato@gmail.com>
2020-01-07 16:52:34 +00:00
Gerald Combs 68a21c46f6 tools: Make compress-pngs a standard utility.
Switch from using `find` to find PNGs to simply accepting a list of
files as arguments.

Pass long arguments to some compressors.

Change-Id: I37884049026fea714d0dd30b08496744c6272379
Reviewed-on: https://code.wireshark.org/review/35646
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2020-01-05 01:52:01 +00:00
Gerald Combs 4d67f06108 make-manuf.py: Add "of" to the general terms list.
Add "of" to the list of general terms to remove when shortening.

Change-Id: Idbfea2d502a89d668ba2f170bf3450cfcbb91fe5
Reviewed-on: https://code.wireshark.org/review/35627
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2020-01-02 22:57:32 +00:00
Pascal Quantin f8aa0d5c02 LPP: upgrade dissector to 37.355 v15.0.0
3GPP decided to transfer the specification from 36.355 to 37.355 now that it
covers NR also. 37.355 v15.0.0 is equivalent to 36.355 v15.5.0.

Change-Id: I63aba21f55861ffd8a5c0adbd307b0453482baaa
Reviewed-on: https://code.wireshark.org/review/35613
Petri-Dish: Pascal Quantin <pascal@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Pascal Quantin <pascal@wireshark.org>
2019-12-31 17:20:30 +00:00
Gerald Combs 12550ef794 make-manuf.py: Fix a shortening error.
Handle cases where we might shorten a name (e.g. "ZAO") down to
nothing.

Change-Id: I5ecb9592d2ecd8225d0ed459ef16885214af5da4
Reviewed-on: https://code.wireshark.org/review/35584
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2019-12-29 18:30:16 +00:00
Gerald Combs f8808b8bd0 make-manuf.py: Handle more business types and other fixes.
Move our business types and general terms to a list and add more. Only
convert all upper case names to title case. Remove double quotes when
shortening names.

Change-Id: I31e9799986542270350b8c2436929f293de4e36c
Reviewed-on: https://code.wireshark.org/review/35577
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2019-12-29 02:42:06 +00:00
Jaap Keuter fe9ee2c9b9 netlink: update 802.11 related netlink messages Linux kernel v5.4
Taking the Linux kernel v5.4 uapi/linux/nl80211.h file:
- Sort the enums in the generation script according to the header file
  to make incremental maintenance easier.
- Add listing of all additional enums found in the header file.
- Update the generated netlink dissector code for 802.11.

Change-Id: I9d2dc09d58d8f252d4746e662e4133d47a7525c5
Reviewed-on: https://code.wireshark.org/review/35570
Petri-Dish: Jaap Keuter <jaap.keuter@xs4all.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2019-12-28 14:00:04 +00:00
Gerald Combs f0be7f27d8 Lemon: Squelch an unused parameter warning.
Fixes

... tools\lemon\lemon.c(1630,14): warning C4100: 'argc': unreferenced formal parameter ...

Change-Id: I5cddbbed025e246ddebe9189edbe6fbeea883a7d
Reviewed-on: https://code.wireshark.org/review/35522
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
2019-12-26 10:32:37 +00:00
Dario Lombardo a20fcccda4 test: fix CI builds on linux.
Fixes:
- sdjournal is available on linux only.
- The systemd library has been put in the right group in debian-setup.

Change-Id: Ie022f29da4313d17d55201b6e7ea1ab2ae740e18
Reviewed-on: https://code.wireshark.org/review/35478
Reviewed-by: Dario Lombardo <lomato@gmail.com>
2019-12-19 08:02:37 +00:00
Pascal Quantin 5d342b01e3 Windows: upgrade Npcap to 0.9986
Change-Id: I9ee3144416eb5564aa8974aeec0e33774edc7ed7
Reviewed-on: https://code.wireshark.org/review/35498
Reviewed-by: Pascal Quantin <pascal@wireshark.org>
Petri-Dish: Pascal Quantin <pascal@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2019-12-19 04:57:57 +00:00
Orgad Shaneh a9c79f0159 Uncrustify: Change line length to 100 chars
80 is too small.

Change-Id: I79a702449f72fcf66ae00e3508546389b022b900
Reviewed-on: https://code.wireshark.org/review/35484
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-12-18 09:34:25 +00:00
Gerald Combs c656affc34 Windows: Get rid of textify.ps1.
We used textify.ps1 to ensure that the .txt files in our Windows
installers would render properly in Notepad if the user double-clicked
on them. Newer versions of Windows have a more sane Notepad, so this is
no longer necessary:

https://devblogs.microsoft.com/commandline/extended-eol-in-notepad/

Copy COPYING, NEWS, README.md, and README.windows once.

Update README.windows.

Change-Id: Ibb8b749725f13e0e49d2a2abe04603d9f2be7960
Reviewed-on: https://code.wireshark.org/review/35470
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2019-12-17 21:52:54 +00:00
Gerald Combs 31414484d4 html2text: Skip generating footnotes for self-links.
Fixes the issue described at
https://www.wireshark.org/lists/wireshark-users/201912/msg00003.html

Change-Id: Ie3fd338ab1c6b216b05eeca002545868d3474bbb
Reviewed-on: https://code.wireshark.org/review/35426
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-12-13 05:29:54 +00:00
Orgad Shaneh 64e5ae4b9d Uncrustify: Remove newline between for and brace
Change-Id: Ib89a159bbc7125b3afcfd72d1a218cb6d7c4af39
Reviewed-on: https://code.wireshark.org/review/35421
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-12-13 05:28:47 +00:00
Orgad Shaneh 4649512b14 Uncrustify: Add spaces between else and braces
Change-Id: Ida8f8638ee226b99804293158e57f4be7a045be8
Reviewed-on: https://code.wireshark.org/review/35420
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-12-13 05:28:01 +00:00
Pascal Quantin 23903925a1 Windows: update c-ares 1.15.0 package
Library was regenerated using g000e963fff596d817d03f366cd49b1fd2d6ec961
to have the proper version info.

Change-Id: I33f26d70ba1ea244aa467e5121b6fb586d8ebd8a
Reviewed-on: https://code.wireshark.org/review/35398
Petri-Dish: Pascal Quantin <pascal@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Pascal Quantin <pascal@wireshark.org>
2019-12-10 23:01:07 +00:00
Dario Lombardo b116405139 tools: use better operators in package scripts.
Change-Id: I1de75829de5f77fa5fe6c8715b1df76148937bc5
Reviewed-on: https://code.wireshark.org/review/35326
Reviewed-by: João Valverde <j@v6e.pt>
Reviewed-by: Dario Lombardo <lomato@gmail.com>
2019-12-06 13:32:47 +00:00
Dario Lombardo 469228a2e5 tools: fix check of shell variables in other setup scripts.
Change-Id: I7423f994b2295ef8336c37fd2e53418d363a4327
Reviewed-on: https://code.wireshark.org/review/35309
Reviewed-by: Dario Lombardo <lomato@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-12-05 05:37:44 +00:00
Tamir Duberstein 9879850cc3 tools/debian-setup: correctly check the value of shell variables
These conditions would previously always evalute as true.

Change-Id: I7eb35f4eae417819090ba47103a266374847cbc5
Reviewed-on: https://code.wireshark.org/review/35305
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Dario Lombardo <lomato@gmail.com>
2019-12-04 19:15:07 +00:00
Gerald Combs 451a241e50 Add c-ares to the required library list.
Although c-ares support was techically optional, it was either on by
default or required in all of our packaging. Go ahead and require it
globally. C-ares is widely available and synchronous name resolution can
easily result in a horrific user experience.

Change-Id: Id67c797316ed6b8a0ab5052e55a43a1b9e2a2464
Reviewed-on: https://code.wireshark.org/review/35188
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2019-11-23 22:45:59 +00:00
Graham Bloice 6a0b558ac1 tools: remove obsolete VS2015 deployment file
The xml deployment file for VS2015 is obsolete as we haven't
used that version for some time and the newer choco packages
for VS2017 & 2019 are simpler and supported.

Change-Id: I5bd29144d7a2f01a6f56147a51fbc51ce891e83c
Reviewed-on: https://code.wireshark.org/review/35189
Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
2019-11-23 08:25:05 +00:00
Gerald Combs 45c6ba587d cppcheck: Exclude the doc directory.
Change-Id: I8d739c7cae7b1b5676cb04e7140d2dd81ebae1d3
Reviewed-on: https://code.wireshark.org/review/35168
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>
2019-11-21 04:55:44 +00:00
Joerg Mayer 0468ead898 macos-setup.sh: Sparkle setup fixes
- mkdir on macos 10.14.6 doesn't have a -f parameter
- set file ownership on tar extraction

Change-Id: I5d6341aba02b56abe0c1aa48e68c4c1b6af15379
Reviewed-on: https://code.wireshark.org/review/35115
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2019-11-18 11:26:29 +00:00
Dario Lombardo e624545b95 tools: fix echo in bsd-setup.
Change-Id: I17479e30ea70e7c9d080994330388b205bcf56e8
Reviewed-on: https://code.wireshark.org/review/35099
Reviewed-by: Dario Lombardo <lomato@gmail.com>
2019-11-15 22:22:31 +00:00
Gerald Combs 02057200fd macOS: Add support for automatic updates using Sparkle.
Add support for automatic updates using the Sparkle framework. Add
FindSparkle.cmake and associated CMake plumbing. Add a public key and
other info to Info.plist.in. Add ui/macosx/sparkle_bridge.{h,m}, which
wraps the Sparkle API. Make code that's specific to WinSparkle
Windows-only.

Add Sparkle installation steps to the macos-setup scripts. Sparkle
prints a warning if your bundle is unsigned (which is the case during
development) so disable installing it by default.

Updating here takes a long time. We might be able to fix that by
shipping our DSYMs separately.

Change-Id: I6cc6671db5657dadc514bda6bf6e1c8bbc9468a5
Reviewed-on: https://code.wireshark.org/review/35090
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2019-11-15 18:39:04 +00:00
Dario Lombardo 5b661c586f tools: fix typos in generate-dissector.
Change-Id: Idd41f622aa1d14bc28dea38a7b8075a0934d619b
Reviewed-on: https://code.wireshark.org/review/35092
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-11-15 12:19:30 +00:00
Dario Lombardo 40d822ed61 tools: add automatic C skeleton dissector generator.
Generate a dissector based on doc/packet-PROTOABBREV.c.

Change-Id: I9233c1212acb30f7166ba91e39d98bc3fb123731
Reviewed-on: https://code.wireshark.org/review/35062
Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
Reviewed-by: Dario Lombardo <lomato@gmail.com>
2019-11-14 12:33:10 +00:00
Gerald Combs ba62446a6a cppcheck: Re-ignore asn1.
The asn1 directory was moved to epan/dissectors back in 2016.

Change-Id: Id22c99fa4e0cacf19ab0c5a6055e71abf94f6159
Reviewed-on: https://code.wireshark.org/review/35074
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2019-11-12 19:31:12 +00:00
Pascal Quantin 99effcada2 Windows: upgrade Npcap to 0.9984
While we are at it, let's deactivate by default the legacy loopback adapter installation

Change-Id: I4950e9dc6de8a2faeda272c03165a9f305862f6b
Reviewed-on: https://code.wireshark.org/review/35004
Petri-Dish: Pascal Quantin <pascal@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Pascal Quantin <pascal@wireshark.org>
2019-11-06 16:37:57 +00:00
Alexis La Goutte 86b0fe361c validate-clang-check (PD): Display also warning
Change-Id: Ie9f36ddbd95b5ebe94b9fc5e2a18ab12c1fb031f
Reviewed-on: https://code.wireshark.org/review/34903
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2019-11-02 11:46:47 +00:00
Pascal Quantin eb4e83d589 asn2wrs.py: fix parsing of integer unions with extension
When parsing the description
ExpectedActivityPeriod ::= INTEGER (1..30|40|50|60|80|100|120|150|180|181,...)
asn2wrs.py was generating some code where the has_extension flag was
wrongly set to false, leading to a decoding error.

Bug: 16145
Change-Id: I0d54994c0656f5b48f3dcd1864218c45a4ebc308
Reviewed-on: https://code.wireshark.org/review/34837
Petri-Dish: Pascal Quantin <pascal@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Pascal Quantin <pascal@wireshark.org>
2019-10-23 20:16:32 +00:00
Gerald Combs 4308ae3d47 tools: Add update-appdata.py
Add a script that fills in the <releases/> section of
wireshark.appdata.xml.

Change-Id: I643a8271f2bf1a5c2cd0be9930a6ca7c71935e42
Reviewed-on: https://code.wireshark.org/review/34824
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2019-10-22 17:09:41 +00:00
Guy Harris 9f374047ad We don't compile Qt, we just install a binary.
Change-Id: Ieeaa2b393775ae58782c0f2447b51fd068ffc185
Reviewed-on: https://code.wireshark.org/review/34763
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2019-10-13 04:26:36 +00:00
Joerg Mayer 0cadd7e4ed Update qt 5.12.1 -> 5.12.4 and update a comment (twice)
Change-Id: I2eab2f73305918a354b8b9b9c5616ef290a40284
Reviewed-on: https://code.wireshark.org/review/34733
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2019-10-08 15:36:52 +00:00
Joerg Mayer 723433f750 Update ASCIIDOCTOR to current version(s)
Change-Id: Ieb87169ffc7dae709954e2f361202cec88d3dedb
Reviewed-on: https://code.wireshark.org/review/34732
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2019-10-08 15:34:30 +00:00
Peter Wu b5d6c9922b sharkd_shell.py: add interactive debug shell for sharkd
Interactive shell for sharkd with some auto-completion, history, and
JSON beautification support. Quick and dirty, tested with Python 3.7.4
on Arch Linux.

Change-Id: I5dec1ac07230bfcbc3165a36b5c7f088ee65a8f7
Reviewed-on: https://code.wireshark.org/review/34583
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2019-10-02 22:05:29 +00:00
Anders Broman 41cf95c4eb win-setup: Use an environment variable to chose not to use 7zip.
Company security policies may make it impossible to use 7zip from a
powershell script. Use an environment variable to chose to use the built
in Expand-Archive instead.

Change-Id: I4fc914c089e25e9cfedf79aef14c42a54b44b845
Reviewed-on: https://code.wireshark.org/review/34601
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-09-24 10:46:47 +00:00
Peter Wu ceb2ee2e44 rpm: use python3 to fix CentOS 7 builds
CentOS 7 (1908) started including python3 (Python 3.6), see
https://wiki.centos.org/Manuals/ReleaseNotes/CentOS7.1908

Change-Id: I6418e7839f1119cf1152f445759e92acd4f39cc4
Reviewed-on: https://code.wireshark.org/review/34593
Reviewed-by: Dario Lombardo <lomato@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-09-23 08:50:10 +00:00
Gerald Combs a97c157d0d macos-setup: Add minizip.
Change-Id: I4f668e8a61e62f3c50ad9d39747c0d73b0196c55
Reviewed-on: https://code.wireshark.org/review/34556
Reviewed-by: Jim Young <jim.young.ws@gmail.com>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2019-09-19 18:25:11 +00:00
Gerald Combs 8428d8f899 macos-setup: Rename libtool* at configure time.
Pass --program-prefix=g to configure, similar to Homebrew's libtool
formula.

Change-Id: I556a0abd0e2715704ddaf4bb94bd5f22dd310d5a
Reviewed-on: https://code.wireshark.org/review/34560
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2019-09-18 21:52:11 +00:00
Alexis La Goutte 27ebed0a5c macos-setup: Update to libssh 0.9.0
Bug: 16032
Change-Id: Iaf9a58f76cef7906e00c1f3c3fecf51260b627a5
Reviewed-on: https://code.wireshark.org/review/34477
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2019-09-11 15:14:12 +00:00
Pascal Quantin 31abf81250 Windows: upgrade Npcap to 0.9983
Change-Id: I05a0eb274d8890711d47c95db1b925682baa63cd
Reviewed-on: https://code.wireshark.org/review/34457
Petri-Dish: Pascal Quantin <pascal@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Pascal Quantin <pascal@wireshark.org>
2019-09-05 22:03:15 +00:00
Dmitry Linikov 22fd28940a packet-ieee1722: Added TSCF and NTSCF control frames support
Only CAN, CAN_BRIEF and LIN messages supported.

Change-Id: Id79574bcdab9f1ec66390357dd5860c73f194ccc
Reviewed-on: https://code.wireshark.org/review/31765
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-08-22 10:32:36 +00:00
Piotr Smolinski ad94c4d459 Kafka: include zstd compression in Kafka message batches
Change-Id: I1d06486ccf7b174ee9aa621fa3d8acb8b3673777
Reviewed-on: https://code.wireshark.org/review/34222
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-08-20 13:50:45 +00:00
Gerald Combs a3c81d328f cppcheck: Make sure it's installed.
Change-Id: I1e33de118c8e022e63f4a2783927e05fe88c364c
Reviewed-on: https://code.wireshark.org/review/34305
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2019-08-16 19:16:55 +00:00
Pascal Quantin 3eea735cc1 Windows: upgrade Npcap to 0.9982, USBPcap to 1.5.3.0 and nghttp2 to 1.39.2
Change-Id: I9dcff1c6714c6bbe211997195ff78537c334fdbd
Reviewed-on: https://code.wireshark.org/review/34303
Petri-Dish: Pascal Quantin <pascal@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Pascal Quantin <pascal@wireshark.org>
2019-08-16 17:39:49 +00:00
Gerald Combs b48b1c0e80 macos-setup: Update nghttp2 to 1.39.2.
1.39.2 fixes CVE-2019-9511 and CVE-2019-9513.

Change-Id: Id8f8ed52769522671ffc80c90014cf3b4c6f38ec
Reviewed-on: https://code.wireshark.org/review/34287
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2019-08-14 21:39:26 +00:00
Gerald Combs 6193c3a5b4 cppcheck: Fix our target selection.
Change-Id: If0fdd7737150357026524a0884b938b809e1244f
Reviewed-on: https://code.wireshark.org/review/34277
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2019-08-13 22:34:16 +00:00
Peter Wu 86a35ac6a2 cmake: allow VCSVERSION to be overridden with VCSVERSION_OVERRIDE
The default VCSVERSION from make-version.pl is based on the "git
archive" information (for tarballs) or uses "git describe" to discover
the version. Distributors such as Debian who directly build from a Git
repository might want to include a deterministic value, therefore add a
new option to achieve this.

Change-Id: I5a39670519f4d846020d917b124fc4d548d00137
Reviewed-on: https://code.wireshark.org/review/34100
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2019-08-12 20:26:32 +00:00
Gerald Combs 9a1d7caac3 tools: Add oxipng to compress-pngs.sh.
Change-Id: I2dc6871fe2288d86bdfda1161afcc25200ded823
Reviewed-on: https://code.wireshark.org/review/34208
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2019-08-08 16:36:31 +00:00
Dario Lombardo b69f032d03 tools: add libnl to rpm-setup.
Add libnl-devel on RHEL.

Change-Id: I82a147ee6c67292d8e2571f91545ae5af5a5e8ff
Reviewed-on: https://code.wireshark.org/review/34191
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Dario Lombardo <lomato@gmail.com>
2019-08-08 08:59:52 +00:00
Juergen Kosel e7852aa3ba debian-setup.sh: Correct order of apt-get update and add_package
apt-get update must be called before calling add_package
otherwise available packages appear as unavailable.

Change-Id: Ie449ca9037950b82908f72a3951401cc0c6496d1
Signed-off-by: Juergen Kosel <juergen.kosel@gmx.de>
Reviewed-on: https://code.wireshark.org/review/34162
Reviewed-by: Dario Lombardo <lomato@gmail.com>
2019-08-01 19:52:08 +00:00
Dario Lombardo ecd731ca92 tools: add missing packages to bsd-setup.
Change-Id: I2d9272c5f320891420a7336d648e1ee23d2f20e8
Reviewed-on: https://code.wireshark.org/review/34128
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Dario Lombardo <lomato@gmail.com>
2019-07-29 21:28:55 +00:00
Dario Lombardo bcd19c9f86 tools: add brotli to alpine-setup.
Change-Id: Ica9c46e1fa75ad1bdc52fba9acda9ef4ecf4e9be
Reviewed-on: https://code.wireshark.org/review/34109
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2019-07-28 17:53:12 +00:00
Guy Harris 245086eb83 HTTPS In Still More Places, update more URLs.
Microsoft reshuffled their documentation - almost all of it moved from
msdn.microsoft.com to docs.microsoft.com.  Some blogs moved to
devblogs.microsoft.com; the comments *didn't* move, so in one case we go
to the Wayback Machine - the link isn't dead, but it formats horribly,
at least on my browser, but the archived version formats OK.

Use the Wayback Machine for some URLs, and update others.

Update the sections for MS-ADTS.

Point to the HTML versions of some RFCs and I-Ds.

Change-Id: I344b20f880de63f1ae2a4e3f9ff98af78a7fe139
Reviewed-on: https://code.wireshark.org/review/34101
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2019-07-27 22:56:35 +00:00
Guy Harris 5cf3fd03f1 HTTPS In More Places, update some URLs.
Change-Id: Ice2e1e2e4d94f6c9da7c651866cfa1a8ac4a31d8
Reviewed-on: https://code.wireshark.org/review/34096
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2019-07-27 07:55:36 +00:00
Guy Harris 20800366dd HTTPS (almost) everywhere.
Change all wireshark.org URLs to use https.

Fix some broken links while we're at it.

Change-Id: I161bf8eeca43b8027605acea666032da86f5ea1c
Reviewed-on: https://code.wireshark.org/review/34089
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2019-07-26 18:44:40 +00:00
Juergen Kosel 76e227bcef debian-setup.sh: Add package lsb-release
The package lsb-release is a build requirement.
Especially needed to build wireshark in a docker container based on
debian:stable.

This change is a prerequisite for the change discussed in
https://code.wireshark.org/review/#/c/34042

Change-Id: Ib8ec73c8bffcb8761ad5748882aa9418e8cd7948
Signed-off-by: Juergen Kosel <juergen.kosel@gmx.de>
Reviewed-on: https://code.wireshark.org/review/34071
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2019-07-25 18:02:30 +00:00
João Valverde 6e5ba74b31 Remove ABI compliance checker code.
It's broken, unmaintained, poorly implemented and obsoleted by saner
debug-info methods.

Note: To do the compliance check properly would require much more
extensive work to clearly define public and private interfaces (without
manual bookeeping of files or symbols either, of course, because who
would want that...).

Change-Id: Ib801f3c152ca2369f95ca1f4af4d37cd8cc7c47a
Reviewed-on: https://code.wireshark.org/review/33928
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: João Valverde <j@v6e.pt>
2019-07-21 15:54:41 +00:00
Roland Knall 390071ed0b Qt: Import Profile information
Allow easy import of profiles. Profiles must be stored inside
a zip file, with no additional hierarchy.

Change-Id: I0ae77460c20ef6b3e447906e671b0cefa6b9b032
Reviewed-on: https://code.wireshark.org/review/33881
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2019-07-17 18:25:11 +00:00
Yannik Enss 3697dd4f5f idl2wrs: clean up and add python3 compatibility
Clean up the python scripts using PEP-8 as a guide, with exceptions
made where necessary.
Includes:
 - Move comments to docstrings
 - Remove unnecessary whitespace
 - Remove brackets from if statements where this improves readability
 - Change the debug print statements to output comments
 - Remove semicolons
 - Prefix debug output with '//'
 - Break long lines

Python 3 compatibility changes are mostly converting print statements
and moving away from the string module in favor of `str` methods.
By including the "future" import, compatibility with python 2 is
maintained.

The changes were tested using both omniORB 4.2.2/Python 3.6 and
omniORB 4.1.7/Python 2.7

Change-Id: I8126a49b2fde13982d34e462fced16b9d7b88306
Reviewed-on: https://code.wireshark.org/review/33850
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-07-06 17:52:42 +00:00
Pascal Quantin 97d47139bc Windows: upgrade USBPcap to 1.5.2.0
Change-Id: I06b7e507277af2c8cdf76dfeaf0b5347a56a0eae
Reviewed-on: https://code.wireshark.org/review/33833
Petri-Dish: Pascal Quantin <pascal@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Pascal Quantin <pascal@wireshark.org>
2019-07-03 20:56:30 +00:00
Pascal Quantin ddfb6e3901 Windows: upgrade USBPcap to 1.5.1.0
Change-Id: Id376763c07ba97dc7105f7265a6ebb3d30a9adbf
Reviewed-on: https://code.wireshark.org/review/33824
Reviewed-by: Pascal Quantin <pascal@wireshark.org>
Petri-Dish: Pascal Quantin <pascal@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-07-03 03:49:08 +00:00
Jim Young 93079941f1 macos-setup.sh: Allow support for QT_VERSION=5.13.0
The macos-setup.sh script does some tests against the major, minor and
micro values of the requested Qt version.  Add 13 as an allowed minor
value.

Change-Id: Ic0ac7af82ce1fb0cddc8f86d8f6bdae43c2edac6
Reviewed-on: https://code.wireshark.org/review/33786
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2019-07-01 01:35:09 +00:00
Peter Wu 5d515bd0f3 make-version: remove defunct --git-description option
This option always writes "1" when supplied because of a missing "=s" in
the argument specification. Aside from that, the regex would produce the
wrong output for tagged releases. Finally, this command line approach
would never have worked since version.h is always overwritten by CMake.

Change-Id: I83a4bc3c48a41d566bf70991d2ab181b85071488
Reviewed-on: https://code.wireshark.org/review/33711
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-06-24 08:50:30 +00:00
Peter Wu 7dfcb4425a asn2wrs: use system lex and yacc from ply if available
Tested with python-ply 3.11 and Python 3.7.3 on Arch Linux using the
'ninja asn1' command.

Bundling lex.py and yacc.py is one distribution method suggested by PLY
upstream (https://www.dabeaz.com/ply/README.txt), but since it is also
available in many Linux distributions, we could potentially remove it in
the future. Windows developers can install it through pip if needed.

Change-Id: I9c847072916ee33da49994820b435ec1d7110303
Reviewed-on: https://code.wireshark.org/review/33708
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Pascal Quantin <pascal@wireshark.org>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2019-06-23 17:31:15 +00:00
Gerald Combs 7d3fffc3f2 Tools: Add a "last n commits" option to cppcheck.sh.
Add a `-l n` option which will check the .c and .cpp files from the last
[n] commits.

Fix some shellcheck warnings.

Change-Id: I8185d6c6c5b08576315b47847795d210d47b042e
Reviewed-on: https://code.wireshark.org/review/33646
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>
2019-06-19 03:20:32 +00:00
Pascal Quantin 6b20a4f2d6 Windows: upgrade Npcap to 0.996 and USBPcap to 1.5.0.0
Change-Id: Ie6590e1a31a5aaa6e96f6f718991cc42a1e40d8a
Reviewed-on: https://code.wireshark.org/review/33639
Reviewed-by: Pascal Quantin <pascal@wireshark.org>
Petri-Dish: Pascal Quantin <pascal@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-06-18 06:20:10 +00:00
Dario Lombardo 24138a0a74 tools: add speex to rpm-setup.
Change-Id: Ie430eab506d1311cc8bf8f995f72489f4a990aea
Reviewed-on: https://code.wireshark.org/review/33593
Reviewed-by: Dario Lombardo <lomato@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-06-14 13:37:27 +00:00
João Valverde 63af1da7e7 Kill libwscodecs plugin library, just use plugins
Change-Id: I085d04840acb53b0b7681787429a2b4e10547cd5
Reviewed-on: https://code.wireshark.org/review/33068
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-06-11 20:59:39 +00:00
Gerald Combs e1a57c61f9 Sysdig event updates.
Convert generate-sysdig-event.py to Python 3. Update it to fetch from
the current version of Sysdig (0.26.1). Add logic to work around
mismatched parameter counts and mismatched types and formats.

The following warnings were generated:

WARNING: Forcing semget INT32 format to DEC. Params: [('key', 'INT32', 'HEX'), ('nsems', 'INT32', 'DEC'), ('semflg', 'FLAGS32', 'HEX')]
WARNING: Forcing notification STRING format to NONE. Params: [('id', 'CHARBUF', 'DEC'), ('desc', 'CHARBUF', 'NA')]
WARNING: Forcing infra STRING format to NONE. Params: [('source', 'CHARBUF', 'DEC'), ('name', 'CHARBUF', 'NA'), ('description', 'CHARBUF', 'NA'), ('scope', 'CHARBUF', 'NA')]
WARNING: seccomp: found 2 parameters. Expected 1. Params: [('op', 'UINT64', 'DEC'), ('flags', 'UINT64', 'HEX')]

Bug: 15826
Change-Id: I5f8a7530f1003270cbbcb1f7dfd86f7b63066bba
Reviewed-on: https://code.wireshark.org/review/33513
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>
2019-06-09 04:53:31 +00:00
Gerald Combs 20568aa8b9 tools: Switch some scripts exclusively to Python 3.
Convert asn2wrs.py to Python 3 via `2to3 --print-function --write` along
with additional tweaks.

Convert asn2deb and idl2deb using `2to3 --write`.

Work around what appears to be a Debian packaging bug:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=818609

Change-Id: I5cc246f7162c2d713673955c10c092e1b91adf82
Reviewed-on: https://code.wireshark.org/review/33504
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>
2019-06-09 04:53:08 +00:00
Pascal Quantin c603fac072 Windows: upgrade USBPcap to 1.4.1.0
Change-Id: I1a9d97a58201dadc6c50a15d1518053c980bd62f
Reviewed-on: https://code.wireshark.org/review/33514
Petri-Dish: Pascal Quantin <pascal@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Pascal Quantin <pascal@wireshark.org>
2019-06-07 05:33:46 +00:00
Yannik Enss 4ebf72d232 idl2wrs: extend aggressive mode
Add a "_loop" header field also when processing attributes

Change-Id: I109b34d8f6cb8fbf3c38dc09f58b740b4d96436b
Reviewed-on: https://code.wireshark.org/review/33460
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2019-06-06 08:04:57 +00:00
Yannik Enss 443df93896 idl2wrs: fix 'undeclared identifier' error
the 'x_octetx' variables were removed a few years back, replace them with get_CDR_xxx()

Change-Id: I8cf3410d8a152c834e7019f7d1d80de3798530c3
Reviewed-on: https://code.wireshark.org/review/33457
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2019-06-05 17:02:21 +00:00
Yannik Enss 3f3337b2ca idl2wrs: add aggressive mode
add a mode to ignore a few optimisations in favor of working output

Change-Id: I875cec5a80e9449e9fd954d4ff6a21e5b128db5e
Reviewed-on: https://code.wireshark.org/review/33459
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2019-06-05 16:51:50 +00:00
Yannik Enss 1c09af410d idl2wrs: fix recursion loop
wireshark_gen goes into an infinite recursion if it encounters a multi-level
alias, this is prevented

Change-Id: Icec678fb326b7c14344dc6df51015dad980587a9
Reviewed-on: https://code.wireshark.org/review/33458
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2019-06-05 16:48:45 +00:00
Yannik Enss 54db60f4e5 idl2wrs: add debug command line parameter
convert the "DEBUG" constant to a command line parameter

Change-Id: I7f873d85fa053cb9298bd03444125d0160ef4640
Reviewed-on: https://code.wireshark.org/review/33456
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2019-06-05 16:35:00 +00:00
Pascal Quantin 76785a12b3 Windows: upgrade USBPcap to 1.4.0.0
Change-Id: I79b8ece52e89e4e646954e965649b0cf5ae69a6a
Reviewed-on: https://code.wireshark.org/review/33379
Petri-Dish: Pascal Quantin <pascal@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Pascal Quantin <pascal@wireshark.org>
2019-05-26 21:19:52 +00:00
Dario Lombardo aab172fbda tools: add alpine-setup script.
As for debian/rpm/bsd add a script that helps the user to setup
a development environment for alpine.

Tested on s390x alpine.

Change-Id: Ib4e002385ce748b764ae7ff51f39a9cfce61590c
Reviewed-on: https://code.wireshark.org/review/33268
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2019-05-21 11:01:11 +00:00
Dario Lombardo 1a7b83c20f tools: fix rpm-setup script.
Some packages are missing, others are in the wrong place.

Change-Id: I396716e85e2106f527b7ff7ad5ee7a519061cbdd
Reviewed-on: https://code.wireshark.org/review/33264
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-05-20 04:17:39 +00:00
Guy Harris 038470b597 Clean up some signed vs. unsigned warnings.
Octet arrays are octets of guint8s, not gchars/chars.

Make some strings arrays of chars/gchars, not guint8s; this needs more
thought (throughout Wireshark).

Offsets into tvbuffs are signed, not unsigned.  (This is to support
negative offsets, which are offsets from the end of the tvbuff.  We
might want to remove that and go with unsigned offsets, and have the
few, if any, places where that feature is used explicitly calculate the
offset from the end based on the tvbuff's length; most if not all of our
handling of trailers/end-of-packet FCSes/etc. does so, and makes sure it
handles the case where the end-of-packet information isn't present, to
better report errors and dissect the stuff before it.)

Change-Id: Ia46ed3fc7c2d8ac97cd14824d521cbc461fb7f45
Reviewed-on: https://code.wireshark.org/review/33239
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2019-05-17 02:55:59 +00:00
Guy Harris 32a014a4f1 Update the warning-suppression statements in idl2wrs.
Update them to use ws_diag_control.h and ws_compiler_tests.h, and the
DIAG_OFF() macros therein.

Regenerate the CORBA dissectors.

Change-Id: I26f0add0ec8dd920bfe80571b4141c1b0e2f0640
Reviewed-on: https://code.wireshark.org/review/33238
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2019-05-17 01:41:20 +00:00
Peter Wu a68627ae96 version: include version information for tarballs from git
Embed the git commit hash as well as the tag information for tarballs
produced by 'git archive' (this includes the Github tarball). Example:

    TShark (Wireshark) 3.0.1 (Git commit ea351cd80516)

Note that the embedded git ref names can include branch information, see
for example `git log -n1 -s --format=%D v3.0.1`:

    tag: wireshark-3.0.1, tag: v3.0.1
    HEAD -> bug/15544, tag: v99.99
    HEAD, origin/master, origin/HEAD, master

Thus, when creating release tarballs, I would recommend using the above
command to see whether unnecessary branch information is present. If so,
create a new post-release commit first on the same branch. This way, the
release tarballs should be reproducible.

While at it, increase the commit abbreviation length from 8 to 12.
Currently git describe abbreviates to 10 by default. The default length
is at minimum 7 and is dependent on the number of objects:

    git count-objects -v | perl -lne 'print int(log($1)/log(2)/2)+1 if /^in-pack: (\d+)/'

Bug: 15544
Change-Id: Ifd1ed636b69f7687a7272775686f51387040a596
Reviewed-on: https://code.wireshark.org/review/33214
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Dario Lombardo <lomato@gmail.com>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2019-05-16 17:31:50 +00:00
Greg Morris 715f46b768 Updates to NCP protocol dissector
Add NCP 98
Fix NDSrequestprotocolflags not being captured on request so that reply
would offset correctly with CRC flag.

Change-Id: Ie45a1017326dd38393baf3f005f3ec9195438565
Reviewed-on: https://code.wireshark.org/review/33146
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-05-16 12:47:47 +00:00
Dario Lombardo 23744c9be7 tools: add speexdsp to debian-setup.
Internal support of libspeexdsp has been removed in favour of system
one in g186f985793. Add it to the list of optional debian packages.

Change-Id: Ie15c367c2a113349614351da8bbcc26ef6353028
Reviewed-on: https://code.wireshark.org/review/33180
Reviewed-by: João Valverde <j@v6e.pt>
Reviewed-by: Dario Lombardo <lomato@gmail.com>
2019-05-13 05:44:04 +00:00
Pascal Quantin 3586da308f Windows: upgrade Npcap to 0.995
Change-Id: I9e1bea5daf8aa49e4de4efa070819da8d3844fc1
Reviewed-on: https://code.wireshark.org/review/33156
Petri-Dish: Pascal Quantin <pascal@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Pascal Quantin <pascal@wireshark.org>
2019-05-11 13:17:00 +00:00
Pascal Quantin fd2f439e33 Revert "Windows: upgrade Npcap to 0.994"
This reverts commit 2f82518f72.

Npcap 0.994 introduced a crash that will be fixed in next version:
https://github.com/nmap/nmap/issues/1591

Change-Id: Iff9a29e6d28c57774844d25f2990e0f8c214bf75
Reviewed-on: https://code.wireshark.org/review/33143
Reviewed-by: Pascal Quantin <pascal@wireshark.org>
2019-05-10 05:38:32 +00:00
Guy Harris 2e3dcd479e Fix dissection of gatewayed/bridged LLAP packets.
EtherTalk and TokenTalk frames use LLC/SNAP headers with an OUI of
08:00:07 and a PID of 0x809B.

Frames with an Ethertype of 0x809B - either as the Ethertype field of an
Ethernet frame or as the PID, in combination of an OUI of 00:00:00, of
an LLC/SNAP frame - have an LLAP frame, complete with an LLAP header, as
the payload.

Don't treat 08:00:07 as a special case - register it as an OUI and give
it a dissector table, and register the DDP dissector in that dissector
table with ETHERTYPE_ATALK.  Register the LLAP dissector in the
"ethertype" table with the Ethertype ETHERTYPE_ATALK.

This means we now have two separate LLC+SNAP PID tables for Apple; name
them appropriately.

That also means we need to add packet-atalk.c to the list of files
allowed to add "llc." named fields.

Change-Id: I00bafd692f83f73bd347628cb9e950863c26a2b7
Reviewed-on: https://code.wireshark.org/review/33125
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2019-05-09 04:27:52 +00:00
Pascal Quantin 2f82518f72 Windows: upgrade Npcap to 0.994
Change-Id: I3b64041723a72600a9ef5a6fb9d22b0b30578cfc
Reviewed-on: https://code.wireshark.org/review/33114
Reviewed-by: Pascal Quantin <pascal@wireshark.org>
Petri-Dish: Pascal Quantin <pascal@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-05-08 16:04:38 +00:00
Anders Broman 85773a21a9 OER: Dissect Boolean and IA5String types.
Change-Id: I12f1f605807809b94a7e51a5be2a4c3588f2d16f
Reviewed-on: https://code.wireshark.org/review/33106
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-05-08 12:50:59 +00:00
Pascal Quantin 48d7cecedd Windows: upgrade Npcap to 0.993
Change-Id: Ibe19a77b5ced8be4f1008450fb6df92c841a43c5
Reviewed-on: https://code.wireshark.org/review/33092
Reviewed-by: Pascal Quantin <pascal@wireshark.org>
Petri-Dish: Pascal Quantin <pascal@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2019-05-07 05:12:08 +00:00
Peter Wu 53e043a42f make-regs.py: assume source files to be UTF-8
packet-sysex.c contains UTF-8 characters which breaks builds that do not
have a UTF-8 locale. Reproduce with Python 3.6 or older using
LANG=C ninja epan/dissectors/dissectors.c

Change-Id: Iaa98756ee80384f415c58aef23560210e500df2f
Reviewed-on: https://code.wireshark.org/review/33087
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2019-05-05 17:40:52 +00:00
Tomasz Moń 8a13504258 commit-msg: Place Ping-Bug before Change-Id
Change-Id: I8fa8609e372304370ab3bcee1c79feb883e3eff5
Reviewed-on: https://code.wireshark.org/review/33086
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2019-05-05 17:38:49 +00:00
João Valverde c7d86568a0 CMake: Remove wsutil pcap dependency
Change-Id: Ic5a3653cb8bcc33e0be108c8b201567e7090f9f5
Reviewed-on: https://code.wireshark.org/review/33043
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: João Valverde <j@v6e.pt>
2019-05-03 21:57:05 +00:00
Pascal Quantin 4addfb6b16 Windows: add brotli and vcpkg-export to cleanup items
Change-Id: I61daf05559b1d33bea117ac6d54f16b71a224e36
Reviewed-on: https://code.wireshark.org/review/33018
Petri-Dish: Pascal Quantin <pascal@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Pascal Quantin <pascal@wireshark.org>
2019-04-30 10:51:57 +00:00
João Valverde cd41d4d96f plugins: Make build status output less redundant
Instead of repeated lines of
  [1771/2272] Generating plugin.c
  Updating plugin.c

actually output the name of the target plugin.

Change-Id: Iacabd5a1ddaf2820276355bf3c7a9357652e8f3d
Reviewed-on: https://code.wireshark.org/review/32951
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>
2019-04-23 04:12:44 +00:00
Gerald Combs 83b2f1bca5 Tools: Make a couple of scripts Python 3-only.
Remove Python 2 support from make-services.py and update-tools-help.py.

Change-Id: I1304038ca07d1d7354795f7b7faacd3747313653
Reviewed-on: https://code.wireshark.org/review/32943
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2019-04-22 18:41:35 +00:00
Dániel Bakai 9ce60b173b Add brotli decompression support for HTTP and HTTP2 dissectors.
Change-Id: I9c09f55673187f6fee723fcd72798fb6b9958b03
Reviewed-on: https://code.wireshark.org/review/32745
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2019-04-22 15:24:46 +00:00
Dániel Bakai c77ee0008d rpm: update rpm package dependencies and spec to work on current os versions
Change-Id: Iaa0bd9513869e65b96b6014d66ca3cfd917dbe64
Reviewed-on: https://code.wireshark.org/review/32938
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2019-04-22 13:21:37 +00:00
Guy Harris 194abe7f3a Update email address for Kaz Kylheku and URL for Kazlib.
Change-Id: I9365cda23e9edece327e04afc882158b87a9f273
Reviewed-on: https://code.wireshark.org/review/32920
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2019-04-21 03:16:50 +00:00
Gerald Combs bd75f5af0a checkAPIs: Check for non-UTF-8 instead of non-ASCII.
Replace our check for non-ASCII characters with one that checks for a
proper UTF-8 encoding.

Change-Id: I8386f5d4376b05bc10358c0d2849a214d8ff00a0
Reviewed-on: https://code.wireshark.org/review/32866
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2019-04-19 21:32:29 +00:00
Peter Wu e60c14e376 travis: update to Qt 5.12.3 to fix Windows builds
The Qt installer always seems to install the latest version while the
version was assumed to be fixed. This configuration will likely break
again with the next Qt update, but it fixes the current Windows builds.

Change-Id: Icf4a8fdf10c15e6f6a6eb0451ff30662da613567
Reviewed-on: https://code.wireshark.org/review/32893
Reviewed-by: Dario Lombardo <lomato@gmail.com>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2019-04-19 17:30:04 +00:00
Peter Wu 30fc67202c make-usb.py: use HTTPS URL
The linux-usb.org website seems maintained by Stephen J. Gowdy as linked
from the bottom of the website, use the https version.

Change-Id: Id50694735d1078df5845ae8d1ec32523d2216c68
Reviewed-on: https://code.wireshark.org/review/32856
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-04-15 04:13:32 +00:00
Peter Wu 1c4885deaf make-usb.py: use octal escape sequences
Fixes errors like:

    epan/dissectors/usb.c:15220:42: error: hex escape sequence out of range
        { 0x0cad9001, "PowerPad Pocket PC\xc2\xa0Device" },

Change-Id: I8c120892c0d52aceb3f6767401e7944353495825
Fixes: v3.1.0rc0-524-g6f57aa72a8 ("Make a couple of scripts Python 3 only.")
Reviewed-on: https://code.wireshark.org/review/32854
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2019-04-14 21:36:58 +00:00
Gerald Combs 6f57aa72a8 Make a couple of scripts Python 3 only.
Remove Python 2 support from tools/make-manuf.py and tools/make-usb.py.

Don't double-escape UTF-8 sequences in make-usb.py so that we generate

    { 0x045e000e, "SideWinder\xc2\xae Freestyle Pro" },

instead of

    { 0x045e000e, "SideWinder\\xc2\\xae Freestyle Pro" },

Change-Id: I918f854ccba868a122fd7b138c1654b2c7615f94
Reviewed-on: https://code.wireshark.org/review/32839
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2019-04-12 20:12:10 +00:00
Gerald Combs ba40851b27 Windows: Use an lz4 DLL built with vcpkg.
Update the Windows build environment to use lz4 packages built from a
VS 2017 command prompt with

    set LZ4_VERSION=1.8.3
    vcpkg remove lz4:x86-windows lz4:x64-windows
    vcpkg install lz4:x86-windows lz4:x64-windows
    vcpkg export lz4:x86-windows --output=lz4-%LZ4_VERSION%-win32ws --zip
    vcpkg export lz4:x64-windows --output=lz4-%LZ4_VERSION%-win64ws --zip

The packages also include a PDB, so copy it to the build directory and
add it to the PDB .zip.

Change-Id: Icea512405d2085e5b271fa4a3ba8c0fe318b8cb5
Reviewed-on: https://code.wireshark.org/review/32785
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>
2019-04-09 04:28:36 +00:00
Gerald Combs 44d11a193f Gen-bugnote: Replace multiple instances where needed.
Change-Id: Ic0d8ec3604ce6a31b68ef265cd5337b0565b8a24
Reviewed-on: https://code.wireshark.org/review/32740
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2019-04-05 20:05:19 +00:00
Anders Broman 7edadf9ce3 asn2wrs: Improve filtername of named bits.
Change-Id: Ie22137e95c8752a0783e3e9ff99b45c0b79b0d4a
Reviewed-on: https://code.wireshark.org/review/32714
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-04-04 13:26:33 +00:00
Anders Broman ca694eb078 PER: Use proto_tree_add_bitmask... () for named bits.
Change-Id: I2f4258e2f4fd11c26bdc101e1375d0b5708610b7
Reviewed-on: https://code.wireshark.org/review/32713
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-04-04 12:28:11 +00:00
Gerald Combs 8d3ac3af86 epan: Convert our PROTO_ITEM_ macros to inline functions.
Convert our various PROTO_ITEM_ macros to inline functions and document
them.

Change-Id: I070b15d4f70d2189217a177ee8ba2740be36327c
Reviewed-on: https://code.wireshark.org/review/32706
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-04-04 04:03:38 +00:00
Moshe Kaplan feb931e2f8 Quiet output of make-version.pl
Change-Id: Iefd53ad630f1dabc154c5b5a940e58288a91aa6e
Reviewed-on: https://code.wireshark.org/review/32623
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2019-04-03 18:02:23 +00:00
Anders Broman c2ac157ac0 ASN.1: Use proto_tree_add_bitmask... () for named bits.
Change-Id: Ied0c91ea070ee76603e7ecb29d874e0c1a65892e
Reviewed-on: https://code.wireshark.org/review/32684
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-04-03 14:53:08 +00:00
Pascal Quantin 711ac47896 Windows: upgrade USBPcap to 1.3.0.0 and Npcap to 0.992
Change-Id: Ie27c2cb36dc90a20851f1e2c53c1af2220465a39
Reviewed-on: https://code.wireshark.org/review/32678
Reviewed-by: Pascal Quantin <pascal@wireshark.org>
Petri-Dish: Pascal Quantin <pascal@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-04-02 03:27:41 +00:00
Peter Wu 8a283325d4 travis: fix missing msbuild output on Windows
For some reason the CMake output to Python is missing, no matter how
hard I try. Use an alternative approach instead where Python executes
CMake and filters the output without relying on pipes in Bash.

Change-Id: I21b8b709c3a944fbd3b07e7fac59702735dd83a4
Reviewed-on: https://code.wireshark.org/review/32628
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Dario Lombardo <lomato@gmail.com>
2019-03-31 20:54:21 +00:00
Gerald Combs 36ba6b87c1 Windows: Switch to Npcap 0.991.
Change-Id: I4f5d82bf0d205b9410db2098abe64dde1a33b21d
Reviewed-on: https://code.wireshark.org/review/32473
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Pascal Quantin <pascal@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2019-03-18 22:46:46 +00:00
Gerald Combs acc96e5206 Windows: Start using a `vcpkg export` bundle.
Create a library bundle using `vcpkg export ... --zip` as described at
https://vcpkg.readthedocs.io/en/latest/users/integration/#export-command.

The bundle includes the following packages:

gettext     0.19-8
glib        2.52.3-13
libffi      3.1-4
libiconv    1.15-5
liblzma     5.2.4
libxml2     2.9.9-4
pcre        8.41-1
zlib        1.2.11-5

It also includes a CMake toolchain file which we might want to make use
of in the future.

This means we no longer compile Zlib locally. Update the CMake environment
accordingly and remove zlib from win-setup.ps1.

It includes PDBs, so add them to the PDB .zip.

Change-Id: I0a94904a86d836e990019dab62af506573be1f35
Reviewed-on: https://code.wireshark.org/review/31377
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2019-03-18 22:22:44 +00:00
Jim Young 3a27d6b3c4 Add -G Ninja to macos-setup.sh
Let's suggest using cmake's Ninja generator if we're going to
suggest using ninja.

Change-Id: Ibc48bf0e2039c2bbc0d11d7b194bc7094c1e0ebf
Reviewed-on: https://code.wireshark.org/review/32399
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-03-14 08:59:52 +00:00
Gerald Combs 092d73e43e macos-setup: Update our GMP build flags.
Configure GMP with --enable-fat. Neither --with-libgcrypt nor
--without-p11-kit appear to be supported, so don't pass those flags.

Change-Id: Ib96e805064b95be72d5fa3bd28057a5092064d8a
Reviewed-on: https://code.wireshark.org/review/32190
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2019-02-25 23:21:47 +00:00
Guy Harris 1048b82ca3 Fix liblzma, liblz4, and libssh builds with minimum deployment version and SDK.
liblzma is used by libxml2, which is used by libwireshark, so we need
it.  It's build by xz, so we need to do the xz build with the
minimum-version and SDK flags.

liblz4 does its builds in its own unique way; it appears we need to set
MOREFLAGS to include the relevant flas.

libssh is built with CMake, so you have to do special magic to set the
SDK path; do it by running cmake with the MACOSX_DEPLOYMENT_TARGET and
SDKROOT environment variables.

Change-Id: Ia588632e5047c4a8a22fe6ef3a0844cfe7722df2
Reviewed-on: https://code.wireshark.org/review/32171
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2019-02-23 19:21:46 +00:00
Michael Tuexen f548063102 Install Qt 5.12.1 by default.
Change-Id: I0d6462e6e9593198a77ccaeb6db630dffa0ae625
Reviewed-on: https://code.wireshark.org/review/32164
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2019-02-22 20:42:49 +00:00
Guy Harris 372b9657a6 Add -D_FORTIFY_SOURCE=0 for C++ if we're using it for C.
Change-Id: Ideaba2faaa7b968947f7af90b41c40a8edb4d3c2
Reviewed-on: https://code.wireshark.org/review/32160
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2019-02-22 20:36:36 +00:00
Guy Harris 1798a3f295 Set CXXFLAGS and LDFLAGS for all libraries.
If a minimum version number is specified, we need them all built with
that and with the selected SDK.

Change-Id: I84b98c67c64da12d3a3b234a41991675a71aeb82
Reviewed-on: https://code.wireshark.org/review/32156
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2019-02-22 20:26:20 +00:00
Guy Harris ce2dadda9f Get rid of extra space between environment variable settings.
Change-Id: Ie200d728f4c98f37ad71a62218b82767cef660b2
Reviewed-on: https://code.wireshark.org/review/32152
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2019-02-22 19:59:50 +00:00
Guy Harris 9342371220 Get rid of duplicate setting of CFLAGS.
Change-Id: I6f46f6827d66fec58d43195a95888c9d8adf245a
Reviewed-on: https://code.wireshark.org/review/32146
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2019-02-22 19:16:43 +00:00
Martin Mathieson ea7b7f052c ASN1: Also show root node for exports.
For now, only apply to nr-rrc.

Change-Id: I9be4bc5c3af33acad76c0a24ac04547e5f302c73
Reviewed-on: https://code.wireshark.org/review/32058
Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Pascal Quantin <pascal@wireshark.org>
Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2019-02-16 23:20:21 +00:00
Gerald Combs 403f556c30 html2text: Fix our footnotes.
Print <number>: <url> instead of <number>: <number>.

Change-Id: I55fd668c8d5870dbd43868e91f9299d5d5580b3f
Reviewed-on: https://code.wireshark.org/review/32048
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2019-02-15 20:53:00 +00:00
Peter Wu e6904308d3 travis: fold msbuild output to remain below the 10k line limit
Fold messages by overwriting the same line via a carriage return),
similar to Ninja. The full log will still contain all messages.

Change-Id: I89cc7d10147ebd21f22d40c8d2c4481b1dd2ab56
Reviewed-on: https://code.wireshark.org/review/32024
Reviewed-by: Dario Lombardo <lomato@gmail.com>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2019-02-15 10:02:01 +00:00
Peter Wu 45f55ad8ac travis: improve cache handling on Windows
The Travis casher Bash implementation for Windows has bugs. The
workarounds only slow down the build further. Given the lack of feedback
on the casher bugs from Travis CI, let's try to improve it. Hopefully
this will avoid stalls during the cache step.

The "cd .." and "cd build" hack is required due to an annoying bug:
https://travis-ci.community/t/caching-is-broken-after-directory-changes/2279

Change-Id: Iae62aa7e9ef78815d240b91199acfe21549c1af7
Reviewed-on: https://code.wireshark.org/review/32023
Reviewed-by: Dario Lombardo <lomato@gmail.com>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2019-02-15 10:01:55 +00:00
Peter Wu 0c00b1666f travis: avoid aborting the build on slow Qt installations
Periodically report the installation status to avoid aborting the
installation on slow Qt installations (possibly due to slow network?).

Change-Id: I6b8b8db49f2268d557a5ca2e7b1f08b6ea801fd9
Reviewed-on: https://code.wireshark.org/review/32022
Reviewed-by: Dario Lombardo <lomato@gmail.com>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2019-02-15 10:01:50 +00:00
Gerald Combs b658de2fa7 Rename our .asciidoc files to .adoc
As noted in "AsciiDoc Recommended Practices" at
https://asciidoctor.org/docs/asciidoc-recommended-practices/, the
AsciiDoc/Asciidoctor community seems to have settled on ".adoc" as a
file extension and that's the one preferred by the Asciidoctor project.
Update our filenames to match.

Change-Id: I2d352623d42d65d950b64310c3655b0fd177ee8c
Reviewed-on: https://code.wireshark.org/review/32037
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>
2019-02-15 05:17:26 +00:00
Gerald Combs 18b180c59a Windows: Upgrade Kerberos to 1.17-1.
Rebuild with NODEBUG=1.

Bug: 15491
Change-Id: I58764c40557c3b148c928d0460cb5d458147f52c
Reviewed-on: https://code.wireshark.org/review/31936
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2019-02-08 20:46:31 +00:00
Gerald Combs 2b52ca1890 Windows: Upgrade Kerberos to 1.17.
Recent versions of Kerberos are much easier to compile on Windows. Switch
to version 1.17, compiled with Visual Studio 2017 and linked with the
Universal CRT.

Change-Id: I393d51666cd13255ee1419f2164d7fa59fe1c5cb
Reviewed-on: https://code.wireshark.org/review/31919
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2019-02-06 20:07:27 +00:00
Gerald Combs 68efe641c8 make-version.pl: Fix version variable checks.
Use "defined" instead of checking the variable's value (which might
be zero).

Change-Id: Id24aa25971f73526761c9821846ac0abcf252978
Reviewed-on: https://code.wireshark.org/review/31882
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2019-02-04 23:21:27 +00:00
Martin Mathieson d6879b6c24 For ASN.1-based protocols, make sure protocol filter will match.
This is optional, and enabled by setting PROTO_ROOT_NAME to the name
of the item in the OPT section of the .cnf file.  For now, setting
only in nr-rrc.

Change-Id: Ibe96c7de982af0346af90bc0e095f20d1a7ac506
Reviewed-on: https://code.wireshark.org/review/31876
Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2019-02-04 18:17:25 +00:00
Pascal Quantin 32c54ef846 Windows: upgrade Npcap to 0.99-r9
Change-Id: Ie2b90a448415d7b8637aac03cee07fa9e5ab217f
Reviewed-on: https://code.wireshark.org/review/31691
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2019-01-23 14:46:38 +00:00
Pascal Quantin 362be299d0 Windows: upgrade libxml2 to 2.9.9
Change-Id: I0496974b09e9183879e2f1421e69aab06040d23a
Reviewed-on: https://code.wireshark.org/review/31585
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2019-01-18 07:38:41 +00:00
Gerald Combs e659773f8f macos-setup.sh: Bump our libxml2 version.
Libxml2 2.9.9 was recently released and fixes a couple of security
flaws.

Change-Id: I59865a35c97e05d7bf41ca9b7688c3dd89507a66
Reviewed-on: https://code.wireshark.org/review/31578
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-01-18 05:15:42 +00:00
Gerald Combs 525c5c1743 make-version.pl: Add a comment about version.h.
Note that we might want to give CMakeLists.txt the ability to generate
version.h independently.

Change-Id: I4864504790aee4c40805f5ae3584db027a2762f5
Reviewed-on: https://code.wireshark.org/review/31569
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2019-01-17 00:50:36 +00:00
Gerald Combs 1f2f253424 make-version.pl updates.
Read our major, minor, and micro versions from CMakeLists.txt.

Add the ability to set our extra version information differently if our
Git commit is tagged or untagged. Change our extra version placeholder
from "%#" to "{vcsinfo}".

Add --tagged-version-extra (-t) and --untagged-version-extra (-u)
arguments for specifying the tagged and untagged extra formats. Add
--force-extra (-f) so that we can force one format or the other.

Require the major.minor.micro version to be specified when using
--set-version (-v).

Update appveyor.yml and the Developer's Guide to match the new behavior.

Change-Id: I6e5d55470aff7e7c61e75f208e24c4105276905a
Reviewed-on: https://code.wireshark.org/review/31479
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2019-01-15 19:20:27 +00:00
Gerald Combs 7fa8215feb Windows: Use a c-ares DLL built with vcpkg.
Update the Windows build environment to use c-ares packages built from
a VS 2017 command prompt with

    set CARES_VERSION=1.15.0
    vcpkg install c-ares:x86-windows c-ares:x64-windows
    vcpkg export c-ares:x86-windows --output=c-ares-%CARES_VERSION%-win32ws --zip
    vcpkg export c-ares:x64-windows --output=c-ares-%CARES_VERSION%-win64ws --zip

The packages also include a PDB, so  copy it to the build directory and
add it to the PDB .zip.

Change-Id: I1887ca89d897bea184144315219b366096519961
Reviewed-on: https://code.wireshark.org/review/31376
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2019-01-14 21:31:08 +00:00
Peter Wu 60e32b6eb3 RPM: remove dependency on the which utility
It is not necessary to know the full path to a program. Instead use the
'type' shell builtin (part of POSIX) to detect availability.

Change-Id: Id68b298625d389a1f7843f52f56312bf81d97b80
Reviewed-on: https://code.wireshark.org/review/31540
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2019-01-14 19:01:27 +00:00
Gerald Combs 290214adc9 tarball+RPM: Fetch our version from CMake.
Move git-export-release.sh to packaging/source. Have the source and RPM
packaging derive version information from CMake's VERSION variable. This
brings them in line with the rest of our packaging and avoids having to
read chicken entrails^W^Wgit output.

Make sure we always generate wireshark.spec.

Bug: 15359
Change-Id: I188efda489c94449a10a612abebf9c2872c305cb
Reviewed-on: https://code.wireshark.org/review/31504
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2019-01-14 17:41:43 +00:00
Dario Lombardo 651a146667 tools/gitlab-ci: add missing packages for rpm builds.
Change-Id: I04e3414ff27e18db8c83581116f4099bbb696a08
Reviewed-on: https://code.wireshark.org/review/31516
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-01-13 07:14:28 +00:00
Peter Wu 5ed8360c21 travis: initial Windows support with non-interactive Qt installer
The current preview release of Windows support on Travis lacks many
packages (like Qt and Python 3) and is very much tied to git-bash
(unlike AppVeyor which has a more native Windows experience).

Several workarounds were necessary, such as reimplementing refreshenv,
setting CMAKE_PROGRAM_PATH) and setting a supported language. See also
https://travis-ci.community/t/feedback-from-windows-integration-for-a-cmake-qt-c-python-perl-project/1706

I wrote the Qt installer script originally for Qt 5.6, ported it to Qt
5.9.5 and finally updated it for 5.12, some comments could be outdated.

Duration as measured for one x64 build:
- 3m00s - restore cache (Qt and wireshark-libs)
- 2m22s - choco install
- 0m8s - pip install
- 2m20s - cmake
- 18m5s - build all
- 0m20s - build test-programs
- 5m34s - pytest -v
- 2m46s - store cache (Qt and wireshark-libs)
- (total duration about 36m)
- (installing Qt 5.12.0 from scratch would add 7m)

Cache size for extracted x64 build: wireshark-libs is 187M, Qt 604M.
(179M and 516M for 32-bit respectively.)

Change-Id: I9881ab6439e9ca99efad16a6c861862ab9d35252
Reviewed-on: https://code.wireshark.org/review/31454
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2019-01-12 21:56:47 +00:00
Gerald Combs 1243976ccd Move make-version.pl to tools.
Move make-version.pl to the tools directory.

Change-Id: I7c3ec8951a682d45d650e3fdb1580d90bf19e8b4
Reviewed-on: https://code.wireshark.org/review/31473
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>
2019-01-10 05:18:29 +00:00
Alexis La Goutte b9e8fee0e7 Add validate-clang-check script for Petri Dish
Launch clang-check -analyze for each file...

Change-Id: Ic4132d563ccaa5d375f27d08366ba6fc052f095c
Reviewed-on: https://code.wireshark.org/review/30482
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2019-01-09 05:18:43 +00:00
Jeff Morriss 6739523a02 valgrind-wireshark: default to looking in run/ for our binaries.
If33a39c26714ebe699463d1c8c67469025767efb made this change for the other
scripts.

Change-Id: I158c1c2d0b564a115443e96a6d90733c2ffff071
Reviewed-on: https://code.wireshark.org/review/31459
Petri-Dish: Jeff Morriss <jeff.morriss.ws@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-01-09 04:22:54 +00:00
Dario Lombardo 0eff9103b6 debian: add dh-python to debian deps.
Basic Ubuntu installation lacks it.

Change-Id: I208952d15bd32a7813c20625fe94656fb71ae824
Reviewed-on: https://code.wireshark.org/review/31322
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Balint Reczey <balint@balintreczey.hu>
2019-01-04 18:50:45 +00:00
Peter Wu a4dad7cb6d commit-msg: accept commit messages with backslashes
Dash (/bin/sh on Ubuntu) treats backslashes specially in an echo
command. This could fail the validate-commit.py script when '\r' or '\n'
occur anywhere in a commit message.

Change-Id: Icec2c1e8ad1b365b4326ecc6ba9667ac64866fdd
Reviewed-on: https://code.wireshark.org/review/31368
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-01-04 14:45:03 +00:00
Peter Wu 7c04036e72 Windows: use lua-unicode as built with VS 2017
These binaries were built by AppVeyor using VS 2017 (MSVC 19.16.27025.1)
and replaces locally built binaries using VS 2015 (MSVC 19.0.24215.1).
I believe that these are the same as both of them use VCRUNTIME140.dll
and import the same symbols. Using a newer compiler should however
remove any doubt of compatibility with VS 2017 and should address
concerns from Anders and Graham.

These files are actually the "msvc2017_*.zip" files from
https://github.com/Lekensteyn/lua-unicode/releases/tag/5.2.4-release1

Change-Id: Ib3fdf4678267fa10c0729f98ae0ce3153ac278a4
Reviewed-on: https://code.wireshark.org/review/31307
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-01-03 04:00:25 +00:00
Dario Lombardo 155f87f73c tools: fix trailing messages.
Change-Id: If4f213daaa27f51b1659939244945d9fdddc7772
Reviewed-on: https://code.wireshark.org/review/31309
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2019-01-02 22:19:43 +00:00
Christophe GUERBER b9473c46f7 Fix asn2wrs.py: always add BASE_VAL64_STRING
In some cases (e.g. when a field has a user defined dissection function)
the type reported for this field is a 'virtual' one and the latter is not
contained in selt.type. Consequently, BASE_VAL64_STRING is not set.

Function eth_get_type_attr should return all the attributes of a type and
it seems resonable to expect it to return the BASE_VAL64_STRING. This
will solve the above mentioned error and may solve any possible issue in
other parts that call this function.

Change-Id: Iaee9ce5bd30f2a768cfcecf628df23bf1ed54e55
Reviewed-on: https://code.wireshark.org/review/31287
Reviewed-by: Michael Mann <mmann78@netscape.net>
2019-01-01 14:59:28 +00:00
Christophe GUERBER c007afa7c2 asn2wrs.py: use BASE_VAL64_STRING and val64_string
When UINT64 contains value strings, in addition to using VALS64 to give
the list of names, the type of the structure has to be val64_string and
the display parameter has to be ORed with BASE_VAL64_STRING.

Change-Id: I0a619c91027df1eaae8209ada816f45b85d6431d
Reviewed-on: https://code.wireshark.org/review/31268
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-12-31 08:23:16 +00:00
Peter Wu cfd79b4701 Windows: Upgrade GnuTLS to 1.6.3
Upgrade to GnuTLS 3.6.3-1, using MinGW binaries from Fedora 29 packages:

    mingw64-gnutls-3.6.3-1.fc29.noarch.rpm
    mingw64-gcc-8.2.0-3.fc29.x86_64.rpm
    mingw64-gmp-6.1.2-4.fc29.noarch.rpm
    mingw64-nettle-3.4-2.fc29.noarch.rpm
    mingw64-p11-kit-0.23.7-5.fc29.noarch.rpm
    mingw64-libffi-3.1-4.fc29.noarch.rpm
    mingw64-libtasn1-4.13-3.fc29.noarch.rpm
    mingw64-winpthreads-5.0.4-2.fc29.noarch.rpm

This includes libgcc_s_seh-1.dll (64-bit, new) and libgcc_s_sjlj-1.dll
(32-bit, previously included with glib2).

Built with
https://git.lekensteyn.nl/peter/wireshark-notes/tree/windows-libs/make-gnutls-libs-zip.sh?id=b86878e458d5d7deb21218ce6598b98af4ed7ec2

The main motivation is improved PKCS #11 support:
- 3.6.0: fix potential compatibility issue with SafeNet HSMs
  https://gitlab.com/gnutls/gnutls/merge_requests/398/
- 3.6.2: gnutls_pkcs11_token_get_flags now forwards token info.
- 3.6.3: new APIs for low-level PKCS #11 token or object operations.

Change-Id: I235774e3b27f3426cb74d3d9c0ab593d06870e89
Reviewed-on: https://code.wireshark.org/review/31128
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-12-31 08:10:56 +00:00
Pascal Quantin fc90970796 asn2wrs.py: fix regression introduced by gf4b0b2109
FT_(U)INT64 are restricted to integer types only currently.
Do not use VALS64() for other types.

Change-Id: Id2299a9291c53ef246b90d732eb84811510ccb85
Reviewed-on: https://code.wireshark.org/review/31257
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2018-12-30 10:52:23 +00:00
Christophe GUERBER f4b0b21092 Fixes ASN.1 generation for VALS using 64 bits
VALS generation did not take into account the constraints on integers.
We now generate VALS if no constraints are present and VALS64 if the
interger needs 64 bits.

Change-Id: Ia044ee1ba1bd5b45554c19a458876e20110b1b7f
Reviewed-on: https://code.wireshark.org/review/31252
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-12-30 07:43:51 +00:00
Peter Wu ac58eafa32 Add support for RSA decryption using PKCS #11 tokens
Add support for loading RSA private key files from PKCS #11 tokens,
identified by PKCS #11 URIs. Add a new 'pkcs11_libs' UAT which can
dynamically load PKCS #11 provider libraries that are not found by
p11-kit.

The configuration GUI will need additional code to discover available
PKCS #11 tokens and will be added later.

This feature requires GnuTLS 3.4 with PKCS #11 support, so Windows,
macOS via Homebrew, Ubuntu 16.04, Debian Stretch. Not supported: RHEL7.
Currently macOS via official packages disables PKCS #11 support, so that
will also not work.

Change-Id: I20646bfd69c6bd13c8c2d27cb65c164a4b0b7a66
Reviewed-on: https://code.wireshark.org/review/30855
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2018-12-29 10:40:16 +00:00
Peter Wu 604aef7164 Windows: fix handling of Unicode paths in Lua
Lua internally uses ANSI C APIs (such as fopen). On many systems (macOS
and Linux for example) these work fine with UTF-8. Windows however
requires special Unicode APIs (such as _wfopen), so patch the Lua
library to interpret paths are UTF-8 and call appropriate Unicode APIs.

Changes compared to the previous LuaBinaries zip archive:

- Patched with UTF-8 support for loadfile, os.execute, etc.
- Built with VS 2015 (VCRUNTIME140.dll) instead of MinGW (MSVCRT.dll).
- Includes PDB file for lua52.dll
- Includes lua52.exe and luac52.exe with UTF-8 argv support (wmain).
- Includes build scripts, source files and README.md.
- Extra subdirectory named after the zip file.

These zip files are taken from https://github.com/Lekensteyn/lua-unicode
(the "prepared" source zips can be found here as well.)

Bug: 15118
Change-Id: I219f046d6e0fd5093287b5d6503a48ba7d1fc6a4
Reviewed-on: https://code.wireshark.org/review/31165
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-12-29 08:27:08 +00:00
Gerald Combs 855bd5bfd7 Fix AUTHORS.
Change-Id: I8d755bff9d85765ef1b24a7c875dd4a2e2284137
Reviewed-on: https://code.wireshark.org/review/31182
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-12-23 16:31:01 +00:00
Gerald Combs 272becd8ca AUTHORS: Add an acknowledgement for Npcap.
Add an acknowledgement to Insecure.com for letting us redistribute
Npcap. Nmap and Wireshark were originally granted distribution rights
via https://github.com/nmap/npcap/commit/167d4710.

While we're here, remove acknowledgements for code we no longer use.
webbrowser.c was removed in 9c5049a80b with the rest of ui/gtk and
sha1.h was removed in f1c75cf6ef when we migrated to Libgcrypt.

Change-Id: Ifb5581f8d1fd1a1b9bd5375a4e96c3ada7d8fc61
Reviewed-on: https://code.wireshark.org/review/31163
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-12-22 06:31:15 +00:00
Peter Wu e04fdf59bf tools: exclude Revert prefixes from 80 chars limit
When commits are reverted, the subject line might exceed 80 chars.
Adjust the pre-commit hook to gracefully handle a higher length and let
validate-commit.py (as used by Petri-Dish) validate the original subject
length.

Change-Id: I54f2a99f95b7fca2f683aa1e98f0349dcf4ed1b7
Reviewed-on: https://code.wireshark.org/review/31120
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-12-20 05:43:24 +00:00
Pascal Quantin 0289b315a3 Windows: upgrade Npcap to 0.99-r8
While we are at it, let's propose by default to upgrade to Npcap when WinPcap
is intalled.

Change-Id: Id9aeb3a507127b5956185fba2b74c60cf1dfdf96
Reviewed-on: https://code.wireshark.org/review/31079
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-12-18 05:18:02 +00:00
Jim Young 320bc80371 macOS: fixup qt_base_path in macos-setup.sh
Recent Qt installations include the entire 3-tuple version string
(e.g. 5.9.7) for the parent folder name directly above the clang_64
folder. Use the entire version string when constructing the
recommended build environment export statements.

Change-Id: I779d487a3b794dde57214639a79727edb111835f
Reviewed-on: https://code.wireshark.org/review/30983
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-12-13 09:34:45 +00:00
Guy Harris a34cc98b2a Put the main() and wmain() routines for CLI programs into a separate file.
That means that code is only in one place, rather than having copies of
it in each of those programs.

CLI programs that, on Windows, should get UTF-8 arguments rather than
arguments in the local code page should:

	include the top-level cli_main.h header;

	define the main function as real_main();

	be built with the top-level cli_main.c file.

On UN*X, cli_main.c has a main() program, and just passes the arguments
on to real_main().

On Windows, cli_main.c has a wmain() function that converts the UTF-16
arguments it's handed to UTF-8 arguments, using WideCharToMultiByte() so
that it doesn't use any functions other than those provided by the
system, and then calls real_main() with the argument count and UTF-8
arguments.

Change-Id: I8b11f01dbc5c63fce599d1bef9ad96cd92c3c01e
Reviewed-on: https://code.wireshark.org/review/31017
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-12-13 00:52:11 +00:00
Alexis La Goutte 0f9f9d76ce update-tx: fix typo
Change-Id: I7ba88e9f1764a8d01c3754e032de1abd940a365c
Reviewed-on: https://code.wireshark.org/review/30868
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-12-03 04:51:23 +00:00
Pascal Quantin 4adaeee0eb Win32: update the zlib 1.2.11 CMake file
- get rid of the CMP0048 deprecation warning
- fix the absolute install path (João Valverde)

Change-Id: If2353987483b17b38a43a2400b97f1446c312e28
Reviewed-on: https://code.wireshark.org/review/30886
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: João Valverde <j@v6e.pt>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2018-12-02 16:12:57 +00:00
João Valverde dd457b0878 CMake: Generate cmake target exports on Windows
CMake requires zlib to be added to the exports via epan and wiretap
targets.

Ping-Bug: 15301
Change-Id: I5cfe746e67c195eb83b1d159a2cc2a645c8c47ea
Reviewed-on: https://code.wireshark.org/review/30793
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2018-11-30 10:52:58 +00:00
Gerald Combs 2bcc8dbf26 NSIS: Install NPcap instead of WinPcap.
Install NPcap 0.99-r7 instead of WinPcap in the NSIS installer. Update
and/or remove installer text, variables, and variable names accordingly.

Change-Id: Ied36f00c2516127969894f55698e70401dfffb4f
Reviewed-on: https://code.wireshark.org/review/30829
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-11-30 06:12:23 +00:00
Peter Wu 9bc4513d5a debian-setup: accept GnuTLS 3.2.11 on Ubuntu 14.04 for Travis
Travis still uses Ubuntu 14.04 which ships with GnuTLS 3.2.11-2ubuntu1.
That package uses libgmp10 5.1.3+dfsg-1ubuntu1 which is not GPLv2+
compliant (libgmp10 6 or newer is needed), but aside from that it still
works. Drop the version requirement to enable GnuTLS with Travis builds.

Change-Id: I235f1127e4f56df3e16b5fa279f1929a1b9577f6
Reviewed-on: https://code.wireshark.org/review/30842
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2018-11-30 01:19:15 +00:00
Milan Stute 6f2ca96359 Add Apple Wireless Direct Link (AWDL) dissector
More information on Apple's proprietary AWDL protocol can be found in
  Milan Stute, David Kreitschmann, and Matthias Hollick. "One Billion Apples'
  Secret Sauce: Recipe for the Apple Wireless Direct Link Ad hoc Protocol"
  in ACM MobiCom '18. https://doi.org/10.1145/3241539.3241566

Bug: 15245
Change-Id: I5ce18125b3c957f338909e46f18e30405a3d3941
Reviewed-on: https://code.wireshark.org/review/30413
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-11-29 22:12:42 +00:00
Peter Wu bcd32b07e7 Drop support for GnuTLS 2.12.x, require GnuTLS 3.2 or newer
Upcoming changes need GnuTLS >= 3.0.2. Require GnuTLS 3.2 (or newer) for
licensing reasons. The Debian control file still mentions 3.2.14 because
older packages linked with a GMP library that was not GPLv2+ compatible.

RHEL6 only has 2.12.23, but is already unsupported anyway.

Change-Id: I024b2a734ebb16b73a624bb2435c254e963d8b7d
Reviewed-on: https://code.wireshark.org/review/30832
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-11-29 22:11:27 +00:00
Gerald Combs 246b801f83 Fixup the "No Reassembly" profile.
Fix the pattern match in make-no-reassembly-profile.py. Have it only
write changed preferences.

Change-Id: I14f23a56f9ec598930591fae9eac2f14747c55bb
Reviewed-on: https://code.wireshark.org/review/30805
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-11-27 21:43:06 +00:00
Gerald Combs 0b9810ab97 Add a "No Reassembly" profile.
Add a script that disables all of our desegmentation and reassembly
preferences and use it to create a "No Reassembly" profile.

Change-Id: Icd0b72e9e271a511e637acde9018f3aae018e589
Reviewed-on: https://code.wireshark.org/review/30799
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-11-27 04:38:15 +00:00
Peter Wu 1d9aff7740 nl80211: update fields to Linux v4.20-rc4
Fix `tools/generate-nl80211-fields.py --update` to match the output from
v2.9.0rc0-1896-g43134ae252 ("netlink-*: fix various VALS/TFS misuse").
Update to match nl80211.h from Linux v4.19-rc6-1865-g0d4e14a32dca.

Change-Id: I101146867a62f2f881752c42229a218c12d6dda7
Reviewed-on: https://code.wireshark.org/review/30794
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-11-27 04:34:19 +00:00
Peter Wu 7c2d8972de tools/validate-commit.py: enforce short summary followed by blank line
To keep git logs readable, enforce a short summary line. Strive for 80
characters, reject everything past 120. Descriptions should also stay
under 80 characters, but as error messages and links to protocol
specifications can be quite long, do not check the description.

Change-Id: Ife46b9ef6330aab015fc4ee5cc774a8ef6b9ad4e
Reviewed-on: https://code.wireshark.org/review/30667
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-11-21 04:31:13 +00:00
Peter Wu 811d5f7fac Drop JSON-GLib completely
JSON-GLib was added in v2.9.0rc0-201-g511c2e166a, but is no longer
necessary since we have a home-grown JSON dumper (wsutil/json_dumper.h).
Remove the remaining traces and additionally remove GObject from
FindGLIB2.cmake since it was only added for JSON-GLib.

Change-Id: If9dfd2c60cec130f98109d100bdb6618bde06ba0
Reviewed-on: https://code.wireshark.org/review/30733
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-11-20 05:04:11 +00:00
Gerald Combs 8788c990b5 rpm-setup.sh: We no longer use FOP or AsciiDoc.
Change-Id: I3b6e200be149d12a42604528a695aae98d310b9c
Reviewed-on: https://code.wireshark.org/review/30719
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-11-19 20:54:15 +00:00
Gerald Combs 66b9495b9e macos-setup.sh: Update library and tool versions.
Update the following versions:

CMake: 3.7.2 to 3.12.4
Qt: 5.9.5 to 5.9.7 (Current LTS)
libxml2: 2.9.4 to 2.9.7 (2.9.4 has security issues)
c-ares: 1.12.0 to 1.15.0 (1.12.0 has security issues)
libssh: 0.7.4 to 0.8.5 (0.7.4 has security issues)

Change-Id: Ia97b436981705a4d99c0b0a2f238738e18394d45
Reviewed-on: https://code.wireshark.org/review/30589
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-11-14 17:45:12 +00:00
Dario Lombardo 51a2a00b7f fix documentation and tests for cmake run directory.
Change-Id: If33a39c26714ebe699463d1c8c67469025767efb
Reviewed-on: https://code.wireshark.org/review/30581
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-11-12 12:36:26 +00:00
Gerald Combs 8c9f09bf34 macos-setup.sh: Remove unused variables and code.
Remove unused variables found by shellcheck. Remove a dead check for
10.5 (which we no longer support) which enables 32-bit builds (which we
no longer support).

Change-Id: I8f987f31025c74d27e46c7f74f514857ec8cdd3b
Reviewed-on: https://code.wireshark.org/review/30549
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-11-09 05:05:52 +00:00
Peter Wu e5cd755578 macos-setup.sh: fix Python 3 installation for OS X 10.8 and older
Change-Id: I3c5b7fa272fbef770b06430edadb8abfc688e951
Fixes: v2.9.0rc0-2460-ge9f7bb5127 ("Require Python 3, drop Python 2 support")
Reviewed-on: https://code.wireshark.org/review/30548
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Michael Tüxen <tuexen@wireshark.org>
2018-11-08 17:26:03 +00:00
Dario Lombardo 50a0a78bd0 rpm: update all rpm files for using python3.
This includes:
- tools/rpm-setup.sh
- packaging/rpm/wireshark.spec.in

Fixes: v2.9.0rc0-2460-ge9f7bb5127 ("Require Python 3, drop Python 2 support")
Change-Id: I9fb92be936dec5fdb819a54e132e64521fa95bbb
Reviewed-on: https://code.wireshark.org/review/30543
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Jeff Morriss <jeff.morriss.ws@gmail.com>
Reviewed-by: Dario Lombardo <lomato@gmail.com>
2018-11-08 15:55:20 +00:00
Peter Wu e9f7bb5127 Require Python 3, drop Python 2 support
Python 3 is widely available. All major Linux distributions support it.
RHEL is covered via EPEL (which is already required for cmake3). Drop
support for Python 2 in order to reduce maintenance costs. The main
motivation is being able to simplify the tests.

CMake is updated to search for Python >= 3.4 and will fail if
unavailable (generating dissectors.c requires Python, so it is quite an
important piece to have).

The documentation is updated to reflect the Python 3.7 paths used by
Chocolatey. Tested the git-review installation instructions in Windows 7
x64 without a previous Chocolatey installation.

macOS brew now installs Python 3 (its dependencies are already installed
by python@2 for libxml2). The macOS (non-brew variant) is updated to use
the official 64-bit installer to install Python 3.

Change-Id: I80b1e36957f338e0dad1bfcc173b6418682cddba
Reviewed-on: https://code.wireshark.org/review/30192
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-11-07 20:46:59 +00:00
Dario Lombardo 62dff7223c tools: fix LUA version and add more libs to the brew script.
brew installs lua 5.3 by default, that is not Wireshark compatible.
lua@5.1 is installed instead since lua@5.2 is not available, see
https://github.com/Homebrew/homebrew-core/issues/24409

Change-Id: I82c98bc3314e367dbdb71109887c37372f6293d2
Reviewed-on: https://code.wireshark.org/review/30494
Tested-by: Dario Lombardo <lomato@gmail.com>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Dario Lombardo <lomato@gmail.com>
2018-11-04 18:57:18 +00:00
Pascal Quantin eb5bfcf144 IEEE1609dot2: generate automatically dissector from ASN.1 description
Add basic OER support to asn2wrs.py. There is still work required as we
miss many basic functions in packet-oer.c file.

Change-Id: I3ebebdb2e9b0c90eb1dfa8885cebbb077b16f246
Reviewed-on: https://code.wireshark.org/review/30434
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-10-30 15:33:44 +00:00
Peter Wu 52d60cac72 checkAPIs.pl: fix false positive in value_string.h
check_value_string_arrays accidentally considered a part of
value_string.h as value_string definition:

    Error: epan/value_string.h                : {0, NULL} is required as the last value_string array entry: value_string array_name[]
    #define _VS_ARRAY_TYPE_NAME(array_name) const value_string array_name[]

    #define _VS_ENUM_ENTRY( name, value, string) name

Stripping all pre-processor statements (like #define) would be one way
to solve it, but at least one function checks for the presence of a
macro, so instead forbid '#' in the regex for variable name.

Change-Id: I4f47b3a42714c5bc526b0ecd8d2fb1ab076d00a2
Fixes: v2.9.0rc0-1929-g73644b3f76 ("checkAPIs.pl: speed up check_value_string_arrays and remove_if0_code")
Reviewed-on: https://code.wireshark.org/review/30391
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2018-10-26 14:28:00 +00:00
Rickard Holmberg 24fb3a14dc dcm: Generate packet-dcm.h from DICOM standard in DocBook format
This change adds a python (3) script that generates the file packet-dcm.h from
the DocBook sources of the DICOM standard. They can either be present in the
current directory where the script is run, otherwise the current version is
downloaded from the DICOM standard official website.

Change-Id: Ibc0d88e52a5960b48624f729a67a0effbb7c1005
Reviewed-on: https://code.wireshark.org/review/30338
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2018-10-22 22:07:55 +00:00
Peter Wu 9c45fbcd08 debian-setup: install GLib development headers
Previously installed as transitive dependency of libgtk2.0-dev.
Installed as transitive dependency of libjson-glib-dev since
v2.9.0rc0-201-g511c2e166a, but this is an optional package.

Change-Id: Id4b8523b2d614d273fdb71e91878d4d1a4518572
Fixes: v2.9.0rc0-310-gf23a934492 ("Don't install autotools or GTK+, but do install CMake.")
Reviewed-on: https://code.wireshark.org/review/30336
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-10-22 18:53:32 +00:00
Guy Harris 1d39055ec9 Test C compiler flags with check_c_compiler_flag(), not check_c_linker_flag().
Change-Id: If56a6acf9935838232d6ee86e331361fb076369b
Reviewed-on: https://code.wireshark.org/review/30316
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-10-21 21:21:41 +00:00
Peter Wu 9f74af24f1 lemon: fix GCC/Clang warnings pre CMake 3.11, silence VSCA warnings
The COMPILE_OPTIONS source file property was introduced with CMake 3.11,
disable warnings via a target property instead (available since 2.8.12).

Disable some VS Code Analysis warnings. These flags seem to be accepted
since VS2015, so they can be added unconditionally.

Change-Id: Idfbf154caf8c1168f1f871a640a25b816a2cfab8
Fixes: v2.9.0rc0-2274-g7ce9081fdc ("lemon: sync with upstream (2018-09-08)")
Reviewed-on: https://code.wireshark.org/review/30298
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2018-10-21 11:46:40 +00:00
Peter Wu 7ce9081fdc lemon: sync with upstream (2018-09-08)
Changes:
- Drop the old basename modification that was present in the Wireshark
  version of lemon.c. Use a new option available since 2018-04-20
  ("Add the -dDIRECTORY command-line option to LEMON.")
- Redo the static analyzer warning fixes, identifying the root causes
  and adding assertions instead of hiding code with __clang_analyzer__.
- Ignore compiler warnings instead of adding config.h, _U_, extra const
  keywords, unsigned/signed changes, etc.
- Remove lemon.html, it is out-of-date and external links are available.

In order to make future updates easier, document the exact steps that
were followed to create the lemon.c and lempar.c files. Future changes
SHOULD follow the same process.

My process to reach this updated lemon version:
1. Identify previous sync. Found v2.5.2rc0-147-g653af0f6d0 ("lemon: Sync
   with latest trunk.") which seems based on sqlite commit 2b3d584ffe.
2. Check successive Wireshark patches. Identified many non-functional
   changes to silence compiler warnings and static analyzer issues.
   Found one feature (basename) that can be replaced with upstream -d.
3. Write minimal patches and document changes.

Upstream typos and coding style issues (other than trailing whitespace)
were deliberately not fixed to remain as close as possible to upstream.

Change-Id: I606f46dede86e34520f962a9e7163912392aad57
Reviewed-on: https://code.wireshark.org/review/30290
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-10-21 07:00:05 +00:00
Peter Wu bb2caa2a9f lemon: fix memleak in ReportTable
Building without -DENABLE_ASAN=1 but with -fsanitize=address (as is done
by oss-fuzz) still triggers a memleak report. Closer inspection revealed
that two other members were leaked.

Change-Id: I3d022ac50c554891a73b9380b7879c1a60c3c798
Reviewed-on: https://code.wireshark.org/review/30289
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-10-21 06:58:32 +00:00
Jeff Morriss 5188a1a38e checkAPIs: check ett variable registrations.
Using unregistered etts leads to an abort so check for them in checkAPIs.
This does slow down checkAPIs by about 15% but it seems a reasonable cost
for the benefit.

Note that finding ett registration blocks was fairly inaccurate so we
just check for whether ett variable addresses are used - on the assumption
that if someone's using the address they're probably using it to register
the ett.

Change-Id: Ifbac75c4a8a0fdb27d9c9d1584a2de791bfbc118
Reviewed-on: https://code.wireshark.org/review/30293
Petri-Dish: Jeff Morriss <jeff.morriss.ws@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-10-21 06:57:33 +00:00
Peter Wu 7e88bb5e53 fuzzshark: integrate oss-fuzz targets in CMake
The current fuzzshark target built by CMake is not usable for fuzzing.
Address this by adding a new ENABLE_FUZZER option that enables mandatory
instrumentation and libFuzzer linking options for the fuzzshark binary.

Create more CMake targets for specific fuzzing targets such as
fuzzshark_ip and fuzzshark_ip_proto-udp. These targets are not built by
default, either build individual targets or use the all-fuzzers target.

Now these binaries are not specific to oss-fuzz, so move them to a new
directory (perhaps the corpora can be added here in the future).
oss-fuzz build.sh is simplified and reuses the CMake targets.

When OSS_FUZZ is set, it will force static linking with external
libraries and limit parallel linker jobs (maybe not necessary for
Google's oss-fuzz builders, but my 8G/6c VM ran out of memory).

Change-Id: If3ba8f60ea1f5c3bd2131223050a81f9acbce05d
Reviewed-on: https://code.wireshark.org/review/30228
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-10-20 07:00:43 +00:00
Jeff Morriss 451b93ed99 checkAPIs: use new regex to remove comments.
The new pattern is from the Perl FAQ; it works better for me than the
old code.  Of note is that it works with C++/C99-style comments
following a statement (as opposed to at the start of a line).

The new regex is only slightly slower than the old one: `make checkAPI`
goes from 3m30s of user time to 3m35s.

The big functional difference can be seen by looking at the
post-removal contents of packet-hl7.c.

Before:

    struct msh {                    // typical/default values
        char field_separator;       //
        char component_separator;   //
        char repetition_separator;  //
        char escape_character;      // &\0\0MSH\0\0';
                    if (tree) {

(With the old regex we lost a lot of code!)

After:

    struct msh {
        char field_separator;
        char component_separator;
        char repetition_separator;
        char escape_character;
        char subcomponent_separator;
        char message_type[4];
        char trigger_event[4];
    };

Change-Id: Iac35413d480cc7b05b820cb3b292f87ed30e6801
Reviewed-on: https://code.wireshark.org/review/30265
Petri-Dish: Jeff Morriss <jeff.morriss.ws@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-10-20 06:59:20 +00:00
Peter Wu 0f3a4db657 tools/validate-commit.py: post-commit hook to check for commit issues
During review we might overlook issues with the commit messages. Some
commits somehow ended up IP addresses or local VM hostnames as author
address. Automate detecting such issues as well as other whitespace
issues with the commit message itself (detected by commit-msg).

Note: when installing as post-commit hook, it will also be executed when
doing things like 'git reset --hard'.

Change-Id: Ic638e7f51d89277ac359c04764effb69eb4f2fa1
Reviewed-on: https://code.wireshark.org/review/30225
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-10-18 04:51:00 +00:00
Peter Wu ca50195f11 validate-diameter-xml.sh: do not hard-code temporary directory
In the event that validation fails, the hard-coded temporary directory
would remain present. Use of a fixed hard-coded directory also prevents
concurrent runs.

Change-Id: I29f09dc004b1ab3578b4a9c51ea7e1a5b526159f
Reviewed-on: https://code.wireshark.org/review/30231
Reviewed-by: Jeff Morriss <jeff.morriss.ws@gmail.com>
2018-10-17 15:02:42 +00:00
Peter Wu 84fd2d7968 licensecheck: fix detection of multiple licenses
licensecheck.pl: by the time the second license is evaluated, the $2
variable was already invalidated. Fix that and make it possible for
checklicenses.py to check for multiple license choices.

Change-Id: I8e9e788c33ccd64e85839c82924e28a504f6ae8f
Reviewed-on: https://code.wireshark.org/review/30223
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Dario Lombardo <lomato@gmail.com>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2018-10-16 08:25:43 +00:00
Guy Harris d2879a61bd json-glib requires GLib 2.37.6 or later.
Go for 2.37.6 for now; we may want to use a newer version.

Change-Id: Icce58716d5f7cb8367e7ff83cad070b2fcd7e1c2
Reviewed-on: https://code.wireshark.org/review/30213
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-10-14 20:09:22 +00:00
Peter Wu 189792f145 macos-setup.sh: fix missing json_glib version check
Change-Id: I3d1fecebd4cb0a7b7656cfb3342f68c4e4f929cf
Fixes: v2.9.0rc0-1933-ge9d353112e ("tools: add libjson-glib to macos-setup.")
Reviewed-on: https://code.wireshark.org/review/30196
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2018-10-14 07:21:43 +00:00
Peter Wu 1df0aca487 macos-setup.sh: fix missing bcg729 version check
Reorder spandsp for consistency with the installation steps.

Change-Id: If9ade381ef7316efb4cce0dbc6486c33d44dd9f8
Fixes: v2.5.0rc0-583-ge23e28da22 ("Add bcg729.")
Reviewed-on: https://code.wireshark.org/review/30195
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2018-10-14 07:21:03 +00:00
Gerald Combs c5d46c1986 Tools: Compress our tarball using threads.
Check to see if xz supports threads and enable them if that's the case.

Change-Id: I8a0e7100fec98e5b7d7ccd9a987f7782bf7c7512
Reviewed-on: https://code.wireshark.org/review/30137
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-10-12 05:04:45 +00:00
Peter Wu 353ad11974 checkAPIs.pl: check for return/goto in TRY/CATCH blocks
As documented in epan/exceptions.h, return/goto should never be used in
a TRY/CATCH/FINALLY block as ENDTRY must be executed first. Additionally
clamp the exit code since values larger than 255 will wrap around. Use a
small value as shells typically use 128+signal for termination signals.

Verified against packet-t125.c and ftype-protocol.c while they suffered
from the return bug. Tested against packet-gssapi.c for lack of false
positives (goto with labels within the function) and against:

    int main() {
        TRY {
            goto bar;
            goto omg;
            goto bar;
            goto barrie;
    barrie: ;
        } ENDTRY;
    bar: meh;
    }

Change-Id: I44484add34e238e07a84fc2c74b69f50ba6dc3f3
Ping-Bug: 15189
Reviewed-on: https://code.wireshark.org/review/30097
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-10-10 04:07:20 +00:00
Gerald Combs 1666d89107 Tools: Add systemd-devel to rpm-setup.sh.
Change-Id: Ib6599926146b58cff66dda978c61b6a705f7565d
Reviewed-on: https://code.wireshark.org/review/30000
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-10-03 19:33:38 +00:00
Dario Lombardo 3a0f45ea1e debian: add libsystemd-journal-dev as alternative.
Required for building on ubuntu 14.04.

Change-Id: I2ebdceb1c73d093458adc05cf38629ac0b50c9e4
Reviewed-on: https://code.wireshark.org/review/29990
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-10-03 16:39:58 +00:00
Gerald Combs 50dbe4df7f Rename packet-ssl* to packet-tls*
Rename packet-ssl{,-utils}.[ch] to packet-tls{,-utils}.[ch].

Change-Id: I4732162ec131ddf0734b3dd191ccc9e48a76ce06
Reviewed-on: https://code.wireshark.org/review/29659
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-09-25 13:24:17 +00:00
Peter Wu bf0ceafaf9 checkhf.pl: speed up find_remove_ei_defs and remove_if0_code
Remove leading spaces early such that the regex in find_remove_ei_defs
can avoid (falsely) matching every line (saves 97% for packet-rrc.c).
Copy the improved remove_if0_code from checkAPIs.pl (saves 600ms).

packet-ieee80211.c used to spend 240ms and now completes in 165ms.
packet-rrc.c used to spend 53.7s and now completes in 0.85s.

Change-Id: I6469f7c11839fab2f33c49d3c839473f1d4902d2
Reviewed-on: https://code.wireshark.org/review/29795
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-09-24 17:54:52 +00:00
Dario Lombardo e9d353112e tools: add libjson-glib to macos-setup.
Change-Id: I3cb83065da67891903559c1da1b45f772e656de9
Reviewed-on: https://code.wireshark.org/review/28946
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-09-24 04:18:42 +00:00
Peter Wu 73644b3f76 checkAPIs.pl: speed up check_value_string_arrays and remove_if0_code
The initial execution time on packet-ieee80211.c was 940ms. Optimize:
- Assume that "static const value_string ... = { ... };" does not have
  other preceding stuff (including optional whitespace). This speeds up
  check_value_string_arrays and reduces runtime by 440ms to 500ms.
- Rewrite remove_if0_code to avoid invoking a substitution for every
  line. This reduces runtime by 130ms to 370ms.

packet-rrc.c used to take 9.4s. The fixes improved it to 3.0s and 2.8s.

Change-Id: Ifc7efa447d64dccba3e211f0741099451b61b95a
Reviewed-on: https://code.wireshark.org/review/29794
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-09-24 04:03:50 +00:00
Peter Wu ed0741ffbd fix-encoding-args.pl: fix terrible performance with large files
"fix-encoding-args.pl epan/dissectors/packet-ieee80211.c" used to take
over 12 seconds to complete. After this change it is reduced to 400ms.
Profiling with Devel::NYTProf showed two issues:
- find_hf_array_entries (5 seconds): matching leading whitespace
  triggers a candidate match against every line. Fix this by removing
  whitespace prior to matching.
- fix_encoding_args_by_hf_type (7.5 seconds): executing 2131 different
  substitution patterns is slow. Fix this by grouping field names and
  execute the substitution only once afterwards (in total 6 calls).

packet-rrc.c is by far the largest file with 215k lines, this used to
take forever (321s) and now completes in 1.3s.

Regression tested by removing "ENC_ASCII" and "ENC_UTF_8" in
dissect_venue_name_info, the expected warnings are still visible.

Change-Id: I071038e8fcb56474ac41223568ce6724258c059d
Reviewed-on: https://code.wireshark.org/review/29789
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-09-22 15:44:20 +00:00
Guy Harris 731e182392 Get rid of unused variable, update a comment.
We no longer use red.libssh.org, so the file number isn't needed any
more.

Change-Id: I4cc6eb242eac51219742731cfa82a7bfe9fff2c3
Reviewed-on: https://code.wireshark.org/review/29771
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-09-21 05:28:42 +00:00
Guy Harris bc65ce1eca Try downloading libssh directly from www.libssh.org.
Downloading from red.libssh.org got "curl: (51) SSL: no alternative
certificate subject name matches target host name 'red.libssh.org'" on
my Mojave virtual machine.

Change-Id: Iab8016c4dc5200c80bff3c0cdc776bc922f4dd59
Reviewed-on: https://code.wireshark.org/review/29768
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-09-21 05:21:24 +00:00
Guy Harris 711a8596ae Update the URLs for GnuPG.
Use HTTP rather than FTP; the FTP server appears no longer to be
available.

Change-Id: I4446cc48818f419a341880da53db8670170794ae
Reviewed-on: https://code.wireshark.org/review/29765
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-09-21 04:45:27 +00:00
Peter Wu 1a63f1ca9b checkAPIs.pl: improve value_string validation in field definitions
Use of 32-bit value_string for 64-bit fields currently results in a
runtime error during use, better catch it earlier. Use of 64-bit
val64_string without BASE_VAL64_STRING will probably crash.

Since many dissectors use no macro for value_string_ext, accept both
VALS_EXT_PTR(x) and &x forms.

Change-Id: I59a3f67425e7c00bdd54cbffd91e498ee0b078cd
Reviewed-on: https://code.wireshark.org/review/29756
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-09-20 23:01:03 +00:00
Peter Wu 54f106fb9c checkAPIs.pl: recognize fields with spaces in display
Fields with display values such as "BASE_RANGE_STRING | BASE_DEC" used
to be ignored, make sure that the regex detects such fields.

Change-Id: I80d4331e3fb75092ffd768dabb85c5f13c9b5462
Reviewed-on: https://code.wireshark.org/review/29755
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-09-20 23:00:19 +00:00