Commit Graph

82158 Commits

Author SHA1 Message Date
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 9f1607ab47 Docs: Prep for POD to Asciidoctor conversion.
[skip ci]

Rename each of our .pod files to .adoc. Add pod2adoc.py, which converts
POD markup to Asciidoctor, along with customizations specific to us.
2021-10-01 16:42:34 +00:00
João Valverde 04b0e2b80b dfilter: Extend function 'tostr' method
Print function arguments instead of just a count.
2021-10-01 16:04:37 +00:00
João Valverde 90dc58a942 dfilter: Add range 'tostr' method 2021-10-01 16:04:37 +00:00
João Valverde dcf41b93a8 dfilter: Add set 'tostr' method 2021-10-01 16:04:37 +00:00
João Valverde 2c55bffb41 dfilter: Improve syntax error message
Pass simple token value and use it for the error message. This string
is freed in the parser destructor.
2021-10-01 16:04:37 +00:00
João Valverde db18865e55 dfilter: Save token value to syntax tree
When parsing we save the token value to the syntax tree. This is
useful for better error reporting. Use it to report an invalid
entity for the slice operation. Before only the memory location
was reported, which is not a good error message.

Before:
  % dftest '"01:02:03:04"[0:3] == foo'
  Filter: ""01:02:03:04"[0:3] == foo"
  dftest: Range is not supported for entity <0x7f6c84017740> of type STRING

After:
  % dftest '"01:02:03:04"[0:3] == foo'
  Filter: ""01:02:03:04"[0:3] == foo"
  dftest: Range is not supported for entity 01:02:03:04 of type STRING

When creating a new node from an old one we need to copy the token
value. Simple tokens such as RBRACKET, COMMA and COLON are
not part of the AST and don't have an associated semantic value.
2021-10-01 16:04:37 +00:00
João Valverde 487e2b6bc3 dfilter: Remove unnecessary log activation check
Use log_write_always_full() instead of ws_log() to avoid a useless
activation check.

Rename stnode_log() to log_stnode() for consistency.
2021-10-01 16:04:37 +00:00
Pascal Quantin 728061fa17 NR RRC: upgrade dissector to v16.6.0 2021-10-01 14:36:49 +00:00
Pascal Quantin 35826bbb95 LTE RRC: upgrade dissector to v16.6.0 2021-10-01 15:05:02 +02:00
João Valverde de6f5b9d82 dfilter: Fixup syntax tree node display 2021-09-30 19:11:17 +01:00
João Valverde b4af7c52a5 dfilter: Add a flags member to the syntax tree node
Use it to record "inside parenthesis".
2021-09-30 17:03:55 +00:00
John Thacker eef110de80 documentation: Add absolute time to user guide
Add a description of absolute time fields to the Display Filter
Field Types section and explain some of its quirks (always in
local time zone, no time zone suffix, etc.) Related to #13268.
2021-09-30 16:44:22 +00:00
João Valverde 0e7ba54d98 dfilter: Clean up handling of "deprecated" tokens
Pass the deprecated data struture to the scanner and insert the deprecated
tokens there. This avoids having to keep a dedicated syntax node field
for this.

Pass the deprecated argument in dfwork_t instead of in a separate
argument. This is less cumbersome than adding an extra argument
to every level of the semantic checker.
2021-09-30 17:26:19 +01:00
João Valverde d6836d103d dfilter: Add test for "deprecated" tokens
Tokens that are (so-called) deprecated produce a warning/hint to
the user in the UI.
2021-09-30 17:26:19 +01:00
João Valverde 3ea2a61f2a dfilter: Display syntax tree for debugging
Use wslog to output debug information. Being able to control
it at runtime is a big advantage.

We extend the syntax tree nodes with a method to return a
canonical string representation.

Add a routine to walk the tree and return an textual representation
for debugging purposes.
2021-09-30 16:29:11 +01:00
João Valverde 1883487241 ws_getopt: Add a test for optional parameter 2021-09-30 14:24:52 +00:00
João Valverde 5362d0c31b ws_getopt: Rename struct and macros
This is part of the API and should also be renamed to avoid conflicts.
2021-09-30 13:59:28 +00:00
Martin Mathieson 0173ea0ec1 COSE: make some functions static 2021-09-30 13:42:24 +00:00
João Valverde e6a1225611 wslog: Alias --log-domain to --log-domains
I keep mistyping this if there is only one domain and it's annoying.
2021-09-30 13:08:32 +00:00
Stig Bjørlykke 19d27eff98 Lua: Free FileHandler on deregister
Free FileHandler and all allocated strings on deregister to avoid
memory leak when reloading Lua plugins.
2021-09-30 11:07:08 +00:00
Stig Bjørlykke 96cfaf67a3 Qt: Reload Lua FileHandler when having a capture file
Support reloading a Lua FileHandler when this is in use for a
loaded capture file. Prompt to save the file if having unsaved
changes because the file must be reloaded.

Fixes #17615
2021-09-30 11:07:08 +00:00
Joakim Andersson a3c2ad04ee nordic_ble: Re-use OK Error true false flag
Re-use the OK Error true false flag instead of defining a custom one
with OK Incorrect.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2021-09-30 07:42:28 +00:00
Joakim Andersson e4842cea3f nordic_ble: Add address resolved flag to Advertising PDUs
Add address resolved flag to Advertising PDUs. This indicates if the
sniffer was able to resolve the advertising address using an IRK.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2021-09-30 07:42:28 +00:00
John Thacker 2ee57a0e46 ftype-time: Absolute times for DFILTER are always local time
absolute_val_from_string() doesn't allow a time zone and always
assumes that time strings are in local time zone, so
absolute_val_to_repr() needs to produce that output for FTREPR_DFILTER
so that construct_match_selected_string() produces the correct filter
string for FT_ABSOLUTE_TIME fields that are not ABSOLUTE_TIME_LOCAL.

Fix #17617
2021-09-30 06:23:05 +00:00
Adrian Granados 4975dbc867 ieee80211: Add dissector for Ruckus vendor specific IE
Dissector supports only type 3: AP Name.
2021-09-30 05:38:13 +00:00
Thomas Dreibholz 220b5af9d4 Removed unnecessary second lookup with val_to_str_const(). 2021-09-30 04:08:36 +00:00
Thomas Dreibholz c2a0a5ebca Add message type with col_add_fstr(). 2021-09-30 04:08:36 +00:00
Jaap Keuter e1543bda0c IS-IS LSP: extended IP reachability prefix SID dissection change
The flags were used to identify the SID format, without regard for the
available size. Also in case of error in the flags the SID would not be
shown. Convert, like elsewhere, SID format identification based on size
and add flag validity checks, based on RFC 8667 section 2.1.1.

Closes #17610
2021-09-30 03:51:45 +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
Berk Akinci a88d0742cf USBHID: Add integer representation of data bits without specific parsing.
Also changing keyboard and button disssectors to prefix values with ": ".  This
matches how proto_tree_add_int_bits_format_value() displays values.

Concludes the last bits left: Closes #17550
2021-09-29 19:17:51 +00:00
Evan Huus 8269572c4f cbor: use scoped pinfo pool instead of global
One reference snuck into the new cbor api, but pinfo was already in
scope so it's a trivial fix.
2021-09-29 11:56:02 -04:00
Joakim Karlsson 6d04c07955 COSE: fix might be clobbered by ‘longjmp’ or ‘vfork’ [-Werror=clobbered] 2021-09-29 14:13:09 +00:00
João Valverde 42906f1246 dftest: Don't use quotes to output filter
Using quotes is confusing because they are difficult to distinguish
from the actual filter expression itself. Quotes are unnecessary
anyway because whitespace is not significant (except inside brackets).
2021-09-29 11:37:14 +00:00
Joakim Karlsson 93d49562c5 JSON: enable Binary data lookup on Array 2021-09-29 09:35:27 +00:00
Brian Sipos abd0f1183f COSE dissector from dtn-wireshark project 2021-09-29 08:51:13 +00:00
Pascal Quantin 4010502a82 LPP: upgrade dissector to v16.6.0 2021-09-29 07:58:16 +00:00
Stig Bjørlykke e9ac4d3900 proto: Delay deleting heur_dtbl_entry_t in heur_dissector_delete
Add the heur_dtbl_entry_t entry as deregistered when deleting a
heuristics dissector. The UDP dissector is storing a pointer to
this in proto_data and may access the entry during reload Lua
plugins until all packets are redissected.
2021-09-29 07:08:52 +00:00
Evan Huus 3cdada3e7b guids: wmem-scope lookups
Avoids the use of the global unprotected packet memory pool and lets the
compiler enforce scoping.
2021-09-28 15:07:55 -04:00
Gerald Combs 440bbd37a0 Docs: More POD markup cleanup. 2021-09-28 16:41:32 +00:00
Martin Mathieson a156d7d05d Fix some spelling errors. 2021-09-28 09:50:58 +00:00
Joakim Karlsson 9a5b9dbca3 JSON: enable Binary data also for non-compact 2021-09-28 09:03:44 +00:00
Anders Broman a757a93208 GSM MAP Update to 3GPP TS 29.002 V17.1.0 (2021-06) 2021-09-28 10:17:55 +02:00
Anders Broman d7a8a55d2a GSM MAP: Dissect message noteSubscriberPresent. 2021-09-28 04:59:19 +00:00
João Valverde 481d0716e5 MSYS2: Test commands in pipes need quoting
At least using MSYS2 python (that uses system() that uses CMD.EXE)
we must quote every command in a pipe, otherwise the "'C:' is not
recognized as an internal or external program" error occurs.
2021-09-27 16:45:58 +00:00
João Valverde ef06593c13 MSYS2: Fix detection of test suite binaries
Fix hack to find test binaries. We must only search in run/<config>
if using Visual Studio.
2021-09-27 16:45:58 +00:00
João Valverde 6c5e56f752 Windows: Add preliminary support for MSYS2
If we are using MSYS2 we use those packages to build Wireshark
using MinGW-w64 and disable most or all of our win-setup.ps1 codepaths.

Fix GLib configuration. Disable copying of DLLs with MSYS2.

Some tests in the suite_capture test suite are failing with MSYS
MINGW64. That particular set of tests is way too brittle regarding
file system paths; more work is needed to improve that situation.
2021-09-27 16:45:58 +00:00
João Valverde 1c8752935d CMake: Remove debian package target
This is more likely to hinder than to help, and is not really a good way to
invoke dpkg-buildpackage. It's a crutch that doesn't interact well with ninja,
has a 50/50 chance of giving the right results and will pollute the build
environment.

The Debian package should be built from a tarball instead.
2021-09-27 17:25:45 +01:00
Gerald Combs f1ee29fc61 GitLab CI: Don't refresh our openSUSE repository.
The openSUSE 15.2 RPM Test step occasionally fails when trying to
retrieve repository metadata. Add "--no-remote" to the zypper install
command in the openSUSE 15.2 RPM Test to match the offline behavior of
our other RPM tests.
2021-09-27 04:17:01 +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