aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors
diff options
context:
space:
mode:
authorGuy Harris <gharris@sonic.net>2022-08-25 22:37:19 -0700
committerGuy Harris <gharris@sonic.net>2022-08-25 22:37:19 -0700
commitdeb95a275d0e7c78cb09efef3109cc33d92c4d38 (patch)
tree08ca451f3e55c0a30a8a65102c1b5fda670d161a /epan/dissectors
parent8195bdd3407d6bdcc0f1afa4245d543dd894cf49 (diff)
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.
Diffstat (limited to 'epan/dissectors')
-rw-r--r--epan/dissectors/packet-dvb-s2-bb.c2
-rw-r--r--epan/dissectors/packet-fc.c4
-rw-r--r--epan/dissectors/packet-fr.c2
-rw-r--r--epan/dissectors/packet-gsmtap.c2
-rw-r--r--epan/dissectors/packet-h223.c4
-rw-r--r--epan/dissectors/packet-isup.c6
-rw-r--r--epan/dissectors/packet-iuup.c8
-rw-r--r--epan/dissectors/packet-k12.c2
-rw-r--r--epan/dissectors/packet-lapdm.c4
-rw-r--r--epan/dissectors/packet-lapsat.c2
-rw-r--r--epan/dissectors/packet-tdmop.c2
-rw-r--r--epan/dissectors/packet-tipc.c2
-rw-r--r--epan/dissectors/packet-x25.c2
13 files changed, 21 insertions, 21 deletions
diff --git a/epan/dissectors/packet-dvb-s2-bb.c b/epan/dissectors/packet-dvb-s2-bb.c
index c5e0547bdd..8f58392bc4 100644
--- a/epan/dissectors/packet-dvb-s2-bb.c
+++ b/epan/dissectors/packet-dvb-s2-bb.c
@@ -1646,7 +1646,7 @@ 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_create_key_by_address_port_pairs() could be useful for the subdissectors
+ /* conversation_set_elements_by_address_port_pairs() 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().
diff --git a/epan/dissectors/packet-fc.c b/epan/dissectors/packet-fc.c
index d39cba3d53..719b027434 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_create_key_by_address_port_pairs(pinfo, &pinfo->src, &pinfo->dst, CONVERSATION_EXCHG, 0, 0);
+ conversation_set_elements_by_address_port_pairs(pinfo, &pinfo->src, &pinfo->dst, CONVERSATION_EXCHG, 0, 0);
} else {
- conversation_create_key_by_address_port_pairs(pinfo, &pinfo->src, &pinfo->dst, CONVERSATION_EXCHG, pinfo->srcport, pinfo->destport);
+ conversation_set_elements_by_address_port_pairs(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-fr.c b/epan/dissectors/packet-fr.c
index 269fadb385..171f01bc89 100644
--- a/epan/dissectors/packet-fr.c
+++ b/epan/dissectors/packet-fr.c
@@ -506,7 +506,7 @@ dissect_fr_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
proto_tree_add_uint(fr_tree, hf_fr_dlci, tvb, 0, offset, addr);
}
- conversation_create_key_by_id(pinfo, CONVERSATION_DLCI, addr);
+ conversation_set_elements_by_id(pinfo, CONVERSATION_DLCI, addr);
col_add_fstr(pinfo->cinfo, COL_INFO, "DLCI %u", addr);
}
diff --git a/epan/dissectors/packet-gsmtap.c b/epan/dissectors/packet-gsmtap.c
index e126635a45..f309a16d7d 100644
--- a/epan/dissectors/packet-gsmtap.c
+++ b/epan/dissectors/packet-gsmtap.c
@@ -853,7 +853,7 @@ dissect_gsmtap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _
/* Try to build an identifier of different 'streams' */
/* (AFCN _cant_ be used because of hopping */
- conversation_create_key_by_id(pinfo, CONVERSATION_GSMTAP, (timeslot << 3) | subslot);
+ conversation_set_elements_by_id(pinfo, CONVERSATION_GSMTAP, (timeslot << 3) | subslot);
if (tree) {
guint8 channel;
diff --git a/epan/dissectors/packet-h223.c b/epan/dissectors/packet-h223.c
index 1250832d5e..2c90a1de54 100644
--- a/epan/dissectors/packet-h223.c
+++ b/epan/dissectors/packet-h223.c
@@ -728,7 +728,7 @@ dissect_mux_sdu_fragment(tvbuff_t *volatile next_tvb, packet_info *pinfo,
TRY {
/* update the circuit details before passing to a subdissector */
guint32 circuit_id = circuit_chain_lookup(call_info, vc);
- conversation_create_key_by_id(pinfo, CONVERSATION_H223, circuit_id);
+ conversation_set_elements_by_id(pinfo, CONVERSATION_H223, circuit_id);
conversation_t *subcircuit = find_conversation_by_id(pinfo->num, CONVERSATION_H223, circuit_id);
proto_tree *vc_tree;
@@ -794,7 +794,7 @@ dissect_mux_sdu_fragment(tvbuff_t *volatile next_tvb, packet_info *pinfo,
/* restore the original circuit details for future PDUs */
FINALLY {
- conversation_create_key_by_id(pinfo, orig_ctype, orig_circuit);
+ conversation_set_elements_by_id(pinfo, orig_ctype, orig_circuit);
}
ENDTRY;
}
diff --git a/epan/dissectors/packet-isup.c b/epan/dissectors/packet-isup.c
index 64799f3031..10dadd9102 100644
--- a/epan/dissectors/packet-isup.c
+++ b/epan/dissectors/packet-isup.c
@@ -10405,7 +10405,7 @@ dissect_isup(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_
isup_tree = proto_item_add_subtree(ti, ett_isup);
proto_tree_add_uint(isup_tree, hf_isup_cic, tvb, CIC_OFFSET, CIC_LENGTH, cic);
}
- conversation_create_key_by_id(pinfo, CONVERSATION_ISUP, cic);
+ conversation_set_elements_by_id(pinfo, CONVERSATION_ISUP, cic);
message_tvb = tvb_new_subset_remaining(tvb, CIC_LENGTH);
dissect_ansi_isup_message(message_tvb, pinfo, isup_tree, ISUP_ITU_STANDARD_VARIANT, cic);
break;
@@ -10454,7 +10454,7 @@ dissect_isup(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_
isup_tree = proto_item_add_subtree(ti, ett_isup);
proto_tree_add_uint(isup_tree, hf_isup_cic, tvb, CIC_OFFSET, CIC_LENGTH, cic);
}
- conversation_create_key_by_id(pinfo, CONVERSATION_ISUP, cic);
+ conversation_set_elements_by_id(pinfo, CONVERSATION_ISUP, cic);
message_tvb = tvb_new_subset_remaining(tvb, CIC_LENGTH);
dissect_isup_message(message_tvb, pinfo, isup_tree, itu_isup_variant, cic);
}
@@ -10508,7 +10508,7 @@ dissect_bicc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_
bicc_cic = tvb_get_letohl(tvb, BICC_CIC_OFFSET);
- conversation_create_key_by_id(pinfo, CONVERSATION_BICC, bicc_cic);
+ conversation_set_elements_by_id(pinfo, CONVERSATION_BICC, bicc_cic);
col_clear(pinfo->cinfo, COL_INFO);
if (isup_show_cic_in_info) {
diff --git a/epan/dissectors/packet-iuup.c b/epan/dissectors/packet-iuup.c
index 12983b448f..c7a90eefe2 100644
--- a/epan/dissectors/packet-iuup.c
+++ b/epan/dissectors/packet-iuup.c
@@ -617,7 +617,7 @@ static int dissect_iuup(tvbuff_t* tvb_in, packet_info* pinfo, proto_tree* tree,
phdr &= 0x7fff;
- conversation_create_key_by_id(pinfo, CONVERSATION_IUUP, phdr);
+ conversation_set_elements_by_id(pinfo, CONVERSATION_IUUP, phdr);
tvb = tvb_new_subset_length(tvb_in,2,len);
}
@@ -650,7 +650,7 @@ static int dissect_iuup(tvbuff_t* tvb_in, packet_info* pinfo, proto_tree* tree,
proto_tree_add_item(iuup_tree,hf_iuup_rfci,tvb,1,1,ENC_BIG_ENDIAN);
add_hdr_crc(tvb, pinfo, iuup_tree);
add_payload_crc(tvb, pinfo, iuup_tree);
- dissect_iuup_payload(tvb,pinfo,iuup_tree,second_octet & 0x3f,4, conversation_get_id_from_key(pinfo, CONVERSATION_IUUP, USE_LAST_ENDPOINT));
+ dissect_iuup_payload(tvb,pinfo,iuup_tree,second_octet & 0x3f,4, conversation_get_id_from_elements(pinfo, CONVERSATION_IUUP, USE_LAST_ENDPOINT));
return tvb_captured_length(tvb);
case PDUTYPE_DATA_NO_CRC:
col_append_fstr(pinfo->cinfo, COL_INFO," RFCI %u", (guint)(second_octet & 0x3f));
@@ -664,7 +664,7 @@ static int dissect_iuup(tvbuff_t* tvb_in, packet_info* pinfo, proto_tree* tree,
proto_tree_add_item(iuup_tree,hf_iuup_rfci,tvb,1,1,ENC_BIG_ENDIAN);
add_hdr_crc(tvb, pinfo, iuup_tree);
- dissect_iuup_payload(tvb,pinfo,iuup_tree,second_octet & 0x3f,3, conversation_get_id_from_key(pinfo, CONVERSATION_IUUP, USE_LAST_ENDPOINT));
+ dissect_iuup_payload(tvb,pinfo,iuup_tree,second_octet & 0x3f,3, conversation_get_id_from_elements(pinfo, CONVERSATION_IUUP, USE_LAST_ENDPOINT));
return tvb_captured_length(tvb);
case PDUTYPE_DATA_CONTROL_PROC:
if (tree) {
@@ -715,7 +715,7 @@ static int dissect_iuup(tvbuff_t* tvb_in, packet_info* pinfo, proto_tree* tree,
switch( second_octet & PROCEDURE_MASK ) {
case PROC_INIT:
add_payload_crc(tvb, pinfo, iuup_tree);
- dissect_iuup_init(tvb,pinfo,iuup_tree, conversation_get_id_from_key(pinfo, CONVERSATION_IUUP, USE_LAST_ENDPOINT));
+ dissect_iuup_init(tvb,pinfo,iuup_tree, conversation_get_id_from_elements(pinfo, CONVERSATION_IUUP, USE_LAST_ENDPOINT));
return tvb_captured_length(tvb);
case PROC_RATE:
add_payload_crc(tvb, pinfo, iuup_tree);
diff --git a/epan/dissectors/packet-k12.c b/epan/dissectors/packet-k12.c
index cb55983de2..e5994e01ee 100644
--- a/epan/dissectors/packet-k12.c
+++ b/epan/dissectors/packet-k12.c
@@ -211,7 +211,7 @@ dissect_k12(tvbuff_t* tvb,packet_info* pinfo,proto_tree* tree, void* data _U_)
* XXX: this is prone to collisions!
* we need an uniform way to manage circuits between dissectors
*/
- conversation_create_key_by_id(pinfo, CONVERSATION_NONE, g_str_hash(circuit_str));
+ conversation_set_elements_by_id(pinfo, CONVERSATION_NONE, g_str_hash(circuit_str));
proto_tree_add_uint(k12_tree, hf_k12_atm_vp, tvb, 0, 0,
pinfo->pseudo_header->k12.input_info.atm.vp);
diff --git a/epan/dissectors/packet-lapdm.c b/epan/dissectors/packet-lapdm.c
index f596f90d4c..aa149a5555 100644
--- a/epan/dissectors/packet-lapdm.c
+++ b/epan/dissectors/packet-lapdm.c
@@ -317,7 +317,7 @@ dissect_lapdm(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data)
pinfo->fragmented = m;
/* Rely on caller to provide a way to group fragments */
- fragment_id = (conversation_get_id_from_key(pinfo, CONVERSATION_GSMTAP, USE_LAST_ENDPOINT) << 4) | (sapi << 1) | pinfo->p2p_dir;
+ fragment_id = (conversation_get_id_from_elements(pinfo, CONVERSATION_GSMTAP, USE_LAST_ENDPOINT) << 4) | (sapi << 1) | pinfo->p2p_dir;
if (!PINFO_FD_VISITED(pinfo)) {
/* Check if new N(S) is equal to previous N(S) (to avoid adding retransmissions in reassembly table)
@@ -377,7 +377,7 @@ dissect_lapdm(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data)
{
if (!PINFO_FD_VISITED(pinfo) && ((control & XDLC_S_U_MASK) == XDLC_U) && ((control & XDLC_U_MODIFIER_MASK) == XDLC_SABM)) {
/* SABM frame; reset the last N(S) to an invalid value */
- guint32 fragment_id = (conversation_get_id_from_key(pinfo, CONVERSATION_GSMTAP, USE_LAST_ENDPOINT) << 4) | (sapi << 1) | pinfo->p2p_dir;
+ guint32 fragment_id = (conversation_get_id_from_elements(pinfo, CONVERSATION_GSMTAP, USE_LAST_ENDPOINT) << 4) | (sapi << 1) | pinfo->p2p_dir;
wmem_map_insert(lapdm_last_n_s_map, GUINT_TO_POINTER(fragment_id), GUINT_TO_POINTER(0));
}
diff --git a/epan/dissectors/packet-lapsat.c b/epan/dissectors/packet-lapsat.c
index e4254ba691..df6c1babb0 100644
--- a/epan/dissectors/packet-lapsat.c
+++ b/epan/dissectors/packet-lapsat.c
@@ -505,7 +505,7 @@ dissect_lapsat(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* dissec
pinfo->fragmented = !!(addr & LAPSAT_SI);
/* Rely on caller to provide a way to group fragments */
- fragment_id = (conversation_get_id_from_key(pinfo, CONVERSATION_GSMTAP, USE_LAST_ENDPOINT) << 3) | (sapi << 1) | pinfo->p2p_dir;
+ fragment_id = (conversation_get_id_from_elements(pinfo, CONVERSATION_GSMTAP, USE_LAST_ENDPOINT) << 3) | (sapi << 1) | pinfo->p2p_dir;
/* Fragment reconstruction helpers */
fd_m = fragment_add_seq_next(
diff --git a/epan/dissectors/packet-tdmop.c b/epan/dissectors/packet-tdmop.c
index 4e8deac237..e31b79aee8 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_create_key_by_address_port_pairs(pinfo, &pinfo->src, &pinfo->dst, CONVERSATION_TDMOP, srcch, dstch);
+ conversation_set_elements_by_address_port_pairs(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 a8d3fb906f..2d3bb218cd 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_create_key_by_address_port_pairs(pinfo, &pinfo->src, &pinfo->dst, CONVERSATION_TIPC, srcport, destport);
+ conversation_set_elements_by_address_port_pairs(pinfo, &pinfo->src, &pinfo->dst, CONVERSATION_TIPC, srcport, destport);
offset = offset + 4;
/* 20 - 24 Bytes
diff --git a/epan/dissectors/packet-x25.c b/epan/dissectors/packet-x25.c
index d3817c2617..8916c2db02 100644
--- a/epan/dissectors/packet-x25.c
+++ b/epan/dissectors/packet-x25.c
@@ -1229,7 +1229,7 @@ dissect_x25_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
modulo = ((bytes0_1 & 0x2000) ? 128 : 8);
vc = (int)(bytes0_1 & 0x0FFF);
- conversation_create_key_by_id(pinfo, CONVERSATION_X25, vc);
+ conversation_set_elements_by_id(pinfo, CONVERSATION_X25, vc);
if (bytes0_1 & X25_ABIT) toa = TRUE;
else toa = FALSE;