Commit Graph

2863 Commits

Author SHA1 Message Date
João Valverde ef581f230f fix-encoding-args: Remove a string check
ENC_NA should not be used because it is unnecessary and
adds no information but since it is just a matter of style and
a lot of code is using it be more lax and ignore that case.
2022-06-09 20:27:26 +00:00
João Valverde eafcd7f97c fix-encoding-args: Revert a change
ENC_ASCII should be invalid for this case so add back the fix.
2022-06-09 20:27:26 +00:00
João Valverde 104cc42008 Make it easier to call tools/make-enums.py from the source dir 2022-06-07 14:31:08 +01:00
Uli Heilmeier 083c6828f5 EOBI: Disable dissector by default
The EOBI dissector has no heuristic and is using several nonstandardized
high ports. Therefore disabling it by default.

Fixes #18103
2022-05-27 19:04:59 +00:00
Gerald Combs 370c58f913 macOS: Add Logwolf packaging targets.
Rename the following build targets:

app_bundle to wireshark_app_bundle
dmg_package_prep to wireshark_dmg_prep
dmg_package to wireshark_dmg

Add logwolf_app_bundle, logwolf_dmg_prep, and logwolf_dmg targets and
packaging assets. Update the documentation.

We need to add a set of Logwolf version variables to CMake and
make-version.pl. Add a static logwolf-version attribute to
attributes.adoc in the mean time.
2022-05-26 20:29:20 +00:00
Gerald Combs 5373483963 Tools: Add a CMakeExecutable parameter to win-setup.ps1.
52054046c1 switched archive extraction from 7Zip to CMake. This removed
a dependency on 7Zip, but assumed that CMake was in our PATH.  Add a
CMakeExecutable to win-setup.ps1 and use it in CMakeLists.txt to pass
the value of CMAKE_COMMAND.
2022-05-26 20:13:18 +00:00
Gerald Combs 286aec2436 Tools: Clean up win-setup.ps1's CleanupItems
Remove some items from CleanupItems that are no longer relevant.
2022-05-24 18:15:00 +00:00
Gerald Combs f065fdbc63 Windows: Upgrade zstd to 1.5.2. 2022-05-24 17:51:31 +00:00
Gerald Combs e5fc7c1d83 Tools: Switch to a new Windows development library repository.
Download our third party libraries and drivers from dev-libs.wireshark.org
in win-setup.ps1. Automatically check our state based on our library
filenames and hashes instead of a manually updated tag.
2022-05-24 16:53:49 +00:00
Gerald Combs 2f0b5ab2cb Tools: Remove 32-bit support from win-setup.ps1. 2022-05-22 15:46:13 +00:00
Martin Mathieson 17367e4648 check_typed_item_calls: skip mask checks if can't parse 2022-05-21 19:54:13 +00:00
Martin Mathieson 3e117ed788 check_spelling: Recognise epan/pci-ids.c as generated 2022-05-19 10:29:46 +01:00
Gerald Combs 6c612bf251 Tools: Don't validate file_util.c.
It's Windows-only.
2022-05-16 10:13:23 -07:00
Gerald Combs 52054046c1 Tools: Unzip using CMake in win-setup.ps1.
Use `CMake -E tar xf` to unzip files in win-setup.ps1. This seems to be
the most reliable and reasonably fast common denominator for unzipping
files. Update our comments. Fixes #17756.
2022-05-16 00:08:58 +00:00
Gerald Combs 5a48815fb4 Fuzz: Fix our elapsed times.
We use SECONDS in multiple places, so don't reset it.

[skip ci]
2022-05-05 09:58:16 -07:00
Gerald Combs 4fa373400f Tools: Add trailing periods to our bug notes if needed.
[skip ci]
2022-05-04 10:39:18 -07:00
Gerald Combs e8bcaad686 Tools: Show elapsed time when fuzzing. 2022-05-02 22:38:31 +00:00
Gerald Combs 3b6734389d tools: Show recent commits in fuzz output.
Show commits from the past 48 hours instead of the most recent commit.
2022-05-02 11:17:24 -07:00
Gerald Combs 0cce93d76a Tools: Fix make-no-reassembly-profile.py.
Update our path to match fc2cc05dde.

[skip ci]
2022-05-01 09:50:40 -07:00
Gerald Combs 76660922e1 Tools: Add a timestamp to our fuzz test error header.
Print the UTC date and time.
2022-04-29 17:01:40 -07:00
Gerald Combs b104af1c7d Tools: Update our fuzz test error header.
Add the GitLab job URL and reorder other items.
2022-04-27 21:45:09 +00:00
Gerald Combs b53d349583 Tools: Only validate a file if we have a build rule for it.
In validate-clang-check.sh, only check files that have rules in
compile_commands.json or build.ninja.
2022-04-26 09:35:38 -07:00
Martin Mathieson 35cc7f43ab Spelling script: minor improvements and more dict words 2022-04-25 08:57:43 +00:00
Gerald Combs 968f40d373 Tools: Handle table rows and admonition titles in html2text. 2022-04-24 23:59:48 +00:00
John Thacker 9c115d0ed5 macos-setup: Require Qt 5.9 or later and macOS 10.10 or later
The minimum required version of Qt is now 5.9, and thus the
minimum required version of macOS is 10.10 (Yosemite). Update
that in macos-setup, and remove various version checks and older
packages needed for Mountain Lion and Mavericks.

Also update the default version of Qt installed to 5.12.12, the
last release in the Qt 5.12 LTS series (and the last version with
an offline installer.)
2022-04-20 19:44:29 -04:00
Gerald Combs 21d8522334 Tools: Update the Sparkle version in macos-setup.sh.
[skip ci]
2022-04-20 21:50:28 +00:00
Gerald Combs f6061c4a3c Tools: Fix our pacman arguments in arch-setup.sh.
Add back the -u / --sysupgrade flag.
2022-04-19 21:06:24 +00:00
Pascal Quantin 5c7c723feb LPP: upgrade dissector to v16.8.0 2022-04-19 10:05:41 +02:00
naesten c8d9c6fc6a Fix tools/*-setup.sh to work with no arguments
They were checking for --help in an unusual manner that failed when
run with no arguments.

I've checked that --help works for each script, and that debian-setup.sh
actually works.

NOTE: bsd-setup.sh and rpm-setup.sh seem to have sometimes-broken
formatting, because they try to pass escape sequences to echo, which
POSIX says is implementation-defined (except on XSI-conformant systems).

These changes were mostly made using the following script, with a
manual fix in bsd-setup.sh because it isn't using "switch case".

```python
#!/bin/env python3

import sys
import re

usage_p = re.compile(r'^if \[ "\$1" = "--help" \]\nthen\n((?:\t(?:printf|echo) .*\n)*)\texit 1\nfi$',
                     re.MULTILINE)

case_p = re.compile(r'(^\tcase \$arg in$)',
                    re.MULTILINE)

root_check_p = re.compile(r'(\n# Check if the user is root(?:\n|.)*?fi\n)',
                          re.MULTILINE)

done_p = re.compile(r'(^done\n)',
                    re.MULTILINE)

def fix_setup(name: str):
    assert name.endswith('-setup.sh')

    with open(name, 'r') as fin:
        s = fin.read()

    s = usage_p.sub(r'function print_usage() {\n\1}', s)
    s = case_p.sub(r'''\1
\t\t--help)
\t\t\tprint_usage
\t\t\texit 0
\t\t\t;;''', s)

    m1 = root_check_p.search(s)
    if m1:
        root_check = m1[0]
        s = root_check_p.sub('', s)
        pos = done_p.search(s).end()  # type: ignore[union-attr]
        s = s[:pos] + root_check + s[pos:]

    with open(name, 'w') as fout:
        fout.write(s)

if __name__ == '__main__':
    for name in sys.argv[1:]:
        fix_setup(name)
```
2022-04-18 17:05:03 +00:00
Martin Mathieson 24d65950e9 check_typed_item_calls: Count all warnings 2022-04-17 22:47:09 +00:00
Gerald Combs 6900065f2d Tools: Make the Alpine and Arch setup scripts more strict.
Make sure alpine-setup.sh and arch-setup.sh fail with a nonzero status
similar to debian-setup.sh and rpm-setup.sh.
2022-04-17 11:04:02 -07:00
Gerald Combs 05c86efcf6 Tools: Set a variable in rpm-setup.sh.
[skip ci]
2022-04-17 17:41:46 +00:00
Gerald Combs bd6ee4479f Tools: Make the Debian and RPM setup scripts more strict.
We use debian-setup.sh and rpm-setup.sh to build the containers in
https://gitlab.com/wireshark/wireshark-containers/. Make sure they fail
with a nonzero exit status, otherwise we might end up with an invalid
container image.

Make sure OPTIONS is defined in all of the setup scripts that use it.
2022-04-10 16:05:42 -07:00
Dylan Ulis 3890d822ba macOS Homebrew: Install PCRE2 2022-04-10 22:09:55 +00:00
Roman Schmitz 545553e203 Update tools/macos-setup-brew.sh 2022-04-07 23:27:08 +00:00
Kenrick Trip cb1b4fb966 Allow building with Qt without Xcode on macOS 2022-04-05 10:31:39 +00:00
Dylan Ulis df5941d467 debian: add ccache to additional_list packages 2022-04-02 17:39:08 +00:00
João Valverde 2a9cb588aa dfilter: Add binary arithmetic (add/subtract)
Add support for display filter binary addition and subtraction.

The grammar is intentionally kept simple for now. The use case
is to add a constant to a protocol field, or (maybe) add two
fields in an expression.

We use signed arithmetic with unsigned numbers, checking for
overflow and casting where necessary to do the conversion.
We could legitimately opt to use traditional modular arithmetic
instead (like C) and if it turns out that that is more useful for
some reason we may want to in the future.

Fixes #15504.
2022-03-31 11:27:34 +01:00
Richard Sharpe e6487fcdf4 tools/radiotap-gen: Fix build issue on some versions of Ubuntu. 2022-03-20 17:38:40 +00:00
Jaap Keuter 096bc367b6 Align plugin reg function search with epan reg function search 2022-03-18 21:01:40 +00:00
Richard Sharpe 4099137ad1 tools/radiotap-gen: Add a sample program for generation radiotap headers.
This program generates complete pcap files containing the proposed U-SIG
radiotap TLVs along with enough else to make it readable. You cannot currently
read such packets with tshark or wireshark until I add U-SIG handling to
Wireshark.
2022-03-18 17:07:33 +00:00
Gerald Combs 87ff577257 Move Freedesktop files to resources/freedesktop. 2022-03-12 00:19:13 +00:00
Gerald Combs 492a11a256 Move a bunch of protocol resources to resources/protocols.
Move the following directories to resources/protocols:

- dtds
- diameter
- protobuf
- radius
- tpncp
- wimaxasncp
2022-03-11 18:34:41 +00:00
Adrian Granados 8622c92a75 extcap: new interface, wifidump, to capture Wi-Fi frames using a remote SSH host 2022-03-09 08:01:39 +00:00
Gerald Combs e482b375f2 Rename the "image" directory to "resources".
The "image" directory contains resource compiler assets and other
application resources, so name it "resources."
2022-03-09 02:07:51 +00:00
Jaap Keuter b2eb476764 Tools: add script to check help URLs vs. available User's Guide chapters 2022-03-07 08:04:08 +00:00
Zoran Bošnjak 85cf859995 asterix: Sync with asterix-specs #4df694c69c
Windows build warning fix.
2022-02-25 08:30:46 +00:00
Zoran Bošnjak 86c14aed44 asterix: long items fix
Do not use FT_UNIT for very long items.

Sync with asterix-specs #e603aaae8a
2022-02-25 08:30:46 +00:00
Zoran Bošnjak 8993d69335 asterix: python to generated C string fix
Some characters (in particular double quotation mark) require escaping
during automatic dissector generation.

Fixes problem from merge request 6256.
2022-02-22 09:30:19 +00:00
Martin Mathieson 55d3a9db9e tools/check_*.py: allow multiple --file entries 2022-02-20 23:12:10 +00:00