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.
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.
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.
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.
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.
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).
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.
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.
* use SPEC names for fields
* decode missing controller ID
* fix reject payload parsing (size is 4 and not 32; no reserved field)
* simplify custom decoding using CF_FUNC.
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.
dissect_diameter_mip6_feature_vector is checking whether the data argument
(assigned to diam_sub_dis_inf) is null, but later dereferences it outside
the conditional, so if it was null it would crash anyway. It doesn't seem
possible for the data argument to actually be null, so this commit removes
the redundant check. I'm also adding an assert to document the non-null
assumption.
Bug found by clang static analyzer.
Fixes#17427.
In ca86d0ab38 I introduced a regression
that caused the A-bis/OML dissector to not recognize ip.access
specific messages as such. The value returned by tvb_memeql() needs
to be reverted, because it returns 0 on success, just like memcmp().
Additionally, I noticed that some implementations of the ip.access
dialect do terminate the manufacturer ID string with a null character,
while some do not. Handle both cases properly.