diff options
author | Michael Mann <mmann78@netscape.net> | 2017-10-29 10:12:59 -0400 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2017-10-29 16:53:57 +0000 |
commit | abfb6441177961fbdfa9648fdd2c40ef0ef3cefd (patch) | |
tree | dc5d1b438a052e73ec243d2f10e772e39fec3894 /epan/dissectors/packet-umts_fp.c | |
parent | 1bc6d4e96573f89ecdd719cb3cac92754b91f52c (diff) |
Add conversation endpoint type
For the moment this mirrors the port_type enumeration (PT_XXX), but the
intent is to move away from using "port types", eliminating most (if not
all)
Added conversation_pt_to_endpoint_type() so that conversations deal with the
correct enumeration. This is for dissector that use pinfo->ptype as input
to conversation APIs. Explicit use of port types are converted to using
ENDPOINT_XXX type.
Change-Id: Ia0bf553a3943b702c921f185407e03ce93ebf0ef
Reviewed-on: https://code.wireshark.org/review/24166
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'epan/dissectors/packet-umts_fp.c')
-rw-r--r-- | epan/dissectors/packet-umts_fp.c | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/epan/dissectors/packet-umts_fp.c b/epan/dissectors/packet-umts_fp.c index 4e9f80431a..c18749a864 100644 --- a/epan/dissectors/packet-umts_fp.c +++ b/epan/dissectors/packet-umts_fp.c @@ -4037,26 +4037,26 @@ set_both_sides_umts_fp_conv_data(packet_info *pinfo, umts_fp_conversation_info_t /* Finding or creating conversation for the way the packet is heading */ packet_direction_conv = (conversation_t *)find_conversation(pinfo->num, &pinfo->net_dst, &pinfo->net_src, - pinfo->ptype, + conversation_pt_to_endpoint_type(pinfo->ptype), pinfo->destport, pinfo->srcport, NO_ADDR_B); if (packet_direction_conv == NULL) { /* Conversation does not exist yet, creating one now. */ packet_direction_conv = conversation_new(pinfo->num, &pinfo->net_dst, &pinfo->net_src, - pinfo->ptype, + conversation_pt_to_endpoint_type(pinfo->ptype), pinfo->destport, pinfo->srcport, NO_ADDR_B); } conversation_add_proto_data(packet_direction_conv, proto_fp, umts_fp_conversation_info); /* Finding or creating conversation for the other side */ other_direction_conv = (conversation_t *)find_conversation(pinfo->num, &pinfo->net_src, &pinfo->net_dst, - pinfo->ptype, + conversation_pt_to_endpoint_type(pinfo->ptype), pinfo->srcport, pinfo->destport, NO_ADDR_B); if (other_direction_conv == NULL) { /* Conversation does not exist yet, creating one now. */ other_direction_conv = conversation_new(pinfo->num, &pinfo->net_src, &pinfo->net_dst, - pinfo->ptype, + conversation_pt_to_endpoint_type(pinfo->ptype), pinfo->srcport, pinfo->destport, NO_ADDR_B); } conversation_add_proto_data(other_direction_conv, proto_fp, umts_fp_conversation_info); @@ -4075,7 +4075,7 @@ heur_dissect_fp_dcch_over_dch(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tre /* Trying to find existing conversation */ p_conv = (conversation_t *)find_conversation(pinfo->num, &pinfo->net_dst, &pinfo->net_src, - pinfo->ptype, + conversation_pt_to_endpoint_type(pinfo->ptype), pinfo->destport, pinfo->srcport, NO_ADDR_B); if (p_conv != NULL) { @@ -4130,7 +4130,7 @@ heur_dissect_fp_dcch_over_dch(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tre /* the conversation must be created here if it doesn't exist yet*/ if (p_conv == NULL) { conversation_new(pinfo->num, &pinfo->net_dst, &pinfo->net_src, - pinfo->ptype, + conversation_pt_to_endpoint_type(pinfo->ptype), pinfo->destport, pinfo->srcport, NO_ADDR_B); } return FALSE; @@ -4201,7 +4201,7 @@ heur_dissect_fp_fach1(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void /* Finding or creating conversation */ p_conv = (conversation_t *)find_conversation(pinfo->num, &pinfo->net_dst, &pinfo->net_src, - pinfo->ptype, + conversation_pt_to_endpoint_type(pinfo->ptype), pinfo->destport, pinfo->srcport, NO_ADDR_B); if (p_conv != NULL) { @@ -4311,7 +4311,7 @@ heur_dissect_fp_fach2(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void /* Finding or creating conversation */ p_conv = (conversation_t *)find_conversation(pinfo->num, &pinfo->net_dst, &pinfo->net_src, - pinfo->ptype, + conversation_pt_to_endpoint_type(pinfo->ptype), pinfo->destport, pinfo->srcport, NO_ADDR_B); if (p_conv != NULL) { @@ -4426,7 +4426,7 @@ heur_dissect_fp_rach(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void * /* Finding or creating conversation */ p_conv = (conversation_t *)find_conversation(pinfo->num, &pinfo->net_dst, &pinfo->net_src, - pinfo->ptype, + conversation_pt_to_endpoint_type(pinfo->ptype), pinfo->destport, pinfo->srcport, NO_ADDR_B); if (p_conv != NULL) { @@ -4550,7 +4550,7 @@ heur_dissect_fp_pch(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *d /* Finding or creating conversation */ p_conv = (conversation_t *)find_conversation(pinfo->num, &pinfo->net_dst, &pinfo->net_src, - pinfo->ptype, + conversation_pt_to_endpoint_type(pinfo->ptype), pinfo->destport, pinfo->srcport, NO_ADDR_B); if (p_conv != NULL) { @@ -4736,7 +4736,7 @@ heur_dissect_fp_hsdsch_type_1(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tre /* Trying to find existing conversation */ p_conv = (conversation_t *)find_conversation(pinfo->num, &pinfo->net_dst, &pinfo->net_src, - pinfo->ptype, + conversation_pt_to_endpoint_type(pinfo->ptype), pinfo->destport, pinfo->srcport, NO_ADDR_B); if (p_conv != NULL) { @@ -4867,7 +4867,7 @@ heur_dissect_fp_hsdsch_type_2(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tre /* Trying to find existing conversation */ p_conv = (conversation_t *)find_conversation(pinfo->num, &pinfo->net_dst, &pinfo->net_src, - pinfo->ptype, + conversation_pt_to_endpoint_type(pinfo->ptype), pinfo->destport, pinfo->srcport, NO_ADDR_B); if (p_conv != NULL) { @@ -5026,7 +5026,7 @@ heur_dissect_fp_unknown_format(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tr /* Trying to find existing conversation */ p_conv = (conversation_t *)find_conversation(pinfo->num, &pinfo->net_dst, &pinfo->net_src, - pinfo->ptype, + conversation_pt_to_endpoint_type(pinfo->ptype), pinfo->destport, pinfo->srcport, NO_ADDR_B); /* Check if FP Conversation Info is attached */ @@ -5570,7 +5570,7 @@ dissect_fp_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *dat /* Check if we have conversation info */ /* Trying to find exact match - with both RNC's address & port and Node B's address & port */ p_conv = (conversation_t *)find_conversation(pinfo->num, &pinfo->net_dst, &pinfo->net_src, - pinfo->ptype, + conversation_pt_to_endpoint_type(pinfo->ptype), pinfo->destport, pinfo->srcport, 0); if (p_conv) { p_conv_data = (umts_fp_conversation_info_t *)conversation_get_proto_data(p_conv, proto_fp); @@ -5579,7 +5579,7 @@ dissect_fp_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *dat /* Didn't find exact conversation match */ /* Try to find a partial match with just the source/destination included */ p_conv = (conversation_t *)find_conversation(pinfo->num, &pinfo->net_dst, &pinfo->net_src, - pinfo->ptype, + conversation_pt_to_endpoint_type(pinfo->ptype), pinfo->destport, pinfo->srcport, NO_ADDR2); if (p_conv) { p_conv_data = (umts_fp_conversation_info_t *)conversation_get_proto_data(p_conv, proto_fp); @@ -5886,10 +5886,10 @@ umts_fp_init_protocol(void) } else { continue; /* Not implemented yet */ } - conversation = find_conversation(1, &src_addr, &dst_addr, PT_UDP, uat_umts_fp_ep_and_ch_records[i].src_port, 0, NO_ADDR2|NO_PORT2); + conversation = find_conversation(1, &src_addr, &dst_addr, ENDPOINT_UDP, uat_umts_fp_ep_and_ch_records[i].src_port, 0, NO_ADDR2|NO_PORT2); if (conversation == NULL) { /* It's not part of any conversation - create a new one. */ - conversation = conversation_new(1, &src_addr, &dst_addr, PT_UDP, uat_umts_fp_ep_and_ch_records[i].src_port, 0, NO_ADDR2|NO_PORT2); + conversation = conversation_new(1, &src_addr, &dst_addr, ENDPOINT_UDP, uat_umts_fp_ep_and_ch_records[i].src_port, 0, NO_ADDR2|NO_PORT2); if (conversation == NULL) continue; conversation_set_dissector(conversation, fp_handle); |