Commit Graph

81213 Commits

Author SHA1 Message Date
João Valverde 0e50979b3f Replace g_assert() with ws_assert() 2021-06-19 01:23:31 +00:00
João Valverde b4eddd32c1 wslog: Set registered name earlier 2021-06-19 02:07:34 +01:00
João Valverde dddb33e398 wslog: Be more obvious in the log that the domain is unset
Currently we are not filtering the unset (NULL) domain, on
the assumption that every log call should belong to a defined
domain.

However there are still many places in the codebase where this isn't
true and the fact that the null/default domain name is omitted from
the output and never filtered is probably surprising and user-unfriendly.
Users might understandably assume the filtering is buggy.

Give an indication, such as (none)-MESSAGE, to make this more
obvious.
2021-06-19 02:07:34 +01:00
Guy Harris 39315979c6 pcap-common: set the time stamp precision correctly for LINKTYPE_ERF.
LINKTYPE_ERF pcap files are really ERF files inside a thin pcap wrapper
(don't even ask what a pcapng file with some or all interfaces being
LINKTYPE_ERF is...), so the time stamp comes from the ERF record, not
from the pcap packet header or pcapng block header.

The time stamp reslution for the record should reflect that, so set it
to WTAP_TSPREC_NSEC (ERF time stamps are fractional-power-of-2, not
fractional-power-of-10, so that's the best we can do).
2021-06-18 17:43:36 -07:00
João Valverde 7f17d18012 wslog: Fix domain filtering
Fixes 051a74378d.
2021-06-19 01:17:05 +01:00
Guy Harris 02cffb51a9 erf: handle errors in some routines more completely.
Have them take error code and error information string arguments and,
for various failures, fill them in as "internal error" indications.

Check their return codes to see if they got an error.
2021-06-18 16:22:54 -07:00
Guy Harris d69d1271f0 libpcap: don't generate a fake interface for LINKTYPE_ERF files.
The ERF code will generate interfaces based on the ERF records in the
file, so don't bother adding an additional dummy interface.
2021-06-18 15:34:49 -07:00
Uli Heilmeier d195847bb1 Prefs: Mark gui.packet_editor.enabled obsoleted
Preference has been removed with fca78f9f1f
without obsoleting it.
2021-06-18 20:11:31 +00:00
João Valverde a6738d72a0 wslog: Add support for inverted debug matches
The --log-debug and --log-noisy now accepts a '!' to invert the
match and disable the debug (noisy respectively) log level for
the listed domains.

Note this is different from --log-domains, that option
enables/disables the entire log domain itself, regardless of log
level.
2021-06-18 10:43:39 +01:00
João Valverde 051a74378d wslog: Use NULL for empty/default domain 2021-06-18 10:43:39 +01:00
Guy Harris 49ec11f5aa erf: set the tsprecision value of a newly-created IDB.
Don't assume the default is correct, because there's no guarantee of
that - in fact, there's currently a guarantee that it's not, as it's
initialized to 0, which is WTAP_TSPREC_SECS.
2021-06-18 01:24:41 -07:00
Gerald Combs 1a7041c742 WSDG: Lowercase our Chocolatey package IDs.
Ensure that the `choco install` command examples are all uniformly lower
case. This matches the naming recommendations at

https://docs.chocolatey.org/en-us/create/create-packages#naming-your-package

and the various installation examples at https://chocolatey.org/packages.
2021-06-18 06:56:28 +00:00
Gerald Combs 0ae9c3e8eb Docs: Remove the authors list from wireshark(1).
The AUTHORS section of wireshark(1) is about half the content of the man
page. While it's important to acknowledge the people who have
contributed to the project, the goal of the man page is to tell people
how to use Wireshark.

Replace the list of authors with text that acknowledges their
contributions along with pointers to the AUTHORS file and the list on
the main web site.
2021-06-17 18:33:09 -07:00
Guy Harris 5eda4c0128 pcapng: update a comment to reflect the name cleanups. 2021-06-17 15:55:18 -07:00
Guy Harris 9773b5a4a7 Just call the block type for custom blocks WTAP_BLOCK_CUSTOM.
No need to add a redundant "_BLOCK" at the end.
2021-06-17 15:04:44 -07:00
Guy Harris 6eb3703379 Make various names match the name of the systemd journal export block.
The name of the block, in the pcapng specification is the systemd
Journal Export Block; add "export" after "journal" in various
variable/enum/define names.
2021-06-17 13:52:45 -07:00
Abhinay Ramesh 829082c191 OSPFv3: To decode ospfv3 authentication trailer header for DD packet.
Problem Statement:
=================
OSPFv3 authentication trailer header is not get decoded for
Database description(DD) packets.

RCA:
====
OSPFv3 supports decoding of authentication trailer header only
for Hello packets as of now. Even DD packets have options and
it can be decoded based on AT bit.

Fix:
====
In the function to check if Auth trailer is supported,
Have added a check for DD packet also.

Risk:
=====
Low - Platform independent code.

Tests Executed:
===============
Download the code from CI and test DD packet decoding.

Signed-off-by: Abhinay Ramesh <rabhinay@vmware.com>
2021-06-17 19:23:33 +00:00
Adrian Granados 81233baa6e Rename he_fragmentation_support to he_dynamic_fragmentation_support 2021-06-17 19:03:00 +00:00
Adrian Granados 0348198540 Remove amendment labels from HE Capabilities and HE Operation IEs names 2021-06-17 19:03:00 +00:00
Adrian Granados daf7c2f580 ieee80211: Update HE Capabilities and Operation IEs
Updates/fixes HE Capabilities and Operation IEs to match
the IEEE Std 802.11ax-2021 amendment.
2021-06-17 19:03:00 +00:00
João Valverde 0a2cef452d Add missing header 2021-06-17 15:30:52 +00:00
Uli Heilmeier fca78f9f1f Prefs: Remove packet_editor option
Since QT UI we have had no more packet editor feature. Therefore we can also
drop the preference to enable it.
2021-06-17 14:47:47 +00:00
João Valverde c5b3842639 wslog: Add more documentation 2021-06-17 12:00:10 +01:00
João Valverde ff9acff6f2 Replace usage of GLogLevel flags everywhere
ws_log_domains.h needs to be included before wslog.h to be used
to define WS_LOG_DOMAIN. Also the definition for enum ws_log_level
needs to be exported for other APIs so move that to ws_log_domains.h
and rename the file to ws_log_defs.h to reflect the new scope.
2021-06-17 12:00:10 +01:00
João Valverde 02e34357bc wslog: Add a noisy debug level
This is intended to replace logging in dissectors that has a
debug level with #ifdef DEBUG_foo and an extra level guarded
by a #ifdef DEBUG_EXTRA_foo.

But generally it can be used as another level of granularity
for debugging output, to avoid flooding the log with too
much information with typical usage.

Rename the filter functions without the unnecessary 'str'
suffix.
2021-06-17 12:00:09 +01:00
João Valverde ac50926d6f wslog: Add a new log-debug option
Option --log-debug or WIRESHARK_LOG_DEBUG is a list
of domains that are set to a "debug" log level. This
takes precedence over the normal log level and domain
filter options.
2021-06-17 12:00:09 +01:00
João Valverde 01001485b9 wslog: Add a new log-fatal option
Enviroment variable WIRESHARK_LOG_FATAL and command line
option --log-fatal set the fatal log level. Messages with
fatal or highr priority cause the program to abort. By
default the fatal level is "error", but it can be set to
"critical" or "warning" with this option.
2021-06-17 12:00:09 +01:00
João Valverde 36c32de869 wslog: Add support for inverted domain matches
Domain filter expressions starting with '!' invert the match.
Only domains that do not match become active. Note that '!'
must be the first character in the filter and applies to the
whole expression.
2021-06-17 12:00:09 +01:00
João Valverde 05ed76d4c0 wslog: Use plain format with "message" level
Try out a simpler format with the default log level.

Don't display process and file/function information with "message"
level (experimental).
2021-06-17 12:00:09 +01:00
Anders Broman 790bbbe16d Diameter: Add a few AVPs 2021-06-17 09:00:02 +00:00
Chuck Craft 686bd3ac94 WSDG: update/clarify naming conventions 2021-06-17 08:43:57 +00:00
Chuck Craft 55cfd76003 WSDG: update/clarify naming conventions 2021-06-17 08:43:57 +00:00
Isaac Boukris d2c3489d79 Revert "test"
This reverts commit af3a9d72d9.
2021-06-17 10:14:55 +03:00
Isaac Boukris af3a9d72d9 test 2021-06-17 05:05:59 +00:00
Isaac Boukris dd39d9b46a credssp: add basic dissection of TSRemoteGuardCreds
as per MS-CSSP 2.2.1.2.3
2021-06-17 05:05:59 +00:00
Guy Harris 2c9d262ed1 pcapng: indentation cleanups. 2021-06-16 20:03:00 -07:00
Guy Harris 8aceee774a pcapng: get rid of some now-redundant rounding up of the block length.
Now that it's being done in common code, we don't need to do it in the
routines to read sysdig event blocks, systemd journal export blocks, or
unknown blocks.

Add in a comment to match other comments while we're at it.
2021-06-16 18:59:34 -07:00
Guy Harris a16f65ab20 pcapng: have more common code for processing options.
Have a common loop for processing options, with a callback to process
options for a particular block type.
2021-06-16 16:50:22 -07:00
Guy Harris ea38a1d419 pcapng: round up block lengths to a multiple of 4 in common code.
Do it earlier in the reading process, rather than in the packet block
code.
2021-06-16 13:15:24 -07:00
Chuck Craft 45cf1f8904 WSDG: define CRT; add UCRT 2021-06-16 17:09:54 +00:00
Adrian Granados 5852954828 ieee80211: Fix validation of subelements in the Multiple BSSID IE.
The IEEE Std 802.11ax-2021 amendment relaxes the requirements for
elements included in the Nontransmitted BSSID Profile subelement:

"Any element specific to the BSS or with content that is different
from the transmitted BSSID" can be included as a sublement.

However, it also enumerates elements that should not be included in the
Nontransmitted BSSID Profile subelement, including some extended element
IDs.

Thus, I've changed the add_tagged_field function to be more comprehensive, so that:

a) it can use the list of elements IDs to check for valid OR invalid element IDs
b) it defines necessary arguments for also checking valid OR invalid extended element IDs

The original function declaration is kept as it is, and the implementation calls the
new function, add_tagged_field_with_validation.

An alternative implementation of this change would be to have
the Multiple BSSID dissector implementation skip the check for invalid
element IDs in the Nontransmitted BSSID Profile subelement,
hence not requiring any changes to the add_tagged_field function.

However, for completeness, the add_tagged_field function should check for
valid extended element IDs in the same way it can check for valid element IDs,
and this commit provides it.
2021-06-16 15:05:33 +00:00
Chuck Craft 535315b7e1 WSDG: stale path and filename; correct typo in path name 2021-06-16 14:47:43 +00:00
João Valverde dcc02b1003 dissectors: Replace g_log() with ws_log() 2021-06-16 12:50:28 +00:00
João Valverde 39df3ae3c0 Replace g_log() calls with ws_log() 2021-06-16 12:50:27 +00:00
Tomas Kukosa 4c4bb915c8 ITS: fix displaying of curvature unavailable value 2021-06-16 12:34:06 +00:00
Joakim Karlsson e22b9733cf GTPv2: make dissect_diameter_3gpp_uli public for custom dissectors 2021-06-16 13:59:44 +02:00
Martin Mathieson 6b0cfb703a netlink-route: Fix a couple of spellings 2021-06-16 10:58:56 +00:00
Guy Harris 8176a16798 pcapng: fix indentation. 2021-06-16 03:31:27 -07:00
Joakim Karlsson 72193d037f NGAP: add more N2SmInfoType 2021-06-16 09:38:36 +00:00
Guy Harris 25a254823f wsutil: add a header that defines some "round to power of 2" macros.
Add macros to round to multiples of 2, 4, 8, 16, and 32.

Use them instead of independently defined macros.

(We don't define a general "round to a power of 2" macro to avoid the
risk of somebody passing something other than a power of 2 to it.)
2021-06-16 02:01:23 -07:00