wireshark/epan
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
..
crypt Fix some spelling errors. 2021-09-28 09:50:58 +00:00
dfilter dfilter: Add compilation result to log output 2021-11-16 13:52:30 +00:00
dissectors wmem: Add a multimap 2021-11-21 07:16:55 -05:00
ftypes Move regex code to wsutil 2021-11-14 21:00:59 +00:00
wslua Qt: Make Lua dialogs children of the main window. 2021-11-15 20:03:16 +00:00
.editorconfig
CMakeLists.txt Move regex code to wsutil 2021-11-14 21:00:59 +00:00
addr_and_mask.c Replace g_assert() with ws_assert() 2021-06-19 01:23:31 +00:00
addr_and_mask.h
addr_resolv.c Move more numerical functions to wsutil/to_str.h 2021-09-16 20:55:03 +01:00
addr_resolv.h
address.h iwarp_mpa: fix iWarp MPA for NFS-over-RDMA 2021-08-31 08:14:31 +00:00
address_types.c wsutil: Remove ip6_to_str_buf_with_pfx() 2021-09-17 00:08:41 +01:00
address_types.h
afn.c
afn.h
aftypes.c
aftypes.h
app_mem_usage.c
app_mem_usage.h
arcnet_pids.h
arptypes.h
asn1.c epan: remove a few more uses of wmem_packet_scope 2021-08-29 11:38:25 +00:00
asn1.h
ax25_pids.h
bridged_pids.h
capture_dissectors.c Replace g_assert() with ws_assert() 2021-06-19 01:23:31 +00:00
capture_dissectors.h
charsets.c epan: remove a few more uses of wmem_packet_scope 2021-08-29 11:38:25 +00:00
charsets.h
chdlctypes.h
cisco_pid.h
color_filters.c Replace g_assert() with ws_assert() 2021-06-19 01:23:31 +00:00
color_filters.h Move more headers outside extern "C". 2021-03-16 02:36:10 -07:00
column-info.h
column-utils.c Replace g_assert() with ws_assert() 2021-06-19 01:23:31 +00:00
column-utils.h
column.c Replace g_assert() with ws_assert() 2021-06-19 01:23:31 +00:00
column.h
conv_id.h
conversation.c iwarp_mpa: fix iWarp MPA for NFS-over-RDMA 2021-08-31 08:14:31 +00:00
conversation.h BT-uTP: Track conversations 2021-10-13 04:37:21 +00:00
conversation_debug.h
conversation_filter.c
conversation_filter.h
conversation_table.c TCP: Conversations Statistics loyalty to connections initiators 2021-02-21 13:12:35 +00:00
conversation_table.h Move epan/wmem/wmem_scopes.h to epan/ 2021-07-26 14:56:11 +00:00
crc6-tvb.c
crc6-tvb.h
crc8-tvb.c
crc8-tvb.h
crc10-tvb.c
crc10-tvb.h
crc16-tvb.c
crc16-tvb.h
crc32-tvb.c
crc32-tvb.h
dccpservicecodes.h Added IANA-assigned DCCP Service Codes. 2021-02-19 13:50:35 +01:00
decode_as.c Replace g_assert() with ws_assert() 2021-06-19 01:23:31 +00:00
decode_as.h
diam_dict.h
diam_dict.l Windows: Fix warnings using flex 2021-10-22 06:41:44 +00:00
disabled_protos.c Replace g_log() calls with ws_log() 2021-06-16 12:50:27 +00:00
disabled_protos.h
dtd.h
dtd_grammar.lemon
dtd_parse.h
dtd_parse.l Add new global header wireshark.h with guideline 2021-10-22 06:41:44 +00:00
dtd_preparse.l Add new global header wireshark.h with guideline 2021-10-22 06:41:44 +00:00
dvb_chartbl.c dvb_chartbl: remove wmem_packet_scope 2021-09-07 17:06:08 +00:00
dvb_chartbl.h
eap.h
eapol_keydes_types.h
epan.c Make PCRE2 a required dependency 2021-11-14 21:00:59 +00:00
epan.h epan: export epan_set_always_visible() 2021-09-08 14:40:24 +00:00
epan_dissect.h Move more headers outside extern "C". 2021-03-16 02:36:10 -07:00
etypes.h IEEE 1722 AVTP: Fix name 2021-09-02 16:23:09 +00:00
ex-opt.c Use the musl in-tree getopt_long() everywhere 2021-09-17 00:43:54 +01:00
ex-opt.h Use the musl in-tree getopt_long() everywhere 2021-09-17 00:43:54 +01:00
except.c Add ws_debug() and use it 2021-05-24 01:13:19 +00:00
except.h
exceptions.h exceptions: set FragmentBoundsError priority above ContainedBoundsError 2021-10-23 15:42:10 +00:00
exntest.c
expert.c Move epan/wmem/wmem_scopes.h to epan/ 2021-07-26 14:56:11 +00:00
expert.h
export_object.c
export_object.h Move epan/wmem/wmem_scopes.h to epan/ 2021-07-26 14:56:11 +00:00
exported_pdu.c iwarp_mpa: fix iWarp MPA for NFS-over-RDMA 2021-08-31 08:14:31 +00:00
exported_pdu.h Move LINKTYPE_WIRESHARK_UPPER_PDU definitions to a separate header. 2021-08-20 02:18:19 -07:00
filter_expressions.c Qt: Undo MR 3422 (filter button separator hint) 2021-06-23 05:12:08 +00:00
filter_expressions.h Move epan/wmem/wmem_scopes.h to epan/ 2021-07-26 14:56:11 +00:00
follow.c HTTP2, QUIC: fix "Follow Stream" 2021-09-13 15:13:10 +00:00
follow.h HTTP2, QUIC: fix "Follow Stream" 2021-09-13 15:13:10 +00:00
frame_data.c wiretap: always allocate a block for a record. 2021-08-29 19:12:13 -07:00
frame_data.h wiretap: always allocate a block for a record. 2021-08-29 19:12:13 -07:00
frame_data_sequence.c Fix null pointer 2021-06-21 18:12:45 +00:00
frame_data_sequence.h
funnel.c wsutils: add local implementation of g_memdup2. 2021-03-25 09:38:10 +00:00
funnel.h Qt: Make Lua dialogs children of the main window. 2021-11-15 20:03:16 +00:00
garrayfix.h
golay.c
golay.h
guid-utils.c guids: wmem-scope lookups 2021-09-28 15:07:55 -04:00
guid-utils.h guids: wmem-scope lookups 2021-09-28 15:07:55 -04:00
iana_charsets.c
iana_charsets.h
iax2_codec_type.h
in_cksum.c
in_cksum.h
ip_opts.h
ipproto.c Eth: Segment routing over IPv6 2021-10-05 13:29:55 +00:00
ipproto.h Eth: Segment routing over IPv6 2021-10-05 13:29:55 +00:00
ipv4.h
ipv6.h
lapd_sapi.h
llcsaps.h
maxmind_db.c Update a bunch of GLib documentation links. 2021-11-20 21:33:17 +00:00
maxmind_db.h maxmind: add optional synchronous lookups 2021-04-02 06:48:42 +00:00
media_params.c
media_params.h Move epan/wmem/wmem_scopes.h to epan/ 2021-07-26 14:56:11 +00:00
next_tvb.c tvblist: explicitly scope memory 2021-09-08 01:37:07 +00:00
next_tvb.h tvblist: explicitly scope memory 2021-09-08 01:37:07 +00:00
nlpid.h osi/nlpid: Update Avaya proprietary NLPID 2021-04-01 15:45:38 +02:00
oids.c oids: remove global scopes from debug code 2021-09-07 17:39:22 +00:00
oids.h Move epan/wmem/wmem_scopes.h to epan/ 2021-07-26 14:56:11 +00:00
oids_test.c Move epan/wmem/wmem_scopes.h to epan/ 2021-07-26 14:56:11 +00:00
osi-utils.c osi: avoid global memory scopes 2021-09-14 19:05:11 +00:00
osi-utils.h osi: avoid global memory scopes 2021-09-14 19:05:11 +00:00
oui.h MeshConnex (MCX): MCX packet decode logic 2021-10-19 19:11:05 +00:00
packet.c BBLog: Fix support of TCP window scaling 2021-11-08 23:05:20 +00:00
packet.h TCP, UDP, SCTP: Try user specified ports first 2021-10-21 06:48:52 +00:00
packet_info.h BBLog: Fix support of TCP window scaling 2021-11-08 23:05:20 +00:00
params.h
pci-ids.c [Automatic update for 2021-11-14] 2021-11-14 16:39:31 +00:00
pci-ids.h NCSI: Squash commits of NCSI and PCI-IDS 2021-02-17 07:10:31 +00:00
plugin_if.c Replace g_assert() with ws_assert() 2021-06-19 01:23:31 +00:00
plugin_if.h
ppptypes.h
prefs-int.h Move epan/wmem/wmem_scopes.h to epan/ 2021-07-26 14:56:11 +00:00
prefs.c epan: Fix crash with upper-case protocol filter names 2021-11-04 16:29:34 +00:00
prefs.h IO Graph: Add checkbox to prevent automatic rescans 2021-09-21 12:58:55 +00:00
print.c ftypes: Internal headers need to be internal 2021-11-11 03:15:31 +00:00
print.h
print.ps
print_stream.c
print_stream.h
proto.c ftypes: Internal headers need to be internal 2021-11-11 03:15:31 +00:00
proto.h epan: Optimize heuristic name validity check 2021-11-04 14:03:37 +00:00
proto_data.c proto_data: use pinfo->pool not the global scope 2021-10-04 15:52:10 +00:00
proto_data.h Move more headers outside extern "C". 2021-03-16 02:36:10 -07:00
protobuf-helper.c
protobuf-helper.h
protobuf_lang_parser.lemon Add missing prototypes to lemon-generated code. 2021-04-16 18:38:26 +00:00
protobuf_lang_scanner.l Add new global header wireshark.h with guideline 2021-10-22 06:41:44 +00:00
protobuf_lang_tree.c protobuf: Fix leaking nodes and strings 2021-04-02 07:25:31 +00:00
protobuf_lang_tree.h Move more headers outside extern "C". 2021-03-16 02:36:10 -07:00
ps.h
ptvcursor.h ptvcursor: add explicit memory scope 2021-09-16 07:12:20 +00:00
radius_dict.l Windows: Fix warnings using flex 2021-10-22 06:41:44 +00:00
range.c
range.h Move epan/wmem/wmem_scopes.h to epan/ 2021-07-26 14:56:11 +00:00
reassemble.c Replace g_assert() with ws_assert() 2021-06-19 01:23:31 +00:00
reassemble.h
reassemble_test.c reassemble_test: Add an explicit cast [-Wformat=] 2021-09-25 21:30:20 +01:00
reedsolomon.c Refactor our logging and extend the wslog API 2021-06-11 09:40:28 +00:00
reedsolomon.h
register-int.h
register.c
register.h
req_resp_hdrs.c First pass pinfo->pool conversion 2021-07-21 05:38:29 +00:00
req_resp_hdrs.h
rtd_table.c
rtd_table.h Move epan/wmem/wmem_scopes.h to epan/ 2021-07-26 14:56:11 +00:00
rtp_pt.h Move more headers outside extern "C". 2021-03-16 02:36:10 -07:00
sctpppids.c Added decoding of ProtocolID and PPID into Component Status Protocol dissector. 2021-02-26 15:31:44 +00:00
sctpppids.h Added decoding of ProtocolID and PPID into Component Status Protocol dissector. 2021-02-26 15:31:44 +00:00
secrets.c Replace g_log() calls with ws_log() 2021-06-16 12:50:27 +00:00
secrets.h
sequence_analysis.c Move epan/wmem/wmem_scopes.h to epan/ 2021-07-26 14:56:11 +00:00
sequence_analysis.h Replace g_log() calls with ws_log() 2021-06-16 12:50:27 +00:00
show_exception.c exceptions: set FragmentBoundsError priority above ContainedBoundsError 2021-10-23 15:42:10 +00:00
show_exception.h
slow_protocol_subtypes.h
sminmpec.h
srt_table.c Replace g_assert() with ws_assert() 2021-06-19 01:23:31 +00:00
srt_table.h Move epan/wmem/wmem_scopes.h to epan/ 2021-07-26 14:56:11 +00:00
stat_groups.h Added statistics group for RSerPool protocols. 2021-04-08 09:36:23 +02:00
stat_tap_ui.c Replace g_assert() with ws_assert() 2021-06-19 01:23:31 +00:00
stat_tap_ui.h Move epan/wmem/wmem_scopes.h to epan/ 2021-07-26 14:56:11 +00:00
stats_tree.c Replace g_assert() with ws_assert() 2021-06-19 01:23:31 +00:00
stats_tree.h
stats_tree_priv.h Use the musl in-tree getopt_long() everywhere 2021-09-17 00:43:54 +01:00
stream.c Replace g_assert() with ws_assert() 2021-06-19 01:23:31 +00:00
stream.h Remove lingering circuit API from stream.h 2021-06-13 11:51:44 +00:00
strutil.c epan: Fix crash with upper-case protocol filter names 2021-11-04 16:29:34 +00:00
strutil.h epan: Fix crash with upper-case protocol filter names 2021-11-04 16:29:34 +00:00
t35.c
t35.h
tap-voip.h
tap.c Epan: Reset our tap globals on cleanup. 2021-11-09 22:22:09 +00:00
tap.h
tfs.c
tfs.h
time_fmt.h
timestamp.c
timestamp.h
timestats.c
timestats.h
to_str.c to_str: scope decode_bits_in_field 2021-10-05 04:42:13 +00:00
to_str.h to_str: scope tvb_ip6_to_str 2021-10-07 13:31:23 -04:00
tvbparse.c tvbparse: explicitly memory-scope parser 2021-09-16 06:54:42 +00:00
tvbparse.h tvbparse: explicitly memory-scope parser 2021-09-16 06:54:42 +00:00
tvbtest.c tvbtest: Test offsets returned by tvb_find on subsets. 2021-04-03 15:12:20 +00:00
tvbuff-int.h
tvbuff.c exceptions: set FragmentBoundsError priority above ContainedBoundsError 2021-10-23 15:42:10 +00:00
tvbuff.h exceptions: set FragmentBoundsError priority above ContainedBoundsError 2021-10-23 15:42:10 +00:00
tvbuff_base64.c epan: more work to avoid global memory pool 2021-09-08 21:25:40 +00:00
tvbuff_brotli.c
tvbuff_composite.c
tvbuff_lz77.c Move epan/wmem/wmem_scopes.h to epan/ 2021-07-26 14:56:11 +00:00
tvbuff_lz77huff.c Move epan/wmem/wmem_scopes.h to epan/ 2021-07-26 14:56:11 +00:00
tvbuff_lznt1.c Move epan/wmem/wmem_scopes.h to epan/ 2021-07-26 14:56:11 +00:00
tvbuff_rdp.c regex: Prefer C99/POSIX types 2021-11-15 02:41:59 +00:00
tvbuff_rdp.h rdp: add dissector for the egfx channel 2021-10-02 11:15:32 +02:00
tvbuff_real.c
tvbuff_subset.c tvbuff_subset: fix its implementation of string scanning. 2021-03-29 01:02:47 +00:00
tvbuff_zlib.c Refactor our logging and extend the wslog API 2021-06-11 09:40:28 +00:00
uat-int.h UAT: Allow missing fields. 2021-11-08 22:20:24 +00:00
uat.c UAT: Allow missing fields. 2021-11-08 22:20:24 +00:00
uat.h UAT: Allow missing fields. 2021-11-08 22:20:24 +00:00
uat_load.l UAT: Allow missing fields. 2021-11-08 22:20:24 +00:00
unit_strings.c
unit_strings.h
value_string.c Move epan/wmem/wmem_scopes.h to epan/ 2021-07-26 14:56:11 +00:00
value_string.h Move epan/wmem/wmem_scopes.h to epan/ 2021-07-26 14:56:11 +00:00
wmem_scopes.c Move epan/wmem/wmem_scopes.h to epan/ 2021-07-26 14:56:11 +00:00
wmem_scopes.h Move epan/wmem/wmem_scopes.h to epan/ 2021-07-26 14:56:11 +00:00
ws_printf.h Add ws_debug() and use it 2021-05-24 01:13:19 +00:00
wscbor.c regex: Prefer C99/POSIX types 2021-11-15 02:41:59 +00:00
wscbor.h COSE: Handle indefinite tstr/bstr encodings 2021-10-05 21:11:36 +00:00
wscbor_test.c WSCBOR: Separate error from non-error expert info 2021-10-26 12:46:16 +00:00
x264_prt_id.h
xdlc.c First pass pinfo->pool conversion 2021-07-21 05:38:29 +00:00
xdlc.h