Currently used to define ssize_t on platforms that lack it.
Fix some Windows build errors caused by moving the definition into a
separate header.
Fix some narrowing warnings on Windows x64 from changing the definition
of ssize_t from long int to int64_t.
The casts in dumpcap are ugly but necessary. The whole code needs
to be rewritten for portability, or the warnings disabled.
Split ws_regex_matches() into two functions with better semantics
and remove the WS_REGEX_ZERO_TERMINATED symbol.
ws_regex_matches() matches zero terminated strings.
ws_regex_matches_length() matches a string length in code units.
epan/dissectors/packet-cisco-marker.c (13 (of 13) fields)
cisco_erspan_marker.prop_header doesn't match PROTOABBREV of cisco-marker
cisco_erspan_marker.header doesn't match PROTOABBREV of cisco-marker
cisco_erspan_marker.version doesn't match PROTOABBREV of cisco-marker
cisco_erspan_marker.type doesn't match PROTOABBREV of cisco-marker
cisco_erspan_marker.ssid doesn't match PROTOABBREV of cisco-marker
cisco_erspan_marker.granularity doesn't match PROTOABBREV of cisco-marker
cisco_erspan_marker.utc_offset doesn't match PROTOABBREV of cisco-marker
cisco_erspan_marker.timestamp doesn't match PROTOABBREV of cisco-marker
cisco_erspan_marker.utc_sec doesn't match PROTOABBREV of cisco-marker
cisco_erspan_marker.utc_usec doesn't match PROTOABBREV of cisco-marker
cisco_erspan_marker.sequence_number doesn't match PROTOABBREV of cisco-marker
cisco_erspan_marker.reserved doesn't match PROTOABBREV of cisco-marker
cisco_erspan_marker.tail doesn't match PROTOABBREV of cisco-marker
Replace:
g_snprintf() -> snprintf()
g_vsnprintf() -> vsnprintf()
g_strdup_printf() -> ws_strdup_printf()
g_strdup_vprintf() -> ws_strdup_vprintf()
This is more portable, user-friendly and faster on platforms
where GLib does not like the native I/O.
Adjust the format string to use macros from intypes.h.
Correctly handle when a minimum packet length forces fragmentation of
SCTP and we are generating dummy SCTP DATA chunk headers: mark fragmentation
in the chunk flags and set the transmission sequence number and
stream sequence number appropriately.
Port from text2pcap commit f8d48662c8
Part of #16724.
After switching to Visual Studio's CMake the Windows MR builds started
failing with
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(241,5): error MSB8066: Custom build for 'C:\builds\wireshark\wireshark\build\CMakeFiles\7345cb0fc1b52560d4d2bd48e83ff433\wireshark_de.qm.rule;C:\builds\wireshark\wireshark\build\CMakeFiles\7345cb0fc1b52560d4d2bd48e83ff433\wireshark_en.qm.rule;C:\builds\wireshark\wireshark\build\CMakeFiles\7345cb0fc1b52560d4d2bd48e83ff433\wireshark_es.qm.rule;C:\builds\wireshark\wireshark\build\CMakeFiles\7345cb0fc1b52560d4d2bd48e83ff433\wireshark_fr.qm.rule;C:\builds\wireshark\wireshark\build\CMakeFiles\7345cb0fc1b52560d4d2bd48e83ff433\wireshark_it.qm.rule;C:\builds\wireshark\wireshark\build\CMakeFiles\7345cb0fc1b52560d4d2bd48e83ff433\wireshark_ja_JP.qm.rule;C:\builds\wireshark\wireshark\build\CMakeFiles\7345cb0fc1b52560d4d2bd48e83ff433\wireshark_pl.qm.rule;C:\builds\wireshark\wireshark\build\CMakeFiles\7345cb0fc1b52560d4d2bd48e83ff433\wireshark_ru.qm.rule;C:\builds\wireshark\wireshark\build\CMakeFiles\7345cb0fc1b52560d4d2bd48e83ff433\wireshark_sv.qm.rule;C:\builds\wireshark\wireshark\build\CMakeFiles\7345cb0fc1b52560d4d2bd48e83ff433\wireshark_tr_TR.qm.rule;C:\builds\wireshark\wireshark\build\CMakeFiles\7345cb0fc1b52560d4d2bd48e83ff433\wireshark_uk.qm.rule;C:\builds\wireshark\wireshark\build\CMakeFiles\7345cb0fc1b52560d4d2bd48e83ff433\wireshark_zh_CN.qm.rule;C:\builds\wireshark\wireshark\build\CMakeFiles\9829b32238fa3bcc807b02099e4c1642\qtui_autogen.rule' exited with code -1073741819. [C:\builds\wireshark\wireshark\build\ui\qt\qtui_autogen.vcxproj]
This appears to be caused by
https://gitlab.kitware.com/cmake/cmake/-/issues/22014 which should be
fixed in recent versions of the official CMake distribution.
Wmem is an alternative to GLib data structures so it should
have the same scope and be equally as convenient to use.
Wmem does not and cannot depend on anything else other than
GLib.
Add some C99 stdio.h numbers to compare with GLib on platforms
(such as Windows) where they use different implementations.
Add a wmem string test with NULL allocator, to compare wmem and GLib
performance with roughly the same memory allocation.
Use the block allocator as being more representative of normal
wmem performance, instead of using strict, that is normally
used for wmem debugging.
These are not pass/fail tests, so the automation cannot
validate them. They just slow down the CI builds. To
enable pass -m perf.
I think the --verbose comment is wrong, I did not detect
any difference in output with or without --verbose.
When the dissector was added, BASE_HEX_DEC was used by default for many
fields. This is often not the most appropriate display format. The
biggest change is that all fields referring to sizes in bytes now
consistently use BASE_DEC_HEX.
This part of the DRBD protocol requires some state to correctly decode.
So we use a conversation to associate the packets. This conversation
stores a map of the two-phase commit data required for decoding later
packets.
Packets such as P_DATA do not have a dedicated field containing the size
of the data. It is simply the amount of extra data in the packet. It is
useful to be able to show or filter by this value, so add it as a
separate field.
Also combine the "blksize" and "size" fields, since they have the same
meaning.
Finally, remove some duplicates of the function decode_payload_data.
These values are opaque handles as far as the protocol is concerned.
They are sent from some node A to B, and then back from B to A. For node
B they have no meaning other than as a handle. However, on node A they
do have meaning, so it is useful to be able to interpret them. In
practice, they are usually little-endian encoded, so decode them
accordingly.
Converting from GLib functions to stdio.h turns up many of these
warnings. They are disabled to allow work to go on and until
there is consensus on how to handle them.
-Wformat-truncation
-Wformat-truncation=1
Level 1 of -Wformat-truncation enabled by -Wformat employs
a conservative approach that warns only about calls to bounded
functions whose return value is unused and that will most likely
result in output truncation.