diff --git a/epan/conversation_table.c b/epan/conversation_table.c index 524b491655..cc432a43d7 100644 --- a/epan/conversation_table.c +++ b/epan/conversation_table.c @@ -315,17 +315,17 @@ char *get_conversation_address(wmem_allocator_t *allocator, address *addr, gbool } } -char *get_conversation_port(wmem_allocator_t *allocator, guint32 port, port_type ptype, gboolean resolve_names) +char *get_conversation_port(wmem_allocator_t *allocator, guint32 port, endpoint_type etype, gboolean resolve_names) { - if(!resolve_names) ptype = PT_NONE; + if(!resolve_names) etype = ENDPOINT_NONE; - switch(ptype) { - case(PT_TCP): + switch(etype) { + case(ENDPOINT_TCP): return tcp_port_to_display(allocator, port); - case(PT_UDP): + case(ENDPOINT_UDP): return udp_port_to_display(allocator, port); - case(PT_SCTP): + case(ENDPOINT_SCTP): return sctp_port_to_display(allocator, port); default: return wmem_strdup_printf(allocator, "%d", port); @@ -333,7 +333,7 @@ char *get_conversation_port(wmem_allocator_t *allocator, guint32 port, port_type } /* given an address (to distinguish between ipv4 and ipv6 for tcp/udp), - a port_type and a name_type (FN_...) + a endpoint_type and a name_type (FN_...) return a string for the filter name. Some addresses, like AT_ETHER may actually be any of multiple types @@ -364,13 +364,13 @@ hostlist_get_filter_name(hostlist_talker_t *host, conv_filter_type_e filter_type /* Convert a port number into a string or NULL */ static char * -ct_port_to_str(port_type ptype, guint32 port) +ct_port_to_str(endpoint_type etype, guint32 port) { - switch(ptype){ - case PT_TCP: - case PT_UDP: - case PT_SCTP: - case PT_NCP: + switch(etype){ + case ENDPOINT_TCP: + case ENDPOINT_UDP: + case ENDPOINT_SCTP: + case ENDPOINT_NCP: return g_strdup_printf("%d", port); default: break; @@ -389,8 +389,8 @@ char *get_conversation_filter(conv_item_t *conv_item, conv_direction_e direction if (usb_address_type == -1) usb_address_type = address_type_get_by_name("AT_USB"); - sport = ct_port_to_str(conv_item->ptype, conv_item->src_port); - dport = ct_port_to_str(conv_item->ptype, conv_item->dst_port); + sport = ct_port_to_str(conv_item->etype, conv_item->src_port); + dport = ct_port_to_str(conv_item->etype, conv_item->dst_port); src_addr = address_to_str(NULL, &conv_item->src_address); dst_addr = address_to_str(NULL, &conv_item->dst_address); @@ -547,7 +547,7 @@ char *get_hostlist_filter(hostlist_talker_t *host) if (usb_address_type == -1) usb_address_type = address_type_get_by_name("AT_USB"); - sport = ct_port_to_str(host->ptype, host->port); + sport = ct_port_to_str(host->etype, host->port); src_addr = address_to_str(NULL, &host->myaddress); if (host->myaddress.type == AT_STRINGZ || host->myaddress.type == usb_address_type) { char *new_addr; @@ -572,9 +572,9 @@ char *get_hostlist_filter(hostlist_talker_t *host) void add_conversation_table_data(conv_hash_t *ch, const address *src, const address *dst, guint32 src_port, guint32 dst_port, int num_frames, int num_bytes, - nstime_t *ts, nstime_t *abs_ts, ct_dissector_info_t *ct_info, port_type ptype) + nstime_t *ts, nstime_t *abs_ts, ct_dissector_info_t *ct_info, endpoint_type etype) { - add_conversation_table_data_with_conv_id(ch, src, dst, src_port, dst_port, CONV_ID_UNSET, num_frames, num_bytes, ts, abs_ts, ct_info, ptype); + add_conversation_table_data_with_conv_id(ch, src, dst, src_port, dst_port, CONV_ID_UNSET, num_frames, num_bytes, ts, abs_ts, ct_info, etype); } void @@ -590,7 +590,7 @@ add_conversation_table_data_with_conv_id( nstime_t *ts, nstime_t *abs_ts, ct_dissector_info_t *ct_info, - port_type ptype) + endpoint_type etype) { const address *addr1, *addr2; guint32 port1, port2; @@ -652,7 +652,7 @@ add_conversation_table_data_with_conv_id( copy_address(&new_conv_item.src_address, addr1); copy_address(&new_conv_item.dst_address, addr2); new_conv_item.dissector_info = ct_info; - new_conv_item.ptype = ptype; + new_conv_item.etype = etype; new_conv_item.src_port = port1; new_conv_item.dst_port = port2; new_conv_item.conv_id = conv_id; @@ -741,7 +741,7 @@ host_match(gconstpointer v, gconstpointer w) } void -add_hostlist_table_data(conv_hash_t *ch, const address *addr, guint32 port, gboolean sender, int num_frames, int num_bytes, hostlist_dissector_info_t *host_info, port_type port_type_val) +add_hostlist_table_data(conv_hash_t *ch, const address *addr, guint32 port, gboolean sender, int num_frames, int num_bytes, hostlist_dissector_info_t *host_info, endpoint_type etype) { hostlist_talker_t *talker=NULL; int talker_idx=0; @@ -777,7 +777,7 @@ add_hostlist_table_data(conv_hash_t *ch, const address *addr, guint32 port, gboo copy_address(&host.myaddress, addr); host.dissector_info = host_info; - host.ptype=port_type_val; + host.etype=etype; host.port=port; host.rx_frames=0; host.tx_frames=0; diff --git a/epan/conversation_table.h b/epan/conversation_table.h index b71d1a03b4..25f8bbb488 100644 --- a/epan/conversation_table.h +++ b/epan/conversation_table.h @@ -26,6 +26,7 @@ #include "conv_id.h" #include "tap.h" +#include "conversation.h" #include "wmem/wmem.h" #ifdef __cplusplus @@ -111,7 +112,7 @@ typedef struct _conversation_item_t { ct_dissector_info_t *dissector_info; /**< conversation information provided by dissector */ address src_address; /**< source address */ address dst_address; /**< destination address */ - port_type ptype; /**< port_type (e.g. PT_TCP) */ + endpoint_type etype; /**< endpoint_type (e.g. ENDPOINT_TCP) */ guint32 src_port; /**< source port */ guint32 dst_port; /**< destination port */ conv_id_t conv_id; /**< conversation id */ @@ -132,7 +133,7 @@ typedef struct _conversation_item_t { typedef struct _hostlist_talker_t { hostlist_dissector_info_t *dissector_info; /**< conversation information provided by dissector */ address myaddress; /**< address */ - port_type ptype; /**< port_type (e.g. PT_TCP) */ + endpoint_type etype; /**< endpoint_type (e.g. ENDPOINT_TCP) */ guint32 port; /**< port */ guint64 rx_frames; /**< number of received packets */ @@ -256,11 +257,11 @@ WS_DLL_PUBLIC char *get_conversation_address(wmem_allocator_t *allocator, addres * * @param allocator The wmem allocator to use when allocating the string * @param port The port number. - * @param ptype The port type. + * @param etype The endpoint type. * @param resolve_names Enable name resolution. * @return A string representing the port. */ -WS_DLL_PUBLIC char *get_conversation_port(wmem_allocator_t *allocator, guint32 port, port_type ptype, gboolean resolve_names); +WS_DLL_PUBLIC char *get_conversation_port(wmem_allocator_t *allocator, guint32 port, endpoint_type etype, gboolean resolve_names); /** Get a display filter for the given conversation and direction. * @@ -294,7 +295,7 @@ WS_DLL_PUBLIC char *get_hostlist_filter(hostlist_talker_t *host); */ WS_DLL_PUBLIC void add_conversation_table_data(conv_hash_t *ch, const address *src, const address *dst, guint32 src_port, guint32 dst_port, int num_frames, int num_bytes, nstime_t *ts, nstime_t *abs_ts, - ct_dissector_info_t *ct_info, port_type ptype); + ct_dissector_info_t *ct_info, endpoint_type etype); /** Add some data to the conversation table, passing a value to be used in * addition to the address and port quadruple to uniquely identify the @@ -316,7 +317,7 @@ WS_DLL_PUBLIC void add_conversation_table_data(conv_hash_t *ch, const address *s WS_DLL_PUBLIC void add_conversation_table_data_with_conv_id(conv_hash_t *ch, const address *src, const address *dst, guint32 src_port, guint32 dst_port, conv_id_t conv_id, int num_frames, int num_bytes, - nstime_t *ts, nstime_t *abs_ts, ct_dissector_info_t *ct_info, port_type ptype); + nstime_t *ts, nstime_t *abs_ts, ct_dissector_info_t *ct_info, endpoint_type etype); /** Add some data to the table. * @@ -330,7 +331,7 @@ add_conversation_table_data_with_conv_id(conv_hash_t *ch, const address *src, co * @param port_type_val the port type (e.g. PT_TCP) */ WS_DLL_PUBLIC void add_hostlist_table_data(conv_hash_t *ch, const address *addr, - guint32 port, gboolean sender, int num_frames, int num_bytes, hostlist_dissector_info_t *host_info, port_type port_type_val); + guint32 port, gboolean sender, int num_frames, int num_bytes, hostlist_dissector_info_t *host_info, endpoint_type etype); #ifdef __cplusplus } diff --git a/epan/dissectors/packet-bluetooth.c b/epan/dissectors/packet-bluetooth.c index 6e19f061ed..65f3ed171b 100644 --- a/epan/dissectors/packet-bluetooth.c +++ b/epan/dissectors/packet-bluetooth.c @@ -2366,7 +2366,7 @@ bluetooth_conversation_packet(void *pct, packet_info *pinfo, conv_hash_t *hash = (conv_hash_t*) pct; add_conversation_table_data(hash, &pinfo->dl_src, &pinfo->dl_dst, 0, 0, 1, pinfo->fd->pkt_len, &pinfo->rel_ts, &pinfo->abs_ts, - &bluetooth_ct_dissector_info, PT_NONE); + &bluetooth_ct_dissector_info, ENDPOINT_NONE); return 1; } @@ -2378,8 +2378,8 @@ bluetooth_hostlist_packet(void *pit, packet_info *pinfo, { conv_hash_t *hash = (conv_hash_t*) pit; - add_hostlist_table_data(hash, &pinfo->dl_src, 0, TRUE, 1, pinfo->fd->pkt_len, &bluetooth_dissector_info, PT_NONE); - add_hostlist_table_data(hash, &pinfo->dl_dst, 0, FALSE, 1, pinfo->fd->pkt_len, &bluetooth_dissector_info, PT_NONE); + add_hostlist_table_data(hash, &pinfo->dl_src, 0, TRUE, 1, pinfo->fd->pkt_len, &bluetooth_dissector_info, ENDPOINT_NONE); + add_hostlist_table_data(hash, &pinfo->dl_dst, 0, FALSE, 1, pinfo->fd->pkt_len, &bluetooth_dissector_info, ENDPOINT_NONE); return 1; } diff --git a/epan/dissectors/packet-eth.c b/epan/dissectors/packet-eth.c index 83657bffd5..6469eb7031 100644 --- a/epan/dissectors/packet-eth.c +++ b/epan/dissectors/packet-eth.c @@ -138,7 +138,7 @@ eth_conversation_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _U_, conv_hash_t *hash = (conv_hash_t*) pct; const eth_hdr *ehdr=(const eth_hdr *)vip; - add_conversation_table_data(hash, &ehdr->src, &ehdr->dst, 0, 0, 1, pinfo->fd->pkt_len, &pinfo->rel_ts, &pinfo->abs_ts, ð_ct_dissector_info, PT_NONE); + add_conversation_table_data(hash, &ehdr->src, &ehdr->dst, 0, 0, 1, pinfo->fd->pkt_len, &pinfo->rel_ts, &pinfo->abs_ts, ð_ct_dissector_info, ENDPOINT_NONE); return 1; } @@ -162,8 +162,8 @@ eth_hostlist_packet(void *pit, packet_info *pinfo, epan_dissect_t *edt _U_, cons /* Take two "add" passes per packet, adding for each direction, ensures that all packets are counted properly (even if address is sending to itself) XXX - this could probably be done more efficiently inside hostlist_table */ - add_hostlist_table_data(hash, &ehdr->src, 0, TRUE, 1, pinfo->fd->pkt_len, ð_host_dissector_info, PT_NONE); - add_hostlist_table_data(hash, &ehdr->dst, 0, FALSE, 1, pinfo->fd->pkt_len, ð_host_dissector_info, PT_NONE); + add_hostlist_table_data(hash, &ehdr->src, 0, TRUE, 1, pinfo->fd->pkt_len, ð_host_dissector_info, ENDPOINT_NONE); + add_hostlist_table_data(hash, &ehdr->dst, 0, FALSE, 1, pinfo->fd->pkt_len, ð_host_dissector_info, ENDPOINT_NONE); return 1; } diff --git a/epan/dissectors/packet-fc.c b/epan/dissectors/packet-fc.c index 04725916bc..762884b3dd 100644 --- a/epan/dissectors/packet-fc.c +++ b/epan/dissectors/packet-fc.c @@ -213,7 +213,7 @@ fc_conversation_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _U_, c conv_hash_t *hash = (conv_hash_t*) pct; const fc_hdr *fchdr=(const fc_hdr *)vip; - add_conversation_table_data(hash, &fchdr->s_id, &fchdr->d_id, 0, 0, 1, pinfo->fd->pkt_len, &pinfo->rel_ts, &pinfo->abs_ts, &fc_ct_dissector_info, PT_NONE); + add_conversation_table_data(hash, &fchdr->s_id, &fchdr->d_id, 0, 0, 1, pinfo->fd->pkt_len, &pinfo->rel_ts, &pinfo->abs_ts, &fc_ct_dissector_info, ENDPOINT_NONE); return 1; } @@ -237,8 +237,8 @@ fc_hostlist_packet(void *pit, packet_info *pinfo, epan_dissect_t *edt _U_, const /* Take two "add" passes per packet, adding for each direction, ensures that all packets are counted properly (even if address is sending to itself) XXX - this could probably be done more efficiently inside hostlist_table */ - add_hostlist_table_data(hash, &fchdr->s_id, 0, TRUE, 1, pinfo->fd->pkt_len, &fc_host_dissector_info, PT_NONE); - add_hostlist_table_data(hash, &fchdr->d_id, 0, FALSE, 1, pinfo->fd->pkt_len, &fc_host_dissector_info, PT_NONE); + add_hostlist_table_data(hash, &fchdr->s_id, 0, TRUE, 1, pinfo->fd->pkt_len, &fc_host_dissector_info, ENDPOINT_NONE); + add_hostlist_table_data(hash, &fchdr->d_id, 0, FALSE, 1, pinfo->fd->pkt_len, &fc_host_dissector_info, ENDPOINT_NONE); return 1; } diff --git a/epan/dissectors/packet-fddi.c b/epan/dissectors/packet-fddi.c index 39663ec8f1..ee0e1c140c 100644 --- a/epan/dissectors/packet-fddi.c +++ b/epan/dissectors/packet-fddi.c @@ -172,7 +172,7 @@ fddi_conversation_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _U_, conv_hash_t *hash = (conv_hash_t*) pct; const fddi_hdr *ehdr=(const fddi_hdr *)vip; - add_conversation_table_data(hash, &ehdr->src, &ehdr->dst, 0, 0, 1, pinfo->fd->pkt_len, &pinfo->rel_ts, &pinfo->abs_ts, &fddi_ct_dissector_info, PT_NONE); + add_conversation_table_data(hash, &ehdr->src, &ehdr->dst, 0, 0, 1, pinfo->fd->pkt_len, &pinfo->rel_ts, &pinfo->abs_ts, &fddi_ct_dissector_info, ENDPOINT_NONE); return 1; } @@ -196,8 +196,8 @@ fddi_hostlist_packet(void *pit, packet_info *pinfo, epan_dissect_t *edt _U_, con /* Take two "add" passes per packet, adding for each direction, ensures that all packets are counted properly (even if address is sending to itself) XXX - this could probably be done more efficiently inside hostlist_table */ - add_hostlist_table_data(hash, &ehdr->src, 0, TRUE, 1, pinfo->fd->pkt_len, &fddi_host_dissector_info, PT_NONE); - add_hostlist_table_data(hash, &ehdr->dst, 0, FALSE, 1, pinfo->fd->pkt_len, &fddi_host_dissector_info, PT_NONE); + add_hostlist_table_data(hash, &ehdr->src, 0, TRUE, 1, pinfo->fd->pkt_len, &fddi_host_dissector_info, ENDPOINT_NONE); + add_hostlist_table_data(hash, &ehdr->dst, 0, FALSE, 1, pinfo->fd->pkt_len, &fddi_host_dissector_info, ENDPOINT_NONE); return 1; } diff --git a/epan/dissectors/packet-ieee80211.c b/epan/dissectors/packet-ieee80211.c index 5a8a997a20..a1d443a9ec 100644 --- a/epan/dissectors/packet-ieee80211.c +++ b/epan/dissectors/packet-ieee80211.c @@ -5300,7 +5300,7 @@ wlan_conversation_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _U_, conv_hash_t *hash = (conv_hash_t*) pct; const wlan_hdr_t *whdr=(const wlan_hdr_t *)vip; - add_conversation_table_data(hash, &whdr->src, &whdr->dst, 0, 0, 1, pinfo->fd->pkt_len, &pinfo->rel_ts, &pinfo->abs_ts, &wlan_ct_dissector_info, PT_NONE); + add_conversation_table_data(hash, &whdr->src, &whdr->dst, 0, 0, 1, pinfo->fd->pkt_len, &pinfo->rel_ts, &pinfo->abs_ts, &wlan_ct_dissector_info, ENDPOINT_NONE); return 1; } @@ -5325,8 +5325,8 @@ wlan_hostlist_packet(void *pit, packet_info *pinfo, epan_dissect_t *edt _U_, con /* Take two "add" passes per packet, adding for each direction, ensures that all packets are counted properly (even if address is sending to itself) XXX - this could probably be done more efficiently inside hostlist_table */ - add_hostlist_table_data(hash, &whdr->src, 0, TRUE, 1, pinfo->fd->pkt_len, &wlan_host_dissector_info, PT_NONE); - add_hostlist_table_data(hash, &whdr->dst, 0, FALSE, 1, pinfo->fd->pkt_len, &wlan_host_dissector_info, PT_NONE); + add_hostlist_table_data(hash, &whdr->src, 0, TRUE, 1, pinfo->fd->pkt_len, &wlan_host_dissector_info, ENDPOINT_NONE); + add_hostlist_table_data(hash, &whdr->dst, 0, FALSE, 1, pinfo->fd->pkt_len, &wlan_host_dissector_info, ENDPOINT_NONE); return 1; } diff --git a/epan/dissectors/packet-ip.c b/epan/dissectors/packet-ip.c index cc30b77ab7..998ab0a372 100644 --- a/epan/dissectors/packet-ip.c +++ b/epan/dissectors/packet-ip.c @@ -539,7 +539,7 @@ ip_conversation_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _U_, c conv_hash_t *hash = (conv_hash_t*) pct; const ws_ip4 *iph=(const ws_ip4 *)vip; - add_conversation_table_data(hash, &iph->ip_src, &iph->ip_dst, 0, 0, 1, pinfo->fd->pkt_len, &pinfo->rel_ts, &pinfo->abs_ts, &ip_ct_dissector_info, PT_NONE); + add_conversation_table_data(hash, &iph->ip_src, &iph->ip_dst, 0, 0, 1, pinfo->fd->pkt_len, &pinfo->rel_ts, &pinfo->abs_ts, &ip_ct_dissector_info, ENDPOINT_NONE); return 1; } @@ -563,8 +563,8 @@ ip_hostlist_packet(void *pit, packet_info *pinfo, epan_dissect_t *edt _U_, const /* Take two "add" passes per packet, adding for each direction, ensures that all packets are counted properly (even if address is sending to itself) XXX - this could probably be done more efficiently inside hostlist_table */ - add_hostlist_table_data(hash, &iph->ip_src, 0, TRUE, 1, pinfo->fd->pkt_len, &ip_host_dissector_info, PT_NONE); - add_hostlist_table_data(hash, &iph->ip_dst, 0, FALSE, 1, pinfo->fd->pkt_len, &ip_host_dissector_info, PT_NONE); + add_hostlist_table_data(hash, &iph->ip_src, 0, TRUE, 1, pinfo->fd->pkt_len, &ip_host_dissector_info, ENDPOINT_NONE); + add_hostlist_table_data(hash, &iph->ip_dst, 0, FALSE, 1, pinfo->fd->pkt_len, &ip_host_dissector_info, ENDPOINT_NONE); return 1; } diff --git a/epan/dissectors/packet-ipv6.c b/epan/dissectors/packet-ipv6.c index dc8d02f908..a94e5d5375 100644 --- a/epan/dissectors/packet-ipv6.c +++ b/epan/dissectors/packet-ipv6.c @@ -451,7 +451,7 @@ ipv6_conversation_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _U_, add_conversation_table_data(hash, &ip6->ip6_src, &ip6->ip6_dst, 0, 0, 1, pinfo->fd->pkt_len, &pinfo->rel_ts, &pinfo->abs_ts, - &ipv6_ct_dissector_info, PT_NONE); + &ipv6_ct_dissector_info, ENDPOINT_NONE); return 1; } @@ -473,9 +473,9 @@ ipv6_hostlist_packet(void *pit, packet_info *pinfo, epan_dissect_t *edt _U_, con const ipv6_tap_info_t *ip6 = (const ipv6_tap_info_t *)vip; add_hostlist_table_data(hash, &ip6->ip6_src, 0, TRUE, 1, - pinfo->fd->pkt_len, &ipv6_host_dissector_info, PT_NONE); + pinfo->fd->pkt_len, &ipv6_host_dissector_info, ENDPOINT_NONE); add_hostlist_table_data(hash, &ip6->ip6_dst, 0, FALSE, 1, - pinfo->fd->pkt_len, &ipv6_host_dissector_info, PT_NONE); + pinfo->fd->pkt_len, &ipv6_host_dissector_info, ENDPOINT_NONE); return 1; } diff --git a/epan/dissectors/packet-ipx.c b/epan/dissectors/packet-ipx.c index 105e469ea0..6275bf0fa7 100644 --- a/epan/dissectors/packet-ipx.c +++ b/epan/dissectors/packet-ipx.c @@ -166,7 +166,7 @@ ipx_conversation_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _U_, conv_hash_t *hash = (conv_hash_t*) pct; const ipxhdr_t *ipxh=(const ipxhdr_t *)vip; - add_conversation_table_data(hash, &ipxh->ipx_src, &ipxh->ipx_dst, 0, 0, 1, pinfo->fd->pkt_len, &pinfo->rel_ts, &pinfo->abs_ts, &ipx_ct_dissector_info, PT_NONE); + add_conversation_table_data(hash, &ipxh->ipx_src, &ipxh->ipx_dst, 0, 0, 1, pinfo->fd->pkt_len, &pinfo->rel_ts, &pinfo->abs_ts, &ipx_ct_dissector_info, ENDPOINT_NONE); return 1; } @@ -190,8 +190,8 @@ ipx_hostlist_packet(void *pit, packet_info *pinfo, epan_dissect_t *edt _U_, cons /* Take two "add" passes per packet, adding for each direction, ensures that all packets are counted properly (even if address is sending to itself) XXX - this could probably be done more efficiently inside hostlist_table */ - add_hostlist_table_data(hash, &ipxh->ipx_src, 0, TRUE, 1, pinfo->fd->pkt_len, &ipx_host_dissector_info, PT_NONE); - add_hostlist_table_data(hash, &ipxh->ipx_dst, 0, FALSE, 1, pinfo->fd->pkt_len, &ipx_host_dissector_info, PT_NONE); + add_hostlist_table_data(hash, &ipxh->ipx_src, 0, TRUE, 1, pinfo->fd->pkt_len, &ipx_host_dissector_info, ENDPOINT_NONE); + add_hostlist_table_data(hash, &ipxh->ipx_dst, 0, FALSE, 1, pinfo->fd->pkt_len, &ipx_host_dissector_info, ENDPOINT_NONE); return 1; } diff --git a/epan/dissectors/packet-jxta.c b/epan/dissectors/packet-jxta.c index 9e365b1beb..bb8cf13200 100644 --- a/epan/dissectors/packet-jxta.c +++ b/epan/dissectors/packet-jxta.c @@ -215,7 +215,7 @@ jxta_conversation_packet(void *pct, packet_info *pinfo _U_, epan_dissect_t *edt const jxta_tap_header *jxtahdr = (const jxta_tap_header *) vip; add_conversation_table_data(hash, &jxtahdr->src_address, &jxtahdr->dest_address, - 0, 0, 1, jxtahdr->size, NULL, NULL, &jxta_ct_dissector_info, PT_NONE); + 0, 0, 1, jxtahdr->size, NULL, NULL, &jxta_ct_dissector_info, ENDPOINT_NONE); return 1; } @@ -239,8 +239,8 @@ jxta_hostlist_packet(void *pit, packet_info *pinfo _U_, epan_dissect_t *edt _U_, /* Take two "add" passes per packet, adding for each direction, ensures that all packets are counted properly (even if address is sending to itself) XXX - this could probably be done more efficiently inside hostlist_table */ - add_hostlist_table_data(hash, &jxtahdr->src_address, 0, TRUE, 1, jxtahdr->size, &jxta_host_dissector_info, PT_NONE); - add_hostlist_table_data(hash, &jxtahdr->dest_address, 0, FALSE, 1, jxtahdr->size, &jxta_host_dissector_info, PT_NONE); + add_hostlist_table_data(hash, &jxtahdr->src_address, 0, TRUE, 1, jxtahdr->size, &jxta_host_dissector_info, ENDPOINT_NONE); + add_hostlist_table_data(hash, &jxtahdr->dest_address, 0, FALSE, 1, jxtahdr->size, &jxta_host_dissector_info, ENDPOINT_NONE); return 1; } diff --git a/epan/dissectors/packet-ncp.c b/epan/dissectors/packet-ncp.c index c3d2ea35c6..461dbece2b 100644 --- a/epan/dissectors/packet-ncp.c +++ b/epan/dissectors/packet-ncp.c @@ -738,7 +738,7 @@ ncp_conversation_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _U_, connection = (ncph->conn_high * 256)+ncph->conn_low; if (connection < 65535) { - add_conversation_table_data(hash, &pinfo->src, &pinfo->dst, connection, connection, 1, pinfo->fd->pkt_len, &pinfo->rel_ts, &pinfo->abs_ts, &ncp_ct_dissector_info, PT_NCP); + add_conversation_table_data(hash, &pinfo->src, &pinfo->dst, connection, connection, 1, pinfo->fd->pkt_len, &pinfo->rel_ts, &pinfo->abs_ts, &ncp_ct_dissector_info, ENDPOINT_NCP); } return 1; @@ -760,8 +760,8 @@ ncp_hostlist_packet(void *pit, packet_info *pinfo, epan_dissect_t *edt _U_, cons /* Take two "add" passes per packet, adding for each direction, ensures that all packets are counted properly (even if address is sending to itself) XXX - this could probably be done more efficiently inside hostlist_table */ - add_hostlist_table_data(hash, &pinfo->src, 0, TRUE, 1, pinfo->fd->pkt_len, &ncp_host_dissector_info, PT_NCP); - add_hostlist_table_data(hash, &pinfo->dst, 0, FALSE, 1, pinfo->fd->pkt_len, &ncp_host_dissector_info, PT_NCP); + add_hostlist_table_data(hash, &pinfo->src, 0, TRUE, 1, pinfo->fd->pkt_len, &ncp_host_dissector_info, ENDPOINT_NCP); + add_hostlist_table_data(hash, &pinfo->dst, 0, FALSE, 1, pinfo->fd->pkt_len, &ncp_host_dissector_info, ENDPOINT_NCP); return 1; } diff --git a/epan/dissectors/packet-rsvp.c b/epan/dissectors/packet-rsvp.c index 4a659cf05f..5a1835622c 100644 --- a/epan/dissectors/packet-rsvp.c +++ b/epan/dissectors/packet-rsvp.c @@ -2102,7 +2102,7 @@ rsvp_conversation_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _U_, const rsvp_conversation_info *rsvph = (const rsvp_conversation_info *)vip; add_conversation_table_data(hash, &rsvph->source, &rsvph->destination, - 0, 0, 1, pinfo->fd->pkt_len, &pinfo->rel_ts, &pinfo->abs_ts, &rsvp_ct_dissector_info, PT_NONE); + 0, 0, 1, pinfo->fd->pkt_len, &pinfo->rel_ts, &pinfo->abs_ts, &rsvp_ct_dissector_info, ENDPOINT_NONE); return 1; } @@ -2128,8 +2128,8 @@ rsvp_hostlist_packet(void *pit, packet_info *pinfo, epan_dissect_t *edt _U_, con * itself). XXX - this could probably be done more efficiently inside * hostlist_table */ - add_hostlist_table_data(hash, &rsvph->source, 0, TRUE, 1, pinfo->fd->pkt_len, &rsvp_host_dissector_info, PT_NONE); - add_hostlist_table_data(hash, &rsvph->destination, 0, FALSE, 1, pinfo->fd->pkt_len, &rsvp_host_dissector_info, PT_NONE); + add_hostlist_table_data(hash, &rsvph->source, 0, TRUE, 1, pinfo->fd->pkt_len, &rsvp_host_dissector_info, ENDPOINT_NONE); + add_hostlist_table_data(hash, &rsvph->destination, 0, FALSE, 1, pinfo->fd->pkt_len, &rsvp_host_dissector_info, ENDPOINT_NONE); return 1; } diff --git a/epan/dissectors/packet-sctp.c b/epan/dissectors/packet-sctp.c index 0d2ee5fd17..b0db49563b 100644 --- a/epan/dissectors/packet-sctp.c +++ b/epan/dissectors/packet-sctp.c @@ -860,7 +860,7 @@ sctp_conversation_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _U_, const struct _sctp_info *sctphdr=(const struct _sctp_info *)vip; add_conversation_table_data(hash, &sctphdr->ip_src, &sctphdr->ip_dst, - sctphdr->sport, sctphdr->dport, 1, pinfo->fd->pkt_len, &pinfo->rel_ts, &pinfo->abs_ts, &sctp_ct_dissector_info, PT_SCTP); + sctphdr->sport, sctphdr->dport, 1, pinfo->fd->pkt_len, &pinfo->rel_ts, &pinfo->abs_ts, &sctp_ct_dissector_info, ENDPOINT_SCTP); return 1; @@ -916,8 +916,8 @@ sctp_hostlist_packet(void *pit, packet_info *pinfo, epan_dissect_t *edt _U_, con /* Take two "add" passes per packet, adding for each direction, ensures that all packets are counted properly (even if address is sending to itself) XXX - this could probably be done more efficiently inside hostlist_table */ - add_hostlist_table_data(hash, &sctphdr->ip_src, sctphdr->sport, TRUE, 1, pinfo->fd->pkt_len, &sctp_host_dissector_info, PT_SCTP); - add_hostlist_table_data(hash, &sctphdr->ip_dst, sctphdr->dport, FALSE, 1, pinfo->fd->pkt_len, &sctp_host_dissector_info, PT_SCTP); + add_hostlist_table_data(hash, &sctphdr->ip_src, sctphdr->sport, TRUE, 1, pinfo->fd->pkt_len, &sctp_host_dissector_info, ENDPOINT_SCTP); + add_hostlist_table_data(hash, &sctphdr->ip_dst, sctphdr->dport, FALSE, 1, pinfo->fd->pkt_len, &sctp_host_dissector_info, ENDPOINT_SCTP); return 1; } diff --git a/epan/dissectors/packet-tcp.c b/epan/dissectors/packet-tcp.c index eee56870e5..a0862c0291 100644 --- a/epan/dissectors/packet-tcp.c +++ b/epan/dissectors/packet-tcp.c @@ -758,7 +758,7 @@ tcpip_conversation_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _U_ const struct tcpheader *tcphdr=(const struct tcpheader *)vip; add_conversation_table_data_with_conv_id(hash, &tcphdr->ip_src, &tcphdr->ip_dst, tcphdr->th_sport, tcphdr->th_dport, (conv_id_t) tcphdr->th_stream, 1, pinfo->fd->pkt_len, - &pinfo->rel_ts, &pinfo->abs_ts, &tcp_ct_dissector_info, PT_TCP); + &pinfo->rel_ts, &pinfo->abs_ts, &tcp_ct_dissector_info, ENDPOINT_TCP); return 1; } @@ -772,7 +772,7 @@ mptcpip_conversation_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _ add_conversation_table_data_with_conv_id(hash, &meta->ip_src, &meta->ip_dst, meta->sport, meta->dport, (conv_id_t) tcpd->mptcp_analysis->stream, 1, pinfo->fd->pkt_len, - &pinfo->rel_ts, &pinfo->abs_ts, &tcp_ct_dissector_info, PT_TCP); + &pinfo->rel_ts, &pinfo->abs_ts, &tcp_ct_dissector_info, ENDPOINT_TCP); return 1; } @@ -827,8 +827,8 @@ tcpip_hostlist_packet(void *pit, packet_info *pinfo, epan_dissect_t *edt _U_, co /* Take two "add" passes per packet, adding for each direction, ensures that all packets are counted properly (even if address is sending to itself) XXX - this could probably be done more efficiently inside hostlist_table */ - add_hostlist_table_data(hash, &tcphdr->ip_src, tcphdr->th_sport, TRUE, 1, pinfo->fd->pkt_len, &tcp_host_dissector_info, PT_TCP); - add_hostlist_table_data(hash, &tcphdr->ip_dst, tcphdr->th_dport, FALSE, 1, pinfo->fd->pkt_len, &tcp_host_dissector_info, PT_TCP); + add_hostlist_table_data(hash, &tcphdr->ip_src, tcphdr->th_sport, TRUE, 1, pinfo->fd->pkt_len, &tcp_host_dissector_info, ENDPOINT_TCP); + add_hostlist_table_data(hash, &tcphdr->ip_dst, tcphdr->th_dport, FALSE, 1, pinfo->fd->pkt_len, &tcp_host_dissector_info, ENDPOINT_TCP); return 1; } diff --git a/epan/dissectors/packet-tr.c b/epan/dissectors/packet-tr.c index 46155349d2..ae9c9f1964 100644 --- a/epan/dissectors/packet-tr.c +++ b/epan/dissectors/packet-tr.c @@ -154,7 +154,7 @@ tr_conversation_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _U_, c conv_hash_t *hash = (conv_hash_t*) pct; const tr_hdr *trhdr=(const tr_hdr *)vip; - add_conversation_table_data(hash, &trhdr->src, &trhdr->dst, 0, 0, 1, pinfo->fd->pkt_len, &pinfo->rel_ts, &pinfo->abs_ts, &tr_ct_dissector_info, PT_NONE); + add_conversation_table_data(hash, &trhdr->src, &trhdr->dst, 0, 0, 1, pinfo->fd->pkt_len, &pinfo->rel_ts, &pinfo->abs_ts, &tr_ct_dissector_info, ENDPOINT_NONE); return 1; } @@ -178,8 +178,8 @@ tr_hostlist_packet(void *pit, packet_info *pinfo, epan_dissect_t *edt _U_, const /* Take two "add" passes per packet, adding for each direction, ensures that all packets are counted properly (even if address is sending to itself) XXX - this could probably be done more efficiently inside hostlist_table */ - add_hostlist_table_data(hash, &trhdr->src, 0, TRUE, 1, pinfo->fd->pkt_len, &tr_host_dissector_info, PT_NONE); - add_hostlist_table_data(hash, &trhdr->dst, 0, FALSE, 1, pinfo->fd->pkt_len, &tr_host_dissector_info, PT_NONE); + add_hostlist_table_data(hash, &trhdr->src, 0, TRUE, 1, pinfo->fd->pkt_len, &tr_host_dissector_info, ENDPOINT_NONE); + add_hostlist_table_data(hash, &trhdr->dst, 0, FALSE, 1, pinfo->fd->pkt_len, &tr_host_dissector_info, ENDPOINT_NONE); return 1; } diff --git a/epan/dissectors/packet-udp.c b/epan/dissectors/packet-udp.c index d747573111..3066c8266d 100644 --- a/epan/dissectors/packet-udp.c +++ b/epan/dissectors/packet-udp.c @@ -330,7 +330,7 @@ udpip_conversation_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _U_ conv_hash_t *hash = (conv_hash_t*) pct; const e_udphdr *udphdr=(const e_udphdr *)vip; - add_conversation_table_data_with_conv_id(hash, &udphdr->ip_src, &udphdr->ip_dst, udphdr->uh_sport, udphdr->uh_dport, (conv_id_t) udphdr->uh_stream, 1, pinfo->fd->pkt_len, &pinfo->rel_ts, &pinfo->abs_ts, &udp_ct_dissector_info, PT_UDP); + add_conversation_table_data_with_conv_id(hash, &udphdr->ip_src, &udphdr->ip_dst, udphdr->uh_sport, udphdr->uh_dport, (conv_id_t) udphdr->uh_stream, 1, pinfo->fd->pkt_len, &pinfo->rel_ts, &pinfo->abs_ts, &udp_ct_dissector_info, ENDPOINT_UDP); return 1; } @@ -387,8 +387,8 @@ udpip_hostlist_packet(void *pit, packet_info *pinfo, epan_dissect_t *edt _U_, co /* Take two "add" passes per packet, adding for each direction, ensures that all packets are counted properly (even if address is sending to itself) XXX - this could probably be done more efficiently inside hostlist_table */ - add_hostlist_table_data(hash, &udphdr->ip_src, udphdr->uh_sport, TRUE, 1, pinfo->fd->pkt_len, &udp_host_dissector_info, PT_UDP); - add_hostlist_table_data(hash, &udphdr->ip_dst, udphdr->uh_dport, FALSE, 1, pinfo->fd->pkt_len, &udp_host_dissector_info, PT_UDP); + add_hostlist_table_data(hash, &udphdr->ip_src, udphdr->uh_sport, TRUE, 1, pinfo->fd->pkt_len, &udp_host_dissector_info, ENDPOINT_UDP); + add_hostlist_table_data(hash, &udphdr->ip_dst, udphdr->uh_dport, FALSE, 1, pinfo->fd->pkt_len, &udp_host_dissector_info, ENDPOINT_UDP); return 1; } diff --git a/epan/dissectors/packet-usb.c b/epan/dissectors/packet-usb.c index fc84927a32..3af31dd6f3 100644 --- a/epan/dissectors/packet-usb.c +++ b/epan/dissectors/packet-usb.c @@ -1745,7 +1745,7 @@ static int usb_conversation_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _U_, const void *vip _U_) { conv_hash_t *hash = (conv_hash_t*) pct; - add_conversation_table_data(hash, &pinfo->src, &pinfo->dst, 0, 0, 1, pinfo->fd->pkt_len, &pinfo->rel_ts, &pinfo->abs_ts, &usb_ct_dissector_info, PT_NONE); + add_conversation_table_data(hash, &pinfo->src, &pinfo->dst, 0, 0, 1, pinfo->fd->pkt_len, &pinfo->rel_ts, &pinfo->abs_ts, &usb_ct_dissector_info, ENDPOINT_NONE); return 1; } @@ -1768,8 +1768,8 @@ usb_hostlist_packet(void *pit, packet_info *pinfo, epan_dissect_t *edt _U_, cons /* Take two "add" passes per packet, adding for each direction, ensures that all packets are counted properly (even if address is sending to itself) XXX - this could probably be done more efficiently inside hostlist_table */ - add_hostlist_table_data(hash, &pinfo->src, 0, TRUE, 1, pinfo->fd->pkt_len, &usb_host_dissector_info, PT_NONE); - add_hostlist_table_data(hash, &pinfo->dst, 0, FALSE, 1, pinfo->fd->pkt_len, &usb_host_dissector_info, PT_NONE); + add_hostlist_table_data(hash, &pinfo->src, 0, TRUE, 1, pinfo->fd->pkt_len, &usb_host_dissector_info, ENDPOINT_NONE); + add_hostlist_table_data(hash, &pinfo->dst, 0, FALSE, 1, pinfo->fd->pkt_len, &usb_host_dissector_info, ENDPOINT_NONE); return 1; } diff --git a/sharkd_session.c b/sharkd_session.c index 258cc71dea..6e43bf1d64 100644 --- a/sharkd_session.c +++ b/sharkd_session.c @@ -1559,8 +1559,8 @@ sharkd_session_process_tap_conv_cb(void *arg) if (proto_with_port) { - printf(",\"sport\":\"%s\"", (src_port = get_conversation_port(NULL, iui->src_port, iui->ptype, iu->resolve_port))); - printf(",\"dport\":\"%s\"", (dst_port = get_conversation_port(NULL, iui->dst_port, iui->ptype, iu->resolve_port))); + printf(",\"sport\":\"%s\"", (src_port = get_conversation_port(NULL, iui->src_port, iui->etype, iu->resolve_port))); + printf(",\"dport\":\"%s\"", (dst_port = get_conversation_port(NULL, iui->dst_port, iui->etype, iu->resolve_port))); wmem_free(NULL, src_port); wmem_free(NULL, dst_port); @@ -1607,7 +1607,7 @@ sharkd_session_process_tap_conv_cb(void *arg) if (proto_with_port) { - printf(",\"port\":\"%s\"", (port_str = get_conversation_port(NULL, host->port, host->ptype, iu->resolve_port))); + printf(",\"port\":\"%s\"", (port_str = get_conversation_port(NULL, host->port, host->etype, iu->resolve_port))); wmem_free(NULL, port_str); } diff --git a/ui/cli/tap-endpoints.c b/ui/cli/tap-endpoints.c index 5e261bd29b..c99ba7d1d0 100644 --- a/ui/cli/tap-endpoints.c +++ b/ui/cli/tap-endpoints.c @@ -81,7 +81,7 @@ endpoints_draw(void *arg) conversation_str = get_conversation_address(NULL, &host->myaddress, TRUE); if (display_port) { /* XXX - TODO: make port resolution configurable (through gbl_resolv_flags?) */ - port_str = get_conversation_port(NULL, host->port, host->ptype, TRUE); + port_str = get_conversation_port(NULL, host->port, host->etype, TRUE); printf("%-20s %5s %6" G_GINT64_MODIFIER "u %9" G_GINT64_MODIFIER "u %6" G_GINT64_MODIFIER "u %9" G_GINT64_MODIFIER "u %6" G_GINT64_MODIFIER "u %9" G_GINT64_MODIFIER "u \n", diff --git a/ui/cli/tap-iousers.c b/ui/cli/tap-iousers.c index 129b56e580..3fc22060f6 100644 --- a/ui/cli/tap-iousers.c +++ b/ui/cli/tap-iousers.c @@ -105,8 +105,8 @@ iousers_draw(void *arg) dst_addr = get_conversation_address(NULL, &iui->dst_address, TRUE); if (display_ports) { char *src, *dst, *src_port, *dst_port; - src_port = get_conversation_port(NULL, iui->src_port, iui->ptype, TRUE); - dst_port = get_conversation_port(NULL, iui->dst_port, iui->ptype, TRUE); + src_port = get_conversation_port(NULL, iui->src_port, iui->etype, TRUE); + dst_port = get_conversation_port(NULL, iui->dst_port, iui->etype, TRUE); src = wmem_strconcat(NULL, src_addr, ":", src_port, NULL); dst = wmem_strconcat(NULL, dst_addr, ":", dst_port, NULL); printf("%-26s <-> %-26s %6" G_GINT64_MODIFIER "u %9" G_GINT64_MODIFIER diff --git a/ui/gtk/conversations_table.c b/ui/gtk/conversations_table.c index 044be7a133..f6acef1a8f 100644 --- a/ui/gtk/conversations_table.c +++ b/ui/gtk/conversations_table.c @@ -1600,8 +1600,8 @@ draw_ct_table_addresses(conversations_table *ct) conv_item = &g_array_index(ct->hash.conv_array, conv_item_t, idx); src_addr = get_conversation_address(NULL, &conv_item->src_address, ct->resolve_names); dst_addr = get_conversation_address(NULL, &conv_item->dst_address, ct->resolve_names); - src_port = get_conversation_port(NULL, conv_item->src_port, conv_item->ptype, ct->resolve_names); - dst_port = get_conversation_port(NULL, conv_item->dst_port, conv_item->ptype, ct->resolve_names); + src_port = get_conversation_port(NULL, conv_item->src_port, conv_item->etype, ct->resolve_names); + dst_port = get_conversation_port(NULL, conv_item->dst_port, conv_item->etype, ct->resolve_names); gtk_list_store_set (store, &iter, CONV_COLUMN_SRC_ADDR, src_addr, CONV_COLUMN_SRC_PORT, src_port, @@ -1721,8 +1721,8 @@ draw_ct_table_data(conversations_table *ct) src_addr = get_conversation_address(NULL, &conv_item->src_address, ct->resolve_names); dst_addr = get_conversation_address(NULL, &conv_item->dst_address, ct->resolve_names); - src_port = get_conversation_port(NULL, conv_item->src_port, conv_item->ptype, ct->resolve_names); - dst_port = get_conversation_port(NULL, conv_item->dst_port, conv_item->ptype, ct->resolve_names); + src_port = get_conversation_port(NULL, conv_item->src_port, conv_item->etype, ct->resolve_names); + dst_port = get_conversation_port(NULL, conv_item->dst_port, conv_item->etype, ct->resolve_names); /* New row. All entries, including fixed ones */ gtk_list_store_insert_with_values(store, &iter, G_MAXINT, CONV_COLUMN_SRC_ADDR, src_addr, @@ -2150,11 +2150,11 @@ follow_stream_cb(GtkWidget *follow_stream_bt, gpointer data _U_) /* Generate and apply a display filter to isolate the conversation. */ - switch (conv->ptype) { - case PT_TCP: + switch (conv->etype) { + case ENDPOINT_TCP: filter = g_strdup_printf("tcp.stream eq %d", conv->conv_id); break; - case PT_UDP: + case ENDPOINT_UDP: filter = g_strdup_printf("udp.stream eq %d", conv->conv_id); break; default: diff --git a/ui/gtk/hostlist_table.c b/ui/gtk/hostlist_table.c index 9fc09f9989..25aa75e99e 100644 --- a/ui/gtk/hostlist_table.c +++ b/ui/gtk/hostlist_table.c @@ -482,7 +482,7 @@ draw_hostlist_table_addresses(hostlist_table *hl) host = &g_array_index(hl->hash.conv_array, hostlist_talker_t, idx); addr_str = get_conversation_address(NULL, &host->myaddress, hl->resolve_names); - port_str = get_conversation_port(NULL, host->port, host->ptype, hl->resolve_names); + port_str = get_conversation_port(NULL, host->port, host->etype, hl->resolve_names); gtk_list_store_set (store, &iter, ENDP_COLUMN_ADDR, addr_str, ENDP_COLUMN_PORT, port_str, @@ -602,7 +602,7 @@ draw_hostlist_table_data(hostlist_table *hl) #endif /* HAVE_GEOIP */ addr_str = get_conversation_address(NULL, &host->myaddress, hl->resolve_names); - port_str = get_conversation_port(NULL, host->port, host->ptype, hl->resolve_names); + port_str = get_conversation_port(NULL, host->port, host->etype, hl->resolve_names); gtk_list_store_insert_with_values( store, &iter, G_MAXINT, ENDP_COLUMN_ADDR, addr_str, ENDP_COLUMN_PORT, port_str, diff --git a/ui/qt/conversation_dialog.cpp b/ui/qt/conversation_dialog.cpp index 413ce966a0..a66ceb5974 100644 --- a/ui/qt/conversation_dialog.cpp +++ b/ui/qt/conversation_dialog.cpp @@ -213,11 +213,11 @@ void ConversationDialog::followStream() QString filter; follow_type_t ftype = FOLLOW_TCP; - switch (conv_item->ptype) { - case PT_TCP: + switch (conv_item->etype) { + case ENDPOINT_TCP: filter = QString("tcp.stream eq %1").arg(conv_item->conv_id); break; - case PT_UDP: + case ENDPOINT_UDP: filter = QString("udp.stream eq %1").arg(conv_item->conv_id); ftype = FOLLOW_UDP; break; @@ -247,7 +247,7 @@ void ConversationDialog::graphTcp() // XXX The GTK+ code opens the TCP Stream dialog. We might want // to open the IO Graph dialog instead. QString filter; - if (conv_item->ptype == PT_TCP) { + if (conv_item->etype == ENDPOINT_TCP) { filter = QString("tcp.stream eq %1").arg(conv_item->conv_id); } else { return; @@ -275,11 +275,11 @@ void ConversationDialog::conversationSelectionChanged() conv_item_t *conv_item = currentConversation(); if (!file_closed_ && conv_item) { - switch (conv_item->ptype) { - case PT_TCP: + switch (conv_item->etype) { + case ENDPOINT_TCP: graph_enable = true; // Fall through - case PT_UDP: + case ENDPOINT_UDP: follow_enable = true; break; default: @@ -470,7 +470,7 @@ public: } case CONV_COLUMN_SRC_PORT: if (resolve_names) { - char* port_str = get_conversation_port(NULL, conv_item->src_port, conv_item->ptype, resolve_names); + char* port_str = get_conversation_port(NULL, conv_item->src_port, conv_item->etype, resolve_names); QString q_port_str(port_str); wmem_free(NULL, port_str); return q_port_str; @@ -486,7 +486,7 @@ public: } case CONV_COLUMN_DST_PORT: if (resolve_names) { - char* port_str = get_conversation_port(NULL, conv_item->dst_port, conv_item->ptype, resolve_names); + char* port_str = get_conversation_port(NULL, conv_item->dst_port, conv_item->etype, resolve_names); QString q_port_str(port_str); wmem_free(NULL, port_str); return q_port_str; diff --git a/ui/qt/endpoint_dialog.cpp b/ui/qt/endpoint_dialog.cpp index 3d388ce9f9..001f3d67a2 100644 --- a/ui/qt/endpoint_dialog.cpp +++ b/ui/qt/endpoint_dialog.cpp @@ -286,7 +286,7 @@ public: } case ENDP_COLUMN_PORT: if (resolve_names) { - char* port_str = get_conversation_port(NULL, endp_item->port, endp_item->ptype, resolve_names); + char* port_str = get_conversation_port(NULL, endp_item->port, endp_item->etype, resolve_names); QString q_port_str(port_str); wmem_free(NULL, port_str); return q_port_str;