Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Changes that hopefully bring the Wireshark plugin closer to the standard against which core Wireshark dissectors are held. Tested on an in-tree Linux build of Wireshark 4.2's
master
branch.Change return type of
timediff()
fromint
tolong
to prevent compiler warning about shortening along
into anint
. (Such warnings are fatal for core dissectors.)Tweak printf-style functions which use the return value of
timediff()
to use thePRId64
format specifier, due to the previous change.Add include of
<wireshark.h>
(see which for its use). Remove redundant and unused header includes.Replace "forbidden" API call (as defined by Wireshark's
tools/checkAPIs.pl
)isascii()
withg_ascii_isalnum()
, and replaceisspace()
withg_ascii_isspace()
.Replace uses of
get_value_ptr(field)->value.uinteger
withfvalue_get_uinteger(get_value_ptr(field))
for consistency with other places in this plugin, and to insulate against recent Wireshark changes which have removed thevalue.uinteger
member in favour ofvalue.uinteger64
.With these changes, the plugin compiles without warnings, and passes all of the checks made by Wireshark's
tools/check_dissector.py
except fortools/checkfiltername.pl
which doesn't like that the field names all start withja4.ja4
; this seems acceptable given JA4's naming conventions.