aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--epan/conversation.c36
-rw-r--r--epan/conversation.h10
-rw-r--r--epan/dissectors/packet-dvb-s2-bb.c13
-rw-r--r--epan/dissectors/packet-fc.c4
-rw-r--r--epan/dissectors/packet-tdmop.c2
-rw-r--r--epan/dissectors/packet-tipc.c2
-rw-r--r--epan/packet.c8
-rw-r--r--epan/packet_info.h5
-rw-r--r--packaging/debian/libwireshark0.symbols2
9 files changed, 41 insertions, 41 deletions
diff --git a/epan/conversation.c b/epan/conversation.c
index 5eb4cde0e5..c5e91819e7 100644
--- a/epan/conversation.c
+++ b/epan/conversation.c
@@ -43,7 +43,7 @@ int _debug_conversation_indent = 0;
* We could use an element list here, but this is effectively a parameter list
* for find_conversation and is more compact.
*/
-struct conversation_key {
+struct conversation_addr_port_endpoints {
address addr1;
address addr2;
guint32 port1;
@@ -1692,11 +1692,11 @@ find_conversation_pinfo(packet_info *pinfo, const guint options)
DINSTR(wmem_free(NULL, dst_str));
/* Have we seen this conversation before? */
- if (pinfo->use_endpoint) {
- DISSECTOR_ASSERT(pinfo->conv_key);
- if ((conv = find_conversation(pinfo->num, &pinfo->conv_key->addr1, &pinfo->conv_key->addr2,
- pinfo->conv_key->ctype, pinfo->conv_key->port1,
- pinfo->conv_key->port2, 0)) != NULL) {
+ if (pinfo->use_conv_addr_port_endpoints) {
+ DISSECTOR_ASSERT(pinfo->conv_addr_port_endpoints);
+ if ((conv = find_conversation(pinfo->num, &pinfo->conv_addr_port_endpoints->addr1, &pinfo->conv_addr_port_endpoints->addr2,
+ pinfo->conv_addr_port_endpoints->ctype, pinfo->conv_addr_port_endpoints->port1,
+ pinfo->conv_addr_port_endpoints->port2, 0)) != NULL) {
DPRINT(("found previous conversation for frame #%u (last_frame=%d)",
pinfo->num, conv->last_frame));
if (pinfo->num > conv->last_frame) {
@@ -1745,10 +1745,10 @@ find_or_create_conversation(packet_info *pinfo)
DPRINT(("did not find previous conversation for frame #%u",
pinfo->num));
DINDENT();
- if (pinfo->use_endpoint) {
- conv = conversation_new(pinfo->num, &pinfo->conv_key->addr1, &pinfo->conv_key->addr2,
- pinfo->conv_key->ctype, pinfo->conv_key->port1,
- pinfo->conv_key->port2, 0);
+ if (pinfo->use_conv_addr_port_endpoints) {
+ conv = conversation_new(pinfo->num, &pinfo->conv_addr_port_endpoints->addr1, &pinfo->conv_addr_port_endpoints->addr2,
+ pinfo->conv_addr_port_endpoints->ctype, pinfo->conv_addr_port_endpoints->port1,
+ pinfo->conv_addr_port_endpoints->port2, 0);
} else if (pinfo->conv_elements) {
conv = conversation_new_full(pinfo->num, pinfo->conv_elements);
} else {
@@ -1781,23 +1781,23 @@ find_or_create_conversation_by_id(packet_info *pinfo, const conversation_type ct
}
void
-conversation_set_elements_by_address_port_pairs(struct _packet_info *pinfo, address* addr1, address* addr2,
+conversation_set_conv_addr_port_endpoints(struct _packet_info *pinfo, address* addr1, address* addr2,
conversation_type ctype, guint32 port1, guint32 port2)
{
- pinfo->conv_key = wmem_new0(pinfo->pool, struct conversation_key);
+ pinfo->conv_addr_port_endpoints = wmem_new0(pinfo->pool, struct conversation_addr_port_endpoints);
if (addr1 != NULL) {
- copy_address_wmem(pinfo->pool, &pinfo->conv_key->addr1, addr1);
+ copy_address_wmem(pinfo->pool, &pinfo->conv_addr_port_endpoints->addr1, addr1);
}
if (addr2 != NULL) {
- copy_address_wmem(pinfo->pool, &pinfo->conv_key->addr2, addr2);
+ copy_address_wmem(pinfo->pool, &pinfo->conv_addr_port_endpoints->addr2, addr2);
}
- pinfo->conv_key->ctype = ctype;
- pinfo->conv_key->port1 = port1;
- pinfo->conv_key->port2 = port2;
+ pinfo->conv_addr_port_endpoints->ctype = ctype;
+ pinfo->conv_addr_port_endpoints->port1 = port1;
+ pinfo->conv_addr_port_endpoints->port2 = port2;
- pinfo->use_endpoint = TRUE;
+ pinfo->use_conv_addr_port_endpoints = TRUE;
}
void
diff --git a/epan/conversation.h b/epan/conversation.h
index 7c3075bad5..056ce17f1d 100644
--- a/epan/conversation.h
+++ b/epan/conversation.h
@@ -180,8 +180,8 @@ typedef struct conversation {
conversation_element_t *key_ptr; /** Keys are conversation element arrays terminated with a CE_CONVERSATION_TYPE */
} conversation_t;
-struct conversation_key;
-typedef struct conversation_key* conversation_key_t;
+struct conversation_addr_port_endpoints;
+typedef struct conversation_addr_port_endpoints* conversation_addr_port_endpoints_t;
WS_DLL_PUBLIC const address* conversation_key_addr1(const conversation_element_t *key);
WS_DLL_PUBLIC guint32 conversation_key_port1(const conversation_element_t *key);
@@ -341,8 +341,8 @@ WS_DLL_PUBLIC void conversation_set_dissector_from_frame_number(conversation_t *
WS_DLL_PUBLIC dissector_handle_t conversation_get_dissector(conversation_t *conversation, const guint32 frame_num);
/**
- * Save conversation elements including address+port information in the
- * current packet info which can be matched by find_conversation_pinfo.
+ * Save address+port information in the current packet info; it can be matched
+ * by find_conversation_pinfo or find_conversation.
* Supports wildcarding.
* @param pinfo Packet info.
* @param addr1 The first address in the identifying tuple.
@@ -351,7 +351,7 @@ WS_DLL_PUBLIC dissector_handle_t conversation_get_dissector(conversation_t *conv
* @param port1 The first port in the identifying tuple.
* @param port2 The second port in the identifying tuple.
*/
-WS_DLL_PUBLIC void conversation_set_elements_by_address_port_pairs(struct _packet_info *pinfo, address* addr1, address* addr2,
+WS_DLL_PUBLIC void conversation_set_conv_addr_port_endpoints(struct _packet_info *pinfo, address* addr1, address* addr2,
conversation_type ctype, guint32 port1, guint32 port2);
/**
diff --git a/epan/dissectors/packet-dvb-s2-bb.c b/epan/dissectors/packet-dvb-s2-bb.c
index 8f58392bc4..e3060bff0b 100644
--- a/epan/dissectors/packet-dvb-s2-bb.c
+++ b/epan/dissectors/packet-dvb-s2-bb.c
@@ -1628,7 +1628,7 @@ static int dissect_dvb_s2_bb(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree
if (conv) {
virtual_id = virtual_stream_lookup(conv, isi);
/* DVB Base Band streams are unidirectional. Differentiate by direction
- * for the unlikely case of two streams between the same endpoints in
+ * for the unlikely case of two streams between the same endpointss in
* the opposite direction.
*/
if (addresses_equal(&pinfo->src, conversation_key_addr1(conv->key_ptr))) {
@@ -1646,14 +1646,15 @@ static int dissect_dvb_s2_bb(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree
subcircuit = conversation_new_by_id(pinfo->num, CONVERSATION_DVBBBF, virtual_id);
}
- /* conversation_set_elements_by_address_port_pairs() could be useful for the subdissectors
+ /* conversation_set_conv_addr_port_endpoints() could be useful for the subdissectors
* this calls (whether GSE or TS, and replace passing the packet data
* below), but it could cause problems when the subdissectors of those
* subdissectors try and call find_or_create_conversation().
- * pinfo->use_endpoint doesn't affect reassembly tables in the default
- * reassembly functions, either. So maybe the eventual approach is
- * to create an endpoint but set pinfo->use_endpoint back to FALSE, and
- * also make the GSE and MP2T dissectors more (DVB BBF) endpoint aware,
+ * pinfo->use_conv_addr_port_endpoints doesn't affect reassembly tables
+ * in the default reassembly functions, either. So maybe the eventual
+ * approach is to create a conversation key but set
+ * pinfo->use_conv_addr_port_endpoints back to FALSE, and also make the
+ * GSE and MP2T dissectors more (DVB BBF) conversation key aware,
* including in their reassembly functions.
*/
diff --git a/epan/dissectors/packet-fc.c b/epan/dissectors/packet-fc.c
index 719b027434..bbffb490aa 100644
--- a/epan/dissectors/packet-fc.c
+++ b/epan/dissectors/packet-fc.c
@@ -722,9 +722,9 @@ dissect_fc_helper (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gboolean
if(!is_ifcp){
set_address_tvb (&pinfo->dst, AT_FC, 3, tvb, offset+1);
set_address_tvb (&pinfo->src, AT_FC, 3, tvb, offset+5);
- conversation_set_elements_by_address_port_pairs(pinfo, &pinfo->src, &pinfo->dst, CONVERSATION_EXCHG, 0, 0);
+ conversation_set_conv_addr_port_endpoints(pinfo, &pinfo->src, &pinfo->dst, CONVERSATION_EXCHG, 0, 0);
} else {
- conversation_set_elements_by_address_port_pairs(pinfo, &pinfo->src, &pinfo->dst, CONVERSATION_EXCHG, pinfo->srcport, pinfo->destport);
+ conversation_set_conv_addr_port_endpoints(pinfo, &pinfo->src, &pinfo->dst, CONVERSATION_EXCHG, pinfo->srcport, pinfo->destport);
}
set_address(&fchdr->d_id, pinfo->dst.type, pinfo->dst.len, pinfo->dst.data);
set_address(&fchdr->s_id, pinfo->src.type, pinfo->src.len, pinfo->src.data);
diff --git a/epan/dissectors/packet-tdmop.c b/epan/dissectors/packet-tdmop.c
index e31b79aee8..3bad31b0b9 100644
--- a/epan/dissectors/packet-tdmop.c
+++ b/epan/dissectors/packet-tdmop.c
@@ -104,7 +104,7 @@ static int dissect_tdmop(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, vo
offset += 1;
/*conversation*/
- conversation_set_elements_by_address_port_pairs(pinfo, &pinfo->src, &pinfo->dst, CONVERSATION_TDMOP, srcch, dstch);
+ conversation_set_conv_addr_port_endpoints(pinfo, &pinfo->src, &pinfo->dst, CONVERSATION_TDMOP, srcch, dstch);
/*flags*/
proto_tree_add_item(tdmop_tree, hf_tdmop_Flags, tvb, offset, 1, ENC_NA);
diff --git a/epan/dissectors/packet-tipc.c b/epan/dissectors/packet-tipc.c
index 2d3bb218cd..e21b52cf40 100644
--- a/epan/dissectors/packet-tipc.c
+++ b/epan/dissectors/packet-tipc.c
@@ -2291,7 +2291,7 @@ dissect_tipc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_
proto_tree_add_item_ret_uint(tipc_tree, hf_tipc_dst_port, tipc_tvb, offset, 4, ENC_BIG_ENDIAN, &destport);
}
- conversation_set_elements_by_address_port_pairs(pinfo, &pinfo->src, &pinfo->dst, CONVERSATION_TIPC, srcport, destport);
+ conversation_set_conv_addr_port_endpoints(pinfo, &pinfo->src, &pinfo->dst, CONVERSATION_TIPC, srcport, destport);
offset = offset + 4;
/* 20 - 24 Bytes
diff --git a/epan/packet.c b/epan/packet.c
index 679475cb92..f9c8b908eb 100644
--- a/epan/packet.c
+++ b/epan/packet.c
@@ -590,8 +590,8 @@ dissect_record(epan_dissect_t *edt, int file_type_subtype,
clear_address(&edt->pi.dst);
edt->pi.noreassembly_reason = "";
edt->pi.ptype = PT_NONE;
- edt->pi.use_endpoint = FALSE;
- edt->pi.conv_key = NULL;
+ edt->pi.use_conv_addr_port_endpoints = FALSE;
+ edt->pi.conv_addr_port_endpoints = NULL;
edt->pi.conv_elements = NULL;
edt->pi.p2p_dir = P2P_DIR_UNKNOWN;
edt->pi.link_dir = LINK_DIR_UNKNOWN;
@@ -664,8 +664,8 @@ dissect_file(epan_dissect_t *edt, wtap_rec *rec,
clear_address(&edt->pi.dst);
edt->pi.noreassembly_reason = "";
edt->pi.ptype = PT_NONE;
- edt->pi.use_endpoint = FALSE;
- edt->pi.conv_key = NULL;
+ edt->pi.use_conv_addr_port_endpoints = FALSE;
+ edt->pi.conv_addr_port_endpoints = NULL;
edt->pi.conv_elements = NULL;
edt->pi.p2p_dir = P2P_DIR_UNKNOWN;
edt->pi.link_dir = LINK_DIR_UNKNOWN;
diff --git a/epan/packet_info.h b/epan/packet_info.h
index b86a8654f7..0c57bc20c0 100644
--- a/epan/packet_info.h
+++ b/epan/packet_info.h
@@ -15,7 +15,6 @@
#include "tvbuff.h"
#include "address.h"
-struct conversation_key;
struct conversation_element;
/** @file
@@ -71,8 +70,8 @@ typedef struct _packet_info {
guint32 destport; /**< destination port */
guint32 match_uint; /**< matched uint for calling subdissector from table */
const char *match_string; /**< matched string for calling subdissector from table */
- gboolean use_endpoint; /**< TRUE if endpoint member should be used for conversations */
- struct conversation_key* conv_key; /**< Data that can be used for address+port conversations, including wildcarding */
+ gboolean use_conv_addr_port_endpoints; /**< TRUE if address/port endpoints member should be used for conversations */
+ struct conversation_addr_port_endpoints* conv_addr_port_endpoints; /**< Data that can be used for address+port conversations, including wildcarding */
struct conversation_element *conv_elements; /**< Arbritrary conversation identifier; can't be wildcarded */
guint16 can_desegment; /**< >0 if this segment could be desegmented.
A dissector that can offer this API (e.g.
diff --git a/packaging/debian/libwireshark0.symbols b/packaging/debian/libwireshark0.symbols
index ffb655c3aa..9fdd013db9 100644
--- a/packaging/debian/libwireshark0.symbols
+++ b/packaging/debian/libwireshark0.symbols
@@ -181,9 +181,9 @@ libwireshark.so.0 libwireshark0 #MINVER#
conversation_new_by_id@Base 2.5.0
conversation_new_full@Base 3.7.1
conversation_pt_to_conversation_type@Base 4.0.0-rc2
+ conversation_set_conv_addr_port_endpoints@Base 4.0.0-rc2
conversation_set_dissector@Base 1.9.1
conversation_set_dissector_from_frame_number@Base 2.0.0
- conversation_set_elements_by_address_port_pairs@Base 4.0.0-rc2
conversation_set_elements_by_id@Base 4.0.0-rc2
conversation_set_port2@Base 2.6.3
conversation_set_addr2@Base 2.6.3