Use the versions of lrint and lrintf defined by Visual C++. This should fix
91>C:\buildbot\builders\wireshark-master-64\wireshark-win64-libs\spandsp-0.0.6-win64ws\include\spandsp/fast_convert.h(320,5): error C2169: 'lrint': intrinsic function, cannot be defined (compiling source file C:\buildbot\builders\wireshark-master-64\windows-2019-x64\build\plugins\codecs\G726\G726decode.c) [C:\buildbot\builders\wireshark-master-64\windows-2019-x64\build\cmbuild\plugins\codecs\G726\g726.vcxproj]
91>C:\buildbot\builders\wireshark-master-64\wireshark-win64-libs\spandsp-0.0.6-win64ws\include\spandsp/fast_convert.h(325,5): error C2169: 'lrintf': intrinsic function, cannot be defined (compiling source file C:\buildbot\builders\wireshark-master-64\windows-2019-x64\build\plugins\codecs\G726\G726decode.c) [C:\buildbot\builders\wireshark-master-64\windows-2019-x64\build\cmbuild\plugins\codecs\G726\g726.vcxproj]
for Visual C++ 16.9.1 and later.
I believe this was the original intention, to use these API restricitons
with dissectors only (not that I necessarily agree with that policy either),
and through copy-paste and lack of clear guidelines it spread to other
parts of the build.
Rename the checkAPI groups to make it very clear that this is dissector-only.
This doesn't mean, of course, that good programming practices shouldn't be
followed everywhere. In particular assertions need to be used properly.
Don't use them to catch runtime errors or validate input data.
This commit will be followed by another removing the various ugly hacks
people have been using to get around the checkAPI hammer.
The minimum required version of Qt is now 5.6, and thus the minimum
required version of macOS is 10.8. Reflect that in macos-setup, and
remove version checks and older packages installed to support
Snow Leopard and Lion.
Celcius -> Celsius.
ammendment, framenun and untunelled (with one 'n') are in wireshark_words.txt
but do not seem to be present in our codebase anymore (and are not
correctly-spelled words), so AFAIK they can be removed from the list.
Added a handful of words which don't seem to be in the dictionary on my host
but are real words and are in the codebase.
Removed two contractions which are now handled within tools/check_spelling.py .
Provide a wiretap routine to get an array of all savable file
type/subtypes, sorted with pcap and pcapng at the top, followed by the
other types, sorted either by the name or the description.
Use that routine to list options for the -F flag for various commands
Rename wtap_get_savable_file_types_subtypes() to
wtap_get_savable_file_types_subtypes_for_file(), to indicate that it
provides an array of all file type/subtypes in which a given file can be
saved. Have it sort all types, other than the default type/subtype and,
if there is one, the "other" type (both of which are put at the top), by
the name or the description.
Don't allow wtap_register_file_type_subtypes() to override any existing
registrations; have them always register a new type. In that routine,
if there are any emply slots in the table, due to an entry being
unregistered, use it rather than allocating a new slot.
Don't allow unregistration of built-in types.
Rename the "dump open table" to the "file type/subtype table", as it has
entries for all types/subtypes, even if we can't write them.
Initialize that table in a routine that pre-allocates the GArray before
filling it with built-in types/subtypes, so it doesn't keep getting
reallocated.
Get rid of wtap_num_file_types_subtypes - it's just a copy of the size
of the GArray.
Don't have wtap_file_type_subtype_description() crash if handed an
file type/subtype that isn't a valid array index - just return NULL, as
we do with wtap_file_type_subtype_name().
In wtap_name_to_file_type_subtype(), don't use WTAP_FILE_TYPE_SUBTYPE_
names for the backwards-compatibility names - map those names to the
current names, and then look them up. This reduces the number of
uses of hardwired WTAP_FILE_TYPE_SUBTYPE_ values.
Clean up the type of wtap_module_count - it has no need to be a gulong.
Have built-in wiretap file handlers register names to be used for their
file type/subtypes, rather than building the table in init.lua.
Add a new Lua C function get_wtap_filetypes() to construct the
wtap_filetypes table, based on the registered names, and use it in
init.lua.
Add a #define WSLUA_INTERNAL_FUNCTION to register functions intended
only for internal use in init.lua, so they can be made available from
Lua without being documented.
Get rid of WTAP_NUM_FILE_TYPES_SUBTYPES - most code has no need to use
it, as it can just request arrays of types, and the space of
type/subtype codes can be sparse due to registration in any case, so
code has to be careful using it.
wtap_get_num_file_types_subtypes() is no longer used, so remove it. It
returns the number of elements in the file type/subtype array, which is
not necessarily the name of known file type/subtypes, as there may have
been some deregistered types, and those types do *not* get removed from
the array, they just get cleared so that they're available for future
allocation (we don't want the indices of any registered types to changes
if another type is deregistered, as those indicates are the type/subtype
values, so we can't shrink the array).
Clean up white space and remove some comments that shouldn't have been
added.
NCSI: Extends NCSI dissection based on DSP0222 Version: 1.2.0_2b
Add pci-ids.c and pci-ids.h for mapping PCI IDs(VID,DID,SID,SVID) to string.
Extends NCSI dissection to support DSP0222 Version: 1.2.0_2b.
Extends NCSI dissection to support Mellanox OEM commands.
NCSI: Use TFS for boolean mapped string and added AEN dissectors
1. Use the tfs defined in tfs.c
2. Refine the boolean mapped strings to be TFS style
3. Added dissectors for AEN
NSCI: Fixed erros with gcc 7.5.0
1. Fix compiling errors with gcc 7.5.0 under Ubuntu 18.04
2. Sloved complaints of git pre-commit hook
NCSI: Add "0x" prefix for displaying HEX values
There are codes display HEX values without prefix, added "0x" to fix that.
PCI-IDS: Added PCI ID file and python script to convert it to C codes
1. Added the PCI ID file pci.ids from https://pci-ids.ucw.cz/
2. Added pci-ids-convert.py to convert to epan/dissectors/pci-ids.c
PCI-IDS: Updated the PCI ID list to be Version 2021.01.11
NCSI: Remove trailing spaces and unused href entries
PCI-IDS: Use a fresh copy of pci.ids to generate pci-ids.c
1. Renamed pci-ids-convert.py to make-pci-ids.py
2. make-pci-ids.py uses a fresh copy of pic.ids to generate pci-ids.c
PCI-IDS: Move internal structure to C file
1. Move pci_id_t and pci_vid_index_t from header file to C file.
2. Refined the comments of pci-ids.c
3. Renamed local variable index (shadow variable) to idx
PCI-IDS: Refined binary search codes
PCI-IDS: Moved pci-ids.[ch] to epan/
Moved pci-ids.[ch] to epan/ as they ought to be
This matches what deb-setup does - it has an --install-deb-deps optionto
install tools necessary to build a .deb.
Document it in the WSDG while we're at it.
Currently, only pcapng has one, and it does nothing, but this mechanism
will be used more in the future.
Update comments in epan/dissectors/CMakeLists.txt and ui/taps.h while
we're at it.
Add a standard CONTRIBUTING file which describes how you can contribute
to Wireshark. Make it Markdown with a .md extension since that's the
default in the GitLab UI and elsewhere.
Instead of having the source file containing the top-level registration
routine for the pinfo_stats_tree plugin checked into our repository,
generate it with tools/make-plugin-reg.py, as we do with other plugins.
While we're at it, fix a comment - "DLL" is a Windows term; the
equivalent term in UN*Xes would be "shared object" ("so" or ".so") or
"dynamic library" ("dylib" or ".dylib").
Python only creates the default argument once and reuses it for
further invocations. Instead, of mutating the default list,
set the default argument to be None and then create a
list, if needed. For more info, see
https://docs.python-guide.org/writing/gotchas/
Fix various warnings with the following changes:
Pass a list of include directories to lupdate. Fixes:
ui/qt/proto_tree.cpp:57: Qualifying with unknown namespace/class ::ProtoTree
and similar warnings.
Use QT_TRANSLATE_NOOP instead of QT_TR_NOOP. Fixes:
ui/qt/lte_rlc_statistics_dialog.cpp:993: tr() cannot be called without context
ui/qt/lte_mac_statistics_dialog.cpp:911: tr() cannot be called without context
ui/qt/font_color_preferences_frame.cpp:28: tr() cannot be called without context
ui/qt/font_color_preferences_frame.cpp:29: tr() cannot be called without context
ui/qt/font_color_preferences_frame.cpp:30: Discarding unconsumed meta data
Add Q_OBJECT to the class definition. Fixes:
ui/qt/models/filter_list_model.cpp:120: Class 'FilterListModel' lacks Q_OBJECT macro
The following warnings were not fixed. This might require moving IOGraph
to its own file:
ui/qt/io_graph_dialog.cpp:320: Qualifying with unknown namespace/class ::IOGraphDialog
ui/qt/io_graph_dialog.cpp:555: Qualifying with unknown namespace/class ::IOGraphDialog
ui/qt/io_graph_dialog.cpp:1059: Qualifying with unknown namespace/class ::IOGraphDialog
ui/qt/io_graph_dialog.cpp:1485: Qualifying with unknown namespace/class ::IOGraphDialog
Allow QT version 5.14.x to be installed (if specified as a variable
on the command line.) Remove the ability to install 5.2.x, as QT 5.3
has been the minimum required version since the Wireshark 3.4 branch.
Note that QT no longer providers offline installers for the free releases
of 5.15 and later, so we'll have to come up with a different method.
(See http://download.qt.io/archive/qt/5.15/5.15.0/OFFLINE_README.txt
and https://www.qt.io/blog/qt-offering-changes-2020 )
Python 3.9.1 is the first version of Python to support Big Sur and
Apple Silicon (https://www.python.org/downloads/release/python-391/),
and Python 3.7.6 is the last version with a 64-bit/32-bit binary installer
for macOS X 10.6 (Snow Leopard) to 10.8 (Mountain Lion) provided.
With Ninja, the build is unnecessarily noisy:
[21/81] Generating plugin.c
Generated plugin.c for l16_mono.
[22/81] Generating plugin.c
Generated plugin.c for G711.
Avoid writing `Generated plugin.c for G711` and generate a single line
such as `Generating plugins/codecs/G711/plugin.c` instead.
Do not write the absolute path to plugin.c, this should hopefully help
with reproducible builds that are independent of the build directory.
Apple Silicon requires CMake 3.19.2, but the binaries provided
for 3.19.2 only run on MacOS 10.10 and later, so we have more
bifurcation of the CMake we try to install. Get rid of some of
the old 2.x paths to compensate.
When running on gitlab-ci, the checkout of the project doesn't give
a complete repo. Then git describe fails at giving the number of commits.
In this case just use 0 instead of NULL.
Adds a pre-commit hook for detecting and replacing
occurrences of `g_malloc()` and `wmem_alloc()` with
`g_new()` and `wmem_new()`, to improve the
readability of Wireshark's code, and
occurrences of
`g_malloc(sizeof(struct myobj) * foo)`
with
`g_new(struct myobj, foo)`
to prevent integer overflows
Also fixes all existing occurrences across
the codebase.
It's minizip-$installed_minizip_version-done, not
zlib-$installed_minizip_version-done; the tarball is
zlib-$installed_minizip_version.tar.gz, because it's a contributed file
in the zlib package, but we don't use zlib in the name of the -done
file.
[skip ci]
It has no configure script, so there's no need for "make distclean", and
the Makefile supplied with it has no "make distclean" rule; just do
"make clean".
[skip ci]