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-tcp.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-tcp.c')
-rw-r--r-- | epan/dissectors/packet-tcp.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/epan/dissectors/packet-tcp.c b/epan/dissectors/packet-tcp.c index 325c81ba3b..eee56870e5 100644 --- a/epan/dissectors/packet-tcp.c +++ b/epan/dissectors/packet-tcp.c @@ -1284,7 +1284,7 @@ static void handle_export_pdu_conversation(packet_info *pinfo, tvbuff_t *tvb, int src_port, int dst_port, struct tcpinfo *tcpinfo) { if (have_tap_listener(exported_pdu_tap)) { - conversation_t *conversation = find_conversation(pinfo->num, &pinfo->src, &pinfo->dst, PT_TCP, src_port, dst_port, 0); + conversation_t *conversation = find_conversation(pinfo->num, &pinfo->src, &pinfo->dst, ENDPOINT_TCP, src_port, dst_port, 0); if (conversation != NULL) { dissector_handle_t handle = (dissector_handle_t)wmem_tree_lookup32_le(conversation->dissector_tree, pinfo->num); @@ -1547,7 +1547,7 @@ add_tcp_process_info(guint32 frame_num, address *local_addr, address *remote_add if (!tcp_display_process_info) return; - conv = find_conversation(frame_num, local_addr, remote_addr, PT_TCP, local_port, remote_port, 0); + conv = find_conversation(frame_num, local_addr, remote_addr, ENDPOINT_TCP, local_port, remote_port, 0); if (!conv) { return; } @@ -5484,7 +5484,7 @@ decode_tcp_ports(tvbuff_t *tvb, int offset, packet_info *pinfo, /* determine if this packet is part of a conversation and call dissector */ /* for the conversation if available */ - if (try_conversation_dissector(&pinfo->src, &pinfo->dst, PT_TCP, + if (try_conversation_dissector(&pinfo->src, &pinfo->dst, ENDPOINT_TCP, src_port, dst_port, next_tvb, pinfo, tree, tcpinfo)) { pinfo->want_pdu_tracking -= !!(pinfo->want_pdu_tracking); handle_export_pdu_conversation(pinfo, next_tvb, src_port, dst_port, tcpinfo); @@ -5835,7 +5835,7 @@ dissect_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) } else { conv = conversation_new(pinfo->num, &pinfo->src, - &pinfo->dst, pinfo->ptype, + &pinfo->dst, ENDPOINT_TCP, pinfo->srcport, pinfo->destport, 0); } tcpd=get_tcp_conversation_data(conv,pinfo); @@ -5856,7 +5856,7 @@ dissect_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) if (save_last_frame > 0) conv->last_frame = save_last_frame; - conv=conversation_new(pinfo->num, &pinfo->src, &pinfo->dst, pinfo->ptype, pinfo->srcport, pinfo->destport, 0); + conv=conversation_new(pinfo->num, &pinfo->src, &pinfo->dst, ENDPOINT_TCP, pinfo->srcport, pinfo->destport, 0); tcpd=get_tcp_conversation_data(conv,pinfo); } if(!tcpd->ta) @@ -5880,7 +5880,7 @@ dissect_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) conv->last_frame = save_last_frame; } - other_conv = find_conversation(pinfo->num, &pinfo->dst, &pinfo->src, pinfo->ptype, pinfo->destport, pinfo->srcport, 0); + other_conv = find_conversation(pinfo->num, &pinfo->dst, &pinfo->src, ENDPOINT_TCP, pinfo->destport, pinfo->srcport, 0); if (other_conv != NULL) { conv = other_conv; |