wireshark/wsutil
John Thacker b5917d0182 wmem: Add a multimap
A number of protocols have IDs that can be reused that are used as
lookup keys. In most cases the frame number should be used as well
to differentiate repeat appearances of an ID. For response/request
matching, it is frequently useful to find the most recent frame number
(greatest value less than or equal to the current one) that contained
an ID.

We can achieve that by using a multimap that stores values with a given
ID in a tree keyed with the frame number. This works better than using
a map or a tree alone:

1) A map isn't ordered, so doesn't allow for less than or equal comparison.
2) Using a tree requires an ordering on all the ID components, and then
   having to test all the components other than the frame number separately
   for equality after retrieval.

Currently the multimap does not support inserting items without specifying
the tree key (and having the multimap generate a key), because the total
capacity of trees (including deleted nodes) is not tracked. If other use
cases are needed, this could be added later along with more generic
multimap support.

Use a multimap in ANSI MAP, ANSI TCAP, and GSM SMS, all of which need to
match lookup IDs that can be reused. Fix #7653.
2021-11-21 07:16:55 -05:00
..
wmem wmem: Add a multimap 2021-11-21 07:16:55 -05:00
.editorconfig wsutil: Improve bytes_to_str_max() API 2021-11-09 20:57:05 +00:00
802_11-utils.c ieee80211: Add 6E support when converting freq. to channel number. 2021-10-03 10:03:45 +00:00
802_11-utils.h peektagged: guess the PHY for 11b/11g/11a. 2021-03-04 16:07:23 -08:00
CMakeLists.txt Move regex code to wsutil 2021-11-14 21:00:59 +00:00
adler32.c HTTPS (almost) everywhere. 2019-07-26 18:44:40 +00:00
adler32.h replace SPDX identifier GPL-2.0+ with GPL-2.0-or-later. 2018-02-08 14:57:36 +00:00
base32.c HTTPS (almost) everywhere. 2019-07-26 18:44:40 +00:00
base32.h replace SPDX identifier GPL-2.0+ with GPL-2.0-or-later. 2018-02-08 14:57:36 +00:00
bits_count_ones.h HTTPS In Still More Places, update more URLs. 2019-07-27 22:56:35 +00:00
bits_ctz.h replace SPDX identifier GPL-2.0+ with GPL-2.0-or-later. 2018-02-08 14:57:36 +00:00
bitswap.c HTTPS (almost) everywhere. 2019-07-26 18:44:40 +00:00
bitswap.h replace SPDX identifier GPL-2.0+ with GPL-2.0-or-later. 2018-02-08 14:57:36 +00:00
buffer.c Replace g_log() calls with ws_log() 2021-06-16 12:50:27 +00:00
buffer.h Fix function declaration of ws_buffer_length(). 2018-05-04 02:26:31 +00:00
cfutils.c HTTPS (almost) everywhere. 2019-07-26 18:44:40 +00:00
cfutils.h replace SPDX identifier GPL-2.0+ with GPL-2.0-or-later. 2018-02-08 14:57:36 +00:00
codecs.c wsutil: Fix incorrect header include 2021-06-25 03:14:22 +00:00
codecs.h wsutil: Fix incorrect header include 2021-06-25 03:14:22 +00:00
color.h HTTPS (almost) everywhere. 2019-07-26 18:44:40 +00:00
copyright_info.c Happy New Year 2021 2021-01-01 11:36:23 +00:00
copyright_info.h replace SPDX identifier GPL-2.0+ with GPL-2.0-or-later. 2018-02-08 14:57:36 +00:00
cpu_info.c wsutil: Strip the processor brand string. 2020-02-15 11:11:50 +00:00
cpu_info.h Move even more headers outside extern "C". 2021-03-16 04:33:00 -07:00
crash_info.c HTTPS (almost) everywhere. 2019-07-26 18:44:40 +00:00
crash_info.h Clean up REPORT_DISSECTOR_BUG(). 2018-03-25 23:49:35 +00:00
crc5.c USBLL: Verify Token/Split packets CRC-5 2019-07-29 20:49:09 +00:00
crc5.h USBLL: Verify Token/Split packets CRC-5 2019-07-29 20:49:09 +00:00
crc6.c HTTPS (almost) everywhere. 2019-07-26 18:44:40 +00:00
crc6.h CRC6: Fixed CRC lookup table and functions 2019-01-04 06:04:07 +00:00
crc7.c HTTPS (almost) everywhere. 2019-07-26 18:44:40 +00:00
crc7.h replace SPDX identifier GPL-2.0+ with GPL-2.0-or-later. 2018-02-08 14:57:36 +00:00
crc8.c HTTPS (almost) everywhere. 2019-07-26 18:44:40 +00:00
crc8.h The CRC8 routines don't modify the buffer; make the pointers to it const. 2018-02-17 19:30:35 +00:00
crc10.c HTTPS (almost) everywhere. 2019-07-26 18:44:40 +00:00
crc10.h replace SPDX identifier GPL-2.0+ with GPL-2.0-or-later. 2018-02-08 14:57:36 +00:00
crc11.c Fix -Wdocumentation warning 2021-04-14 14:01:49 +00:00
crc11.h replace SPDX identifier GPL-2.0+ with GPL-2.0-or-later. 2018-02-08 14:57:36 +00:00
crc16-plain.c HTTPS (almost) everywhere. 2019-07-26 18:44:40 +00:00
crc16-plain.h replace SPDX identifier GPL-2.0+ with GPL-2.0-or-later. 2018-02-08 14:57:36 +00:00
crc16.c HTTPS (almost) everywhere. 2019-07-26 18:44:40 +00:00
crc16.h USBLL: Verify DATA packets CRC-16 2019-07-25 08:58:13 +00:00
crc32.c HTTPS (almost) everywhere. 2019-07-26 18:44:40 +00:00
crc32.h Rename airpdcap to dot11decrypt. 2018-02-24 11:56:18 +00:00
curve25519.c wsutil: fix build failure of Debian packages on Ubuntu 16.04 2019-06-30 13:07:43 +00:00
curve25519.h wsutil: fix build failure of Debian packages on Ubuntu 16.04 2019-06-30 13:07:43 +00:00
dot11decrypt_wep.c HTTPS (almost) everywhere. 2019-07-26 18:44:40 +00:00
eax.c HTTPS (almost) everywhere. 2019-07-26 18:44:40 +00:00
eax.h replace SPDX identifier GPL-2.0+ with GPL-2.0-or-later. 2018-02-08 14:57:36 +00:00
epochs.h Put various epoch time deltas into wsutil/epochs.h. 2020-01-21 23:37:05 +00:00
exported_pdu_tlvs.h iwarp_mpa: fix iWarp MPA for NFS-over-RDMA 2021-08-31 08:14:31 +00:00
file_util.c MSVC: Warn about unused formal parameters 2019-09-21 08:51:34 +00:00
file_util.h file_util: Fix declaration is not a prototype [-Wstrict-prototypes] 2021-09-21 14:52:32 +00:00
filesystem.c Qt: Register import_hexdump.json as a profile file 2021-09-21 18:20:34 +00:00
filesystem.h Qt: Register import_hexdump.json as a profile file 2021-09-21 18:20:34 +00:00
g711.c HTTPS (almost) everywhere. 2019-07-26 18:44:40 +00:00
g711.h replace SPDX identifier GPL-2.0+ with GPL-2.0-or-later. 2018-02-08 14:57:36 +00:00
glib-compat.h wsutil: Provide static inline g_memdup2 in glib-compat.h to not export it 2021-10-11 21:51:35 +02:00
inet_addr.c Replace g_log() calls with ws_log() 2021-06-16 12:50:27 +00:00
inet_addr.h wsutil: fix WS_INET_ADDRSTRLEN definition on Windows 2018-05-11 18:24:15 +00:00
inet_ipv4.h ip: Reassemble across VLANs for publicly routable IPv4 addresses 2021-05-25 20:09:25 -04:00
inet_ipv6.h replace SPDX identifier GPL-2.0+ with GPL-2.0-or-later. 2018-02-08 14:57:36 +00:00
interface.c Eliminate some unneeded header checks. 2018-05-16 22:03:09 +00:00
interface.h replace SPDX identifier GPL-2.0+ with GPL-2.0-or-later. 2018-02-08 14:57:36 +00:00
jsmn.c wsutil: split libjsmn. 2016-09-30 20:12:00 +00:00
jsmn.h jsmn(.h): fix warning: '@param' command used in a comment that is not attached to a function declaration [-Wdocumentation] 2016-10-06 14:20:16 +00:00
json_dumper.c Replace g_log() calls with ws_log() 2021-06-16 12:50:27 +00:00
json_dumper.h json_dumper: add json_dumper_value_double 2019-02-11 05:09:58 +00:00
mpeg-audio.c HTTPS (almost) everywhere. 2019-07-26 18:44:40 +00:00
mpeg-audio.h replace SPDX identifier GPL-2.0+ with GPL-2.0-or-later. 2018-02-08 14:57:36 +00:00
netlink.h Don't include config.h in system headers 2021-01-30 10:06:20 +00:00
nstime.c nstime: Fix Dead Store (found by Clang Analyzer) 2021-07-30 20:43:55 +00:00
nstime.h editcap: add support for epoch timestamps in `-A` and `-B` options 2021-01-11 18:01:08 +00:00
os_version_info.c Windows: Update displayed OS version info 2021-09-11 14:27:21 +00:00
os_version_info.h Windows: Fetch our version using RtlGetVersion. 2018-06-26 20:30:02 +00:00
pint.h HTTPS (almost) everywhere. 2019-07-26 18:44:40 +00:00
please_report_bug.c Update our issue tracker URL in some places. 2020-09-16 01:29:07 +00:00
please_report_bug.h Add routines to return "Please report this as a bug" message strings. 2019-03-24 04:48:12 +00:00
plugins.c Add new global header wireshark.h with guideline 2021-10-22 06:41:44 +00:00
plugins.h Add new global header wireshark.h with guideline 2021-10-22 06:41:44 +00:00
pow2.h Define macros to calculate (2^N)^M, and use them in more places. 2018-02-20 05:27:38 +00:00
privileges.c Replace g_log() calls with ws_log() 2021-06-16 12:50:27 +00:00
privileges.h replace SPDX identifier GPL-2.0+ with GPL-2.0-or-later. 2018-02-08 14:57:36 +00:00
processes.h Move even more headers outside extern "C". 2021-03-16 04:33:00 -07:00
regex.c regex: Prefer C99/POSIX types 2021-11-15 02:41:59 +00:00
regex.h regex: Prefer C99/POSIX types 2021-11-15 02:41:59 +00:00
report_message.c Add more error-reporting routines that call through a function pointer. 2021-03-15 12:17:59 -07:00
report_message.h Add more error-reporting routines that call through a function pointer. 2021-03-15 12:17:59 -07:00
rsa.c Refactor our logging and extend the wslog API 2021-06-11 09:40:28 +00:00
rsa.h replace SPDX identifier GPL-2.0+ with GPL-2.0-or-later. 2018-02-08 14:57:36 +00:00
sign_ext.h Replace g_assert() with ws_assert() in places 2021-06-06 20:05:26 +00:00
sober128.c HTTPS (almost) everywhere. 2019-07-26 18:44:40 +00:00
sober128.h wsutil/sober128: remove unused macros and functions 2017-02-02 21:13:55 +00:00
socket.c Replace g_assert() with ws_assert() in places 2021-06-06 20:05:26 +00:00
socket.h wsutil: add netinet/in.h to socket.h. 2019-11-12 19:17:46 +00:00
str_util.c Add new global header wireshark.h with guideline 2021-10-22 06:41:44 +00:00
str_util.h Add new global header wireshark.h with guideline 2021-10-22 06:41:44 +00:00
strnatcmp.c HTTPS (almost) everywhere. 2019-07-26 18:44:40 +00:00
strnatcmp.h wsutil: use SPDX identifiers. 2018-02-07 05:34:22 +00:00
strptime.c Fix many spelling errors 2020-10-11 08:35:55 +00:00
strptime.h replace SPDX identifier GPL-2.0+ with GPL-2.0-or-later. 2018-02-08 14:57:36 +00:00
strtoi.c Replace g_assert() with ws_assert() in places 2021-06-06 20:05:26 +00:00
strtoi.h Add ws_strtoi() and ws_strtoui() routines and use them. 2020-02-25 08:27:52 +00:00
tempfile.c Fix -Wdocumentation warning 2021-04-14 14:01:49 +00:00
tempfile.h tempfile(.h): fix -Wdocumentation 2020-03-23 08:47:50 +00:00
test_wsutil.c wsutil: Improve bytes_to_str_max() API 2021-11-09 20:57:05 +00:00
time_util.c Replace g_log() calls with ws_log() 2021-06-16 12:50:27 +00:00
time_util.h Move even more headers outside extern "C". 2021-03-16 04:33:00 -07:00
to_str.c wsutil: Rename ws_return_ptr_if_null() macro 2021-11-14 20:58:14 +00:00
to_str.h Fix some narrowing compiler warnings 2021-11-10 16:13:17 +00:00
type_util.c HTTPS (almost) everywhere. 2019-07-26 18:44:40 +00:00
type_util.h replace SPDX identifier GPL-2.0+ with GPL-2.0-or-later. 2018-02-08 14:57:36 +00:00
unicode-utils.c wsutil: argv[] is a NULL terminated array 2021-06-10 16:22:12 +00:00
unicode-utils.h Move even more headers outside extern "C". 2021-03-16 04:33:00 -07:00
utf8_entities.h Qt: Replace the toolbar extension icon. 2018-02-17 08:26:46 +00:00
win32-utils.c Refactor our logging and extend the wslog API 2021-06-11 09:40:28 +00:00
win32-utils.h Remove ABI compliance checker code. 2019-07-21 15:54:41 +00:00
ws_assert.c wsutil: Rewrite ws_assert() to minimize dependencies 2021-06-25 22:06:32 +00:00
ws_assert.h dfilter: Require double-quoted strings with "matches" 2021-10-17 22:53:36 +00:00
ws_cpuid.h Fix many spelling errors 2020-10-11 08:35:55 +00:00
ws_getopt.c ws_getopt: Rename struct and macros 2021-09-30 13:59:28 +00:00
ws_getopt.h ws_getopt: Rename struct and macros 2021-09-30 13:59:28 +00:00
ws_mempbrk.c HTTPS (almost) everywhere. 2019-07-26 18:44:40 +00:00
ws_mempbrk.h replace SPDX identifier GPL-2.0+ with GPL-2.0-or-later. 2018-02-08 14:57:36 +00:00
ws_mempbrk_int.h replace SPDX identifier GPL-2.0+ with GPL-2.0-or-later. 2018-02-08 14:57:36 +00:00
ws_mempbrk_sse42.c Fix many spelling errors 2020-10-11 08:35:55 +00:00
ws_pipe.c Debug: Lower priority to "noisy" for pipe spawn output 2021-06-23 17:45:44 +00:00
ws_pipe.h HTTPS (almost) everywhere. 2019-07-26 18:44:40 +00:00
ws_return.h wsutil: Rename ws_return_ptr_if_null() macro 2021-11-14 20:58:14 +00:00
ws_roundup.h wsutil: add a header that defines some "round to power of 2" macros. 2021-06-16 02:01:23 -07:00
wsgcrypt.c HTTPS (almost) everywhere. 2019-07-26 18:44:40 +00:00
wsgcrypt.h wsutil: define HAVE_LIBGCRYPT_AEAD in wsutil/wsgcrypt.h. 2020-08-11 02:30:04 +00:00
wsjson.c NGAP: fix dissection of multiple NGAP messages in the same HTTP2 packet 2021-06-21 13:33:55 +00:00
wsjson.h NGAP: fix dissection of multiple NGAP messages in the same HTTP2 packet 2021-06-21 13:33:55 +00:00
wslog.c wslog: Remove (part of) a special case for the default level 2021-11-15 09:22:06 +00:00
wslog.h wslog: Remove (part of) a special case for the default level 2021-11-15 09:22:06 +00:00
xtea.c HTTPS (almost) everywhere. 2019-07-26 18:44:40 +00:00
xtea.h HTTPS (almost) everywhere. 2019-07-26 18:44:40 +00:00