Commit Graph

2722 Commits

Author SHA1 Message Date
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