11#include "ws_symbol_export.h"
40#define NO_PORT2_FORCE 0x04
41#define CONVERSATION_TEMPLATE 0x08
48#define NO_MASK_B 0xFFFF0000
49#define NO_ADDR_B 0x00010000
50#define NO_PORT_B 0x00020000
51#define NO_PORT_X 0x00040000
52#define NO_GREEDY 0x00100000
53#define EXACT_EXCLUDED 0x00200000
56#define USE_LAST_ENDPOINT 0x08
130#define ENDPOINT_NONE CONVERSATION_NONE
131#define ENDPOINT_SCTP CONVERSATION_SCTP
132#define ENDPOINT_TCP CONVERSATION_TCP
133#define ENDPOINT_UDP CONVERSATION_UDP
134#define ENDPOINT_DCCP CONVERSATION_DCCP
135#define ENDPOINT_IPX CONVERSATION_IPX
136#define ENDPOINT_NCP CONVERSATION_NCP
137#define ENDPOINT_EXCHG CONVERSATION_EXCHG
138#define ENDPOINT_DDP CONVERSATION_DDP
139#define ENDPOINT_SBCCS CONVERSATION_SBCCS
140#define ENDPOINT_IDP CONVERSATION_IDP
141#define ENDPOINT_TIPC CONVERSATION_TIPC
142#define ENDPOINT_USB CONVERSATION_USB
143#define ENDPOINT_I2C CONVERSATION_I2C
144#define ENDPOINT_IBQP CONVERSATION_IBQP
145#define ENDPOINT_BLUETOOTH CONVERSATION_BLUETOOTH
146#define ENDPOINT_TDMOP CONVERSATION_TDMOP
147#define ENDPOINT_DVBCI CONVERSATION_DVBCI
148#define ENDPOINT_ISO14443 CONVERSATION_ISO14443
149#define ENDPOINT_ISDN CONVERSATION_ISDN
150#define ENDPOINT_H223 CONVERSATION_H223
151#define ENDPOINT_X25 CONVERSATION_X25
152#define ENDPOINT_IAX2 CONVERSATION_IAX2
153#define ENDPOINT_DLCI CONVERSATION_DLCI
154#define ENDPOINT_ISUP CONVERSATION_ISUP
155#define ENDPOINT_BICC CONVERSATION_BICC
156#define ENDPOINT_GSMTAP CONVERSATION_GSMTAP
157#define ENDPOINT_IUUP CONVERSATION_IUUP
158#define ENDPOINT_DVBBBF CONVERSATION_DVBBBF
159#define ENDPOINT_IWARP_MPA CONVERSATION_IWARP_MPA
160#define ENDPOINT_BT_UTP CONVERSATION_BT_UTP
161#define ENDPOINT_LOG CONVERSATION_LOG
162#define ENDPOINT_MCTP CONVERSATION_MCTP
163#define ENDPOINT_NVME_MI CONVERSATION_NVME_MI
164#define ENDPOINT_SNMP CONVERSATION_SNMP
165#define ENDPOINT_IP CONVERSATION_IP
166#define ENDPOINT_IPv6 CONVERSATION_IPv6
167#define ENDPOINT_ETH CONVERSATION_ETH
168#define ENDPOINT_ILNP CONVERSATION_ILNP
354 const conversation_type ctype,
const uint32_t port1,
const uint32_t port2,
const unsigned options);
400 const conversation_type ctype,
const uint32_t port1,
const uint32_t port2,
const uint32_t anchor,
const unsigned options);
416 const conversation_type ctype,
const uint32_t key1,
const uint32_t key2,
const uint32_t key3);
446 const conversation_type ctype,
const uint32_t port1,
const uint32_t port2,
const unsigned options);
504 const conversation_type ctype,
const uint32_t port_a,
const uint32_t port_b,
const unsigned options);
520 const conversation_type ctype,
const uint32_t port_a,
const uint32_t port_b,
const uint32_t anchor,
const unsigned options);
535 const conversation_type ctype,
const uint32_t key_a,
const uint32_t key_b,
const uint32_t key_c);
602 const conversation_type ctype,
const uint32_t port1,
const uint32_t port2,
const unsigned options);
791 proto_tree *tree,
void* data,
const unsigned options);
810 tvbuff_t *tvb,
proto_tree *tree,
void* data,
const unsigned options,
const bool direction);
port_type
Transport-layer port number types recognized by Wireshark.
Definition address.h:425
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.
Definition conversation.c:2781
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.
Definition conversation.c:2694
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,...
Definition conversation.c:2823
WS_DLL_PUBLIC endpoint_type conversation_pt_to_endpoint_type(port_type pt)
Converts a port_type to an endpoint_type.
Definition conversation.c:3466
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.
Definition conversation.c:1594
void conversation_epan_reset(void)
Initialize some variables every time a file is loaded or re-loaded.
Definition conversation.c:784
WS_DLL_PUBLIC uint32_t conversation_key_port2(const conversation_element_t *key)
Retrieve the second port from a conversation key.
Definition conversation.c:3410
WS_DLL_PUBLIC void * conversation_get_proto_data(const conversation_t *conv, const int proto)
Fetch data associated with a conversation.
Definition conversation.c:2741
struct conversation conversation_t
WS_DLL_PUBLIC conversation_t * find_conversation_deinterlacer_pinfo(const packet_info *pinfo)
A wrapper function of find_conversation_deinterlacer().
Definition conversation.c:2652
WS_DLL_PUBLIC void conversation_set_addr2(conversation_t *conv, const address *addr)
Set the second address in a conversation created with conversation_new.
Definition conversation.c:1520
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.
Definition conversation.c:2984
WS_DLL_PUBLIC conversation_type conversation_pt_to_conversation_type(port_type pt)
Converts a port_type to an endpoint_type.
Definition conversation.c:3426
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.
Definition conversation.c:2716
WS_DLL_PUBLIC const address * conversation_key_addr1(const conversation_element_t *key)
Retrieve the first address from a conversation key.
Definition conversation.c:3380
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,...
Definition conversation.c:3308
conversation_type
Conversation key types recognized by Wireshark dissectors.
Definition conversation.h:65
@ CONVERSATION_ETH_IN
Definition conversation.h:110
@ CONVERSATION_SNMP
Definition conversation.h:102
@ CONVERSATION_BP
Definition conversation.h:101
@ CONVERSATION_BLUETOOTH
Definition conversation.h:81
@ CONVERSATION_TIPC
Definition conversation.h:77
@ CONVERSATION_GNSS
Definition conversation.h:115
@ CONVERSATION_QUIC
Definition conversation.h:103
@ CONVERSATION_SCTP
Definition conversation.h:67
@ CONVERSATION_H223
Definition conversation.h:86
@ CONVERSATION_BICC
Definition conversation.h:91
@ CONVERSATION_NCP
Definition conversation.h:72
@ CONVERSATION_IBQP
Definition conversation.h:80
@ CONVERSATION_IP
Definition conversation.h:105
@ CONVERSATION_NVME_MI
Definition conversation.h:100
@ CONVERSATION_VSPC_VMOTION
Definition conversation.h:112
@ CONVERSATION_IDP
Definition conversation.h:76
@ CONVERSATION_ISO14443
Definition conversation.h:84
@ CONVERSATION_IPV6
Definition conversation.h:106
@ CONVERSATION_LTP
Definition conversation.h:98
@ CONVERSATION_USB
Definition conversation.h:78
@ CONVERSATION_DVBBBF
Definition conversation.h:94
@ CONVERSATION_DVBCI
Definition conversation.h:83
@ CONVERSATION_EXCHG
Definition conversation.h:73
@ CONVERSATION_ETH_NN
Definition conversation.h:108
@ CONVERSATION_LOG
Definition conversation.h:97
@ CONVERSATION_ETH_NV
Definition conversation.h:109
@ CONVERSATION_NONE
Definition conversation.h:66
@ CONVERSATION_IAX2
Definition conversation.h:88
@ CONVERSATION_SBCCS
Definition conversation.h:75
@ CONVERSATION_ETH
Definition conversation.h:107
@ CONVERSATION_PROXY
Definition conversation.h:114
@ CONVERSATION_DDP
Definition conversation.h:74
@ CONVERSATION_TCP
Definition conversation.h:68
@ CONVERSATION_IPX
Definition conversation.h:71
@ CONVERSATION_DCCP
Definition conversation.h:70
@ CONVERSATION_ILNP
Definition conversation.h:117
@ CONVERSATION_GSMTAP
Definition conversation.h:92
@ CONVERSATION_TDMOP
Definition conversation.h:82
@ CONVERSATION_ETH_IV
Definition conversation.h:111
@ CONVERSATION_DLCI
Definition conversation.h:89
@ CONVERSATION_I2C
Definition conversation.h:79
@ CONVERSATION_ISUP
Definition conversation.h:90
@ CONVERSATION_BT_UTP
Definition conversation.h:96
@ CONVERSATION_X25
Definition conversation.h:87
@ CONVERSATION_IWARP_MPA
Definition conversation.h:95
@ CONVERSATION_IUUP
Definition conversation.h:93
@ CONVERSATION_IDN
Definition conversation.h:104
@ CONVERSATION_UDP
Definition conversation.h:69
@ CONVERSATION_MCTP
Definition conversation.h:99
@ CONVERSATION_ISDN
Definition conversation.h:85
@ CONVERSATION_DNP3
Definition conversation.h:116
@ CONVERSATION_OPENVPN
Definition conversation.h:113
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.
Definition conversation.c:2765
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 ...
Definition conversation.c:3116
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.
Definition conversation.c:3326
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,...
Definition conversation.c:1280
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,...
Definition conversation.c:3234
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.
Definition conversation.c:3346
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.
Definition conversation.c:1190
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.
Definition conversation.c:911
WS_DLL_PUBLIC void conversation_delete_proto_data(conversation_t *conv, const int proto)
Remove data associated with a conversation.
Definition conversation.c:2755
struct conversation_element conversation_element_t
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,...
Definition conversation.c:1167
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,...
Definition conversation.c:1145
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,...
Definition conversation.c:1232
WS_DLL_PUBLIC const address * conversation_key_addr2(const conversation_element_t *key)
Retrieve the second address from a conversation key.
Definition conversation.c:3400
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...
Definition conversation.c:3004
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.
Definition conversation.c:3140
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.
Definition conversation.c:3356
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.
Definition conversation.c:2874
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)
Definition conversation.c:1840
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.
Definition conversation.c:1476
WS_DLL_PUBLIC bool is_deinterlacing_supported(const packet_info *pinfo)
Returns the Deinterlacing support status.
Definition conversation.c:3105
void conversation_init(void)
Create a new hash tables for conversations.
Definition conversation.c:572
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.
Definition conversation.c:2629
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 ...
Definition conversation.c:2923
WS_DLL_PUBLIC uint32_t conversation_key_port1(const conversation_element_t *key)
Retrieve the first port from a conversation key.
Definition conversation.c:3390
conversation_element_type
Definition conversation.h:175
@ CE_UINT
Definition conversation.h:180
@ CE_INT64
Definition conversation.h:183
@ CE_ADDRESS
Definition conversation.h:177
@ CE_UINT64
Definition conversation.h:181
@ CE_INT
Definition conversation.h:182
@ CE_STRING
Definition conversation.h:179
@ CE_CONVERSATION_TYPE
Definition conversation.h:176
@ CE_BLOB
Definition conversation.h:184
@ CE_PORT
Definition conversation.h:178
WS_DLL_PUBLIC wmem_map_t * get_conversation_hashtables(void)
Get a hash table of conversation hash table.
Definition conversation.c:3374
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 ac...
Definition conversation.c:2957
WS_DLL_PUBLIC void conversation_add_proto_data(conversation_t *conv, const int proto, void *proto_data)
Associate data with a conversation.
Definition conversation.c:2728
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.
Definition conversation.c:3290
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...
Definition conversation.c:955
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.
Definition conversation.c:2242
WS_DLL_PUBLIC void conversation_set_dissector(conversation_t *conversation, const dissector_handle_t handle)
Set the dissector for a conversation.
Definition conversation.c:2775
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.
Definition conversation.c:1210
Holds a network or link-layer address of any supported type.
Definition address.h:62
Represents the metadata and indexing information for a single captured frame.
Definition packet_info.h:43
Internal representation of a wmem balanced tree.
Definition wmem_tree-int.h:81
Definition conversation.c:49
Definition conversation.h:208
const char * str_val
Definition conversation.h:214
conversation_type conversation_type_val
Definition conversation.h:211
const uint8_t * val
Definition conversation.h:220
unsigned int uint_val
Definition conversation.h:215
size_t len
Definition conversation.h:221
struct conversation_element::@23::@25 blob
conversation_element_type type
Definition conversation.h:209
uint64_t uint64_val
Definition conversation.h:216
address addr_val
Definition conversation.h:212
int int_val
Definition conversation.h:217
unsigned int port_val
Definition conversation.h:213
int64_t int64_val
Definition conversation.h:218
Definition conversation.h:229
wmem_tree_t * dissector_tree
Definition conversation.h:238
struct conversation * last
Definition conversation.h:231
struct conversation * latest_found
Definition conversation.h:232
uint32_t setup_frame
Definition conversation.h:234
unsigned options
Definition conversation.h:239
wmem_tree_t * data_list
Definition conversation.h:237
uint32_t last_frame
Definition conversation.h:236
uint32_t conv_index
Definition conversation.h:233
conversation_element_t * key_ptr
Definition conversation.h:240
Core tvbuff (testy virtual buffer) structure representing a region of packet data,...
Definition tvbuff-int.h:95