Commit Graph

2975 Commits

Author SHA1 Message Date
Martin Mathieson eab62aa768 Fix some spellings. 2022-07-06 09:02:37 +01:00
David Perry aa0eeb3184 debian-setup.sh: install pytest and pytest-xdist 2022-07-06 03:35:14 +00:00
Gerald Combs 6684583c7c tools: Remove more unused variables from make-version.pl 2022-07-05 10:40:34 -05:00
Gerald Combs 218d290110 tools: Remove unused variables from make-version.pl.
It looks like repo_branch, repo_url, and repo_root have been unused
since faf5f86e7e.
2022-07-05 10:16:19 -05:00
Gerald Combs f17d39db1e CMake+tools: Clean up our build version variables.
In the top-level CMakeLists.txt, fill in PROJECT_BUILD_VERSION directly.
Clean up the WiX PRODUCT_VERSION variable.
2022-07-05 15:00:06 +00:00
Gerald Combs 7b38ff3d9d tools: Remove dead/unused code from make-version.pl.
Remove the "ugly internal SVN file hack" block from make-version.pl. It
only worked for Subversion versions prior to 1.4, which was released in
2006.

Remove the Bazaar (bzr) block. James Brown may not have sang about it,
but even so it's a Git's world.

Remove the Tortoise block. As noted in a comment, it appears to be dead
code.
2022-07-04 21:43:37 +00:00
Gerald Combs 493e65a0d8 Tools: Remove fixhf.pl.
Remove fixhf.pl. It doesn't appear to have been used since 2010, and
it's in our commit history if we ever need to restore it.
Ping #18152.
2022-06-30 15:48:41 +00:00
Moshe Kaplan cdb83a370f tools: Port make-sminmpec.pl to make-sminmpec.py
Port make-sminmpec.pl to Python.
Now uses an explicit destination path,
instead of a hardcoded path relative to
the script's location on disk.
Ping #18152
2022-06-28 21:59:53 +00:00
Moshe Kaplan 1fdbc65394 tools: Port colorfilters2js.pl to colorfilters2js.py
Port colorfilters2js.pl to Python.
Slight differences in output code formatting,
but is otherwise consistent.
Ping #18152
2022-06-28 19:05:29 +00:00
Gerald Combs eaae2d0ee7 Minor Python3 script fixups.
Make some scripts executable and use the shebang line recommended at
https://docs.python.org/3/using/unix.html#miscellaneous
2022-06-27 16:46:55 +00:00
Gerald Combs 602e87d6c5 Make sure our Python scripts read and write UTF-8.
Explicitly set "encoding='utf-8'" for each of the files we read and
write in make-reg.py and generate_authors.py.
2022-06-24 11:08:37 -07:00
Moshe Kaplan acb8158033 Tools: Port tools/generate_authors.py to Python3.
Port the script that creates AUTHORS to Python3.
Ping #18152.
2022-06-24 08:05:50 +00:00
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
Martin Mathieson 4633621c3e Some spelling fixes 2022-02-17 10:28:45 +00:00
João Valverde 8efad466c4 Tools: Fix fix-encoding-args.pl ASCII string validation
Do not require a useless ENC_NA parameter for string encodings.
FT_STRING and FT_STRINGZ types don't have any ndianness.

Follow-up to 6ec429622c.
2022-02-15 11:38:16 +00:00
João Valverde 8198dd51cd pre-commit: Add an exception to duplicate filter name check 2022-02-15 11:38:16 +00:00
Gerald Combs 8b526c61cb Tools: Improve update-tools-help's version handling. 2022-02-14 23:13:36 +00:00
Jim Young 371f98aec4 make-manuf.py: Remove HTML double quote entities 2022-02-14 23:12:56 +00:00
Gerald Combs 79da670bd1 Packaging+GitLab CI: Move debian to the packaging directory.
We keep our various packaging assets in the "packaging" directory. Move
the Debian assets there. dpkg-buildpackage doesn't seem appear to have a
"debian directory path" option, but symlinking worked in my test
container.
2022-02-13 13:21:58 -08:00
Martin Mathieson 095255481a Tidy up some masks in items. 2022-02-08 08:56:17 +00:00
ardnew 84873418da
macos-setup.sh: libtiff: refactor curl fail logic
- Rebased against master (18edc17)
2022-01-31 12:57:25 -06:00
ardnew d06e7bd0f6
macos-setup.sh: fix libtiff filename and URL
macos-setup.sh:
  - Fix filename of libtiff in existence test from "libtiff" to "tiff"
  - Added fallback URL for libtiff when the downloaded file is not a valid gzip
    archive. The host rotates older versions of libtiff into an "old"
    subdirectory, so curl downloads a 404 Web page and exits without error. Then
    the call to gzcat fails with an invalid gzip archive error. Maybe libtiff
    version should be updated instead?
2022-01-31 12:54:05 -06:00
Martin Mathieson 19ec126687 check_typed_item_calls.py - Find all (but 3) items from calls. 2022-01-29 15:54:19 +00:00
Jaap Keuter 2f6cf59ce4 CPPcheck: When we say C11 do check for C11 2022-01-28 04:31:07 +00:00
Gerald Combs 6e48f973ec Tools: Remove NPL.
Remove tools/npl. It doesn't appear to be used and hasn't had any
activity for many years. Ping #17897.
2022-01-26 17:35:58 +00:00
Martin Mathieson 89b7a1328b tools/check_typed_item_calls.py: improve detection of missing items 2022-01-25 11:43:32 +00:00
Zoran Bošnjak 63cbb2dd1e asterix: output format fix
Use HEX, DEC, HEX_DEC..., depending on item size and byte alignment.
2022-01-23 08:45:04 +00:00
Zoran Bošnjak 99ab96555a asterix: minor cleanup in decoding subitems
The "VALUE" string should not be displayed for generated subitem levels.
2022-01-23 08:45:04 +00:00
John Thacker b4e74af118 check_typed_item_calls.py: Don't match files with extra extensions
When checking is_dissector_file(), only match against files that
end in ".c" and not, e.g. ".c.swp" ".c~" or other such temporary
files that might be binary files (as with vim .swp files).

Prevents errors like "UnicodeDecodeError: 'utf-8' codec can't decode
byte 0xe4 in position 18: invalid continuation byte" with Python 3
when a dissector file is open in vim.
2022-01-23 00:00:32 +00:00
Martin Mathieson d7d2994228 check_typed_item_calls.py: fix matching of calls 2022-01-21 21:59:50 +00:00
Martin Mathieson 4720967c4a tools/check_typed_item_calls.py improvements 2022-01-19 22:32:04 +00:00
Martin Mathieson 73b94e7aef Improvements to check_typed_item_calls.py 2022-01-19 17:14:59 +00:00
Michael Tuexen 9a887cc909 macos-setup.sh: bump libssh version 2022-01-18 22:01:30 +01:00
Martin Mathieson 559df3c620 Fix some spelling errors 2022-01-15 23:11:47 +00:00
Jaap Keuter 7ad17154d4 Update USB ID list straight from the sources 2022-01-08 17:59:40 +00:00
Gerald Combs 7f5f7c8285 Tools: Remove git-review from rpm-setup. 2022-01-06 11:24:31 -08:00
Gerald Combs 11d8520f69 Tools: Add openSUSE 15.3 requirements to rpm-setup. 2022-01-06 10:36:16 -08:00
Michael Tuexen b3c24758b3 macos-setup.sh: Simplify building nghttp2 2022-01-05 20:58:32 +00:00
Gerald Combs e9bc60ace4 macos-setup.sh: Update the PCRE URL.
As noted on https://pcre.org/, ftp.pcre.org has been shut down. Switch
to SourceForge and bump the version to 8.45. Fixes #17834.
2022-01-05 17:01:23 +00:00
Alexis La Goutte a68fd7b09d macos-setup: Update nghttp2 release
there is some CVE and bug fix...
2022-01-05 10:10:38 +00:00
Jaap Keuter a4cbf047e4 Validate only real C files, not templates 2022-01-04 07:09:26 +00:00
Martin Mathieson 070cc0a47a Run dissector URLs check - fix up a couple of entries. 2022-01-03 20:01:27 +00:00
Gerald Combs 6cdb86fbc7 Tools: Be more clear that we're matching the BSD 1-Clause license. 2022-01-01 15:25:21 -08:00
Moshe Kaplan 67f05835ca Fix more repeated words throughout
Fixes more repeated words seen throughout
the code base.
2021-12-31 22:50:40 +00:00
João Valverde a20f3649e8 arch-setup: Update requirements for user guides 2021-12-31 02:11:53 +00:00
j.novak@netsystem.cz 6c9cb8f3fa Prefs/Extcap: Added support for password which is never stored on the disk 2021-12-30 16:03:15 +00:00
Jaap Keuter fb48954f26 Update model list based on libgphoto2 repo dated 27 dec 2021 2021-12-28 13:28:44 +00:00
Moshe Kaplan 69d54d6f8e Corrects repeated words throughout the code.
Repeated words were found with:
egrep "(\b[a-zA-Z]+) +\1\b" . -Ir
and then manually reviewed.
Non-displayed strings (e.g., in comments)
were also corrected, to ease future review.
2021-12-22 11:01:11 +00:00
Anders Broman b5928542b7 Ignore packet-PROTOABBREV.c 2021-12-22 11:18:07 +01:00
Georg Sauthoff e273006a1d Add ETI/EOBI order flow/market data dissectors
The Enhanced Trading Interface (ETI) protocol and the Enhanced
Order Book Interface (EOBI) protocol are used by a few European
exchanges such as Eurex, Xetra and Börse Frankfurt.

Basically, a trader uses ETI to communicate with a matching
engine (over TCP), e.g. to add a new order, modify an existing
one, etc. while the matching engine also publicizes the current
state of the order book via EOBI over multicast UDP feeds.

ETI actually consists of two variants, i.e. ETI for derivatives
markets (such as Eurex) and ETI for cash markets (such as Xetra).
A common convention is to abbreviate them as ETI (for
derivatives) and XTI (for cash).

These protocols share the same encoding, i.e. messages start with
a length and a tag field and most messages and fields are fixed
size. See also
https://github.com/gsauthof/python-eti#protocol-introduction for
some more details.

The protocol specifications are openly available (cf.
https://github.com/gsauthof/python-eti#protocol-descriptions for
direct links) in human and machine-readable (XML) formats.

The Wireshark ETI/XTI/EOBI dissectors are code-generated by
`eti2wireshark.py`
(https://github.com/gsauthof/python-eti/blob/master/eti2wireshark.py)
which is GPL licensed. See also
https://github.com/gsauthof/python-eti#wireshark-protocol-dissectors
for usage examples and related work.
2021-12-21 08:10:43 +00:00
João Valverde 0ccd69e530 Replace g_strdup_printf() with ws_strdup_printf()
Use macros from inttypes.h.
2021-12-19 21:21:58 +00:00
João Valverde f984def50c Add g_snprintf() to checkAPIs 2021-12-19 21:04:49 +00:00
João Valverde fe5248717f Replace g_snprintf() with snprintf()
Use macros from inttypes.h with format strings.
2021-12-19 20:06:13 +00:00
João Valverde e0dba4854b Exclude wmem_test.c from pre-commit 2021-12-18 20:13:41 +00:00
Martin Mathieson bf15343241 Fix some spelling errors 2021-12-15 12:28:16 +00:00
Guy Harris ff7a5c87e9 macos-setup.sh: don't build libxml2 with Python.
At least on Monterey, with Xcode 13.1, the linker whines that we weren't
granted the Sacred and Holy Right to link with the Python 2.7 framework.
As far as I know, we have no need to use that framework, so configure it
out.
2021-12-13 14:41:13 -08:00
Federico Di Pierro 6b1657d85d tools: updated generate-sysdig-event python script.
Point it to fetch files from falcosecurity/libs repo.
Moreover, add support for blank spaces in param names.

Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
2021-12-13 14:30:30 +00:00
João Valverde f52611de89 Remove obsolete macro HFI_DECLS 2021-12-12 13:24:51 +00:00
João Valverde 6ec429622c fix-encoding-args.pl: Strings ftypes don't need "ENC_NA" 2021-12-12 13:24:44 +00:00
João Valverde 04d25fb64c fix-encoding-args.pl: Remove dead code 2021-12-12 13:12:56 +00:00
Moshe Kaplan 7567432ec4 Add remaining header files to Doxygen
Add @file markers for remaining
header files so that Doxygen will
generate documentation for them.
2021-12-12 03:56:35 +00:00
João Valverde e67ce21f81 Netlink nl80211: Convert to normal proto tree API 2021-12-11 16:32:33 +00:00
João Valverde d2a9cb940a epan: Remove new proto tree API
Remove experimental new API.

Fix Netlink dissector to compile with normal proto tree API.

Closes #17774.
2021-12-10 14:37:01 +00:00
Pascal Quantin cd752deeac Windows: upgrade Npcap to 1.60 2021-12-09 22:41:07 +01:00
João Valverde f196595e1d Tools: Remove convert-proto-tree-new.awk 2021-12-08 21:12:37 +00:00
John Thacker 7e99bbf32b BER: Make GeneralizedTime a FT_ABSOLUTE_TIME
Since we now support ISO 8601 Basic format, have asn2wrs.py
convert GeneralizedTime fields in BER to FT_ABSOLUTE_TIMEs and use
the new common code to convert them. This means that the fields
can be compared with other time fields in filters, etc.
2021-12-02 20:40:22 -05:00
Martin Mathieson e11cdf2f46 Fix some spelling errors 2021-11-29 17:46:16 +00:00
João Valverde 01a95db9b7 epan: Add binary search to introspection API 2021-11-27 14:31:53 +00:00
João Valverde 6fab4cbeff epan: Add introspection API to export some constants
C is notoriously difficult to bind from other languages
without additional metadata. The C ABI does not include
enums and macros that are an essential component of the
API.

To make Wireshark instrospectable and more binding friendly
include an introspection API to export enums and integer macros.

To avoid the tedious need to manually keep the code up to date
it uses the excellent pyclibrary python package to automatically
parse C headers and extract this data.

This is not a process that should be done automatically during
the build.

This could be used for example to replace most of the wslua
make-init-lua.pl perl script, which tries to do the same thing
using regular expressions.

Besides the downside of using Perl using regular expressions
is inferior to pyclibrary in 2 ways: 1) pyclibrary understands
most of C99 grammar so it is much more powerful; 2) pyclibrary
has a specific API to extract "values" (enums and constants)
automagically. We just need to take care to use only integer
values, for our purposes.
2021-11-26 20:38:42 +00:00
Gerald Combs 0385e7448a Tools: Add our branch name to fuzz error reports. 2021-11-25 11:41:12 -08:00
Martin Mathieson 263189e23d Fix some spelling errors. 2021-11-18 04:43:51 +00:00
Joerg Mayer d52478436d macos-setup.sh: Update some tools
- Cmake to 3.21.4
- Sparkle to 1.27.0
- Asciidoctor to 2.0.16
- AsciidoctorPdf to 1.6.1
2021-11-17 16:18:50 +00:00
Jaap Keuter 5f7806a496 c-ares: move domain from haxx.se to its own .org
With c-ares release 1.18.0 the URLs were updated to c-ares.org.
Let's do the same.
2021-11-16 17:02:50 +00:00
João Valverde 4403bd98d9 tools: Add MSYS2 setup script to install dependencies 2021-11-15 12:24:49 +00:00
João Valverde df968b5342 tools: Add Arch Linux setup script to install dependencies
This was intentionally kept simple (matches the philosophy of Arch).

In particular I wasn't so concerned about what is a required build
dependency and what is an optional build dependency to compile the
programs. I don't know why one would ever wish to skip installation
of non-essential library dependencies. But others are very welcome
to extend this intentionally barebones effort.

The script also adds an "--install-all" flag to install everything
at once. I keep forgetting the name of the other options.

I used the build optional flag to install packages required to build
documentation and so on. Ancillary stuff.
2021-11-15 11:25:29 +00:00
Gerald Combs e5088eea4a Tools: Fix a typo in win-setup.ps1. 2021-11-15 01:24:08 +00:00
João Valverde ed8a02af17 dfilter: Add support for PCRE2
PCRE2 is the future of PCRE. The only advantage of GRegex is that
it comes bundled with GLib, which is not an advantage at all.
PCRE2 is widely available, the GRegex abstractions layer are not a
good fit and abstract things that don't need abstracting or that we
could handle better ourselves, there are open bugs (#12997) and
maintenance is spotty at best.

GRegex comes with many of the problems of bundled code, aggravated by
the fact that it completely falls outside of our control.
2021-11-14 21:00:59 +00:00
Michael Tuexen 6587debb3b tools: building pcre2 requires cmake.
So move it after cmake...
2021-11-14 20:57:29 +01:00
Michael Tuexen 2d7bc59fae tools: actually call install_pcre2 in macos-setup.sh 2021-11-14 19:35:33 +01:00
Gerald Combs d8429d2065 Tools: Add PCRE2 to our setup scripts.
Add PCRE2 to the base package list in our various setup scripts.
2021-11-14 17:53:36 +00:00
Gerald Combs a99e1b2099 Tools: Switch a bunch of macos-setup URLs to HTTPS. 2021-11-12 21:25:48 +00:00
João Valverde 1a32a75a62 ftypes: Internal headers need to be internal
The header ftypes-int.h should not be used outside of epan/ftypes
because it is a private header.

The functions fvalue_free() and fvalue_cleanup() need not and should
not be macros either.
2021-11-11 03:15:31 +00:00
Gerald Combs 37f1cf1a92 Tools: Let jq escape backslashes in gen-bugnote. 2021-11-11 02:41:32 +00:00
Роман Донченко 4c75a78f26 Refactor generate_authors.pl to remove the text duplicated from AUTHORS.src
Now the script just copies the corresponding sections from AUTHORS.src.
2021-11-10 23:59:21 +00:00
Роман Донченко 614c64b3b5 Synchronize the acknowledgements between AUTHORS.src and generate_authors.pl
Note that the Henrik Brix Andersen and Christophe Devine acknowledgements
were deliberately removed in 272becd8.
2021-11-10 23:59:21 +00:00
Роман Донченко b95be90d27 tools/generate_authors.pl: simplify repeated I/O code
By using the `open` pragma and `say` function, we can get Perl to do the
encoding, decoding and line termination for us.
2021-11-10 23:59:20 +00:00
Stig Bjørlykke f314b64fd0 Skinny: Fix arguments in parser
Remove a duplicated argument to fix a warning:

  Wrong number of arguments for string format.
  Format ptvcursor_add(cursor, hf_skinny_%s, 6, ENC_NA);
  takes 1, but 2 are provided.
2021-11-09 13:32:50 +00:00
Stig Bjørlykke ebb2df7a06 asn2wrs: Fix Type eth_type_default_body() arguments
Add tname as argument to Type eth_type_default_body() to fix a warning.

  Call to method Type.eth_type_default_body with too many arguments;
  should be no more than 1.
2021-11-09 13:17:39 +00:00
Zoran Bošnjak 1427a25cd1 asterix: update script adjusted
Asterix update script is modified, to support automatic operation
(weekly updates).
2021-11-03 19:01:34 +00:00
Gerald Combs 85b99c18d9 Tools: make-pci-ids fixups.
Add ID count sanity checks and make sure we don't update pci-ids.c
unless the checks pass. Fix a bunch of Pylint warnings. Strip leading
whitespace from our output strings.
2021-11-02 17:20:24 +00:00
Gerald Combs 51c714bfb5 Tools: Fetch IANA data over HTTPS. 2021-11-02 16:46:18 +00:00
Gerald Combs 274a29f389 Tools: Fixup our fuzz test error header.
Move the error header output to a group command.
2021-11-01 17:02:52 +00:00
Gerald Combs f9d0f35363 Tools: Fix a make-manuf error and some Pylint warnings. 2021-10-31 16:04:00 -07:00
Jirka Novak cbb35809ba Skinny: Resynced Skinny xml definition with code
I found that SkinnyProtocolOptimized.xml and packet-skinny.c.in are not in
sync with packet-skinny.c. Obviously packet-skinny.c file was modified
multiple times manually.
I made changes:
- synced all typos fixed in packet-skinny.c to SkinnyProtocolOptimized.xml
- improved parse_xml2skinny_dissector.py to be able to generate
  additional information to flow sequence
- updated SkinnyProtocolOptimized.xml to mark where to generate
  additional information

If fact the outcome is just refactoring of original code.
2021-10-31 17:19:33 +01:00
Zoran Bošnjak eda95fd016 asterix: Change `wmem_packet_scope()` to `pinfo->pool`
Fixes #17696.

Sync with asterix-specs #797e576298
2021-10-30 15:35:12 +02:00
Zoran Bošnjak 16779dc43e asterix: Dissector automatic update from spec files
Asterix data format is a complex family of asterix categories,
where each individual category exists in multiple editions.
As a result of many variants, the epan/dissectors/packet-asterix.c
is one of the largest dissectors.

So far, the asterix dissector had been maintained manually, where the
generic decoding routines and category/edition specific definitions
were entangled in the same file (packet-asterix.c).

This commit preserves the overall dissector structure, but makes
it easy to update the dissector with new categories or editions as
they become available (via the update script from this commit).
See tools/asterix/README.md file for dissector update procedure.

This commit includes:

- tools/asterix/packet-asterix-template.c
  Extraction of generic asterix decoding routines and
  common data structures.

- tools/asterix/update-specs.py
  Update script, to render the template with up-to-date asterix
  specs files. The asterix specs files themselves are maintained in
  a separate repository.

- epan/dissectors/packet-asterix.c
  Automatically generated dissector for asterix data format.
  Although generated, this file needs to remain in the repository,
  to be able to build the project in a reproducible way.

The generated asterix dissector was additionally tested with:

- ./tools/check_typed_item_calls.py --mask
- ./tools/fuzz-test.sh

Sync with asterix-specs #cef694825c
2021-10-30 06:12:59 +00:00
Gerald Combs 8df628f5a0 Tools: Don't check Markdown file licenses.
Remove ".md" and ".markdown" from the default extension list in
licensecheck.pl, and remove CONTRIBUTING.md from checklicenses.py.
2021-10-28 13:42:14 -07:00
Gerald Combs 24b8942a90 GitLab CI+tools: Fuzz test updates.
Make sure we install the llvm package, which includes llvm-symbolizer.
Add the current branch and CI job information to the error report.
2021-10-28 11:20:25 -07:00
Brian Sipos 1120f545d3 CBOR: Avoid infinite loop when sequence has not-well-formed data
This fixes a defect in the original MR !4752 adding cbor sequence dissecting.
2021-10-26 12:18:13 +00:00
Gerald Combs a281afd9fa Tools: Add a plugin check to make-no-reassembly-profile.py.
Some of our plugins have reassembly preferences, so make sure we can
load them before creating the No Reassembly profile.
2021-10-25 11:50:06 -07:00
Brian Sipos c79e35d45c CBOR: Show and return actual dissected length 2021-10-24 07:28:38 +00:00