Commit Graph

81393 Commits

Author SHA1 Message Date
João Valverde dd78347a7e capture: Lower priority for some status messages 2021-06-14 22:05:35 +00:00
João Valverde 41fd46310f wslog: Change log format to display everything
Revert from alternating between function name and file name,
show both instead.
2021-06-14 22:05:35 +00:00
João Valverde 95396973e7 wslog: Add basic color support
This is just a basic framework to improve on, if desired.
2021-06-14 22:05:35 +00:00
João Valverde 69a217b95b wslog: Use buffered I/O
Use standard buffered I/O instead of printing to a string.
This is more efficient, cleaner and allows custom output per stream.
2021-06-14 22:05:35 +00:00
João Valverde 59eff63794 wslog: Rename default log level 2021-06-14 22:05:35 +00:00
João Valverde 42c6c4781f wslog: Add a diagnostic message. 2021-06-14 22:05:35 +00:00
João Valverde b91801a870 wslog: Add a --log-file cmd line option 2021-06-14 22:05:35 +00:00
João Valverde e86ac706ca wslog: Parse cmd line options in one pass 2021-06-14 22:05:35 +00:00
João Valverde 2d2cfa8d14 wslog: Make a variable static 2021-06-14 22:05:35 +00:00
Guy Harris 9aa128c45d netlink-route: the padding is there, but not in the message length.
The message length for legacy netlink route messages doesn't include the
padding in question.
2021-06-14 12:31:32 -07:00
Gerald Combs c36ebbafd4 FAQ: Update the "Where can I get help?" answer. 2021-06-14 12:03:03 -07:00
João Valverde 5ddc007023 wslog: Include pid in format 2021-06-14 14:18:38 +01:00
João Valverde 675c428dca wslog: Fix shadow variable 2021-06-14 13:13:12 +01:00
João Valverde 55f0fba85d wslog: Make error and critical levels not conditional 2021-06-14 13:13:12 +01:00
João Valverde 700d8e34db wslog: Rename environment vars to according to our conventions 2021-06-14 13:13:12 +01:00
João Valverde b20c8a6029 wslog: Update test suite 2021-06-14 13:13:12 +01:00
João Valverde 5a662ba3fb wslog: Add support for domain filtering
A domain filter can be given in the environment variable
'WS_LOG_DOMAINS' or in a command-line options "--log-domains".

The filter is specified as a comma separated case insensitive list,
for example:

    ./tshark  --log-domains=main,capture

Domain data type switches from an enum to a string. There is no
constaint on adding new domains, neither in code or at runtime.
The string format is arbitrary, only positive matches will produce
output.
2021-06-14 13:13:12 +01:00
João Valverde 82739fc4f5 wslog: Improve code modularity and efficiency
Also tweak format for readability.
2021-06-14 13:13:12 +01:00
João Valverde c025e793dd CMake: Remove -Wc++-compat
Happy days are here again.
2021-06-14 11:47:53 +00:00
Martin Mathieson d9c150169d NVME: fix typo 2021-06-14 09:22:17 +01:00
Martin Mathieson 8e099bb0c7 print.c: add length check to loop
Note that it was impossible to actually overflow
the buffer, and there is a check to flush and restart
if it gets to within a few bytes of the end, but static
analyzers (CID: 1477927) are unlikely to be able to work
this out.
2021-06-14 07:03:49 +00:00
Thomas Dreibholz 30f3d72061 Added corresponding documentation for new statistics. 2021-06-14 06:41:44 +00:00
Thomas Dreibholz 7ee68a7904 Added statistics for ScriptingServiceProtocol (SSP). 2021-06-14 06:41:44 +00:00
Thomas Dreibholz e204bb3205 Added statistics for PingPongProtocol. 2021-06-14 06:41:44 +00:00
Constantine Gavrilov 74a3fac004 NVMeOF: rename fields to pass code validation. 2021-06-14 06:21:46 +00:00
Constantine Gavrilov 5d35e28e45 NVMeOF: complete decoding of fabric commands.
Add support for:
* Authentication Send
* Authentication Receive
* Disconnect
2021-06-14 06:21:46 +00:00
Constantine Gavrilov c7e082c6de NVMe: use common block for decoding CQEs for fabric and IO commands. 2021-06-14 06:21:46 +00:00
Constantine Gavrilov 8bc0924c25 NVMeOF fabric commands: simplify decoding code using field definitions. 2021-06-14 06:21:46 +00:00
Constantine Gavrilov 45201049e0 NVMeOF fabric commands: switch TCP dissect to common NVMe code. 2021-06-14 06:21:46 +00:00
Constantine Gavrilov 0b101d54da NVMeOF fabric commands: support offset in commands and completions dissectors. 2021-06-14 06:21:46 +00:00
Constantine Gavrilov d576719df4 NVMeOF: move handling of NVMeOF fabric commands, fabric completions and fabric command transfers to packet-nvme.c.
RMDA implementation is moved to packet-nvme.c, will become common implementation.
2021-06-14 06:21:46 +00:00
Constantine Gavrilov c47294197e NVMEoF: rename rdma fields names to nvmeof.
This is a preparation step to move NVMeOF parsing to generic code.
2021-06-14 06:21:46 +00:00
Constantine Gavrilov 7874e01686 NVMeOF Connect command decoding fixes. 2021-06-14 06:21:46 +00:00
Moshe Kaplan 5e2a8f37f0 Avoid duplicating duplicated memory
No reason to call wmem_strdup() on newly-allocated
memory that is exclusively used for that call
and they both have wmem_packet_scope().
2021-06-14 05:22:45 +00:00
Guy Harris 9f18356888 netlink-route: handle the padding in legacy dump request messages.
The structure containing struct rtgenmsg in the message header also
includes a structure that's aligned on a 4-byte boundary, so there's 3
bytes of padding after the struct rtgenmsg.
2021-06-13 19:19:55 -07:00
Martin Mathieson 10d0a8fd8a IPSEC: free error string
Free error string that may be set during call to
esp_sa_record_add_from_dissector().

Fixes CID: 1485671
2021-06-13 19:58:06 +01:00
John Thacker 73256b3fb7 Remove lingering circuit API from stream.h
The circuit API was removed and replaced with the conversation
"_by_id" API that uses a single uint32 value by commit
800b26edbe

Remove the lingering references to circuits from the stream API,
since it's just used with conversations now.
2021-06-13 11:51:44 +00:00
Gerald Combs 13e5cff6e8 [Automatic update for 2021-06-13]
Update manuf, services enterprise numbers, translations, and other items.
2021-06-13 09:28:55 +00:00
Guy Harris 76174b19b0 file-pcapng: correctly check whether there are any options in the block.
Check whether the length of data remaining in the block content,
starting at the offset past the data preceding options, is > 0, don't
check whether the *total* block content length is > 0.
2021-06-12 15:58:56 -07:00
Guy Harris 14b695d9b3 file-pcapng: report different "block length too short" conditions differently.
Report "length less than the minimum length for a pcapng block"
differently from "length less than the block content of this block".
2021-06-12 15:25:52 -07:00
Guy Harris 016f193111 pcapng: fix routine name.
This processes pcapng files, not pcap files, so call it
pcapng_process_unhandled_option(), not pcap_process_unhandled_option().
2021-06-12 14:08:16 -07:00
Adrian Granados 5b4e814221 ieee80211: fixes Hotspot 2.0 Indication IE dissector
Fixes mask for reserved field, and adds support for ver. number 3.x.
Also, renames "Release Number" to "Version Number" to match
latest WFA Passpoint specification document (ver 3.2).
2021-06-12 09:18:09 +00:00
Adrian Granados 3663277f07 ieee80211: Fix RNR IE field names
Fixes a few typos and makes sure field names in the RNR IE
match the IEEE Std 802.11ax-2021 amendment.
2021-06-12 08:47:08 +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 b86ec10ca4 CMake: Fixup our glibconfig.h discovery.
On Windows, search for glibconfig.h in the vcpkg lib directory. Search
for it in the directory that contains libglib-2.0 on other platforms.
Avoid a side effect that caused us to search in `/lib` on non-Windows
platforms. Don't add GLIB2_LIBRARY to the search path -- that contains
the path to a file, not a directory.
2021-06-11 11:22:11 +00:00
João Valverde dc7f0b88bb Refactor our logging and extend the wslog API
Experience has shown that:

  1. The current logging methods are not very reliable or practical.
A logging bitmask makes little sense as the user-facing interface (who
would want debug but not crtical messages for example?); it's
computer-friendly and user-unfriendly. More importantly the console
log level preference is initialized too late in the startup process
to be used for the logging subsystem and that fact raises a number
of annoying and hard-to-fix usability issues.

  2. Coding around G_MESSAGES_DEBUG to comply with our log level mask
and not clobber the user's settings or not create unexpected log misses
is unworkable and generally follows the principle of most surprise.
The fact that G_MESSAGES_DEBUG="all" can leak to other programs using
GLib is also annoying.

  3. The non-structured GLib logging API is very opinionated and lacks
configurability beyond replacing the log handler.

  4. Windows GUI has some special code to attach to a console,
but it would be nice to abstract away the rest under a single
interface.

  5. Using this logger seems to be noticeably faster.

Deprecate the console log level preference and extend our API to
implement a log handler in wsutil/wslog.h to provide easy-to-use,
flexible and dependable logging during all execution phases.

Log levels have a hierarchy, from most verbose to least verbose
(debug to error). When a given level is set everything above that
is also enabled.

The log level can be set with an environment variable or a command
line option (parsed as soon as possible but still later than the
environment). The default log level is "message".

Dissector logging is not included because it is not clear what log
domain they should use. An explosion to thousands of domains is
not desirable and putting everything in a single domain is probably
too coarse and noisy. For now I think it makes sense to let them do
their own thing using g_log_default_handler() and continue using the
G_MESSAGES_DEBUG mechanism with specific domains for each individual
dissector.

In the future a mechanism may be added to selectively enable these
domains at runtime while trying to avoid the problems introduced
by G_MESSAGES_DEBUG.
2021-06-11 09:40:28 +00:00
Pascal Quantin c0f8812c31 Kerberos: fix compilation without HAVE_KERBEROS flag
Closes #17439
2021-06-11 09:38:02 +02:00
Guy Harris 5d053016c4 Remove a byte-order mark from two files.
Fixes #17440.
2021-06-10 21:33:08 -07:00
Vadim Yanitskiy bffb6c881a osmo_trx: add primary/shadow TRXDv2 PDU classification 2021-06-10 19:51:57 +00:00
João Valverde 70cea91c8a wsutil: argv[] is a NULL terminated array 2021-06-10 16:22:12 +00:00