|
Wireshark 4.7.0
The Wireshark network protocol analyzer
|
Go to the source code of this file.
Classes | |
| struct | conversation_element |
| struct | conversation |
Macros | |
| #define | NO_ADDR2 0x01 |
| #define | NO_PORT2 0x02 |
| #define | NO_PORT2_FORCE 0x04 |
| #define | CONVERSATION_TEMPLATE 0x08 |
| #define | NO_PORTS 0x010 |
| #define | NO_MASK_B 0xFFFF0000 |
| #define | NO_ADDR_B 0x00010000 |
| #define | NO_PORT_B 0x00020000 |
| #define | NO_PORT_X 0x00040000 |
| #define | NO_GREEDY 0x00100000 |
| #define | EXACT_EXCLUDED 0x00200000 |
| #define | USE_LAST_ENDPOINT 0x08 |
| #define | ENDPOINT_NONE CONVERSATION_NONE |
| #define | ENDPOINT_SCTP CONVERSATION_SCTP |
| #define | ENDPOINT_TCP CONVERSATION_TCP |
| #define | ENDPOINT_UDP CONVERSATION_UDP |
| #define | ENDPOINT_DCCP CONVERSATION_DCCP |
| #define | ENDPOINT_IPX CONVERSATION_IPX |
| #define | ENDPOINT_NCP CONVERSATION_NCP |
| #define | ENDPOINT_EXCHG CONVERSATION_EXCHG |
| #define | ENDPOINT_DDP CONVERSATION_DDP |
| #define | ENDPOINT_SBCCS CONVERSATION_SBCCS |
| #define | ENDPOINT_IDP CONVERSATION_IDP |
| #define | ENDPOINT_TIPC CONVERSATION_TIPC |
| #define | ENDPOINT_USB CONVERSATION_USB |
| #define | ENDPOINT_I2C CONVERSATION_I2C |
| #define | ENDPOINT_IBQP CONVERSATION_IBQP |
| #define | ENDPOINT_BLUETOOTH CONVERSATION_BLUETOOTH |
| #define | ENDPOINT_TDMOP CONVERSATION_TDMOP |
| #define | ENDPOINT_DVBCI CONVERSATION_DVBCI |
| #define | ENDPOINT_ISO14443 CONVERSATION_ISO14443 |
| #define | ENDPOINT_ISDN CONVERSATION_ISDN |
| #define | ENDPOINT_H223 CONVERSATION_H223 |
| #define | ENDPOINT_X25 CONVERSATION_X25 |
| #define | ENDPOINT_IAX2 CONVERSATION_IAX2 |
| #define | ENDPOINT_DLCI CONVERSATION_DLCI |
| #define | ENDPOINT_ISUP CONVERSATION_ISUP |
| #define | ENDPOINT_BICC CONVERSATION_BICC |
| #define | ENDPOINT_GSMTAP CONVERSATION_GSMTAP |
| #define | ENDPOINT_IUUP CONVERSATION_IUUP |
| #define | ENDPOINT_DVBBBF CONVERSATION_DVBBBF |
| #define | ENDPOINT_IWARP_MPA CONVERSATION_IWARP_MPA |
| #define | ENDPOINT_BT_UTP CONVERSATION_BT_UTP |
| #define | ENDPOINT_LOG CONVERSATION_LOG |
| #define | ENDPOINT_MCTP CONVERSATION_MCTP |
| #define | ENDPOINT_NVME_MI CONVERSATION_NVME_MI |
| #define | ENDPOINT_SNMP CONVERSATION_SNMP |
| #define | ENDPOINT_IP CONVERSATION_IP |
| #define | ENDPOINT_IPv6 CONVERSATION_IPv6 |
| #define | ENDPOINT_ETH CONVERSATION_ETH |
| #define | ENDPOINT_ILNP CONVERSATION_ILNP |
Typedefs | |
| typedef conversation_type | endpoint_type |
| typedef struct conversation_element | conversation_element_t |
| typedef struct conversation | conversation_t |
| typedef struct conversation_addr_port_endpoints * | conversation_addr_port_endpoints_t |
Functions | |
| WS_DLL_PUBLIC const address * | conversation_key_addr1 (const conversation_element_t *key) |
| Retrieve the first address from a conversation key. | |
| WS_DLL_PUBLIC uint32_t | conversation_key_port1 (const conversation_element_t *key) |
| Retrieve the first port from a conversation key. | |
| WS_DLL_PUBLIC const address * | conversation_key_addr2 (const conversation_element_t *key) |
| Retrieve the second address from a conversation key. | |
| WS_DLL_PUBLIC uint32_t | conversation_key_port2 (const conversation_element_t *key) |
| Retrieve the second port from a conversation key. | |
| void | conversation_init (void) |
| Create a new hash tables for conversations. | |
| void | conversation_epan_reset (void) |
| Initialize some variables every time a file is loaded or re-loaded. | |
| WS_DLL_PUBLIC WS_RETNONNULL conversation_t * | conversation_new_full (const uint32_t setup_frame, conversation_element_t *elements) |
| Create a new conversation identified by a list of elements. | |
| WS_DLL_PUBLIC WS_RETNONNULL conversation_t * | conversation_new (const uint32_t setup_frame, const address *addr1, const address *addr2, const conversation_type ctype, const uint32_t port1, const uint32_t port2, const unsigned options) |
| Given two address/port pairs for a packet, create a new conversation identified by address/port pairs. | |
| WS_DLL_PUBLIC WS_RETNONNULL conversation_t * | conversation_new_by_id (const uint32_t setup_frame, const conversation_type ctype, const uint32_t id) |
| Create a new conversation identified by a conversation index. | |
| WS_DLL_PUBLIC WS_RETNONNULL conversation_t * | conversation_new_err_pkts (const uint32_t setup_frame, const conversation_type ctype, const uint32_t id, const uint32_t rid) |
| Create a new conversation in the err_pkts table. | |
| WS_DLL_PUBLIC bool | is_deinterlacing_supported (const packet_info *pinfo) |
| Returns the Deinterlacing support status. | |
| WS_DLL_PUBLIC WS_RETNONNULL conversation_t * | conversation_new_deinterlaced (const uint32_t setup_frame, const address *addr1, const address *addr2, const conversation_type ctype, const uint32_t port1, const uint32_t port2, const uint32_t anchor, const unsigned options) |
| Create a deinterlaced conversation, based on two addresses, a type, and several keys (VLAN, Mac, Interface). | |
| WS_DLL_PUBLIC WS_RETNONNULL conversation_t * | conversation_new_deinterlacer (const uint32_t setup_frame, const address *addr1, const address *addr2, const conversation_type ctype, const uint32_t key1, const uint32_t key2, const uint32_t key3) |
| Create a deinterlacer conversation, based on two addresses, a type, and several keys (VLAN, Mac, Interface). | |
| WS_DLL_PUBLIC WS_RETNONNULL conversation_t * | conversation_new_strat (const packet_info *pinfo, const conversation_type ctype, const unsigned options) |
| A helper function for creating conversations according to the runtime deinterlacing strategy, which means the returned conversation is either a classic (historical) object, or a deinterlaced one. | |
| WS_DLL_PUBLIC WS_RETNONNULL conversation_t * | conversation_new_strat_xtd (const packet_info *pinfo, const uint32_t setup_frame, const address *addr1, const address *addr2, const conversation_type ctype, const uint32_t port1, const uint32_t port2, const unsigned options) |
| A helper function for creating conversations according to the runtime deinterlacing strategy, which means the returned conversation is either a classic (historical) object, or a deinterlaced one. | |
| WS_DLL_PUBLIC conversation_t * | find_conversation_full (const uint32_t frame_num, conversation_element_t *elements) |
| Search for a conversation based on the structure and values of an element list. | |
| WS_DLL_PUBLIC conversation_t * | find_conversation (const uint32_t frame_num, const address *addr_a, const address *addr_b, const conversation_type ctype, const uint32_t port_a, const uint32_t port_b, const unsigned options) |
| WS_DLL_PUBLIC conversation_t * | find_conversation_deinterlaced (const uint32_t frame_num, const address *addr_a, const address *addr_b, const conversation_type ctype, const uint32_t port_a, const uint32_t port_b, const uint32_t anchor, const unsigned options) |
| Finds a conversation using deinterlacing based on frame number, addresses, ports, and type. | |
| WS_DLL_PUBLIC conversation_t * | find_conversation_deinterlacer (const uint32_t frame_num, const address *addr_a, const address *addr_b, const conversation_type ctype, const uint32_t key_a, const uint32_t key_b, const uint32_t key_c) |
| Finds a conversation using deinterlacing based on frame number and addresses. | |
| WS_DLL_PUBLIC conversation_t * | find_conversation_deinterlacer_pinfo (const packet_info *pinfo) |
| A wrapper function of find_conversation_deinterlacer(). | |
| WS_DLL_PUBLIC conversation_t * | find_conversation_by_id (const uint32_t frame, const conversation_type ctype, const uint32_t id) |
| Finds a conversation by its ID. | |
| WS_DLL_PUBLIC conversation_t * | find_conversation_err_pkts (const uint32_t frame, const conversation_type ctype, const uint32_t id, const uint32_t rid) |
| Finds a conversation using error packets. | |
| WS_DLL_PUBLIC conversation_t * | find_conversation_strat (const packet_info *pinfo, const conversation_type ctype, const unsigned options, const bool direction) |
| A helper function that calls find_conversation() using data from pinfo, and returns a conversation according to the runtime deinterlacing strategy. The frame number and addresses are taken from pinfo, and direction. | |
| WS_DLL_PUBLIC conversation_t * | find_conversation_strat_xtd (const packet_info *pinfo, const uint32_t setup_frame, const address *addr1, const address *addr2, const conversation_type ctype, const uint32_t port1, const uint32_t port2, const unsigned options) |
| Finds a conversation using extended parameters. | |
| WS_DLL_PUBLIC conversation_t * | find_conversation_pinfo (const packet_info *pinfo, const unsigned options) |
| A helper function that calls find_conversation() using data from pinfo The frame number and addresses are taken from pinfo. | |
| WS_DLL_PUBLIC conversation_t * | find_conversation_pinfo_strat (const packet_info *pinfo, const unsigned options) |
| A helper function that calls find_conversation() using data from pinfo. It's a simplified version of find_conversation_pinfo() to avoid unnecessary checks and be limited to read-only, which is the minimal need for displaying packets in packet_list. The frame number and addresses are taken from pinfo. | |
| WS_DLL_PUBLIC conversation_t * | find_conversation_pinfo_ro (const packet_info *pinfo, const unsigned options) |
| A helper function that calls find_conversation() using data from pinfo. | |
| WS_DLL_PUBLIC WS_RETNONNULL conversation_t * | find_or_create_conversation (const packet_info *pinfo) |
| A helper function that calls find_conversation() and, if a conversation is not found, calls conversation_new(). | |
| WS_DLL_PUBLIC WS_RETNONNULL conversation_t * | find_or_create_conversation_strat (const packet_info *pinfo) |
| Finds or creates a conversation based on the provided packet information. | |
| WS_DLL_PUBLIC WS_RETNONNULL conversation_t * | find_or_create_conversation_by_id (packet_info *pinfo, const conversation_type ctype, const uint32_t id) |
| A helper function that calls find_conversation_by_id() and, if a conversation is not found, calls conversation_new_by_id(). The frame number is taken from pinfo. | |
| WS_DLL_PUBLIC void | conversation_add_proto_data (conversation_t *conv, const int proto, void *proto_data) |
| Associate data with a conversation. | |
| WS_DLL_PUBLIC void * | conversation_get_proto_data (const conversation_t *conv, const int proto) |
| Fetch data associated with a conversation. | |
| WS_DLL_PUBLIC void | conversation_delete_proto_data (conversation_t *conv, const int proto) |
| Remove data associated with a conversation. | |
| WS_DLL_PUBLIC void | conversation_set_dissector (conversation_t *conversation, const dissector_handle_t handle) |
| Set the dissector for a conversation. | |
| WS_DLL_PUBLIC void | conversation_set_dissector_from_frame_number (conversation_t *conversation, const uint32_t starting_frame_num, const dissector_handle_t handle) |
| Set a dissector for a conversation starting from a specific frame number. | |
| WS_DLL_PUBLIC dissector_handle_t | conversation_get_dissector (conversation_t *conversation, const uint32_t frame_num) |
| Retrieves the dissector associated with a conversation at a specific frame number. | |
| WS_DLL_PUBLIC void | conversation_set_conv_addr_port_endpoints (struct _packet_info *pinfo, address *addr1, address *addr2, conversation_type ctype, uint32_t port1, uint32_t port2) |
| Set the address and port endpoints for a conversation in the packet info. | |
| WS_DLL_PUBLIC void | conversation_set_elements_by_id (struct _packet_info *pinfo, conversation_type ctype, uint32_t id) |
| Set the conversation elements for a conversation in the packet info. | |
| WS_DLL_PUBLIC uint32_t | conversation_get_id_from_elements (struct _packet_info *pinfo, conversation_type ctype, const unsigned options) |
| Get the ID value from the conversation elements in the packet info. | |
| WS_DLL_PUBLIC bool | try_conversation_dissector (const address *addr_a, const address *addr_b, const conversation_type ctype, const uint32_t port_a, const uint32_t port_b, tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data, const unsigned options) |
| Given two address/port pairs for a packet, search for a matching conversation and, if found and it has a conversation dissector, call that dissector and return true, otherwise return false. | |
| WS_DLL_PUBLIC bool | try_conversation_dissector_strat (packet_info *pinfo, const conversation_type ctype, tvbuff_t *tvb, proto_tree *tree, void *data, const unsigned options, const bool direction) |
| Attempts to dissect a packet using a conversation-based strategy. | |
| WS_DLL_PUBLIC bool | try_conversation_dissector_by_id (const conversation_type ctype, const uint32_t id, tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data) |
| Tries to use an existing dissector for a given conversation type and ID. Attempt to dissect a packet using a specific conversation ID. | |
| WS_DLL_PUBLIC void | conversation_set_port2 (conversation_t *conv, const uint32_t port) |
| Set the second port in a conversation created with conversation_new. | |
| WS_DLL_PUBLIC void | conversation_set_addr2 (conversation_t *conv, const address *addr) |
| Set the second address in a conversation created with conversation_new. | |
| WS_DLL_PUBLIC wmem_map_t * | get_conversation_hashtables (void) |
| Get a hash table of conversation hash table. | |
| WS_DLL_PUBLIC conversation_type | conversation_pt_to_conversation_type (port_type pt) |
| Converts a port_type to an endpoint_type. | |
| WS_DLL_PUBLIC endpoint_type | conversation_pt_to_endpoint_type (port_type pt) |
| Converts a port_type to an endpoint_type. | |
The conversation API lets you correlate packets based on values in a packet, typically address+port tuples. You can search for conversations based on their value tuples and attach data to them.
| #define NO_ADDR2 0x01 |
Flags to pass to "conversation_new()" to indicate that the address 2 and/or port 2 values for the conversation should be wildcards. The CONVERSATION_TEMPLATE option tells that any of the other supplied port and / or address wildcards will be used to match an infinite number of new connections to the conversation(s) that have the CONVERSATION_- TEMPLATE flag set. Any conversation created without the CONVERSATION_- TEMPLATE flag will be altered once the first connections (connection oriented protocols only) to include the newly found information which matched the wildcard options.
| #define NO_MASK_B 0xFFFF0000 |
Flags to pass to "find_conversation()" to indicate that the address B and/or port B search arguments are wildcards.
| #define USE_LAST_ENDPOINT 0x08 |
Flags to handle endpoints Use last endpoint created, regardless of type
| typedef struct conversation_element conversation_element_t |
Elements used to identify conversations for *_full routines and pinfo->conv_elements. Arrays must be terminated with an element .type set to CE_CONVERSATION_TYPE.
This is currently set only by conversation_set_elements_by_id(); it is not set for conversations identified by address/port endpoints.
In find_conversation_pinfo() and find_or_create_conversation(), if any dissector has set this, then, unless some dissector has set the pair of address/port endpoints (see below), the array of elements is used to look up or create the conversation. Otherwise, the current addresses and ports in the packet_info structure are used.
XXX - is there any reason why we shouldn't use an array of conversation elements, with the appropriate addresses and ports, and set it for all protocols that use conversations specified by a pair of address/port endpoints? That might simplify find_conversation_pinfo() by having them always use the array of elements if it's present, and just fail if it's not.
| typedef struct conversation conversation_t |
Data structure representing a conversation.
Conversation element type.
| enum conversation_type |
Conversation key types recognized by Wireshark dissectors.
XXX: There should be a way to register conversation types used only within one dissector, similar to address types, instead of changing the global typedef.
| Enumerator | |
|---|---|
| CONVERSATION_NONE | No conversation key |
| CONVERSATION_SCTP | SCTP association |
| CONVERSATION_TCP | TCP address/port pair |
| CONVERSATION_UDP | UDP address/port pair |
| CONVERSATION_DCCP | Datagram Congestion Control Protocol (DCCP) |
| CONVERSATION_IPX | IPX socket number |
| CONVERSATION_NCP | NetWare Core Protocol (NCP) connection |
| CONVERSATION_EXCHG | Fibre Channel exchange |
| CONVERSATION_DDP | AppleTalk Datagram Delivery Protocol (DDP) address/port pair |
| CONVERSATION_SBCCS | FICON (SBCCS) channel connection |
| CONVERSATION_IDP | XNS Internet Datagram Protocol (IDP) socket |
| CONVERSATION_TIPC | TIPC port |
| CONVERSATION_USB | USB endpoint; 0xffff denotes the host |
| CONVERSATION_I2C | I2C bus conversation |
| CONVERSATION_IBQP | InfiniBand Queue Pair (QP) number |
| CONVERSATION_BLUETOOTH | Bluetooth connection |
| CONVERSATION_TDMOP | TDMoP (TDM over Packet) circuit |
| CONVERSATION_DVBCI | DVB Common Interface (DVB-CI) session |
| CONVERSATION_ISO14443 | ISO 14443 contactless smart card session |
| CONVERSATION_ISDN | ISDN channel number |
| CONVERSATION_H223 | H.223 logical channel number |
| CONVERSATION_X25 | X.25 logical channel number |
| CONVERSATION_IAX2 | IAX2 call identifier |
| CONVERSATION_DLCI | Frame Relay Data Link Connection Identifier (DLCI) |
| CONVERSATION_ISUP | ISDN User Part (ISUP) Circuit Identification Code (CIC) |
| CONVERSATION_BICC | Bearer Independent Call Control (BICC) circuit identifier |
| CONVERSATION_GSMTAP | GSMTAP virtual radio conversation |
| CONVERSATION_IUUP | Iu UP (UMTS Iu interface user plane) |
| CONVERSATION_DVBBBF | DVB Base Band Frame ISI/PLP_ID |
| CONVERSATION_IWARP_MPA | iWARP Marker PDU Aligned (MPA) framing conversation |
| CONVERSATION_BT_UTP | BitTorrent uTP connection ID |
| CONVERSATION_LOG | Logging source conversation |
| CONVERSATION_LTP | LTP Engine ID and Session Number |
| CONVERSATION_MCTP | Management Component Transport Protocol (MCTP) |
| CONVERSATION_NVME_MI | NVMe Management Interface (NVMe-MI) conversation |
| CONVERSATION_BP | Bundle Protocol endpoint IDs |
| CONVERSATION_SNMP | SNMP community/context conversation |
| CONVERSATION_QUIC | QUIC connection |
| CONVERSATION_IDN | Internationalized Domain Name (IDN) conversation |
| CONVERSATION_IP | IPv4 address pair |
| CONVERSATION_IPV6 | IPv6 address pair |
| CONVERSATION_ETH | Classic Ethernet (no interface/VLAN deinterleaving) |
| CONVERSATION_ETH_NN | Ethernet deinterleaved: Interface=No, VLAN=No |
| CONVERSATION_ETH_NV | Ethernet deinterleaved: Interface=No, VLAN=Yes |
| CONVERSATION_ETH_IN | Ethernet deinterleaved: Interface=Yes, VLAN=No |
| CONVERSATION_ETH_IV | Ethernet deinterleaved: Interface=Yes, VLAN=Yes |
| CONVERSATION_VSPC_VMOTION | VMware vSPC vMotion conversation (Telnet-based) |
| CONVERSATION_OPENVPN | OpenVPN tunnel conversation |
| CONVERSATION_PROXY | Proxy protocol conversation |
| CONVERSATION_GNSS | Global Navigation Satellite System (GNSS) conversation |
| CONVERSATION_DNP3 | DNP3 (Distributed Network Protocol 3) conversation |
| CONVERSATION_ILNP | Identifier-Locator Network Protocol (ILNP) conversation |
| WS_DLL_PUBLIC void conversation_add_proto_data | ( | conversation_t * | conv, |
| const int | proto, | ||
| void * | proto_data | ||
| ) |
Associate data with a conversation.
| conv | Conversation. Must not be NULL. |
| proto | Protocol ID. |
| proto_data | Pointer to the data to associate. |
| WS_DLL_PUBLIC void conversation_delete_proto_data | ( | conversation_t * | conv, |
| const int | proto | ||
| ) |
Remove data associated with a conversation.
| conv | Conversation. Must not be NULL. |
| proto | Protocol ID. |
|
extern |
Initialize some variables every time a file is loaded or re-loaded.
This function initializes necessary variables for handling conversations in Wireshark. It prepares data structures and sets up default values to ensure proper operation when new files are loaded or existing ones are reloaded.
Initialize some variables every time a file is loaded or re-loaded.
| WS_DLL_PUBLIC dissector_handle_t conversation_get_dissector | ( | conversation_t * | conversation, |
| const uint32_t | frame_num | ||
| ) |
Retrieves the dissector associated with a conversation at a specific frame number.
| conversation | The conversation to query. |
| frame_num | The frame number within the conversation. |
| WS_DLL_PUBLIC uint32_t conversation_get_id_from_elements | ( | struct _packet_info * | pinfo, |
| conversation_type | ctype, | ||
| const unsigned | options | ||
| ) |
Get the ID value from the conversation elements in the packet info.
| pinfo | Packet info. |
| ctype | The conversation type. |
| options | USE_LAST_ENDPOINT or 0. |
< Use last endpoint created, regardless of type
< Use last endpoint created, regardless of type
| WS_DLL_PUBLIC void * conversation_get_proto_data | ( | const conversation_t * | conv, |
| const int | proto | ||
| ) |
Fetch data associated with a conversation.
| conv | Conversation. Must not be NULL. |
| proto | Protocol ID. |
|
extern |
Create a new hash tables for conversations.
Create a new hash tables for conversations.
| WS_DLL_PUBLIC const address * conversation_key_addr1 | ( | const conversation_element_t * | key | ) |
Retrieve the first address from a conversation key.
| key | The conversation element key. |
| WS_DLL_PUBLIC const address * conversation_key_addr2 | ( | const conversation_element_t * | key | ) |
Retrieve the second address from a conversation key.
| key | The conversation element key. |
| WS_DLL_PUBLIC uint32_t conversation_key_port1 | ( | const conversation_element_t * | key | ) |
Retrieve the first port from a conversation key.
| key | The conversation element key. |
| WS_DLL_PUBLIC uint32_t conversation_key_port2 | ( | const conversation_element_t * | key | ) |
Retrieve the second port from a conversation key.
| key | The conversation element key. |
| WS_DLL_PUBLIC WS_RETNONNULL conversation_t * conversation_new | ( | const uint32_t | setup_frame, |
| const address * | addr1, | ||
| const address * | addr2, | ||
| const conversation_type | ctype, | ||
| const uint32_t | port1, | ||
| const uint32_t | port2, | ||
| const unsigned | options | ||
| ) |
Given two address/port pairs for a packet, create a new conversation identified by address/port pairs.
The options field is used to specify whether the address 2 value and/or port 2 value are not given and any value is acceptable when searching for this conversation. Null address values will be replaced with empty (AT_NONE) addresses.
| setup_frame | The first frame in the conversation. |
| addr1 | The first address in the identifying tuple. |
| addr2 | The second address in the identifying tuple. |
| ctype | The conversation type. |
| port1 | The first port in the identifying tuple. |
| port2 | The second port in the identifying tuple. |
| options | NO_ADDR2, NO_PORT2, NO_PORT2_FORCE, or CONVERSATION_TEMPLATE. Options except for NO_PORT2 and NO_PORT2_FORCE can be ORed. |
| WS_DLL_PUBLIC WS_RETNONNULL conversation_t * conversation_new_by_id | ( | const uint32_t | setup_frame, |
| const conversation_type | ctype, | ||
| const uint32_t | id | ||
| ) |
Create a new conversation identified by a conversation index.
| setup_frame | The first frame in the conversation. |
| ctype | The conversation type. |
| id | The conversation index. |
| WS_DLL_PUBLIC WS_RETNONNULL conversation_t * conversation_new_deinterlaced | ( | const uint32_t | setup_frame, |
| const address * | addr1, | ||
| const address * | addr2, | ||
| const conversation_type | ctype, | ||
| const uint32_t | port1, | ||
| const uint32_t | port2, | ||
| const uint32_t | anchor, | ||
| const unsigned | options | ||
| ) |
Create a deinterlaced conversation, based on two addresses, a type, and several keys (VLAN, Mac, Interface).
| setup_frame | The first frame in the conversation. |
| addr1 | The first address in the identifying tuple. |
| addr2 | The second address in the identifying tuple. |
| ctype | The conversation type. |
| port1 | The first port in the identifying tuple. |
| port2 | The second port in the identifying tuple. |
| anchor | The frame number to anchor the conversation to, which is used to determine the initial frame number of the conversation and to find the other key values (VLAN, Mac, Interface) for the conversation. |
| options | NO_ADDR2, NO_PORT2, NO_PORT2_FORCE, or CONVERSATION_TEMPLATE. Options except for NO_PORT2 and NO_PORT2_FORCE can be ORed. |
| WS_DLL_PUBLIC WS_RETNONNULL conversation_t * conversation_new_deinterlacer | ( | const uint32_t | setup_frame, |
| const address * | addr1, | ||
| const address * | addr2, | ||
| const conversation_type | ctype, | ||
| const uint32_t | key1, | ||
| const uint32_t | key2, | ||
| const uint32_t | key3 | ||
| ) |
Create a deinterlacer conversation, based on two addresses, a type, and several keys (VLAN, Mac, Interface).
| setup_frame | The first frame in the conversation. |
| addr1 | The first address in the identifying tuple. |
| addr2 | The second address in the identifying tuple. |
| ctype | The conversation type. |
| key1 | The first key in the identifying tuple. |
| key2 | The second key in the identifying tuple. |
| key3 | The third key in the identifying tuple. |
| WS_DLL_PUBLIC WS_RETNONNULL conversation_t * conversation_new_err_pkts | ( | const uint32_t | setup_frame, |
| const conversation_type | ctype, | ||
| const uint32_t | id, | ||
| const uint32_t | rid | ||
| ) |
Create a new conversation in the err_pkts table.
| setup_frame | The first frame in the conversation. |
| ctype | The conversation type. |
| id | The conversation index. |
| rid | The reference conversation index, supposedly a member of one of the port_addr tables. |
| WS_DLL_PUBLIC WS_RETNONNULL conversation_t * conversation_new_full | ( | const uint32_t | setup_frame, |
| conversation_element_t * | elements | ||
| ) |
Create a new conversation identified by a list of elements.
| setup_frame | The first frame in the conversation. |
| elements | An array of element types and values. Must not be NULL. Must be terminated with a CE_CONVERSATION_TYPE element. |
| WS_DLL_PUBLIC WS_RETNONNULL conversation_t * conversation_new_strat | ( | const packet_info * | pinfo, |
| const conversation_type | ctype, | ||
| const unsigned | options | ||
| ) |
A helper function for creating conversations according to the runtime deinterlacing strategy, which means the returned conversation is either a classic (historical) object, or a deinterlaced one.
| pinfo | Packet info. |
| ctype | The conversation type. |
| options | NO_ADDR2, NO_PORT2, NO_PORT2_FORCE, or CONVERSATION_TEMPLATE. Options except for NO_PORT2 and NO_PORT2_FORCE can be ORed. |
| WS_DLL_PUBLIC WS_RETNONNULL conversation_t * conversation_new_strat_xtd | ( | const packet_info * | pinfo, |
| const uint32_t | setup_frame, | ||
| const address * | addr1, | ||
| const address * | addr2, | ||
| const conversation_type | ctype, | ||
| const uint32_t | port1, | ||
| const uint32_t | port2, | ||
| const unsigned | options | ||
| ) |
A helper function for creating conversations according to the runtime deinterlacing strategy, which means the returned conversation is either a classic (historical) object, or a deinterlaced one.
| pinfo | Packet info. |
| setup_frame | The first frame in the conversation. |
| addr1 | The first address in the identifying tuple. |
| addr2 | The second address in the identifying tuple. |
| ctype | The conversation type. |
| port1 | The first port in the identifying tuple. |
| port2 | The second port in the identifying tuple. |
| options | NO_ADDR2, NO_PORT2, NO_PORT2_FORCE, or CONVERSATION_TEMPLATE. Options except for NO_PORT2 and NO_PORT2_FORCE can be ORed. |
| WS_DLL_PUBLIC conversation_type conversation_pt_to_conversation_type | ( | port_type | pt | ) |
Converts a port_type to an endpoint_type.
This function is used to convert a port_type enumeration value to its corresponding endpoint_type enumeration value. The conversion is currently a 1-1 mapping, but the intention is to remove many of the port_type instances in favor of endpoint_type.
| pt | The port_type to be converted. |
| WS_DLL_PUBLIC endpoint_type conversation_pt_to_endpoint_type | ( | port_type | pt | ) |
Converts a port_type to an endpoint_type.
This function maps a given port_type to its corresponding endpoint_type. For now, it's a 1-1 mapping, but the intention is to remove many of the port_type instances in favor of endpoint_type.
| pt | The port_type to convert. |
| WS_DLL_PUBLIC void conversation_set_addr2 | ( | conversation_t * | conv, |
| const address * | addr | ||
| ) |
Set the second address in a conversation created with conversation_new.
| conv | Conversation. Must be created with conversation_new. |
| addr | The second address to set. |
| WS_DLL_PUBLIC void conversation_set_conv_addr_port_endpoints | ( | struct _packet_info * | pinfo, |
| address * | addr1, | ||
| address * | addr2, | ||
| conversation_type | ctype, | ||
| uint32_t | port1, | ||
| uint32_t | port2 | ||
| ) |
Set the address and port endpoints for a conversation in the packet info.
Save address+port information in the current packet info; it can be matched by find_conversation_pinfo or find_conversation. Supports wildcarding.
| pinfo | Packet info. |
| addr1 | The first address in the identifying tuple. |
| addr2 | The second address in the identifying tuple. |
| ctype | The conversation type. |
| port1 | The first port in the identifying tuple. |
| port2 | The second port in the identifying tuple. |
| WS_DLL_PUBLIC void conversation_set_dissector | ( | conversation_t * | conversation, |
| const dissector_handle_t | handle | ||
| ) |
Set the dissector for a conversation.
| conversation | The conversation to set the dissector for. |
| handle | The dissector handle to use. |
| WS_DLL_PUBLIC void conversation_set_dissector_from_frame_number | ( | conversation_t * | conversation, |
| const uint32_t | starting_frame_num, | ||
| const dissector_handle_t | handle | ||
| ) |
Set a dissector for a conversation starting from a specific frame number.
| conversation | The conversation to set the dissector for. |
| starting_frame_num | The frame number from which to start setting the dissector. |
| handle | The dissector handle to set. |
| WS_DLL_PUBLIC void conversation_set_elements_by_id | ( | struct _packet_info * | pinfo, |
| conversation_type | ctype, | ||
| uint32_t | id | ||
| ) |
Set the conversation elements for a conversation in the packet info.
Save conversation elements including ID information in the current packet info which can be matched by conversation_get_id_from_elements. Does not support wildcarding.
| pinfo | Packet info. |
| ctype | The conversation type. |
| id | A unique ID. |
| WS_DLL_PUBLIC void conversation_set_port2 | ( | conversation_t * | conv, |
| const uint32_t | port | ||
| ) |
Set the second port in a conversation created with conversation_new.
| conv | Conversation. Must be created with conversation_new. |
| port | The second port to set. |
| WS_DLL_PUBLIC conversation_t * find_conversation | ( | const uint32_t | frame_num, |
| const address * | addr_a, | ||
| const address * | addr_b, | ||
| const conversation_type | ctype, | ||
| const uint32_t | port_a, | ||
| const uint32_t | port_b, | ||
| const unsigned | options | ||
| ) |
Given two address/port pairs for a packet, search for a conversation containing packets between those address/port pairs. Returns NULL if not found.
We try to find the most exact match that we can, and then proceed to try wildcard matches on the "addr_b" and/or "port_b" argument if a more exact match failed.
Either or both of the "addr_b" and "port_b" arguments may be specified as a wildcard by setting the NO_ADDR_B or NO_PORT_B flags in the "options" argument. We do only wildcard matches on addresses and ports specified as wildcards.
I.e.:
if neither "addr_b" nor "port_b" were specified as wildcards, we do an exact match (addr_a/port_a and addr_b/port_b) and, if that succeeds, we return a pointer to the matched conversation;
otherwise, if "port_b" wasn't specified as a wildcard, we try to match any address 2 with the specified port 2 (addr_a/port_a and {any}/addr_b) and, if that succeeds, we return a pointer to the matched conversation;
otherwise, if "addr_b" wasn't specified as a wildcard, we try to match any port 2 with the specified address 2 (addr_a/port_a and addr_b/{any}) and, if that succeeds, we return a pointer to the matched conversation;
otherwise, we try to match any address 2 and any port 2 (addr_a/port_a and {any}/{any}) and, if that succeeds, we return a pointer to the matched conversation;
otherwise, we found no matching conversation, and return NULL.
Null address values will be replaced with empty (AT_NONE) addresses.
| frame_num | Frame number. Must be greater than or equal to the conversation's initial frame number. |
| addr_a | The first address in the identifying tuple. |
| addr_b | The second address in the identifying tuple. |
| ctype | The conversation type. |
| port_a | The first port in the identifying tuple. |
| port_b | The second port in the identifying tuple. |
| options | Wildcard options as described above. |
| WS_DLL_PUBLIC conversation_t * find_conversation_by_id | ( | const uint32_t | frame, |
| const conversation_type | ctype, | ||
| const uint32_t | id | ||
| ) |
Finds a conversation by its ID.
| frame | The frame number associated with the conversation. |
| ctype | The type of conversation. |
| id | The unique identifier for the conversation. |
| WS_DLL_PUBLIC conversation_t * find_conversation_deinterlaced | ( | const uint32_t | frame_num, |
| const address * | addr_a, | ||
| const address * | addr_b, | ||
| const conversation_type | ctype, | ||
| const uint32_t | port_a, | ||
| const uint32_t | port_b, | ||
| const uint32_t | anchor, | ||
| const unsigned | options | ||
| ) |
Finds a conversation using deinterlacing based on frame number, addresses, ports, and type.
| frame_num | The frame number associated with the conversation. |
| addr_a | The first address of the conversation. |
| addr_b | The second address of the conversation. |
| ctype | The type of the conversation. |
| port_a | The port number for the first address. |
| port_b | The port number for the second address. |
| anchor | The anchor value for the conversation. |
| options | Options to control the search behavior. |
| WS_DLL_PUBLIC conversation_t * find_conversation_deinterlacer | ( | const uint32_t | frame_num, |
| const address * | addr_a, | ||
| const address * | addr_b, | ||
| const conversation_type | ctype, | ||
| const uint32_t | key_a, | ||
| const uint32_t | key_b, | ||
| const uint32_t | key_c | ||
| ) |
Finds a conversation using deinterlacing based on frame number and addresses.
| frame_num | The frame number of the packet. |
| addr_a | The first address of the conversation. |
| addr_b | The second address of the conversation. |
| ctype | The type of conversation. |
| key_a | Additional key for the conversation (port A). |
| key_b | Additional key for the conversation (port B). |
| key_c | Additional key for the conversation (anchor). |
| WS_DLL_PUBLIC conversation_t * find_conversation_deinterlacer_pinfo | ( | const packet_info * | pinfo | ) |
A wrapper function of find_conversation_deinterlacer().
A wrapper function of find_conversation_deinterlacer() using data from pinfo, which evaluates the execution context first (user preference, VLAN, interface,..), and then calls find_conversation_deinterlacer(). The frame number and addresses are taken from pinfo.
| pinfo | Packet info. |
| WS_DLL_PUBLIC conversation_t * find_conversation_err_pkts | ( | const uint32_t | frame, |
| const conversation_type | ctype, | ||
| const uint32_t | id, | ||
| const uint32_t | rid | ||
| ) |
Finds a conversation using error packets.
| frame | The frame number. |
| ctype | The conversation type. |
| id | The ID of the conversation element. |
| rid | The remote ID of the conversation element. |
| WS_DLL_PUBLIC conversation_t * find_conversation_full | ( | const uint32_t | frame_num, |
| conversation_element_t * | elements | ||
| ) |
Search for a conversation based on the structure and values of an element list.
| frame_num | Frame number. Must be greater than or equal to the conversation's initial frame number. |
| elements | An array of element types and values. Must not be NULL. Must be terminated with a CE_CONVERSATION_TYPE element. |
| WS_DLL_PUBLIC conversation_t * find_conversation_pinfo | ( | const packet_info * | pinfo, |
| const unsigned | options | ||
| ) |
A helper function that calls find_conversation() using data from pinfo The frame number and addresses are taken from pinfo.
| pinfo | Packet info. |
| options | Options to control the search behavior. |
A helper function that calls find_conversation() using data from pinfo The frame number and addresses are taken from pinfo.
| WS_DLL_PUBLIC conversation_t * find_conversation_pinfo_ro | ( | const packet_info * | pinfo, |
| const unsigned | options | ||
| ) |
A helper function that calls find_conversation() using data from pinfo.
It's a simplified version of find_conversation_pinfo() to avoid unnecessary checks and be limited to read-only, which is the minimal need for displaying packets in packet_list. The frame number and addresses are taken from pinfo.
| pinfo | Pointer to the packet_info structure containing the necessary data. |
| options | Options for finding the conversation. |
A helper function that calls find_conversation() using data from pinfo, as above, but somewhat simplified for being accessed from packet_list. The frame number and addresses are taken from pinfo.
| WS_DLL_PUBLIC conversation_t * find_conversation_pinfo_strat | ( | const packet_info * | pinfo, |
| const unsigned | options | ||
| ) |
A helper function that calls find_conversation() using data from pinfo. It's a simplified version of find_conversation_pinfo() to avoid unnecessary checks and be limited to read-only, which is the minimal need for displaying packets in packet_list. The frame number and addresses are taken from pinfo.
| pinfo | Pointer to the packet_info structure containing the necessary data. |
| options | Options for finding the conversation. |
| WS_DLL_PUBLIC conversation_t * find_conversation_strat | ( | const packet_info * | pinfo, |
| const conversation_type | ctype, | ||
| const unsigned | options, | ||
| const bool | direction | ||
| ) |
A helper function that calls find_conversation() using data from pinfo, and returns a conversation according to the runtime deinterlacing strategy. The frame number and addresses are taken from pinfo, and direction.
| pinfo | Packet info. |
| ctype | The conversation type. |
| options | Options to control the search behavior. |
| direction | The direction of the conversation to find, true for forward and false for reverse. |
| WS_DLL_PUBLIC conversation_t * find_conversation_strat_xtd | ( | const packet_info * | pinfo, |
| const uint32_t | setup_frame, | ||
| const address * | addr1, | ||
| const address * | addr2, | ||
| const conversation_type | ctype, | ||
| const uint32_t | port1, | ||
| const uint32_t | port2, | ||
| const unsigned | options | ||
| ) |
Finds a conversation using extended parameters.
This function searches for an existing conversation based on the provided packet information, frame number, addresses, conversation type, ports, and options. If deinterlacing is supported, it uses the underlying conversation to find the target conversation.
| pinfo | Packet information containing necessary details. |
| setup_frame | Frame number of the setup packet. |
| addr1 | First address in the conversation. |
| addr2 | Second address in the conversation. |
| ctype | Type of the conversation. |
| port1 | Port number for the first address. |
| port2 | Port number for the second address. |
| options | Additional options for conversation search. |
| WS_DLL_PUBLIC WS_RETNONNULL conversation_t * find_or_create_conversation | ( | const packet_info * | pinfo | ) |
A helper function that calls find_conversation() and, if a conversation is not found, calls conversation_new().
A helper function that calls find_conversation() and, if a conversation is not found, calls conversation_new(). The frame number and addresses are taken from pinfo. No options are used, though we could extend this API to include an options parameter.
| pinfo | Packet info. |
| WS_DLL_PUBLIC WS_RETNONNULL conversation_t * find_or_create_conversation_by_id | ( | packet_info * | pinfo, |
| const conversation_type | ctype, | ||
| const uint32_t | id | ||
| ) |
A helper function that calls find_conversation_by_id() and, if a conversation is not found, calls conversation_new_by_id(). The frame number is taken from pinfo.
| pinfo | Packet info. |
| ctype | The conversation type. |
| id | The conversation index. |
| WS_DLL_PUBLIC WS_RETNONNULL conversation_t * find_or_create_conversation_strat | ( | const packet_info * | pinfo | ) |
Finds or creates a conversation based on the provided packet information.
This function attempts to find an existing conversation using the packet's source and destination addresses, protocol type, destination port, and source port. If no conversation is found, it creates a new one.
| pinfo | The packet information structure containing the necessary details for finding or creating a conversation. |
| WS_DLL_PUBLIC wmem_map_t * get_conversation_hashtables | ( | void | ) |
Get a hash table of conversation hash table.
| WS_DLL_PUBLIC bool is_deinterlacing_supported | ( | const packet_info * | pinfo | ) |
Returns the Deinterlacing support status.
| pinfo | Packet info. |
| WS_DLL_PUBLIC bool try_conversation_dissector | ( | const address * | addr_a, |
| const address * | addr_b, | ||
| const conversation_type | ctype, | ||
| const uint32_t | port_a, | ||
| const uint32_t | port_b, | ||
| tvbuff_t * | tvb, | ||
| packet_info * | pinfo, | ||
| proto_tree * | tree, | ||
| void * | data, | ||
| const unsigned | options | ||
| ) |
Given two address/port pairs for a packet, search for a matching conversation and, if found and it has a conversation dissector, call that dissector and return true, otherwise return false.
This helper uses call_dissector_only which will NOT call the default "data" dissector if the packet was rejected. Our caller is responsible to call the data dissector explicitly in case this function returns false.
| addr_a | The first address in the identifying tuple. |
| addr_b | The second address in the identifying tuple. |
| ctype | The conversation type. |
| port_a | The first port in the identifying tuple. |
| port_b | The second port in the identifying tuple. |
| tvb | The current data buffer containing the packet. |
| pinfo | Packet information structure. |
| tree | Protocol tree for displaying dissected information. |
| data | User-specific data passed to the dissector. |
| options | Wildcard options as described in find_conversation(). |
| WS_DLL_PUBLIC bool try_conversation_dissector_by_id | ( | const conversation_type | ctype, |
| const uint32_t | id, | ||
| tvbuff_t * | tvb, | ||
| packet_info * | pinfo, | ||
| proto_tree * | tree, | ||
| void * | data | ||
| ) |
Tries to use an existing dissector for a given conversation type and ID. Attempt to dissect a packet using a specific conversation ID.
| ctype | The type of conversation. |
| id | The unique identifier of the conversation. |
| tvb | The current data buffer containing the packet. |
| pinfo | Packet information structure. |
| tree | Protocol tree for displaying dissected information. |
| data | User-specific data passed to the dissector. |
| WS_DLL_PUBLIC bool try_conversation_dissector_strat | ( | packet_info * | pinfo, |
| const conversation_type | ctype, | ||
| tvbuff_t * | tvb, | ||
| proto_tree * | tree, | ||
| void * | data, | ||
| const unsigned | options, | ||
| const bool | direction | ||
| ) |
Attempts to dissect a packet using a conversation-based strategy.
This function tries to find an existing conversation that matches the given parameters and uses it to dissect the packet. If no matching conversation is found, it attempts to create one with specific options.
| pinfo | Pointer to the packet information structure. |
| ctype | The type of conversation. |
| tvb | Pointer to the TVBuffer containing the packet data. |
| tree | Pointer to the protocol tree for displaying dissected information. |
| data | User-specific data passed to the dissector. |
| options | Options for conversation creation, such as NO_ADDR_B or NO_PORT_B. |
| direction | Direction of the conversation (e.g., client-server). |