Commit Graph

85 Commits

Author SHA1 Message Date
John Thacker 5ee2e7c268 QUIC: Handle QUIC connections multiplexed on the same 5-tuple
Different QUIC connections can be multiplexed on the same network
5-tuple. Handle this, including checking for Stateless Reset tokens
on all connections on the same 5-tuple.

Create a CONVERSATION_QUIC type using our internal QUIC connection
ID, and set the conversation elements so that subdissectors like
TLS that set conversation data only alter data for the one QUIC
connection instead of all multiplexed connections.

Various failures are expected, per RFC 9000, if zero-length connection
IDs are used when multiplexing connections on the same local IP addresses
and ports.

Fix #17099
2022-12-22 19:56:19 +00:00
Chuck Craft 3a61e3f851 SNMP/UDP: SNMP is walking on UDP conversation/stream ID 2022-12-16 08:46:03 +00:00
Brian Sipos 9866cf3bad BPv7: Add conversation and endpoint tracking
This adds BPv7 source and destination as first-class text addresses for the packet.
This fixes proto-data used for decode-as table editing outside of a layer.
2022-12-14 15:44:36 +00:00
Jeremy Kerr 889e5331dc Add NVMe Management Interface (NVMe-MI) dissector
This change adds a small dissector for the NVMe-MI protocol, typically
for tunelling Administration commands over an MCTP (over I2C) channel.

We just decode the request and response headers, and leave the payload
as raw data.

Signed-off-by: Jeremy Kerr <jk@codeconstruct.com.au>
2022-11-15 09:05:05 +00:00
Jeremy Kerr e1cbe02cce Add Management Component Transport Protocol (MCTP) dissector
This change adds a protocol dissector for the Management Component
Transport Protocol (MCTP). This is a failry simple datagram-based
protocol for messaging between components within a single platform,
typically over I2C, serial or PCIe.

This dissector just implements the header fields, and sequence-number
based message reassembly. Inner protocols will be added as follow-up
changes.

Linux has support for AF_MCTP data, so decode from the MCTP SLL ltype.

Signed-off-by: Jeremy Kerr <jk@codeconstruct.com.au>
2022-11-15 09:05:05 +00:00
Patricia Lindner ceed050c47 LTP: Enhance with generated items, sequence analysis, and statistics
This change adds computed values for reports, sequence analysis between
segments, conversation and endpoint taps, and a new statistics menu
and dialog.
2022-10-13 09:30:55 +00:00
Guy Harris 308e295669 conversation: bring back conversation_pt_to_endpoint_type().
It may be used by third-party code, and it may be useful on its own, at
least for now.
2022-09-02 00:07:53 -07:00
Guy Harris 68a77b48e9 conversation: give more details of the various conversation keys.
Give details about the conversation elements key and the pair of
address/port endpoints key, including a bunch of XXX comments about how
this should perhaps be cleaned up.
2022-08-30 10:25:35 +00:00
Guy Harris a6ee179427 conversation: speak of the "conversation key" as just address/port endpoints.
It's not a general key for looking up arbitrary conversations - that's
what an array of conversation elements is for - it's just a pair of
address/port endpoints.  (It's not even hijacked for conversations
identified by a circuit ID any more.)
2022-08-29 19:19:59 -07:00
Guy Harris 95aff565ab conversation: fix some comments. 2022-08-26 00:10:01 -07:00
Guy Harris deb95a275d Rename routines that talk about conversation keys to talk about elements.
And change them to say "set" rather than "create"; they do more than
just allocate an array of conversation elements, they stuff a pointer to
that array into pinfo, which may affect what other dissectors do.
2022-08-25 22:37:19 -07:00
Guy Harris 8195bdd340 Rename a bunch of things with "conversation".
A conversation in Wireshark might have two endpoints or might have no
endpoints; few if any have one endpoint.  Distinguish between
conversations and endpoints.
2022-08-25 20:02:20 -07:00
Roland Knall a807047b95 Qt: Adapt sorting for traffic tables
Improve sorting for the traffic tables
2022-06-12 14:53:23 +02:00
John Thacker a3e0d93bed debian: Remove removed symbols
Commit 5cd591129f removes a number
of conversation related functions. Remove them from the debian
symbol list.

The commit also removed the implementation of conversation_hash_exact,
so remove the declaration from the header file.
2022-06-05 22:48:43 -04:00
Gerald Combs 286f57a2c7 epan: Check for null addresses in find_conversation.
Make sure we don't pass null address pointers to conversation_lookup_*.
Fixes #18126.
2022-06-05 17:58:50 -07:00
Gerald Combs 5cd591129f epan: Convert remaining conversation code to elements.
Convert the address+port conversation code to element lists. Make our
conversation keys element lists. Document more of the conversation API.

Update the Conversation Hash Table dialog to use the new API.

Describe an alternative key type and data structure at the top of
conversation.c.
2022-06-05 19:05:33 +00:00
Jaap Keuter 709593ee91 Make distinction between conversation options for creation and search 2022-06-02 22:58:15 +00:00
Gerald Combs e8dc20899f epan: Remove conversation_create_endpoint options.
The "options" paramameter was never used, so remove it.
2022-05-29 18:00:09 -07:00
Gerald Combs 34d74031a9 epan+Qt: Add element tables to the ConversationHashTablesDialog.
Add get_conversation_hashtables() and use it to populate the
conversation hash tables dialog.
2022-05-25 19:09:12 +00:00
Alexis La Goutte 966969e777 conversation(.h): Fix -Wdocumentation 2022-05-25 18:53:48 +00:00
Gerald Combs c0032f2f0d epan: Switch the conversation IDs back to guint32s.
Switch the _by_id IDs back to guint32s. None of the current callers need
64 bits and if someone needs 64-bit IDs they can use conversation_new_full.
2022-05-24 12:07:48 -07:00
Gerald Combs 865feb2bf8 epan: Switch some _by_id conversation routines to elements.
Switch the non-endpoint *_by_id conversation routines to use element
lists. Change the ID type from guint32 to guint64. None of them used the
address+port option flag arguments, so remove them.
2022-05-24 17:18:21 +00:00
Gerald Combs be929e162d epan: Allow conversations based on arbitrary element lists.
Add conversation_new_full and find_conversation_full, which take
arbitrary element lists instead of fixed addresses and ports.

Update the comments in conversation.h to be more Doxygen-conformant.
Update README.dissector.

Use the new functionality to add initial conversation support to the
Falco Bridge dissector.
2022-05-23 18:12:26 +00:00
Gerald Combs b09263f1a3 epan: Normalize conversation code indentation.
Change the indentation of conversation.[ch] to 4 spaces to match
conversation_table.[ch] and conversation_filter.[ch].
2022-05-09 10:50:17 -07:00
Gerald Combs 88f07ff5d1 epan: Add a null conversation checks.
Check for null conversations in conversation_add_proto_data,
conversation_get_proto_data, and conversation_delete_proto_data.
Document them as well. Ping #18043.
2022-04-21 16:27:43 +00:00
John Thacker c6e44fb00c BT-uTP: Track conversations
Add endpoint type for uTP connection IDs.
Manage uTP conversations, creating generated stream ID to filter
on both sides of a conversation.
Display more information in INFO column, similar to TCP.
This is some progress towards #8792.
2021-10-13 04:37:21 +00:00
Jorge Mora 981ec7f3c7 iwarp_mpa: fix iWarp MPA for NFS-over-RDMA
On the first packet of the conversation, the MPA layer is
dissected correctly followed by the DDP, RDMAP, RPC-over-RDMA,
RPC and NFS layers. The MPA layer sets the TCP conversation as
MPA protocol but when it dissects the RPC layer it also sets
the TCP conversation as RPC protocol thus overwriting the previous
protocol.

Added new port type PT_IWARP_MPA so that when the RPC layer
is dissected it does not overwrite the default protocol for
the TCP conversation which has already been set to MPA.

Fixes #15869.
2021-08-31 08:14:31 +00:00
João Valverde 133b0c583f Move epan/wmem/wmem_scopes.h to epan/
This header was installed incorrectly to epan/wmem_scopes.h.

Instead of creating additional installation rules for a single
header in a subfolder (kept for backward compatibility) just
rename the standard "epan/wmem/wmem.h" include to
"epan/wmem_scopes.h" and fix the documentation.

Now the header is installed *correctly* to epan/wmem_scopes.h.
2021-07-26 14:56:11 +00:00
John Thacker c5c25a9268 DVB-S2-BB: Add support for TS over BBFrame
Add support for Transport Streams carried over DVB Base Band Frames,
passing them to the MP2T dissector. Add an endpoint type for the ISI.
Update comments. Use standard true false strings in a couple cases.
Create a header file for MP2T, since the BBFrame dissector needs to
know about the MPEG2 TS packet size and sync byte.
2021-06-05 08:12:47 +00:00
Guy Harris 1e1f4e6b5f Move more headers outside extern "C".
If a header declares a function, or anything else requiring the extern
"C" decoration, have it wrap the declaration itself; don't rely on the
header itself being included inside extern "C".
2021-03-16 02:36:10 -07:00
Joerg Mayer 4f2304ae02 conversation.h: Whitespace fixes
Change-Id: Id8b0b352ac5fcfc7451663367ccea8fe4be86da9
Reviewed-on: https://code.wireshark.org/review/35200
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2019-11-24 21:33:18 +00:00
Guy Harris 9cf292a30f Revert "Have find_or_create_conversation() use pinfo->conv_endpoint if present."
This reverts commit ba202ef362.

Creating endpoints, and corresponding conversations, for protocols atop which TCP or UDP runs can potentially cause attempts to look up the conversation to find the conversation for that protocol rather than for TCP/UDP, which can confuse protocols running atop TCP or UDP.

Change-Id: I3ca522e54e67cc4f996d0ee841c6bb40ee6a9976
Reviewed-on: https://code.wireshark.org/review/28912
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-08-01 02:55:18 +00:00
Guy Harris ba202ef362 Have find_or_create_conversation() use pinfo->conv_endpoint if present.
Add conversation_new_pinfo(), which uses the endpoint if present, and
have find_or_create_conversation() use it rather than
conversation_new().

Remove find_or_create_conversation_by_id() - it's no longer needed.

Bug: 15018
Change-Id: Ib13e539751af0f071aede4ee0ed751d0cb72ba3f
Reviewed-on: https://code.wireshark.org/review/28908
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-07-31 22:53:27 +00:00
Guy Harris 137bbb2d14 Export some more conversation functions.
They're used by built-in dissectors; I see no reason whatsoever to
forbid plugins from using them.

See

    https://ask.wireshark.org/question/4366/compile-plugin-with-call-to-conversation_set_port2/

Change-Id: I6a04df961c164a09b88abd8f46a1fe3420a21661
Reviewed-on: https://code.wireshark.org/review/28906
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-07-31 21:45:26 +00:00
Guy Harris d950b14f26 For ISDN, don't create an endpoint by ID and then use it.
That isn't working, because it depends on the notion that for every
"endpoint type" there's a "port type" for the packet_info structure;
that's not true for ISDN channels.

The whole point of "use the packet_info structure when trying to find a
conversation and create it if it doesn't exist" is to use address
information *already filled in by somebody for use by other dissectors*;
we don't do that with the ISDN channel number, because there's no *need*
to do so.

So just add a new find_or_create_conversation_by_id() routine, which
passes the packet_info structure to get the frame number, and explicitly
passes the endpoint type and ID.  Use that in the ISDN dissector.

Bug: 15018
Change-Id: Id0e997254b0eaf7cbc9261a2adff639ecbf083c0
Reviewed-on: https://code.wireshark.org/review/28904
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-07-31 21:14:48 +00:00
Robert Jongbloed d16308c89a UDP: Heuristic dissector for conversation taking precedence
When a single UDP port is supporting multiple protocols, for example RTP and
RTCP can share a port, and one of these protocols is detected through a
heuristic before a superior protocol (e.g. SIP/SDP) has established that the
port has multiple protocols, then only the heuristic is used. This is due to
only looking for an exact match with find_conversation() and not going any
further. The superior protocol only adds the dissector by source address/port.
So, to fix, if we do not find the exact match, we continue serching for a
dissector on the partial matches.

Bug: 14370
Change-Id: Icdded9ca1637cd594b920f979f6f0a003bef9aae
Reviewed-on: https://code.wireshark.org/review/25432
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2018-02-10 20:51:55 +00:00
Dario Lombardo 55c68ee69c epan: use SPDX indentifiers.
Skipping dissectors dir for now.

Change-Id: I717b66bfbc7cc81b83f8c2cbc011fcad643796aa
Reviewed-on: https://code.wireshark.org/review/25694
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-02-08 19:29:45 +00:00
Michael Mann 800b26edbe Remove circuit API
Replace with conversation API that limits the "endpoint" to a single
uint32 value.

The intention is to eventually have "layered" endpoints, because circuit_id
was used in cases where src/dest port have already been populated (and
are used for layers above).  Those src/dest ports should just be treated
as just another endpoint, but we currently only have support for one.

Change-Id: Ic6aa7ef0241275aa4dfde9459194369b48c72960
Reviewed-on: https://code.wireshark.org/review/24369
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-11-13 05:21:36 +00:00
Michael Mann afb252355b ISDN: Convert circuit API to conversation API
Change-Id: I8752123a740c47f9328e0144624d4fbf4e200165
Reviewed-on: https://code.wireshark.org/review/24314
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-11-09 07:50:09 +00:00
Michael Mann 78665f5211 ISO 14443: Convert circuit API to conversation API
Change-Id: Id007a3df5442cf4d21263acb17303b6d735aaa7d
Reviewed-on: https://code.wireshark.org/review/24311
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-11-09 07:48:38 +00:00
Michael Mann 82891e37e9 DVB-CI: Convert circuit API to conversation API
Add the few necessary conversation APIs to make conversion possible.

Change-Id: I775f23005c48cacd2be342bdc704af4738f0789c
Reviewed-on: https://code.wireshark.org/review/24310
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-11-09 07:47:41 +00:00
Michael Mann 66b441f3d6 Add ability to create endpoints through conversations
Add endpoint information to the packet_info structure for dissectors
to potentially use as their data to create conversations.

This patch includes a simple "example" of using conversation_create_endpoint
with TDMoP.  The assignment of the PT_TDMOP "port type" has been replaced by
setting ENDPOINT_TDMOP within the endpoint structure.  Then when subdissectors
of TDMoP call find_or_create_conversation(), it implicitly picks up the
conversation information set by TDMoP

Change-Id: I11dc29989cccd3b0f0349ee901babb455ca02d19
Reviewed-on: https://code.wireshark.org/review/24190
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Andrew Chernyh <andrew.chernyh@gmail.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-11-01 02:41:45 +00:00
Michael Mann abfb644117 Add conversation endpoint type
For the moment this mirrors the port_type enumeration (PT_XXX), but the
intent is to move away from using "port types", eliminating most (if not
all)

Added conversation_pt_to_endpoint_type() so that conversations deal with the
correct enumeration.  This is for dissector that use pinfo->ptype as input
to conversation APIs.  Explicit use of port types are converted to using
ENDPOINT_XXX type.

Change-Id: Ia0bf553a3943b702c921f185407e03ce93ebf0ef
Reviewed-on: https://code.wireshark.org/review/24166
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-10-29 16:53:57 +00:00
Michael Mann 7dbc520d57 Privatize the conversation_key structure
The intention is to make it more transparent when making a switch
to an "endpoint" over address/port combination.

Change-Id: Ic424c32095ecb103bcb4f7f4079c549de2c8d9c4
Reviewed-on: https://code.wireshark.org/review/24148
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-10-28 19:22:24 +00:00
Michael Mann 7df5fcdc51 Share use of conversation_hash_exact
It was duplicated in GTK, so just make it public (at least for now)

Change-Id: I89d985b2d42f0edb1c535a65a97b132920dedbcd
Reviewed-on: https://code.wireshark.org/review/24146
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-10-28 16:00:46 +00:00
Michael Mann 3a6552744f Add find_conversation_pinfo
Convenience function to add the same parameters to find_conversation as
find_or_create_conversation.

Change-Id: I3a92541cb9c1e827a9de8248825636debbd989cd
Reviewed-on: https://code.wireshark.org/review/24118
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-10-27 21:51:49 +00:00
Michael Mann b54c438011 Convert conversation hash tables to use wmem.
Simplifies cleanup because wmem can handle the memory cleanup.

Change-Id: Idc6a9bfe5f23c83b59a5278a64b9fb706862342d
Reviewed-on: https://code.wireshark.org/review/20042
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-02-10 13:26:14 +00:00
Michael Mann e0fafa5475 Convert conversation data_list from GSList to wmem_tree.
Change-Id: I7eac4b4da86d1ac1ce8753f424b698a9949df00b
Reviewed-on: https://code.wireshark.org/review/20041
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-02-10 03:42:16 +00:00
Dario Lombardo f8500f39e2 conversation: rename shadow variable
Change-Id: I8f738b2e01d7f448b21cdc1b488b16b7dd581911
Reviewed-on: https://code.wireshark.org/review/16104
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-06-26 06:03:14 +00:00
Anders Broman 56a41845e7 Revert "Create an extended converstaion hastable taking more address information into consideration. This makes it possible to differentiate between packets on different vlans and can be expanded to handle tunnels."
This reverts commit f80e9df793.

Change-Id: I7877b250d479c30209cfe74351069d54359757b5
Reviewed-on: https://code.wireshark.org/review/13825
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-02-08 16:32:57 +00:00