Commit Graph

2974 Commits

Author SHA1 Message Date
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
Gerald Combs 15536d71ef Tools: Fix some fuzzing logic.
Fix a conditional that was inadvertently inverted in d7bdd77a4c.
2021-10-22 20:19:13 +00:00
Martin Mathieson c983a219e3 Autosar IPDU Multiplexer: make some functions static
Also fix up check_static.py - dissectors.c.o has moved.wq
2021-10-22 17:50:21 +01:00
Martin Mathieson 54ac7b4424 Fix some spelling errors 2021-10-20 10:00:12 +01:00
Martin Mathieson a5df18e51e Fix some spelling errors 2021-10-11 04:44:49 +00:00
Gerald Combs 51e1381b23 Tools: Quote some elements in html2text.
Quote <code> spans with backticks and <span class=menuseq> spans with
double quotes.
2021-10-10 13:47:45 +00:00
Martin Mathieson ef2468662b check_typed_item_calls.py: Flag bits set outside mask
Current errors are:
Error: epan/dissectors/packet-asterix.c filter= asterix.021_161_TN 0x0fff with len is 4 but type FT_UINT8  indicates max of 2 and extra digits are non-zero (0f)
Error: epan/dissectors/packet-capwap.c filter= capwap.control.message_element.ieee80211_station_session_key.flags_a 0x2000 with len is 4 but type FT_BOOLEAN  indicates max of 1 and extra digits are non-zero (200)
Error: epan/dissectors/packet-capwap.c filter= capwap.control.message_element.ieee80211_station_session_key.flags_c 0x1000 with len is 4 but type FT_BOOLEAN  indicates max of 1 and extra digits are non-zero (100)
Error: epan/dissectors/packet-cfdp.c filter= cfdp.trans_stat_2_b 0x6000 with len is 4 but type FT_UINT8  indicates max of 2 and extra digits are non-zero (60)
Error: epan/dissectors/packet-cfdp.c filter= cfdp.suspension_ind_b 0x8000 with len is 4 but type FT_UINT8  indicates max of 2 and extra digits are non-zero (80)
Error: epan/dissectors/packet-ixveriwave.c filter= ixveriwave.tx.factorydebug 0x7f80 with len is 4 but type FT_UINT8  indicates max of 2 and extra digits are non-zero (7f)
Error: epan/dissectors/packet-opa-snc.c filter= opa.snc.rhf.eccerr 0x200000000 with len is 9 but type FT_BOOLEAN  indicates max of 8 and extra digits are non-zero (2)
Error: plugins/epan/ethercat/packet-ethercat-datagram.c filter= ecat.reg.ctrlstat.rdacc 0x0100 with len is 4 but type FT_BOOLEAN  indicates max of 2 and extra digits are non-zero (01)
Error: plugins/epan/ethercat/packet-ethercat-datagram.c filter= ecat.reg.ctrlstat.wracc 0x0200 with len is 4 but type FT_BOOLEAN  indicates max of 2 and extra digits are non-zero (02)
Error: plugins/epan/ethercat/packet-ethercat-datagram.c filter= ecat.reg.ctrlstat.reloadacc 0x0400 with len is 4 but type FT_BOOLEAN  indicates max of 2 and extra digits are non-zero (04)
Error: plugins/epan/ethercat/packet-ethercat-datagram.c filter= ecat.reg.ctrlstat.crcerr 0x0800 with len is 4 but type FT_BOOLEAN  indicates max of 2 and extra digits are non-zero (08)
Error: plugins/epan/ethercat/packet-ethercat-datagram.c filter= ecat.reg.ctrlstat.lderr 0x1000 with len is 4 but type FT_BOOLEAN  indicates max of 2 and extra digits are non-zero (10)
Error: plugins/epan/ethercat/packet-ethercat-datagram.c filter= ecat.reg.ctrlstat.cmderr 0x2000 with len is 4 but type FT_BOOLEAN  indicates max of 2 and extra digits are non-zero (20)
Error: plugins/epan/ethercat/packet-ethercat-datagram.c filter= ecat.reg.ctrlstat.wrerr 0x4000 with len is 4 but type FT_BOOLEAN  indicates max of 2 and extra digits are non-zero (40)
Error: plugins/epan/ethercat/packet-ethercat-datagram.c filter= ecat.reg.ctrlstat.busy 0x8000 with len is 4 but type FT_BOOLEAN  indicates max of 2 and extra digits are non-zero (80)
2021-10-04 18:07:28 +00:00
Gerald Combs 7f47511653 Try to fix RPM packaging.
Asciidoctor is now required for packaging. Try to make sure it's
installed on CentOS 8 and openSUSE 15.2. Note that CentOS 8 doesn't have
an Asciidoctor package, which complicates our SPEC.
2021-10-01 18:26:24 +00:00
Gerald Combs 84ab55cf75 Docs+Packaging: Convert our man pages to Asciidoctor.
Convert doc/*.pod to Asciidoctor. This:

* Means we use the same markup for our man pages, the guides, and
  release notes.
* Lets us add versions to our man pages.
* Gives us more formatting options, e.g. AsciiDoc supports `commands`,
  nested lists and makes it easy to include version information. The
  manpage backend doesn't seem to support tables very well,
  unfortunately.

Convert our CMake configuration to produce *roff and html man pages
using Asciidoctor. Add a "manarg" block macro which makes our synopses
wrap correctly.

Similar to the release notes, guides, and FAQ, if Asciidoctor isn't
found the man pages won't be generated or installed.

Move Asciidoctor to the list of package build dependencies in various
places.

This commit includes the conversion script (pod2adoc.py), which will be
removed later.

Line count sanity check:

Man page         .pod .adoc
androiddump       260  280
asn2deb            93  105
capinfos          401  471
captype            54   55
ciscodump         241  269
dftest             42   42
dpauxmon          153  169
dumpcap           464  534
editcap           528  583
etwdump           136  156
extcap            157  181
idl2deb            91  103
idl2wrs           120  100
mergecap          206  207
mmdbresolve        75   75
randpkt           107  111
randpktdump       158  184
rawshark          558  610
reordercap         76   78
sdjournal         145  157
sshdump           272  302
text2pcap         274  312
tshark           2135 2360
udpdump           133  151
wireshark-filter  486  479
wireshark        2967 3420
2021-10-01 16:42:34 +00:00
Gerald Combs eb5d17f2bc Windows: Upgrade libpcap, lz4, nghttp2, and snappy.
Upgrade libpcap to 1.10.1, lz4 to 1.9.3, nghttp2 to 1.44.0, and snappy
to 1.1.9.
2021-09-29 18:14:52 -07:00
Brian Sipos abd0f1183f COSE dissector from dtn-wireshark project 2021-09-29 08:51:13 +00:00
Martin Mathieson a156d7d05d Fix some spelling errors. 2021-09-28 09:50:58 +00:00
Tomasz Moń 7b82110092 USB HID: Parse bit fields with correct bit order
Implement little endian support for tvb_get_bits family of functions.
The big/little endian refers to bit numbering within an octet. In big
endian, the most significant bit is considered bit 0, while in little
endian the least significant bit is considered bit 0.

Add encoding parameters to proto tree bits format family functions.
Specify ENC_BIG_ENDIAN in all dissectors using these functions except in
USB HID that requires ENC_LITTLE_ENDIAN to work correctly.

When formatting bits values, always display most significant bit on the
leftmost position regardless of the encoding. This results in no gaps
between octets and makes the displayed value comprehensible.

Close #4478
Fix #17014
2021-09-26 18:16:28 +02:00
Martin Mathieson b84aa6b243 Fix some spelling errors. 2021-09-23 21:22:46 +00:00
Guy Harris 624ed977cb validate-clang-check: add yet another Windows-only file. 2021-09-23 03:39:11 -07:00
Martin Mathieson 543ea3968c ethercat: Fix some too-wide mask widths.
N.B. Some other issues spotted have been reported in
https://gitlab.com/wireshark/wireshark/~/issues/17605
2021-09-21 11:04:31 +01:00
João Valverde 8726c65267 win-setup.ps1: Be more lax about validating path separators
CMake file(TO_NATIVE_PATH) doesn't do the right thing on MinGW[1],
but Windows supports backslash and forward slash.

[1]https://gitlab.kitware.com/cmake/cmake/-/issues/5939
2021-09-20 14:38:03 +01:00
Martin Mathieson dd667dddf0 Some spelling fixes 2021-09-18 20:52:04 +00:00
João Valverde 8df2a73594 Use the musl in-tree getopt_long() everywhere
Besides the obvious limitation of being unavailable on Windows,
the standard is vague about getopt() and getopt_long() has many
non-portable pitfalls and buggy implementations, that increase
the maintainance cost a lot. Also the GNU libc code currently
in the tree is not suited for embedding and is unmaintainable.

Own maintainership for getopt_long() and use the musl implementation
everywhere. This way we don't need to worry if optreset is available,
or if the $OPERATING_SYSTEM version behaves in subtly different ways.

The API is under the Wireshark namespace to avoid conflicts with
system headers.

Side-note, the Mingw-w64 9.0 getopt_long() implementation is buggy
with opterr and known to crash. In my experience it's a headache to
use the embedded getopt implementation if the system provides one.
2021-09-17 00:43:54 +01:00
Chuck Craft 5b4c7e1c46 NEWS: multiple list indentation levels (nested lists) 2021-09-16 16:27:11 +00:00
Uli Heilmeier 2de4d40e22 setup-macos-brew: Extend to build dmg
Extend the script to be able to build a dmg bundle
2021-09-16 09:56:36 +00:00
Gerald Combs 55a67fd66a Tools: Migrate compress-pngs.sh to Python.
Migrate compress-pngs from a Bash script that ran Make to a Python
script, which should be usable on more platforms.

Add Efficient Compression Tool (ect) to the list of compressors.

Add the compressors to the various *-setup.sh scripts, but comment them
out for now.
2021-09-13 11:00:04 -07:00
Guy Harris 21339ceed0 make-pci-ids.py: make it executable.
It's a #! script, so it should be runnable from the command line without
explicitly running Python on it.
2021-09-11 10:21:05 +00:00
Guy Harris 76b08ea083 Fix spelling errors.
The Ubuntu build commented on some spelling errors in executable code
files.  Fix the errors that don't come from external files containing
the spelling errors (USB product and vendor IDs, PCI IDs, ASN.1
specifications), and fix some errors that don't show up in the
executable code files (e.g., in comments and variable names).
2021-09-11 10:01:27 +00:00
Guy Harris d4ed129727 pre-commit: skip some checks on idl2wrs.c.
Some checks intended for dissectors don't work well on dissector
*generators*, as they see stuff such as "value_string %s[]" in a format
string used to generate dissector code and get upset because the
purported value_string doesn't end with {0, NULL} (the generator *does*
put a {0, NULL} at the end, but the checker isn't clever enough to
figure that out).
2021-09-11 02:42:51 -07:00
Pascal Quantin 530ee0b365 Windows: upgrade Npcap to 1.55 2021-09-07 23:18:19 +02:00
Martin Mathieson fb02f423b1 Some spelling fixes 2021-09-03 22:45:06 +00:00
Alexis La Goutte bbcedb667c clang-check(tools): exit when set illegal option
and not when pass -c parameter, it is break some part of gitlab-ci (Clang Builder)
2021-09-02 16:06:17 +00:00
Evan Huus cdfab0d6e9 tvbuff: convert helper methods to pinfo->pool
A few of them just needed scratch memory, so allocate and free it
manually after doing any exception-raising checks.

A few others were returning memory, and needed conversion to accept a
wmem scope argument.
2021-09-01 03:54:52 +00:00
Adrian Ratiu 61e66c37ab cmake: lemon: allow overriding lemon CC setting
When cross-compiling wireshark the lemon tool should be built
using the host machine compiler to be run on the host. Before
cmake this was done via autotools CC_FOR_BUILD but cmake only
supports one compiler toolchain per build and requires some
workarounds like running cmake twice using separately defined
toolchains.

This gets ugly and complicated fast when considering multiple
toolchains, especially for a simple tool like lemon, so just
allow builds to override the C compiler and wipe the cflags.

This way systems like Gentoo/ChromeOS/Yocto with a properly
setup cross-compile environment can just point to the native
BUILD_CC or similar while minimizing complexity.
2021-08-31 19:19:05 +00:00
Martin Mathieson 70e26d691e Some spelling fixes. 2021-08-27 22:21:40 +00:00
Guy Harris d42ac7b4b5 check_tfs: we want os.path.commonprefix, not os.path.commonpath. 2021-08-25 01:24:31 -07:00
Guy Harris 9941c00a0f check_tfs: don't require plugins to use tfs.c true_false_strings.
To quote the comment in plugins/epan/gryphon/packet-gryphon.c, "Note:
using external tfs strings doesn't work in a plugin", so, for plugins,
don't check to make sure that the file doesn't define a
true_false_string that's the same as one defined by tfs.c.
2021-08-25 07:31:56 +00:00
Michael Tuexen 3d7729c6b3 tools: use glib version 2.68.4 on MacOS 2021-08-24 19:23:49 +00:00
Martin Mathieson d3b016a365 Remove trailing colons from item label names
This is a new check added to check_typed_item_calls.py --label

Ignoring cases where item type is FT_NONE, as fpr tjpse
text was appended that otherwise would lack a colon.
2021-08-23 08:32:56 +00:00
Martin Mathieson 927690e883 Fix some docbook spellings. 2021-08-20 10:43:01 +00:00
Gerald Combs 2683508b38 Windows: Upgrade c-ares to 1.17.2. 2021-08-15 18:45:33 +00:00
Martin Mathieson 545eab808e Fix some item label names with unbalanced parens/braces/brackets
Spotted by new check added to check_typed_item_calls.py --label
2021-08-14 21:24:13 +01:00
Martin Mathieson c0faa8f1da Some more dissector spellings. 2021-08-08 22:21:38 +01:00
Martin Mathieson 03c3c9a056 check_typed_item_calls: Add some ptvcursor_add...() calls
Fix up some NFAPI calls.
2021-08-08 17:47:42 +01:00
Jaap Keuter 9a35314d79 Generate a valid source file, with a newline at the end 2021-08-05 14:05:22 +00:00
Martin Mathieson 73a4ada071 A few documentation spelling fixes. 2021-08-02 17:40:55 +01:00
Martin Mathieson 6d02f1dcf9 Check scripts: split issues into errors and warnings
For CI, will now return error codes only for those issues
that are definitely bugs that will require fixing. i.e.

- if the type is not compatible with the call

- if a TFS is (case-sensitively) identical to a tfs.c entrywq
2021-07-31 16:06:32 +01:00
Guy Harris cc84bebcdc macos-setup: add the deployment flags when configuring with Meson.
We add them when configuring with autotools, so that we build GLib
appropriately for the OS versions we're targeting; do the same when
configuring with Meson.
2021-07-30 19:20:13 -07:00
Guy Harris 856c4f3af6 macos-setup: generate a .pc file for libffi if we have it.
If this version of macOS comes with a version of libffi, generate a .pc
file for it and install it in /usr/local/lib/pkgconfig, so that
pkg-config finds that version of libffi, and the GLib configuration
process - whether it's done with autotools or Meson - doesn't decide
that there is no libffi and fail or install its own libffi or whatever.
2021-07-30 18:54:04 -07:00
Guy Harris c8e17d7835 macos-setup: cleanups.
If we're running an external Python 3 package, pip3 will install scripts
in some directory under /Library; set MESON to point to the location
where Meson will be installed, and use that.

Have a meson-done file to indicate that Meson's been installed by us,
and uninstall it only if that's present.
2021-07-30 03:45:41 -07:00
Guy Harris 2fd29240c8 macos-setup: test whether /usr/bin/python3 works, not python3 in general.
We want to check whether *Apple* provides Python 3, not whether there's
a Python 3 installed; if there is no Apple-provided Python 3, but
there's somebody else's Python 3 installed, leave it alone, don't
uninstall it.
2021-07-29 14:50:10 -07:00
Guy Harris cc34e1c406 macos-setup: install and use Meson+Ninja to build newer versions of GLib.
Newer versions of GLib require Meson (they don't support autotools) and
Ninja (they use Ninja rather than Make).  Install Meson and, based on
the GLib version, use autotools+make or Meson+Ninja to build GLib.

Move up the installation of Python 3 so that it's available when we
install Meson, as Meson requires Python 3 and is installed with pip3.
2021-07-29 14:06:58 -07:00
Guy Harris c263b0a13e macos-setup: if Xcode provides Python 3, use it.
Only install an external Python 3 if /usr/bin/python3 doesn't work; on
at least some versions of macOS, /usr/bin/python3 is a wrapper to run
Python 3 from Xcode, and at least some versions of Xcode provide Python
3.
2021-07-29 19:44:20 +00:00
Martin Mathieson d34d1a1e13 More fussing with masks.
Mostly longer masks with odd numbers of digits.
2021-07-29 10:15:58 +00:00
Guy Harris c4d3716ce8 macos-setup: install the current version of Ninja.
1.10.2 is the latest version, and is the first version to ship as a fat
x86-64/ARM64 binary, so that we have native binaries for both platforms
supported by macOS.
2021-07-27 00:26:28 -07:00
Martin Mathieson a7b5eec265 check_typed_item_calls.py: check add_bitmask() functions 2021-07-26 10:31:15 +00:00
Martin Mathieson a975ef7203 check_typed_item_calls.py: Add a check for all-zeroes mask
When the mask value is 0x0, it effectively means there is no
mask, and that all bits count.

Fix found instances and replace them with 0x0.
2021-07-24 10:58:15 +00:00
Evan Huus d6d7dd1e56 First pass pinfo->pool conversion
Automated find/replace of wmem_packet_scope() with pinfo->pool in all
files where it didn't cause a build failure.

I also tweaked a few of the docs which got caught up.
2021-07-21 05:38:29 +00:00
Martin Mathieson 86e2fda11e check_typed_item_calls: fix typo 2021-07-11 17:15:44 +01:00
Martin Mathieson 030d659f88 More mask checks and some fixes. 2021-07-11 14:55:55 +00:00
João Valverde d48c7e9305 make-version.pl: Remove duplicate "-f" option 2021-07-09 22:25:20 +01:00
João Valverde ffcfc83ecb Rename version.h to be more descriptive
Version.h is too generic. This is specific to VCSVERSION and that
should be made more obvious and discoverable.
2021-07-09 18:27:41 +00:00
Martin Mathieson 9e5d051a8a check_typed_item_calls.py Some more mask checks
Fix a handful of (trivial) issues found.
2021-07-08 13:02:18 +00:00
Martin Mathieson 3dd7ba03fa tools/check_typed_item_calls.py: Add extra mask checks 2021-07-07 10:00:45 +01:00
Martin Mathieson 43077b96e8 Fix a few dissector spelling errors. 2021-07-06 07:52:21 +00:00
Pascal Quantin fa21433c35 Windows: upgrade Npcap to 1.50 2021-06-26 13:16:49 +02:00
João Valverde 3fb7a6e0d5 checkAPIs: __func__ is now part of C99, allow it 2021-06-25 22:06:32 +00:00
Chuck Craft 54baebad48 Lua: reconcile expert info groups; add PI_ASSUMPTION 2021-06-21 15:27:51 +00:00
Joerg Mayer 5fc88c671a Strip comment lines before validating format
Fixes the problem that a one line commit message followed by the default
comment lines was rejected.
2021-06-11 16:46:13 +02:00
Gerald Combs 6357f46bc6 Windows: Update GLib to 2.66.4.
Upgrade our vcpkg bundle to one that includes GLib 2.66.4 and libxml2
2.9.10.

Avoid running pkgconfig on Windows so that we don't find Strawberry
Perl's headers.
2021-06-10 03:48:28 +00:00
Martin Mathieson 8775e2c694 check_static.py: remove unused option 2021-06-08 10:47:59 +01:00
Martin Mathieson abf3c0f2f9 Add some spelling words.
Fix one iee80211 typo.wq
2021-06-06 18:47:38 +01:00
Anders Broman e64bad71be Diameter: Update AVPs from 3GPP TS 29.272 V16.4.0
Amend the xml checking script to exlude one more AVP from the check and
make it easy to add more to the list.
 Courtesy of Christopher Maynard.
2021-06-03 15:49:38 +02:00
Joerg Mayer bf33998a30 Add missing space before ']' 2021-05-30 18:51:02 +02:00
Michael Tuexen 96aa5d9b68 macos-setup.sh: update sparkle 2021-05-29 01:41:15 +02:00
Michael Tuexen a889e8e04b macos-setup.sh: improve arm support
Disable on arm the usage of assember code in nettle and sbc, since this
doesn't compile (yet) on arm platforms.
2021-05-27 14:18:45 +02:00
Michael Tuexen bb327af305 macossetup.sh: fix syntax 2021-05-26 23:21:39 +02:00
Michael Tuexen c1518877fa macossetup.sh: whitespace fix 2021-05-26 23:20:44 +02:00
John Thacker 9bd450f507 macos: Update Python
Update Python from 3.9.3 to 3.9.5, since 3.9.3 was recalled due
to unintentional ABI compatiblity breakage:
(https://bugs.python.org/issue43710)
2021-05-26 03:50:03 +00:00
David Perry 162cba438d Don't try to install qt5-default
As of Debian bullseye and Ubuntu 21.04, `qt5-default` is no longer
available. This patch removes it and adds its dependencies instead
as suggested in <https://askubuntu.com/a/1335187/580576>.
2021-05-14 21:31:26 +00:00
Odysseus Yang c4b32c8f46 ETWDUMP: Update to support live capture
etwdump will read events from a live session with the params as the filter, also the params can be used as filter when reading from a etl file.
2021-05-13 21:17:09 +00:00
Gerald Combs dacbfc4ae9 Tools: Try to exit more gracefully from fuzzing.
If we catch a signal while we're fuzzing, exit with a successful status
and clean up after ourselves.
2021-05-11 11:07:27 -07:00
Anders Broman 71e6b0498a http: Add dissection of HTTP2-Settings
Closes #17370
2021-05-08 17:14:45 +00:00
Gerald Combs 4266e1e9ba Tools: Show only filenames when fuzzing.
Show only the basename of each capture file when fuzzing, which is less
noisy than the full pathname.
2021-05-07 14:21:09 -07:00
Tomas Kukosa 5af925e013 ITS: fix asn2wrs #.NO_EMIT
asn2wrs accepts #.NO_EMIT using module specific $Module$TypeName identifier
2021-05-06 07:36:08 +00:00
Gerald Combs d7bdd77a4c GitLab CI: Add a minimal fuzzing job.
Add a -t option to tools/fuzz-test.sh which lets you specify a maximum
fuzz time.

Add an initial "fuzz-test" job which fuzzes test/captures/* for 5
minutes. To do: Fuzz longer using our capture menagerie and report
failures.
2021-05-05 16:58:12 +00:00
Rickard Holmberg 4dd71cfbb6 Update to DICOM Edition 2021b 2021-05-03 19:51:19 +00:00
Gerald Combs c603a5f2c1 GitLab CI+tools: Make our clang version configurable.
Track our preferred version of clang using $CLANG_VERSION in
.gitlab-ci.yml. Update validate-clang-check.sh to accept a clang
version.
2021-04-30 21:32:00 +00:00
Guy Harris 4e9d2be9ae validate-clang-check: fix extracting the file basename. 2021-04-28 11:35:31 -07:00
Guy Harris 0d12050e5e validate-clang-check: fix some issues.
Not all shells support [[ ]] compound commands; it's not in the most
recent Single UNIX Specification I could see, and the
ubuntu-clang-other-tests job is reporting

    tools/validate-clang-check.sh: 18: [[: not found

Don't use [[ ]].

In addition, if you change extcap/etl.c, it tries to run clang-check on
it, but that file builds, and is only built, on Windows, so clang-check
fails dismally on UN*Xes.  Omit it for now.
2021-04-28 10:02:02 +00:00
Martin Mathieson 1b2fdeca13 PTP: Fix a couple of spelling errors 2021-04-27 10:01:37 +00:00
Pascal Quantin 1408db615b Windows: upgrade Npcap to 1.31 2021-04-25 13:08:52 +02:00
Martin Mathieson d75e9f95eb More trivial spellings. 2021-04-20 08:46:16 +00:00
Martin Mathieson 53c67e31e7 NVME: Fix some spellings
Also added some of its words to wireshark_words.txt
2021-04-19 09:24:38 +01:00
Pascal Quantin 0338a7afac Windows: upgrade Npcap to 1.30 2021-04-12 22:54:39 +02:00
Martin Mathieson d06287ec2e Some more spelling fixes.
Changed script to allow recursive search for multi-words.
2021-04-10 22:50:52 +00:00
John Thacker 69244cbb98 macos-setup: Update CMake, Qt, and Python
Update CMake (3.19.7), Qt (5.2.10), and Python (3.9.3) to later bugfix
versions of the current packages. CMake and Python have made tweaks in
the names of the binary packages that support different macOS versions.

Fixes downloading Python 3.9.2+ on macOS 11 after the package suffix
changed from -macos11.0.pkg to -macos11.pkg

Warn about the lack of Qt offline installers for version 5.15 and
greater.
2021-04-05 00:41:41 +00:00
Martin Mathieson dff0f997de check_static.py check symbols that could be static.
As discussed at
https://www.wireshark.org/lists/wireshark-dev/202101/msg00056.html
2021-04-03 18:19:00 +00:00
Martin Mathieson e83ee9b66a Add more common words to spelling dict. 2021-04-03 17:06:35 +00:00
Pascal Quantin 51170b91d2 asn2wrs.py: prevent adding several times BASE_VAL64_STRING
Fixes ITS dissector generation from ASN.1 description
2021-04-01 20:49:43 +00:00
Guy Harris 828b43491c macos-setup: the current Python is 3.9.2.
While we're at it, capitalize "Arm".  (That's how Arm Ltd. is spelling
it now, even in the architecture versions, e.g. "Armv8-A".)
2021-03-26 21:32:31 -07:00
Dario Lombardo f96886ebef
tools: add g_memdup to prohibited APIs. 2021-03-25 15:53:27 +01:00
Martin Mathieson 4981b10d0b Add a commit-msg that may be installed to verify commit msg line length. 2021-03-23 09:09:19 +00:00
Guy Harris 0cc59d38ab Replace the Large File Support CMake stuff.
The existing stuff doesn't appear to work (I tried it on 32-bit Ubuntu
18.04, and it did *not* add any flags to the compilation, as it appeared
not to conclude that they were necessary, even though they were).

Pull in the stuff from libpcap, which *does* appear to work.  (it does
so in my 32-bit Ubuntu testing).

This should fix #17301.

While we're at it, fix cppcheck.sh so that it doesn't attempt to run
cppcheck on files that have been deleted.
2021-03-22 12:11:26 +00:00
Guy Harris b61fd6d76a dfilter, ftypes: get rid of FT_PCRE.
It's not a valid field type, it's only a hack to support regular
expression matching in packet-matching expressions.

Instead, in the packet-matching code, have a separate syntax tree type
for Perl-compatible regular expressions, and a separate instruction to
load one into a register, and have the "matching" operator for field
types take a GRegex * as the second argument.
2021-03-21 03:27:44 -07:00
Pascal Quantin f6e0de60db Windows: upgrade Npcap to 1.20 2021-03-17 20:46:52 +00:00