aboutsummaryrefslogtreecommitdiffstats
path: root/epan
diff options
context:
space:
mode:
Diffstat (limited to 'epan')
-rw-r--r--epan/conversation.c15
-rw-r--r--epan/dissectors/asn1/h225/packet-h225-template.c4
-rw-r--r--epan/dissectors/asn1/idmp/packet-idmp-template.c3
-rw-r--r--epan/dissectors/asn1/ldap/packet-ldap-template.c3
-rw-r--r--epan/dissectors/asn1/pres/packet-pres-template.c6
-rw-r--r--epan/dissectors/asn1/rtse/packet-rtse-template.c4
-rw-r--r--epan/dissectors/asn1/spnego/packet-spnego-template.c4
-rw-r--r--epan/dissectors/packet-dcerpc.c9
-rw-r--r--epan/dissectors/packet-dcm.c3
-rw-r--r--epan/dissectors/packet-dof.c10
-rw-r--r--epan/dissectors/packet-enip.c5
-rw-r--r--epan/dissectors/packet-fcp.c4
-rw-r--r--epan/dissectors/packet-fp_mux.c7
-rw-r--r--epan/dissectors/packet-ftp.c5
-rw-r--r--epan/dissectors/packet-gadu-gadu.c2
-rw-r--r--epan/dissectors/packet-h223.c5
-rw-r--r--epan/dissectors/packet-h225.c4
-rw-r--r--epan/dissectors/packet-idmp.c7
-rw-r--r--epan/dissectors/packet-isakmp.c4
-rw-r--r--epan/dissectors/packet-iwarp-mpa.c11
-rw-r--r--epan/dissectors/packet-jxta.c11
-rw-r--r--epan/dissectors/packet-ldap.c9
-rw-r--r--epan/dissectors/packet-mgcp.c8
-rw-r--r--epan/dissectors/packet-msproxy.c3
-rw-r--r--epan/dissectors/packet-msrp.c12
-rw-r--r--epan/dissectors/packet-nbd.c5
-rw-r--r--epan/dissectors/packet-ntlmssp.c16
-rw-r--r--epan/dissectors/packet-ositp.c4
-rw-r--r--epan/dissectors/packet-pcp.c4
-rw-r--r--epan/dissectors/packet-pres.c12
-rw-r--r--epan/dissectors/packet-reload-framing.c3
-rw-r--r--epan/dissectors/packet-rpc.c16
-rw-r--r--epan/dissectors/packet-rtse.c8
-rw-r--r--epan/dissectors/packet-rtsp.c3
-rw-r--r--epan/dissectors/packet-ses.c4
-rw-r--r--epan/dissectors/packet-socks.c6
-rw-r--r--epan/dissectors/packet-soupbintcp.c8
-rw-r--r--epan/dissectors/packet-spnego.c8
-rw-r--r--epan/dissectors/packet-sprt.c8
-rw-r--r--epan/dissectors/packet-synphasor.c6
-rw-r--r--epan/dissectors/packet-tcp.c25
-rw-r--r--epan/dissectors/packet-tftp.c3
-rw-r--r--epan/dissectors/packet-tn3270.c8
-rw-r--r--epan/dissectors/packet-tn5250.c8
-rw-r--r--epan/dissectors/packet-udp.c3
45 files changed, 80 insertions, 236 deletions
diff --git a/epan/conversation.c b/epan/conversation.c
index 4480788b61..63c5b8de1d 100644
--- a/epan/conversation.c
+++ b/epan/conversation.c
@@ -1269,21 +1269,8 @@ find_or_create_conversation(packet_info *pinfo)
{
conversation_t *conv=NULL;
- DPRINT(("called for frame #%d: %s:%d -> %s:%d (ptype=%d)",
- pinfo->num, address_to_str(wmem_packet_scope(), &pinfo->src), pinfo->srcport,
- address_to_str(wmem_packet_scope(), &pinfo->dst), pinfo->destport, pinfo->ptype));
- DINDENT();
-
/* Have we seen this conversation before? */
- if((conv = find_conversation(pinfo->num, &pinfo->src, &pinfo->dst,
- pinfo->ptype, pinfo->srcport,
- pinfo->destport, 0)) != NULL) {
- DPRINT(("found previous conversation for frame #%d (last_frame=%d)",
- pinfo->num, conv->last_frame));
- if (pinfo->num > conv->last_frame) {
- conv->last_frame = pinfo->num;
- }
- } else {
+ if((conv = find_conversation_pinfo(pinfo, 0)) == NULL) {
/* No, this is a new conversation. */
DPRINT(("did not find previous conversation for frame #%d",
pinfo->num));
diff --git a/epan/dissectors/asn1/h225/packet-h225-template.c b/epan/dissectors/asn1/h225/packet-h225-template.c
index 4299246da4..e39971dfc4 100644
--- a/epan/dissectors/asn1/h225/packet-h225-template.c
+++ b/epan/dissectors/asn1/h225/packet-h225-template.c
@@ -1041,9 +1041,7 @@ static void ras_call_matching(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tre
/* end of request message handling*/
}
else { /* Confirm or Reject Message */
- conversation = find_conversation(pinfo->num, &pinfo->src,
- &pinfo->dst, pinfo->ptype, pinfo->srcport,
- pinfo->destport, 0);
+ conversation = find_conversation_pinfo(pinfo, 0);
if (conversation != NULL) {
/* look only for matching request, if
matching conversation is available. */
diff --git a/epan/dissectors/asn1/idmp/packet-idmp-template.c b/epan/dissectors/asn1/idmp/packet-idmp-template.c
index 2ce6841b69..3d9e30cb2c 100644
--- a/epan/dissectors/asn1/idmp/packet-idmp-template.c
+++ b/epan/dissectors/asn1/idmp/packet-idmp-template.c
@@ -158,8 +158,7 @@ static int dissect_idmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tr
asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
- conv = find_conversation (pinfo->num, &pinfo->src, &pinfo->dst,
- pinfo->ptype, pinfo->srcport, pinfo->destport, 0);
+ conv = find_conversation_pinfo(pinfo, 0);
if (conv) {
/* Found a conversation, also use index for the generated dst_ref */
dst_ref = conv->conv_index;
diff --git a/epan/dissectors/asn1/ldap/packet-ldap-template.c b/epan/dissectors/asn1/ldap/packet-ldap-template.c
index 10832a8a71..2c860fc4fc 100644
--- a/epan/dissectors/asn1/ldap/packet-ldap-template.c
+++ b/epan/dissectors/asn1/ldap/packet-ldap-template.c
@@ -1764,8 +1764,7 @@ dissect_ldap_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data
/*
* Do we have a conversation for this connection?
*/
- conversation = find_conversation(pinfo->num, &pinfo->src, &pinfo->dst,
- pinfo->ptype, pinfo->srcport, pinfo->destport, 0);
+ conversation = find_conversation_pinfo(pinfo, 0);
if(conversation){
ldap_info = (ldap_conv_info_t *)conversation_get_proto_data(conversation, proto_ldap);
}
diff --git a/epan/dissectors/asn1/pres/packet-pres-template.c b/epan/dissectors/asn1/pres/packet-pres-template.c
index 7ca8de50ae..fbe0b3d943 100644
--- a/epan/dissectors/asn1/pres/packet-pres-template.c
+++ b/epan/dissectors/asn1/pres/packet-pres-template.c
@@ -128,8 +128,7 @@ register_ctx_id_and_oid(packet_info *pinfo _U_, guint32 idx, const char *oid)
pco=wmem_new(wmem_file_scope(), pres_ctx_oid_t);
pco->ctx_id=idx;
pco->oid=wmem_strdup(wmem_file_scope(), oid);
- conversation=find_conversation (pinfo->num, &pinfo->src, &pinfo->dst,
- pinfo->ptype, pinfo->srcport, pinfo->destport, 0);
+ conversation=find_conversation_pinfo(pinfo, 0);
if (conversation) {
pco->idx = conversation->conv_index;
} else {
@@ -169,8 +168,7 @@ find_oid_by_pres_ctx_id(packet_info *pinfo, guint32 idx)
conversation_t *conversation;
pco.ctx_id=idx;
- conversation=find_conversation (pinfo->num, &pinfo->src, &pinfo->dst,
- pinfo->ptype, pinfo->srcport, pinfo->destport, 0);
+ conversation=find_conversation_pinfo(pinfo, 0);
if (conversation) {
pco.idx = conversation->conv_index;
} else {
diff --git a/epan/dissectors/asn1/rtse/packet-rtse-template.c b/epan/dissectors/asn1/rtse/packet-rtse-template.c
index b2c3c956a0..52e5dd10b8 100644
--- a/epan/dissectors/asn1/rtse/packet-rtse-template.c
+++ b/epan/dissectors/asn1/rtse/packet-rtse-template.c
@@ -226,9 +226,7 @@ dissect_rtse(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void* d
(session->spdu_type == SES_MAJOR_SYNC_POINT)))
{
/* Use conversation index as fragment id */
- conversation = find_conversation (pinfo->num,
- &pinfo->src, &pinfo->dst, pinfo->ptype,
- pinfo->srcport, pinfo->destport, 0);
+ conversation = find_conversation_pinfo(pinfo, 0);
if (conversation != NULL) {
rtse_id = conversation->conv_index;
}
diff --git a/epan/dissectors/asn1/spnego/packet-spnego-template.c b/epan/dissectors/asn1/spnego/packet-spnego-template.c
index 13b338a855..58c4885fbb 100644
--- a/epan/dissectors/asn1/spnego/packet-spnego-template.c
+++ b/epan/dissectors/asn1/spnego/packet-spnego-template.c
@@ -1283,9 +1283,7 @@ dissect_spnego(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void*
* If we have a conversation, try to get the handle,
* and if we get one, attach it to the frame.
*/
- conversation = find_conversation(pinfo->num, &pinfo->src, &pinfo->dst,
- pinfo->ptype, pinfo->srcport,
- pinfo->destport, 0);
+ conversation = find_conversation_pinfo(pinfo, 0);
if (conversation) {
next_level_value = (gssapi_oid_value *)conversation_get_proto_data(conversation, proto_spnego);
diff --git a/epan/dissectors/packet-dcerpc.c b/epan/dissectors/packet-dcerpc.c
index b8b5296c3b..1a674fa0f3 100644
--- a/epan/dissectors/packet-dcerpc.c
+++ b/epan/dissectors/packet-dcerpc.c
@@ -4542,8 +4542,7 @@ dissect_dcerpc_cn_rqst(tvbuff_t *tvb, gint offset, packet_info *pinfo,
*/
dissect_dcerpc_cn_auth(tvb, offset, pinfo, dcerpc_tree, hdr, &auth_info);
- conv = find_conversation(pinfo->num, &pinfo->src, &pinfo->dst, pinfo->ptype,
- pinfo->srcport, pinfo->destport, 0);
+ conv = find_conversation_pinfo(pinfo, 0);
if (!conv)
show_stub_data(pinfo, tvb, offset, dcerpc_tree, &auth_info, TRUE);
else {
@@ -4707,8 +4706,7 @@ dissect_dcerpc_cn_resp(tvbuff_t *tvb, gint offset, packet_info *pinfo,
*/
dissect_dcerpc_cn_auth(tvb, offset, pinfo, dcerpc_tree, hdr, &auth_info);
- conv = find_conversation(pinfo->num, &pinfo->src, &pinfo->dst, pinfo->ptype,
- pinfo->srcport, pinfo->destport, 0);
+ conv = find_conversation_pinfo(pinfo, 0);
if (!conv) {
/* no point in creating one here, really */
@@ -4877,8 +4875,7 @@ dissect_dcerpc_cn_fault(tvbuff_t *tvb, gint offset, packet_info *pinfo,
length = reported_length;
stub_tvb = tvb_new_subset_length_caplen(tvb, offset, length, reported_length);
- conv = find_conversation(pinfo->num, &pinfo->src, &pinfo->dst, pinfo->ptype,
- pinfo->srcport, pinfo->destport, 0);
+ conv = find_conversation_pinfo(pinfo, 0);
if (!conv) {
/* no point in creating one here, really */
} else {
diff --git a/epan/dissectors/packet-dcm.c b/epan/dissectors/packet-dcm.c
index 5c4c866b58..5085b87824 100644
--- a/epan/dissectors/packet-dcm.c
+++ b/epan/dissectors/packet-dcm.c
@@ -6665,8 +6665,7 @@ dissect_dcm_pdv_fragmented(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
if (global_dcm_reassemble)
{
- conv = find_conversation(pinfo->num, &pinfo->src, &pinfo->dst,
- pinfo->ptype, pinfo->srcport, pinfo->destport, 0);
+ conv = find_conversation_pinfo(pinfo, 0);
/* Try to create somewhat unique ID.
Include the conversation index, to separate TCP session
diff --git a/epan/dissectors/packet-dof.c b/epan/dissectors/packet-dof.c
index 2d18a065e9..8a8279e187 100644
--- a/epan/dissectors/packet-dof.c
+++ b/epan/dissectors/packet-dof.c
@@ -5892,7 +5892,7 @@ static int dissect_dof_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
* so we can "mirror" that by attaching our own data to that conversation. If our
* data cannot be found, then it is a new connection (to us).
*/
- conversation = find_conversation(pinfo->fd->num, &pinfo->src, &pinfo->dst, pinfo->ptype, pinfo->srcport, pinfo->destport, 0);
+ conversation = find_conversation_pinfo(pinfo, 0);
{
/* This should be impossible - the TCP dissector requires this conversation.
* Bail...
@@ -6099,11 +6099,7 @@ static int dissect_tunnel_udp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tre
if (!udp_transport_session)
udp_transport_session = se_alloc0(sizeof(*udp_transport_session));
- conversation = find_conversation(pinfo->fd->num, &pinfo->src, &pinfo->dst, PT_UDP, pinfo->srcport, pinfo->destport, 0);
- if (!conversation)
- {
- conversation = conversation_new(pinfo->fd->num, &pinfo->src, &pinfo->dst, PT_UDP, pinfo->srcport, pinfo->destport, 0);
- }
+ conversation = find_or_create_conversation(pinfo);
/* Add the packet data. */
packet = p_get_proto_data(wmem_file_scope(), proto_2012_1_tunnel, 0);
@@ -6145,7 +6141,7 @@ static int dissect_tunnel_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tre
* so we can "mirror" that by attaching our own data to that conversation. If our
* data cannot be found, then it is a new connection (to us).
*/
- conversation = find_conversation(pinfo->fd->num, &pinfo->src, &pinfo->dst, pinfo->ptype, pinfo->srcport, pinfo->destport, 0);
+ conversation = find_conversation_pinfo(pinfo, 0);
{
/* This should be impossible - the TCP dissector requires this conversation.
* Bail...
diff --git a/epan/dissectors/packet-enip.c b/epan/dissectors/packet-enip.c
index 0b1515a4ba..adb73837bf 100644
--- a/epan/dissectors/packet-enip.c
+++ b/epan/dissectors/packet-enip.c
@@ -1267,10 +1267,7 @@ enip_get_explicit_connid(packet_info *pinfo, enip_request_key_t *prequest_key, g
/*
* Do we have a conversation for this connection?
*/
- conversation = find_conversation(pinfo->num,
- &pinfo->src, &pinfo->dst,
- pinfo->ptype,
- pinfo->srcport, pinfo->destport, 0);
+ conversation = find_conversation_pinfo(pinfo, 0);
if (conversation == NULL)
return NULL;
diff --git a/epan/dissectors/packet-fcp.c b/epan/dissectors/packet-fcp.c
index 24588de17a..593dd2073e 100644
--- a/epan/dissectors/packet-fcp.c
+++ b/epan/dissectors/packet-fcp.c
@@ -660,9 +660,7 @@ dissect_fcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data)
fcp_iu_val, "Unknown 0x%02x"));
fcp_tree = proto_item_add_subtree(ti, ett_fcp);
- fc_conv = find_conversation(pinfo->num, &pinfo->src, &pinfo->dst,
- pinfo->ptype, pinfo->srcport,
- pinfo->destport, 0);
+ fc_conv = find_conversation_pinfo(pinfo, 0);
if (fc_conv != NULL) {
fcp_conv_data = (fcp_conv_data_t *)conversation_get_proto_data(fc_conv, proto_fcp);
}
diff --git a/epan/dissectors/packet-fp_mux.c b/epan/dissectors/packet-fp_mux.c
index 6be6b726f4..2caf1fb9e5 100644
--- a/epan/dissectors/packet-fp_mux.c
+++ b/epan/dissectors/packet-fp_mux.c
@@ -319,12 +319,7 @@ static int heur_dissect_fp_mux(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tr
/* This is FP Mux! */
/* Set conversation dissector and dissect */
- conversation = find_conversation(pinfo->num, &pinfo->net_dst, &pinfo->net_src,
- pinfo->ptype, pinfo->destport, pinfo->srcport, 0);
- if (!conversation) {
- conversation = conversation_new(pinfo->num, &pinfo->net_dst, &pinfo->net_src,
- pinfo->ptype, pinfo->destport, pinfo->srcport, 0);
- }
+ conversation = find_or_create_conversation(pinfo);
conversation_set_dissector(conversation, fp_mux_handle);
dissect_fp_mux(tvb, pinfo, tree, data);
diff --git a/epan/dissectors/packet-ftp.c b/epan/dissectors/packet-ftp.c
index 3056afd585..f8bf9d057a 100644
--- a/epan/dissectors/packet-ftp.c
+++ b/epan/dissectors/packet-ftp.c
@@ -1306,10 +1306,7 @@ dissect_ftpdata(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data
data_ti = proto_tree_add_item(tree, proto_ftp_data, tvb, 0, -1, ENC_NA);
/* Link back to setup of this stream */
- p_conv = find_conversation(pinfo->num, &pinfo->src, &pinfo->dst,
- PT_TCP,
- pinfo->srcport, pinfo->destport,
- 0);
+ p_conv = find_conversation_pinfo(pinfo, 0);
if (p_conv) {
/* Link back to FTP frame where this conversation was created */
diff --git a/epan/dissectors/packet-gadu-gadu.c b/epan/dissectors/packet-gadu-gadu.c
index 1c41cfec69..57d0945c39 100644
--- a/epan/dissectors/packet-gadu-gadu.c
+++ b/epan/dissectors/packet-gadu-gadu.c
@@ -564,7 +564,7 @@ gadu_gadu_get_conversation_data(packet_info *pinfo)
{
conversation_t *conv;
- conv = find_conversation(pinfo->num, &pinfo->src, &pinfo->dst, pinfo->ptype, pinfo->srcport, pinfo->destport, 0);
+ conv = find_conversation_pinfo(pinfo, 0);
if (conv)
return (struct gadu_gadu_conv_data *)conversation_get_proto_data(conv, hfi_gadu_gadu->id);
return NULL;
diff --git a/epan/dissectors/packet-h223.c b/epan/dissectors/packet-h223.c
index a0ccee759a..0f2ea877bf 100644
--- a/epan/dissectors/packet-h223.c
+++ b/epan/dissectors/packet-h223.c
@@ -487,10 +487,7 @@ find_or_create_call_info_conv(packet_info * pinfo)
conversation_t *conv;
/* assume we're running atop TCP or RTP; use the conversation support */
- conv = find_conversation( pinfo->num,
- &pinfo->src,&pinfo->dst,
- pinfo->ptype,
- pinfo->srcport,pinfo->destport, 0 );
+ conv = find_conversation_pinfo(pinfo, 0 );
/* both RTP and TCP track their conversations, so just assert here if
* we can't find one */
diff --git a/epan/dissectors/packet-h225.c b/epan/dissectors/packet-h225.c
index d0adb1481b..c2593e8239 100644
--- a/epan/dissectors/packet-h225.c
+++ b/epan/dissectors/packet-h225.c
@@ -11953,9 +11953,7 @@ static void ras_call_matching(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tre
/* end of request message handling*/
}
else { /* Confirm or Reject Message */
- conversation = find_conversation(pinfo->num, &pinfo->src,
- &pinfo->dst, pinfo->ptype, pinfo->srcport,
- pinfo->destport, 0);
+ conversation = find_conversation_pinfo(pinfo, 0);
if (conversation != NULL) {
/* look only for matching request, if
matching conversation is available. */
diff --git a/epan/dissectors/packet-idmp.c b/epan/dissectors/packet-idmp.c
index 87ff313ae2..b74f68f716 100644
--- a/epan/dissectors/packet-idmp.c
+++ b/epan/dissectors/packet-idmp.c
@@ -644,8 +644,7 @@ static int dissect_idmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tr
asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
- conv = find_conversation (pinfo->num, &pinfo->src, &pinfo->dst,
- pinfo->ptype, pinfo->srcport, pinfo->destport, 0);
+ conv = find_conversation_pinfo(pinfo, 0);
if (conv) {
/* Found a conversation, also use index for the generated dst_ref */
dst_ref = conv->conv_index;
@@ -927,7 +926,7 @@ void proto_register_idmp(void)
NULL, HFILL }},
/*--- End of included file: packet-idmp-hfarr.c ---*/
-#line 312 "./asn1/idmp/packet-idmp-template.c"
+#line 311 "./asn1/idmp/packet-idmp-template.c"
};
/* List of subtrees */
@@ -950,7 +949,7 @@ void proto_register_idmp(void)
&ett_idmp_InvokeId,
/*--- End of included file: packet-idmp-ettarr.c ---*/
-#line 320 "./asn1/idmp/packet-idmp-template.c"
+#line 319 "./asn1/idmp/packet-idmp-template.c"
};
module_t *idmp_module;
diff --git a/epan/dissectors/packet-isakmp.c b/epan/dissectors/packet-isakmp.c
index 2d9462c488..cd3d527b67 100644
--- a/epan/dissectors/packet-isakmp.c
+++ b/epan/dissectors/packet-isakmp.c
@@ -4391,9 +4391,7 @@ dissect_ikev2_fragmentation(tvbuff_t *tvb, int offset, proto_tree *tree,
if (fragment_number == total_fragments) {
if (!pinfo->fd->flags.visited) {
/* On first pass, get it from the conversation info */
- conversation_t *p_conv = find_conversation(pinfo->num, &pinfo->src, &pinfo->dst,
- pinfo->ptype, pinfo->srcport,
- pinfo->destport, 0);
+ conversation_t *p_conv = find_conversation_pinfo(pinfo, 0);
if (p_conv != NULL) {
ikev2_fragmentation_state_t *p_state = (ikev2_fragmentation_state_t*)conversation_get_proto_data(p_conv, proto_isakmp);
if (p_state != NULL) {
diff --git a/epan/dissectors/packet-iwarp-mpa.c b/epan/dissectors/packet-iwarp-mpa.c
index 26db219dab..346f28cb97 100644
--- a/epan/dissectors/packet-iwarp-mpa.c
+++ b/epan/dissectors/packet-iwarp-mpa.c
@@ -384,9 +384,7 @@ is_mpa_rep(tvbuff_t *tvb, packet_info *pinfo)
return FALSE;
}
- conversation = find_conversation(pinfo->num, &pinfo->src,
- &pinfo->dst, pinfo->ptype, pinfo->srcport,
- pinfo->destport, 0);
+ conversation = find_conversation_pinfo(pinfo, 0);
if (!conversation) {
return FALSE;
@@ -420,9 +418,7 @@ is_mpa_fpdu(packet_info *pinfo)
conversation_t *conversation = NULL;
mpa_state_t *state = NULL;
- conversation = find_conversation(pinfo->num, &pinfo->src,
- &pinfo->dst, pinfo->ptype, pinfo->srcport,
- pinfo->destport, 0);
+ conversation = find_conversation_pinfo(pinfo, 0);
if (!conversation) {
return FALSE;
@@ -786,8 +782,7 @@ dissect_iwarp_mpa(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *dat
/* FPDU */
if (tvb_captured_length(tvb) >= MPA_SMALLEST_FPDU_LEN && is_mpa_fpdu(pinfo)) {
- conversation = find_conversation(pinfo->num, &pinfo->src,
- &pinfo->dst, pinfo->ptype, pinfo->srcport, pinfo->destport, 0);
+ conversation = find_conversation_pinfo(pinfo, 0);
state = get_mpa_state(conversation);
diff --git a/epan/dissectors/packet-jxta.c b/epan/dissectors/packet-jxta.c
index 9f11830899..9348995d07 100644
--- a/epan/dissectors/packet-jxta.c
+++ b/epan/dissectors/packet-jxta.c
@@ -746,18 +746,9 @@ Common_Exit:
**/
static jxta_stream_conversation_data *get_tpt_conversation(packet_info * pinfo)
{
- conversation_t *tpt_conversation =
- find_conversation(pinfo->num, &pinfo->src, &pinfo->dst, pinfo->ptype, pinfo->srcport, pinfo->destport, 0);
+ conversation_t *tpt_conversation = find_or_create_conversation(pinfo);
jxta_stream_conversation_data *tpt_conv_data;
- if (tpt_conversation == NULL) {
- /*
- * No conversation exists yet - create one.
- */
- tpt_conversation =
- conversation_new(pinfo->num, &pinfo->src, &pinfo->dst, pinfo->ptype, pinfo->srcport, pinfo->destport, 0);
- }
-
conversation_set_dissector(tpt_conversation, stream_jxta_handle);
tpt_conv_data = (jxta_stream_conversation_data *) conversation_get_proto_data(tpt_conversation, proto_jxta);
diff --git a/epan/dissectors/packet-ldap.c b/epan/dissectors/packet-ldap.c
index 6adb41d141..fafd29277b 100644
--- a/epan/dissectors/packet-ldap.c
+++ b/epan/dissectors/packet-ldap.c
@@ -4682,8 +4682,7 @@ dissect_ldap_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data
/*
* Do we have a conversation for this connection?
*/
- conversation = find_conversation(pinfo->num, &pinfo->src, &pinfo->dst,
- pinfo->ptype, pinfo->srcport, pinfo->destport, 0);
+ conversation = find_conversation_pinfo(pinfo, 0);
if(conversation){
ldap_info = (ldap_conv_info_t *)conversation_get_proto_data(conversation, proto_ldap);
}
@@ -5639,7 +5638,7 @@ void proto_register_ldap(void) {
NULL, HFILL }},
/*--- End of included file: packet-ldap-hfarr.c ---*/
-#line 2156 "./asn1/ldap/packet-ldap-template.c"
+#line 2155 "./asn1/ldap/packet-ldap-template.c"
};
/* List of subtrees */
@@ -5713,7 +5712,7 @@ void proto_register_ldap(void) {
&ett_ldap_T_warning,
/*--- End of included file: packet-ldap-ettarr.c ---*/
-#line 2170 "./asn1/ldap/packet-ldap-template.c"
+#line 2169 "./asn1/ldap/packet-ldap-template.c"
};
/* UAT for header fields */
static uat_field_t custom_attribute_types_uat_fields[] = {
@@ -5901,7 +5900,7 @@ proto_reg_handoff_ldap(void)
/*--- End of included file: packet-ldap-dis-tab.c ---*/
-#line 2341 "./asn1/ldap/packet-ldap-template.c"
+#line 2340 "./asn1/ldap/packet-ldap-template.c"
dissector_add_uint_range_with_preference("tcp.port", TCP_PORT_RANGE_LDAP, ldap_handle);
}
diff --git a/epan/dissectors/packet-mgcp.c b/epan/dissectors/packet-mgcp.c
index 6e4eb27f6f..ea6d2a7050 100644
--- a/epan/dissectors/packet-mgcp.c
+++ b/epan/dissectors/packet-mgcp.c
@@ -1247,9 +1247,7 @@ static void dissect_mgcp_firstline(tvbuff_t *tvb, packet_info *pinfo, proto_tree
to which the call was sent. */
if (pinfo->ptype == PT_TCP)
{
- conversation = find_conversation(pinfo->num, &pinfo->src,
- &pinfo->dst, pinfo->ptype, pinfo->srcport,
- pinfo->destport, 0);
+ conversation = find_conversation_pinfo(pinfo, 0);
}
else
{
@@ -1349,9 +1347,7 @@ static void dissect_mgcp_firstline(tvbuff_t *tvb, packet_info *pinfo, proto_tree
*/
if (pinfo->ptype == PT_TCP)
{
- conversation = find_conversation(pinfo->num, &pinfo->src,
- &pinfo->dst, pinfo->ptype, pinfo->srcport,
- pinfo->destport, 0);
+ conversation = find_conversation_pinfo(pinfo, 0);
}
else
{
diff --git a/epan/dissectors/packet-msproxy.c b/epan/dissectors/packet-msproxy.c
index ba8ee4a76e..93df3889a5 100644
--- a/epan/dissectors/packet-msproxy.c
+++ b/epan/dissectors/packet-msproxy.c
@@ -204,8 +204,7 @@ static int msproxy_sub_dissector( tvbuff_t *tvb, packet_info *pinfo,
proto_tree *msp_tree;
proto_item *ti;
- conversation = find_conversation( pinfo->num, &pinfo->src, &pinfo->dst,
- pinfo->ptype, pinfo->srcport, pinfo->destport, 0);
+ conversation = find_conversation_pinfo(pinfo, 0);
DISSECTOR_ASSERT( conversation); /* should always find a conversation */
diff --git a/epan/dissectors/packet-msrp.c b/epan/dissectors/packet-msrp.c
index 5f252ef03c..4a1b900cfa 100644
--- a/epan/dissectors/packet-msrp.c
+++ b/epan/dissectors/packet-msrp.c
@@ -426,15 +426,9 @@ dissect_msrp_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *dat
*/
if (pinfo->fd->flags.visited){
/* Look for existing conversation */
- conversation = find_conversation(pinfo->num, &pinfo->src, &pinfo->dst, pinfo->ptype,
- pinfo->srcport, pinfo->destport, 0);
- /* Create new one if not found */
- if (conversation == NULL){
- conversation = conversation_new(pinfo->num, &pinfo->src, &pinfo->dst,
- pinfo->ptype, pinfo->srcport, pinfo->destport, 0);
- /* Set dissector */
- conversation_set_dissector(conversation, msrp_handle);
- }
+ conversation = find_or_create_conversation(pinfo);
+ /* Set dissector */
+ conversation_set_dissector(conversation, msrp_handle);
}
dissect_msrp(tvb, pinfo, tree, NULL);
return TRUE;
diff --git a/epan/dissectors/packet-nbd.c b/epan/dissectors/packet-nbd.c
index c89c62545a..9fe4d83cfd 100644
--- a/epan/dissectors/packet-nbd.c
+++ b/epan/dissectors/packet-nbd.c
@@ -103,10 +103,7 @@ get_nbd_tcp_pdu_len(packet_info *pinfo, tvbuff_t *tvb, int offset, void *data _U
/*
* Do we have a conversation for this connection?
*/
- conversation = find_conversation(pinfo->num,
- &pinfo->src, &pinfo->dst,
- pinfo->ptype,
- pinfo->srcport, pinfo->destport, 0);
+ conversation = find_conversation_pinfo(pinfo, 0);
if (conversation == NULL) {
/* No, so just return the rest of the current packet */
return tvb_captured_length(tvb);
diff --git a/epan/dissectors/packet-ntlmssp.c b/epan/dissectors/packet-ntlmssp.c
index d0df92760a..2b32ebd50e 100644
--- a/epan/dissectors/packet-ntlmssp.c
+++ b/epan/dissectors/packet-ntlmssp.c
@@ -1874,9 +1874,7 @@ get_sign_key(packet_info *pinfo, int cryptpeer)
conversation_t *conversation;
ntlmssp_info *conv_ntlmssp_info;
- conversation = find_conversation(pinfo->num, &pinfo->src, &pinfo->dst,
- pinfo->ptype, pinfo->srcport,
- pinfo->destport, 0);
+ conversation = find_conversation_pinfo(pinfo, 0);
if (conversation == NULL) {
/* We don't have a conversation. In this case, stop processing
because we do not have enough info to decrypt the payload */
@@ -1914,9 +1912,7 @@ get_encrypted_state(packet_info *pinfo, int cryptpeer)
conversation_t *conversation;
ntlmssp_info *conv_ntlmssp_info;
- conversation = find_conversation(pinfo->num, &pinfo->src, &pinfo->dst,
- pinfo->ptype, pinfo->srcport,
- pinfo->destport, 0);
+ conversation = find_conversation_pinfo(pinfo, 0);
if (conversation == NULL) {
/* We don't have a conversation. In this case, stop processing
because we do not have enough info to decrypt the payload */
@@ -2041,9 +2037,7 @@ decrypt_data_payload(tvbuff_t *tvb, int offset, guint32 encrypted_block_length,
ntlmssp_info *conv_ntlmssp_info;
/* Pull the challenge info from the conversation */
- conversation = find_conversation(pinfo->num, &pinfo->src, &pinfo->dst,
- pinfo->ptype, pinfo->srcport,
- pinfo->destport, 0);
+ conversation = find_conversation_pinfo(pinfo, 0);
if (conversation == NULL) {
/* There is no conversation, thus no encryption state */
return NULL;
@@ -2249,9 +2243,7 @@ decrypt_verifier(tvbuff_t *tvb, int offset, guint32 encrypted_block_length,
/* We don't have data for this packet */
return;
}
- conversation = find_conversation(pinfo->num, &pinfo->src, &pinfo->dst,
- pinfo->ptype, pinfo->srcport,
- pinfo->destport, 0);
+ conversation = find_conversation_pinfo(pinfo, 0);
if (conversation == NULL) {
/* There is no conversation, thus no encryption state */
return;
diff --git a/epan/dissectors/packet-ositp.c b/epan/dissectors/packet-ositp.c
index 4e2edfeb5c..26c0c6f0b8 100644
--- a/epan/dissectors/packet-ositp.c
+++ b/epan/dissectors/packet-ositp.c
@@ -975,9 +975,7 @@ static int ositp_decode_DT(tvbuff_t *tvb, int offset, guint8 li, guint8 tpdu,
cotp_frame_reset = FALSE;
cotp_last_fragment = fragment;
dst_ref = cotp_dst_ref;
- conv = find_conversation(pinfo->num, &pinfo->src, &pinfo->dst,
- pinfo->ptype, pinfo->srcport, pinfo->destport,
- 0);
+ conv = find_conversation_pinfo(pinfo, 0);
if (conv) {
/* Found a conversation, also use index for the generated dst_ref */
dst_ref += (conv->conv_index << 16);
diff --git a/epan/dissectors/packet-pcp.c b/epan/dissectors/packet-pcp.c
index 81f3bebe01..82ae9f0c9e 100644
--- a/epan/dissectors/packet-pcp.c
+++ b/epan/dissectors/packet-pcp.c
@@ -558,9 +558,7 @@ static pcp_conv_info_t* get_pcp_conversation_info(packet_info *pinfo) {
conversation_t *conversation;
pcp_conv_info_t *pcp_conv_info;
- conversation = find_conversation(pinfo->num, &pinfo->src, &pinfo->dst,
- pinfo->ptype, pinfo->srcport,
- pinfo->destport, 0);
+ conversation = find_conversation_pinfo(pinfo, 0);
/* Conversation setup is done in the main dissecting routine so it should never be null */
DISSECTOR_ASSERT(conversation);
diff --git a/epan/dissectors/packet-pres.c b/epan/dissectors/packet-pres.c
index bf48babff6..42bacf9851 100644
--- a/epan/dissectors/packet-pres.c
+++ b/epan/dissectors/packet-pres.c
@@ -260,8 +260,7 @@ register_ctx_id_and_oid(packet_info *pinfo _U_, guint32 idx, const char *oid)
pco=wmem_new(wmem_file_scope(), pres_ctx_oid_t);
pco->ctx_id=idx;
pco->oid=wmem_strdup(wmem_file_scope(), oid);
- conversation=find_conversation (pinfo->num, &pinfo->src, &pinfo->dst,
- pinfo->ptype, pinfo->srcport, pinfo->destport, 0);
+ conversation=find_conversation_pinfo(pinfo, 0);
if (conversation) {
pco->idx = conversation->conv_index;
} else {
@@ -301,8 +300,7 @@ find_oid_by_pres_ctx_id(packet_info *pinfo, guint32 idx)
conversation_t *conversation;
pco.ctx_id=idx;
- conversation=find_conversation (pinfo->num, &pinfo->src, &pinfo->dst,
- pinfo->ptype, pinfo->srcport, pinfo->destport, 0);
+ conversation=find_conversation_pinfo(pinfo, 0);
if (conversation) {
pco.idx = conversation->conv_index;
} else {
@@ -1345,7 +1343,7 @@ static int dissect_UD_type_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_
/*--- End of included file: packet-pres-fn.c ---*/
-#line 210 "./asn1/pres/packet-pres-template.c"
+#line 208 "./asn1/pres/packet-pres-template.c"
/*
@@ -1827,7 +1825,7 @@ void proto_register_pres(void) {
NULL, HFILL }},
/*--- End of included file: packet-pres-hfarr.c ---*/
-#line 379 "./asn1/pres/packet-pres-template.c"
+#line 377 "./asn1/pres/packet-pres-template.c"
};
/* List of subtrees */
@@ -1874,7 +1872,7 @@ void proto_register_pres(void) {
&ett_pres_UD_type,
/*--- End of included file: packet-pres-ettarr.c ---*/
-#line 385 "./asn1/pres/packet-pres-template.c"
+#line 383 "./asn1/pres/packet-pres-template.c"
};
static ei_register_info ei[] = {
diff --git a/epan/dissectors/packet-reload-framing.c b/epan/dissectors/packet-reload-framing.c
index 9e68b13dc9..81c6698676 100644
--- a/epan/dissectors/packet-reload-framing.c
+++ b/epan/dissectors/packet-reload-framing.c
@@ -137,8 +137,7 @@ dissect_reload_framing_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tr
if (effective_length < MIN_HDR_LENGTH)
return 0;
- conversation = find_conversation(pinfo->num, &pinfo->src, &pinfo->dst,
- pinfo->ptype, pinfo->srcport, pinfo->destport, 0);
+ conversation = find_conversation_pinfo(pinfo, 0);
if (conversation)
reload_framing_info = (reload_conv_info_t *)conversation_get_proto_data(conversation, proto_reload_framing);
diff --git a/epan/dissectors/packet-rpc.c b/epan/dissectors/packet-rpc.c
index 1bb86a1267..7859c144bc 100644
--- a/epan/dissectors/packet-rpc.c
+++ b/epan/dissectors/packet-rpc.c
@@ -1311,9 +1311,7 @@ dissect_rpc_opaque_auth(tvbuff_t* tvb, proto_tree* tree, int offset,
rpc_conv_info_t *conv_info = NULL;
if (pinfo->ptype == PT_TCP)
- conv = find_conversation(pinfo->num, &pinfo->src,
- &pinfo->dst, pinfo->ptype, pinfo->srcport,
- pinfo->destport, 0);
+ conv = find_conversation_pinfo(pinfo, 0);
if (conv)
conv_info = (rpc_conv_info_t *)conversation_get_proto_data(conv,
@@ -1655,9 +1653,7 @@ get_conversation_for_call(packet_info *pinfo)
* the original request.
*/
if (pinfo->ptype == PT_TCP || pinfo->ptype == PT_IBQP) {
- conversation = find_conversation(pinfo->num,
- &pinfo->src, &pinfo->dst, pinfo->ptype,
- pinfo->srcport, pinfo->destport, 0);
+ conversation = find_conversation_pinfo(pinfo, 0);
} else {
/*
* XXX - you currently still have to pass a non-null
@@ -1709,9 +1705,7 @@ find_conversation_for_reply(packet_info *pinfo)
* might be sent to different ports.
*/
if (pinfo->ptype == PT_TCP || pinfo->ptype == PT_IBQP) {
- conversation = find_conversation(pinfo->num,
- &pinfo->src, &pinfo->dst, pinfo->ptype,
- pinfo->srcport, pinfo->destport, 0);
+ conversation = find_conversation_pinfo(pinfo, 0);
} else {
/*
* XXX - you currently still have to pass a non-null
@@ -1752,9 +1746,7 @@ get_conversation_for_tcp(packet_info *pinfo)
* not wildcard either address or port, regardless of whether
* this is a call or reply.
*/
- conversation = find_conversation(pinfo->num,
- &pinfo->src, &pinfo->dst, pinfo->ptype,
- pinfo->srcport, pinfo->destport, 0);
+ conversation = find_conversation_pinfo(pinfo, 0);
if (conversation == NULL) {
/*
* It's not part of any conversation - create a new one.
diff --git a/epan/dissectors/packet-rtse.c b/epan/dissectors/packet-rtse.c
index cb01c6068a..d29fec44d5 100644
--- a/epan/dissectors/packet-rtse.c
+++ b/epan/dissectors/packet-rtse.c
@@ -774,9 +774,7 @@ dissect_rtse(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void* d
(session->spdu_type == SES_MAJOR_SYNC_POINT)))
{
/* Use conversation index as fragment id */
- conversation = find_conversation (pinfo->num,
- &pinfo->src, &pinfo->dst, pinfo->ptype,
- pinfo->srcport, pinfo->destport, 0);
+ conversation = find_conversation_pinfo(pinfo, 0);
if (conversation != NULL) {
rtse_id = conversation->conv_index;
}
@@ -994,7 +992,7 @@ void proto_register_rtse(void) {
NULL, HFILL }},
/*--- End of included file: packet-rtse-hfarr.c ---*/
-#line 349 "./asn1/rtse/packet-rtse-template.c"
+#line 347 "./asn1/rtse/packet-rtse-template.c"
};
/* List of subtrees */
@@ -1016,7 +1014,7 @@ void proto_register_rtse(void) {
&ett_rtse_CallingSSuserReference,
/*--- End of included file: packet-rtse-ettarr.c ---*/
-#line 358 "./asn1/rtse/packet-rtse-template.c"
+#line 356 "./asn1/rtse/packet-rtse-template.c"
};
static ei_register_info ei[] = {
diff --git a/epan/dissectors/packet-rtsp.c b/epan/dissectors/packet-rtsp.c
index d56ac3a48d..99460e2023 100644
--- a/epan/dissectors/packet-rtsp.c
+++ b/epan/dissectors/packet-rtsp.c
@@ -390,8 +390,7 @@ dissect_rtspinterleaved(tvbuff_t *tvb, int offset, packet_info *pinfo,
length_remaining = rf_len;
next_tvb = tvb_new_subset_length_caplen(tvb, offset, length_remaining, rf_len);
- conv = find_conversation(pinfo->num, &pinfo->src, &pinfo->dst, pinfo->ptype,
- pinfo->srcport, pinfo->destport, 0);
+ conv = find_conversation_pinfo(pinfo, 0);
if (conv &&
(data = (rtsp_conversation_data_t *)conversation_get_proto_data(conv, proto_rtsp)) &&
diff --git a/epan/dissectors/packet-ses.c b/epan/dissectors/packet-ses.c
index f75db260a8..deea1d2256 100644
--- a/epan/dissectors/packet-ses.c
+++ b/epan/dissectors/packet-ses.c
@@ -1003,9 +1003,7 @@ dissect_spdu(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree,
guint32 ses_id = 0;
/* Use conversation index as segment id */
- conversation = find_conversation (pinfo->num,
- &pinfo->src, &pinfo->dst, pinfo->ptype,
- pinfo->srcport, pinfo->destport, 0);
+ conversation = find_conversation_pinfo(pinfo, 0);
if (conversation != NULL) {
ses_id = conversation->conv_index;
}
diff --git a/epan/dissectors/packet-socks.c b/epan/dissectors/packet-socks.c
index 1eba1e2c3c..7f4da5daaf 100644
--- a/epan/dissectors/packet-socks.c
+++ b/epan/dissectors/packet-socks.c
@@ -335,8 +335,7 @@ socks_udp_dissector(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* d
proto_tree *socks_tree;
proto_item *ti;
- conversation = find_conversation( pinfo->num, &pinfo->src, &pinfo->dst, pinfo->ptype,
- pinfo->srcport, pinfo->destport, 0);
+ conversation = find_conversation_pinfo( pinfo, 0);
DISSECTOR_ASSERT( conversation); /* should always find a conversation */
@@ -1003,8 +1002,7 @@ dissect_socks(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data) {
if (state_info->in_socks_dissector_flag)
return 0;
- conversation = find_conversation(pinfo->num, &pinfo->src, &pinfo->dst,
- pinfo->ptype, pinfo->srcport, pinfo->destport, 0);
+ conversation = find_conversation_pinfo(pinfo, 0);
if (conversation == NULL) {
/* If we don't already have a conversation, make sure the first
byte is a valid version number */
diff --git a/epan/dissectors/packet-soupbintcp.c b/epan/dissectors/packet-soupbintcp.c
index c1f680e630..7e17d0bc73 100644
--- a/epan/dissectors/packet-soupbintcp.c
+++ b/epan/dissectors/packet-soupbintcp.c
@@ -228,13 +228,7 @@ dissect_soupbintcp_common(
if (pkt_type == 'S') {
if (!PINFO_FD_VISITED(pinfo)) {
/* Get next expected sequence number from conversation */
- conv = find_conversation(pinfo->num,
- &pinfo->src,
- &pinfo->dst,
- pinfo->ptype,
- pinfo->srcport,
- pinfo->destport,
- 0);
+ conv = find_conversation_pinfo(pinfo, 0);
if (!conv) {
this_seq = 0;
} else {
diff --git a/epan/dissectors/packet-spnego.c b/epan/dissectors/packet-spnego.c
index df7e3ddf3f..2f9d8d4045 100644
--- a/epan/dissectors/packet-spnego.c
+++ b/epan/dissectors/packet-spnego.c
@@ -1735,9 +1735,7 @@ dissect_spnego(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void*
* If we have a conversation, try to get the handle,
* and if we get one, attach it to the frame.
*/
- conversation = find_conversation(pinfo->num, &pinfo->src, &pinfo->dst,
- pinfo->ptype, pinfo->srcport,
- pinfo->destport, 0);
+ conversation = find_conversation_pinfo(pinfo, 0);
if (conversation) {
next_level_value = (gssapi_oid_value *)conversation_get_proto_data(conversation, proto_spnego);
@@ -1936,7 +1934,7 @@ void proto_register_spnego(void) {
NULL, HFILL }},
/*--- End of included file: packet-spnego-hfarr.c ---*/
-#line 1391 "./asn1/spnego/packet-spnego-template.c"
+#line 1389 "./asn1/spnego/packet-spnego-template.c"
};
/* List of subtrees */
@@ -1959,7 +1957,7 @@ void proto_register_spnego(void) {
&ett_spnego_InitialContextToken_U,
/*--- End of included file: packet-spnego-ettarr.c ---*/
-#line 1401 "./asn1/spnego/packet-spnego-template.c"
+#line 1399 "./asn1/spnego/packet-spnego-template.c"
};
static ei_register_info ei[] = {
diff --git a/epan/dissectors/packet-sprt.c b/epan/dissectors/packet-sprt.c
index 870a13cc2e..a3fd2efd44 100644
--- a/epan/dissectors/packet-sprt.c
+++ b/epan/dissectors/packet-sprt.c
@@ -745,13 +745,7 @@ static struct _sprt_conversation_info* find_sprt_conversation_data(packet_info *
conversation_t *p_conv = NULL;
struct _sprt_conversation_info *p_conv_data = NULL;
/* Use existing packet info if available */
- p_conv = find_conversation(pinfo->num,
- &pinfo->src,
- &pinfo->dst,
- pinfo->ptype,
- pinfo->srcport,
- pinfo->destport,
- NO_ADDR_B|NO_PORT_B);
+ p_conv = find_conversation_pinfo(pinfo, NO_ADDR_B|NO_PORT_B);
if (p_conv)
{
p_conv_data = (struct _sprt_conversation_info*)conversation_get_proto_data(p_conv, proto_sprt);
diff --git a/epan/dissectors/packet-synphasor.c b/epan/dissectors/packet-synphasor.c
index 9aba75ac31..628e01fe5d 100644
--- a/epan/dissectors/packet-synphasor.c
+++ b/epan/dissectors/packet-synphasor.c
@@ -510,11 +510,7 @@ static int dissect_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, v
conversation_add_proto_data(conversation, proto_synphasor, frame);
}
else if (DATA == frame_type) {
- conversation_t *conversation = find_conversation(pinfo->num,
- &pinfo->src, &pinfo->dst,
- pinfo->ptype,
- pinfo->srcport, pinfo->destport,
- 0);
+ conversation_t *conversation = find_conversation_pinfo(pinfo, 0);
if (conversation) {
config_frame *conf = (config_frame *)conversation_get_proto_data(conversation, proto_synphasor);
diff --git a/epan/dissectors/packet-tcp.c b/epan/dissectors/packet-tcp.c
index 1dbe97b094..66f2312c09 100644
--- a/epan/dissectors/packet-tcp.c
+++ b/epan/dissectors/packet-tcp.c
@@ -913,8 +913,7 @@ gchar* tcp_follow_conv_filter(packet_info* pinfo, int* stream)
if (((pinfo->net_src.type == AT_IPv4 && pinfo->net_dst.type == AT_IPv4) ||
(pinfo->net_src.type == AT_IPv6 && pinfo->net_dst.type == AT_IPv6))
- && (conv=find_conversation(pinfo->num, &pinfo->src, &pinfo->dst, pinfo->ptype,
- pinfo->srcport, pinfo->destport, 0)) != NULL )
+ && (conv=find_conversation_pinfo(pinfo, 0)) != NULL )
{
/* TCP over IPv4/6 */
tcpd=get_tcp_conversation_data(conv, pinfo);
@@ -5320,27 +5319,13 @@ dissect_tcpopt_rvbd_trpy(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, vo
*/
if (sport_handle != NULL) {
conversation_t *conversation;
- conversation = find_conversation(pinfo->num,
- &pinfo->src, &pinfo->dst, pinfo->ptype,
- pinfo->srcport, pinfo->destport, 0);
- if (conversation == NULL) {
- conversation = conversation_new(pinfo->num,
- &pinfo->src, &pinfo->dst, pinfo->ptype,
- pinfo->srcport, pinfo->destport, 0);
- }
+ conversation = find_or_create_conversation(pinfo);
if (conversation_get_dissector(conversation, pinfo->num) != sport_handle) {
conversation_set_dissector(conversation, sport_handle);
}
} else if (data_handle != NULL) {
conversation_t *conversation;
- conversation = find_conversation(pinfo->num,
- &pinfo->src, &pinfo->dst, pinfo->ptype,
- pinfo->srcport, pinfo->destport, 0);
- if (conversation == NULL) {
- conversation = conversation_new(pinfo->num,
- &pinfo->src, &pinfo->dst, pinfo->ptype,
- pinfo->srcport, pinfo->destport, 0);
- }
+ conversation = find_or_create_conversation(pinfo);
if (conversation_get_dissector(conversation, pinfo->num) != data_handle) {
conversation_set_dissector(conversation, data_handle);
}
@@ -5841,9 +5826,7 @@ dissect_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
* in case a new conversation is found and the previous conversation needs
* to be adjusted,
*/
- if((conv = find_conversation(pinfo->num, &pinfo->src, &pinfo->dst,
- pinfo->ptype, pinfo->srcport,
- pinfo->destport, 0)) != NULL) {
+ if((conv = find_conversation_pinfo(pinfo, 0)) != NULL) {
/* Update how far the conversation reaches */
if (pinfo->num > conv->last_frame) {
save_last_frame = conv->last_frame;
diff --git a/epan/dissectors/packet-tftp.c b/epan/dissectors/packet-tftp.c
index 6770aa74d1..1d8e6bb6c9 100644
--- a/epan/dissectors/packet-tftp.c
+++ b/epan/dissectors/packet-tftp.c
@@ -667,8 +667,7 @@ dissect_tftp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_
conversation_set_dissector(conversation, tftp_handle);
}
} else {
- conversation = find_conversation(pinfo->num, &pinfo->src, &pinfo->dst,
- pinfo->ptype, pinfo->srcport, pinfo->destport, 0);
+ conversation = find_conversation_pinfo(pinfo, 0);
if( (conversation == NULL) || (conversation_get_dissector(conversation, pinfo->num) != tftp_handle) ){
conversation = conversation_new(pinfo->num, &pinfo->src, &pinfo->dst, PT_UDP,
pinfo->destport, pinfo->srcport, 0);
diff --git a/epan/dissectors/packet-tn3270.c b/epan/dissectors/packet-tn3270.c
index 539d686456..13b4dce66a 100644
--- a/epan/dissectors/packet-tn3270.c
+++ b/epan/dissectors/packet-tn3270.c
@@ -5248,9 +5248,7 @@ dissect_tn3270(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _
pinfo->fd->flags.encoding = PACKET_CHAR_ENC_CHAR_EBCDIC;
/* Do we have a conversation for this connection? */
- conversation = find_conversation(pinfo->num, &pinfo->src, &pinfo->dst,
- pinfo->ptype, pinfo->srcport,
- pinfo->destport, 0);
+ conversation = find_conversation_pinfo(pinfo, 0);
if (conversation != NULL) {
/* Do we already have a type and mechanism? */
tn3270_info = (tn3270_conv_info_t *)conversation_get_proto_data(conversation, proto_tn3270);
@@ -5354,9 +5352,7 @@ find_tn3270_conversation(packet_info *pinfo)
/*
* Do we have a conversation for this connection?
*/
- conversation = find_conversation(pinfo->num, &pinfo->src, &pinfo->dst,
- pinfo->ptype, pinfo->srcport,
- pinfo->destport, 0);
+ conversation = find_conversation_pinfo(pinfo, 0);
if (conversation != NULL) {
tn3270_info = (tn3270_conv_info_t *)conversation_get_proto_data(conversation, proto_tn3270);
if (tn3270_info != NULL) {
diff --git a/epan/dissectors/packet-tn5250.c b/epan/dissectors/packet-tn5250.c
index 647f8f7d47..60b3834d5d 100644
--- a/epan/dissectors/packet-tn5250.c
+++ b/epan/dissectors/packet-tn5250.c
@@ -5125,9 +5125,7 @@ dissect_tn5250(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _
int sna_flag;
/* Do we have a conversation for this connection? */
- conversation = find_conversation(pinfo->num, &pinfo->src, &pinfo->dst,
- pinfo->ptype, pinfo->srcport,
- pinfo->destport, 0);
+ conversation = find_conversation_pinfo(pinfo, 0);
if (conversation != NULL) {
/* Do we already have a type and mechanism? */
tn5250_info = (tn5250_conv_info_t *)conversation_get_proto_data(conversation, proto_tn5250);
@@ -5203,9 +5201,7 @@ find_tn5250_conversation(packet_info *pinfo)
/*
* Do we have a conversation for this connection?
*/
- conversation = find_conversation(pinfo->num, &pinfo->src, &pinfo->dst,
- pinfo->ptype, pinfo->srcport,
- pinfo->destport, 0);
+ conversation = find_conversation_pinfo(pinfo, 0);
if (conversation != NULL) {
tn5250_info = (tn5250_conv_info_t *)conversation_get_proto_data(conversation, proto_tn5250);
diff --git a/epan/dissectors/packet-udp.c b/epan/dissectors/packet-udp.c
index 7fc472be99..f595a92f96 100644
--- a/epan/dissectors/packet-udp.c
+++ b/epan/dissectors/packet-udp.c
@@ -428,8 +428,7 @@ static gchar* udp_follow_conv_filter(packet_info *pinfo, int* stream)
if( ((pinfo->net_src.type == AT_IPv4 && pinfo->net_dst.type == AT_IPv4) ||
(pinfo->net_src.type == AT_IPv6 && pinfo->net_dst.type == AT_IPv6))
- && (conv=find_conversation(pinfo->num, &pinfo->src, &pinfo->dst, pinfo->ptype,
- pinfo->srcport, pinfo->destport, 0)) != NULL )
+ && (conv=find_conversation_pinfo(pinfo, 0)) != NULL )
{
/* UDP over IPv4/6 */
udpd=get_udp_conversation_data(conv, pinfo);