From 8195bdd3407d6bdcc0f1afa4245d543dd894cf49 Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Thu, 25 Aug 2022 19:42:38 -0700 Subject: [PATCH] Rename a bunch of things with "conversation". A conversation in Wireshark might have two endpoints or might have no endpoints; few if any have one endpoint. Distinguish between conversations and endpoints. --- epan/conversation.c | 226 +++++++++--------- epan/conversation.h | 186 ++++++++------ epan/conversation_table.c | 68 ++++-- epan/conversation_table.h | 33 ++- epan/dissectors/asn1/h225/h225.cnf | 4 +- epan/dissectors/asn1/kerberos/kerberos.cnf | 4 +- epan/dissectors/asn1/nbap/nbap.cnf | 36 +-- .../asn1/nbap/packet-nbap-template.c | 4 +- epan/dissectors/asn1/rrc/rrc.cnf | 2 +- .../asn1/snmp/packet-snmp-template.c | 4 +- .../dissectors/asn1/t38/packet-t38-template.c | 8 +- epan/dissectors/packet-aeron.c | 4 +- epan/dissectors/packet-ansi_tcap.c | 2 +- epan/dissectors/packet-asphodel.c | 8 +- epan/dissectors/packet-at.c | 2 +- epan/dissectors/packet-atalk.c | 2 +- epan/dissectors/packet-bluetooth.c | 6 +- epan/dissectors/packet-bt-utp.c | 12 +- epan/dissectors/packet-coap.c | 4 +- epan/dissectors/packet-dccp.c | 6 +- epan/dissectors/packet-dcerpc.c | 4 +- epan/dissectors/packet-dof.c | 8 +- epan/dissectors/packet-dpaux.c | 4 +- epan/dissectors/packet-drbd.c | 4 +- epan/dissectors/packet-dvb-s2-bb.c | 6 +- epan/dissectors/packet-dvbci.c | 6 +- epan/dissectors/packet-eap.c | 2 +- epan/dissectors/packet-enip.c | 6 +- epan/dissectors/packet-epl.c | 4 +- epan/dissectors/packet-epmd.c | 2 +- epan/dissectors/packet-eth.c | 2 +- epan/dissectors/packet-fc.c | 6 +- epan/dissectors/packet-fcdns.c | 6 +- epan/dissectors/packet-fcels.c | 10 +- epan/dissectors/packet-fcfcs.c | 6 +- epan/dissectors/packet-fcfzs.c | 6 +- epan/dissectors/packet-fcsb3.c | 4 +- epan/dissectors/packet-fcswils.c | 6 +- epan/dissectors/packet-fddi.c | 2 +- epan/dissectors/packet-fp_mux.c | 2 +- epan/dissectors/packet-fpp.c | 4 +- epan/dissectors/packet-fr.c | 2 +- epan/dissectors/packet-ftp.c | 2 +- epan/dissectors/packet-geonw.c | 6 +- epan/dissectors/packet-gsmtap.c | 2 +- epan/dissectors/packet-h223.c | 67 +++--- epan/dissectors/packet-h225.c | 4 +- epan/dissectors/packet-hartip.c | 4 +- epan/dissectors/packet-http.c | 2 +- epan/dissectors/packet-http2.c | 2 +- epan/dissectors/packet-iax2.c | 16 +- epan/dissectors/packet-iax2.h | 2 +- epan/dissectors/packet-icmp.c | 6 +- epan/dissectors/packet-icmpv6.c | 6 +- epan/dissectors/packet-idn.c | 4 +- epan/dissectors/packet-ieee80211.c | 2 +- epan/dissectors/packet-ieee802154.c | 6 +- epan/dissectors/packet-infiniband.c | 12 +- epan/dissectors/packet-infiniband_sdp.c | 4 +- epan/dissectors/packet-ip.c | 2 +- epan/dissectors/packet-ippusb.c | 2 +- epan/dissectors/packet-ipv6.c | 2 +- epan/dissectors/packet-ipx.c | 8 +- epan/dissectors/packet-iscsi.c | 2 +- epan/dissectors/packet-isdn.c | 4 +- epan/dissectors/packet-iser.c | 4 +- epan/dissectors/packet-isns.c | 10 +- epan/dissectors/packet-iso14443.c | 8 +- epan/dissectors/packet-isup.c | 6 +- epan/dissectors/packet-iuup.c | 8 +- epan/dissectors/packet-jxta.c | 6 +- epan/dissectors/packet-k12.c | 2 +- epan/dissectors/packet-kerberos.c | 4 +- epan/dissectors/packet-l2tp.c | 6 +- epan/dissectors/packet-lapdm.c | 4 +- epan/dissectors/packet-lapsat.c | 2 +- epan/dissectors/packet-lbmpdmtcp.c | 4 +- epan/dissectors/packet-lbtrm.c | 12 +- epan/dissectors/packet-lbtru.c | 12 +- epan/dissectors/packet-lbttcp.c | 18 +- epan/dissectors/packet-ldss.c | 6 +- epan/dissectors/packet-lnet.c | 4 +- epan/dissectors/packet-lustre.c | 4 +- epan/dissectors/packet-mgcp.c | 8 +- epan/dissectors/packet-ms-mms.c | 18 +- epan/dissectors/packet-msproxy.c | 28 +-- epan/dissectors/packet-msrp.c | 6 +- epan/dissectors/packet-mtp2.c | 4 +- epan/dissectors/packet-nano.c | 2 +- epan/dissectors/packet-nbap.c | 40 ++-- epan/dissectors/packet-ncp.c | 8 +- epan/dissectors/packet-ncp2222.inc | 24 +- epan/dissectors/packet-ndps.c | 10 +- epan/dissectors/packet-nvme-rdma.c | 10 +- epan/dissectors/packet-opensafety.c | 2 +- epan/dissectors/packet-portmap.c | 4 +- epan/dissectors/packet-radius.c | 6 +- epan/dissectors/packet-rdt.c | 6 +- epan/dissectors/packet-reload-framing.c | 2 +- epan/dissectors/packet-rpc.c | 16 +- epan/dissectors/packet-rrc.c | 2 +- epan/dissectors/packet-rsvp.c | 2 +- epan/dissectors/packet-rtcp.c | 14 +- epan/dissectors/packet-rtmpt.c | 8 +- epan/dissectors/packet-rtp.c | 14 +- epan/dissectors/packet-sctp.c | 2 +- epan/dissectors/packet-sll.c | 2 +- epan/dissectors/packet-snmp.c | 4 +- epan/dissectors/packet-socks.c | 4 +- epan/dissectors/packet-soupbintcp.c | 2 +- epan/dissectors/packet-sprt.c | 4 +- epan/dissectors/packet-t38.c | 8 +- epan/dissectors/packet-tcp.c | 18 +- epan/dissectors/packet-tdmop.c | 2 +- epan/dissectors/packet-tftp.c | 6 +- epan/dissectors/packet-tipc.c | 2 +- epan/dissectors/packet-tls.c | 4 +- epan/dissectors/packet-tr.c | 2 +- epan/dissectors/packet-twamp.c | 4 +- epan/dissectors/packet-udp.c | 10 +- epan/dissectors/packet-uma.c | 8 +- epan/dissectors/packet-umts_fp.c | 32 +-- epan/dissectors/packet-umts_mac.c | 2 +- epan/dissectors/packet-usb.c | 8 +- epan/dissectors/packet-vj-comp.c | 4 +- epan/dissectors/packet-vnc.c | 2 +- epan/dissectors/packet-wsp.c | 8 +- epan/dissectors/packet-x25.c | 10 +- epan/dissectors/packet-xyplex.c | 4 +- epan/dissectors/packet-zbee-nwk.c | 2 +- epan/dissectors/packet-zbncp.c | 4 +- epan/packet.c | 4 +- epan/packet_info.h | 4 +- .../epan/falco_bridge/packet-falco-bridge.c | 6 +- plugins/epan/irda/packet-irda.c | 12 +- plugins/epan/profinet/packet-dcerpc-pn-io.c | 34 +-- plugins/epan/profinet/packet-pn-dcp.c | 26 +- plugins/epan/profinet/packet-pn-rsi.c | 8 +- plugins/epan/profinet/packet-pn-rt.c | 4 +- plugins/epan/profinet/packet-pn-rtc-one.c | 2 +- sharkd_session.c | 6 +- ui/cli/tap-endpoints.c | 2 +- ui/cli/tap-iousers.c | 4 +- ui/qt/conversation_dialog.cpp | 10 +- ui/qt/conversation_hash_tables_dialog.cpp | 6 +- ui/qt/models/atap_data_model.cpp | 10 +- ui/qt/widgets/traffic_tree.cpp | 2 +- 147 files changed, 819 insertions(+), 723 deletions(-) diff --git a/epan/conversation.c b/epan/conversation.c index 9f0eab4216..02d852f863 100644 --- a/epan/conversation.c +++ b/epan/conversation.c @@ -28,7 +28,7 @@ // } // } // Instead of using strings as keys we could bit-shift conversation endpoint types -// into a guint64, e.g. 0x0000000102010200 for CE_ADDRESS,CE_PORT,CE_ADDRESS,CE_PORT,CE_ENDPOINT. +// into a guint64, e.g. 0x0000000102010200 for CE_ADDRESS,CE_PORT,CE_ADDRESS,CE_PORT,CE_CONVERSATION_TYPE. // We could also use this to prepend a type+length indicator for element arrays. /* define DEBUG_CONVERSATION for pretty debug printing */ @@ -43,12 +43,12 @@ int _debug_conversation_indent = 0; * We could use an element list here, but this is effectively a parameter list * for find_conversation and is more compact. */ -struct endpoint { +struct conversation_key { address addr1; address addr2; guint32 port1; guint32 port2; - endpoint_type etype; + conversation_type ctype; }; /* Element offsets for address+port conversations */ @@ -106,13 +106,13 @@ static guint32 new_index; static address null_address_ = ADDRESS_INIT_NONE; -/* Element count including the terminating CE_ENDPOINT */ +/* Element count including the terminating CE_CONVERSATION_TYPE */ #define MAX_CONVERSATION_ELEMENTS 8 // Arbitrary. static size_t conversation_element_count(conversation_element_t *elements) { size_t count = 0; - while (elements[count].type != CE_ENDPOINT) { + while (elements[count].type != CE_CONVERSATION_TYPE) { count++; DISSECTOR_ASSERT(count < MAX_CONVERSATION_ELEMENTS); } @@ -122,15 +122,15 @@ conversation_element_count(conversation_element_t *elements) return count; } -static endpoint_type -conversation_endpoint_type(conversation_element_t *elements) +static conversation_type +conversation_get_key_type(conversation_element_t *elements) { size_t count = 0; - while (elements[count].type != CE_ENDPOINT) { + while (elements[count].type != CE_CONVERSATION_TYPE) { count++; DISSECTOR_ASSERT(count < MAX_CONVERSATION_ELEMENTS); } - return elements[count].endpoint_type_val; + return elements[count].conversation_type_val; } /* Create a string based on element types. */ @@ -173,8 +173,8 @@ static char* conversation_element_list_values(conversation_element_t *elements) g_string_append_printf(value_str, "%s%s=", sep, type_names[cur_el->type]); sep = ","; switch (cur_el->type) { - case CE_ENDPOINT: - g_string_append_printf(value_str, "%d", cur_el->endpoint_type_val); + case CE_CONVERSATION_TYPE: + g_string_append_printf(value_str, "%d", cur_el->conversation_type_val); break; case CE_ADDRESS: { @@ -205,7 +205,7 @@ static bool is_no_addr2_key(conversation_element_t *key) { if (key[ADDR1_IDX].type == CE_ADDRESS && key[PORT1_IDX].type == CE_PORT - && key[PORT2_NO_ADDR2_IDX].type == CE_PORT && key[ENDP_NO_ADDR2_IDX].type == CE_ENDPOINT) { + && key[PORT2_NO_ADDR2_IDX].type == CE_PORT && key[ENDP_NO_ADDR2_IDX].type == CE_CONVERSATION_TYPE) { return true; } return false; @@ -215,7 +215,7 @@ static bool is_no_port2_key(conversation_element_t *key) { if (key[ADDR1_IDX].type == CE_ADDRESS && key[PORT1_IDX].type == CE_PORT - && key[ADDR2_IDX].type == CE_ADDRESS && key[ENDP_NO_PORT2_IDX].type == CE_ENDPOINT) { + && key[ADDR2_IDX].type == CE_ADDRESS && key[ENDP_NO_PORT2_IDX].type == CE_CONVERSATION_TYPE) { return true; } return false; @@ -225,7 +225,7 @@ static bool is_no_addr2_port2_key(conversation_element_t *key) { if (key[ADDR1_IDX].type == CE_ADDRESS && key[PORT1_IDX].type == CE_PORT - && key[ENDP_NO_ADDR2_PORT2_IDX].type == CE_ENDPOINT) { + && key[ENDP_NO_ADDR2_PORT2_IDX].type == CE_CONVERSATION_TYPE) { return true; } return false; @@ -248,12 +248,12 @@ is_no_addr2_port2_key(conversation_element_t *key) static conversation_t * conversation_create_from_template(conversation_t *conversation, const address *addr2, const guint32 port2) { - endpoint_type etype = conversation_endpoint_type(conversation->key_ptr); + conversation_type ctype = conversation_get_key_type(conversation->key_ptr); /* * Add a new conversation and keep the conversation template only if the * CONVERSATION_TEMPLATE bit is set for a connection oriented protocol. */ - if (conversation->options & CONVERSATION_TEMPLATE && etype != ENDPOINT_UDP) + if (conversation->options & CONVERSATION_TEMPLATE && ctype != CONVERSATION_UDP) { /* * Set up a new options mask where the conversation template bit and the @@ -276,7 +276,7 @@ conversation_create_from_template(conversation_t *conversation, const address *a new_conversation_from_template = conversation_new(conversation->setup_frame, &conversation->key_ptr[ADDR1_IDX].addr_val, addr2, - etype, conversation->key_ptr[PORT1_IDX].port_val, + ctype, conversation->key_ptr[PORT1_IDX].port_val, port2, options); } else if (conversation->options & NO_PORT2 && is_no_port2_key(conversation->key_ptr)) @@ -288,7 +288,7 @@ conversation_create_from_template(conversation_t *conversation, const address *a new_conversation_from_template = conversation_new(conversation->setup_frame, &conversation->key_ptr[ADDR1_IDX].addr_val, &conversation->key_ptr[ADDR2_IDX].addr_val, - etype, conversation->key_ptr[PORT1_IDX].port_val, + ctype, conversation->key_ptr[PORT1_IDX].port_val, port2, options); } else if (conversation->options & NO_ADDR2 && is_no_addr2_key(conversation->key_ptr)) @@ -300,7 +300,7 @@ conversation_create_from_template(conversation_t *conversation, const address *a new_conversation_from_template = conversation_new(conversation->setup_frame, &conversation->key_ptr[ADDR1_IDX].addr_val, addr2, - etype, conversation->key_ptr[PORT1_IDX].port_val, + ctype, conversation->key_ptr[PORT1_IDX].port_val, conversation->key_ptr[PORT2_NO_ADDR2_IDX].port_val, options); } else @@ -368,9 +368,9 @@ conversation_hash_element_list(gconstpointer v) tmp_addr.data = &element->uint64_val; hash_val = add_address_to_hash(hash_val, &tmp_addr); break; - case CE_ENDPOINT: - tmp_addr.len = (int) sizeof(element->endpoint_type_val); - tmp_addr.data = &element->endpoint_type_val; + case CE_CONVERSATION_TYPE: + tmp_addr.len = (int) sizeof(element->conversation_type_val); + tmp_addr.data = &element->conversation_type_val; hash_val = add_address_to_hash(hash_val, &tmp_addr); goto done; break; @@ -426,8 +426,8 @@ conversation_match_element_list(gconstpointer v1, gconstpointer v2) return FALSE; } break; - case CE_ENDPOINT: - if (element1->endpoint_type_val != element2->endpoint_type_val) { + case CE_CONVERSATION_TYPE: + if (element1->conversation_type_val != element2->conversation_type_val) { return FALSE; } goto done; @@ -463,7 +463,7 @@ conversation_init(void) { CE_PORT, .port_val = 0 }, { CE_ADDRESS, .addr_val = ADDRESS_INIT_NONE }, { CE_PORT, .port_val = 0 }, - { CE_ENDPOINT, .endpoint_type_val = ENDPOINT_NONE } + { CE_CONVERSATION_TYPE, .conversation_type_val = CONVERSATION_NONE } }; char *exact_map_key = conversation_element_list_name(wmem_epan_scope(), exact_elements); conversation_hashtable_exact_addr_port = wmem_map_new_autoreset(wmem_epan_scope(), wmem_file_scope(), @@ -476,7 +476,7 @@ conversation_init(void) { CE_ADDRESS, .addr_val = ADDRESS_INIT_NONE }, { CE_PORT, .port_val = 0 }, { CE_PORT, .port_val = 0 }, - { CE_ENDPOINT, .endpoint_type_val = ENDPOINT_NONE } + { CE_CONVERSATION_TYPE, .conversation_type_val = CONVERSATION_NONE } }; char *no_addr2_map_key = conversation_element_list_name(wmem_epan_scope(), no_addr2_elements); conversation_hashtable_no_addr2 = wmem_map_new_autoreset(wmem_epan_scope(), wmem_file_scope(), @@ -489,7 +489,7 @@ conversation_init(void) { CE_ADDRESS, .addr_val = ADDRESS_INIT_NONE }, { CE_PORT, .port_val = 0 }, { CE_ADDRESS, .addr_val = ADDRESS_INIT_NONE }, - { CE_ENDPOINT, .endpoint_type_val = ENDPOINT_NONE } + { CE_CONVERSATION_TYPE, .conversation_type_val = CONVERSATION_NONE } }; char *no_port2_map_key = conversation_element_list_name(wmem_epan_scope(), no_port2_elements); conversation_hashtable_no_port2 = wmem_map_new_autoreset(wmem_epan_scope(), wmem_file_scope(), @@ -501,7 +501,7 @@ conversation_init(void) conversation_element_t no_addr2_or_port2_elements[NO_ADDR2_PORT2_IDX_COUNT] = { { CE_ADDRESS, .addr_val = ADDRESS_INIT_NONE }, { CE_PORT, .port_val = 0 }, - { CE_ENDPOINT, .endpoint_type_val = ENDPOINT_NONE } + { CE_CONVERSATION_TYPE, .conversation_type_val = CONVERSATION_NONE } }; char *no_addr2_or_port2_map_key = conversation_element_list_name(wmem_epan_scope(), no_addr2_or_port2_elements); conversation_hashtable_no_addr2_or_port2 = wmem_map_new_autoreset(wmem_epan_scope(), wmem_file_scope(), @@ -512,7 +512,7 @@ conversation_init(void) conversation_element_t id_elements[2] = { { CE_UINT, .uint_val = 0 }, - { CE_ENDPOINT, .endpoint_type_val = ENDPOINT_NONE } + { CE_CONVERSATION_TYPE, .conversation_type_val = CONVERSATION_NONE } }; char *id_map_key = conversation_element_list_name(wmem_epan_scope(), id_elements); conversation_hashtable_id = wmem_map_new_autoreset(wmem_epan_scope(), wmem_file_scope(), @@ -696,7 +696,7 @@ conversation_t *conversation_new_full(const guint32 setup_frame, conversation_el */ conversation_t * conversation_new(const guint32 setup_frame, const address *addr1, const address *addr2, - const endpoint_type etype, const guint32 port1, const guint32 port2, const guint options) + const conversation_type ctype, const guint32 port1, const guint32 port2, const guint options) { /* DISSECTOR_ASSERT(!(options | CONVERSATION_TEMPLATE) || ((options | (NO_ADDR2 | NO_PORT2 | NO_PORT2_FORCE))) && @@ -849,8 +849,8 @@ conversation_new(const guint32 setup_frame, const address *addr1, const address new_key[port2_idx].port_val = port2; } - new_key[endp_idx].type = CE_ENDPOINT; - new_key[endp_idx].endpoint_type_val = etype; + new_key[endp_idx].type = CE_CONVERSATION_TYPE; + new_key[endp_idx].conversation_type_val = ctype; conversation = wmem_new0(wmem_file_scope(), conversation_t); @@ -871,7 +871,7 @@ conversation_new(const guint32 setup_frame, const address *addr1, const address } conversation_t * -conversation_new_by_id(const guint32 setup_frame, const endpoint_type etype, const guint32 id) +conversation_new_by_id(const guint32 setup_frame, const conversation_type ctype, const guint32 id) { conversation_t *conversation = wmem_new0(wmem_file_scope(), conversation_t); conversation->conv_index = new_index; @@ -882,8 +882,8 @@ conversation_new_by_id(const guint32 setup_frame, const endpoint_type etype, con conversation_element_t *elements = wmem_alloc(wmem_file_scope(), sizeof(conversation_element_t) * 2); elements[0].type = CE_UINT; elements[0].uint_val = id; - elements[1].type = CE_ENDPOINT; - elements[1].endpoint_type_val = etype; + elements[1].type = CE_CONVERSATION_TYPE; + elements[1].conversation_type_val = ctype; conversation->key_ptr = elements; conversation_insert_into_hashtable(conversation_hashtable_id, conversation); @@ -1031,14 +1031,14 @@ conversation_t *find_conversation_full(const guint32 frame_num, conversation_ele */ static conversation_t * conversation_lookup_exact(const guint32 frame_num, const address *addr1, const guint32 port1, - const address *addr2, const guint32 port2, const endpoint_type etype) + const address *addr2, const guint32 port2, const conversation_type ctype) { conversation_element_t key[EXACT_IDX_COUNT] = { { CE_ADDRESS, .addr_val = *addr1 }, { CE_PORT, .port_val = port1 }, { CE_ADDRESS, .addr_val = *addr2 }, { CE_PORT, .port_val = port2 }, - { CE_ENDPOINT, .endpoint_type_val = etype }, + { CE_CONVERSATION_TYPE, .conversation_type_val = ctype }, }; return conversation_lookup_hashtable(conversation_hashtable_exact_addr_port, frame_num, key); } @@ -1049,13 +1049,13 @@ conversation_lookup_exact(const guint32 frame_num, const address *addr1, const g */ static conversation_t * conversation_lookup_no_addr2(const guint32 frame_num, const address *addr1, const guint32 port1, - const guint32 port2, const endpoint_type etype) + const guint32 port2, const conversation_type ctype) { conversation_element_t key[NO_ADDR2_IDX_COUNT] = { { CE_ADDRESS, .addr_val = *addr1 }, { CE_PORT, .port_val = port1 }, { CE_PORT, .port_val = port2 }, - { CE_ENDPOINT, .endpoint_type_val = etype }, + { CE_CONVERSATION_TYPE, .conversation_type_val = ctype }, }; return conversation_lookup_hashtable(conversation_hashtable_no_addr2, frame_num, key); } @@ -1066,13 +1066,13 @@ conversation_lookup_no_addr2(const guint32 frame_num, const address *addr1, cons */ static conversation_t * conversation_lookup_no_port2(const guint32 frame_num, const address *addr1, const guint32 port1, - const address *addr2, const endpoint_type etype) + const address *addr2, const conversation_type ctype) { conversation_element_t key[NO_PORT2_IDX_COUNT] = { { CE_ADDRESS, .addr_val = *addr1 }, { CE_PORT, .port_val = port1 }, { CE_ADDRESS, .addr_val = *addr2 }, - { CE_ENDPOINT, .endpoint_type_val = etype }, + { CE_CONVERSATION_TYPE, .conversation_type_val = ctype }, }; return conversation_lookup_hashtable(conversation_hashtable_no_port2, frame_num, key); } @@ -1083,12 +1083,12 @@ conversation_lookup_no_port2(const guint32 frame_num, const address *addr1, cons */ static conversation_t * conversation_lookup_no_addr2_or_port2(const guint32 frame_num, const address *addr1, const guint32 port1, - const endpoint_type etype) + const conversation_type ctype) { conversation_element_t key[NO_ADDR2_PORT2_IDX_COUNT] = { { CE_ADDRESS, .addr_val = *addr1 }, { CE_PORT, .port_val = port1 }, - { CE_ENDPOINT, .endpoint_type_val = etype }, + { CE_CONVERSATION_TYPE, .conversation_type_val = ctype }, }; return conversation_lookup_hashtable(conversation_hashtable_no_addr2_or_port2, frame_num, key); } @@ -1130,7 +1130,7 @@ conversation_lookup_no_addr2_or_port2(const guint32 frame_num, const address *ad * otherwise, we found no matching conversation, and return NULL. */ conversation_t * -find_conversation(const guint32 frame_num, const address *addr_a, const address *addr_b, const endpoint_type etype, +find_conversation(const guint32 frame_num, const address *addr_a, const address *addr_b, const conversation_type ctype, const guint32 port_a, const guint32 port_b, const guint options) { conversation_t *conversation, *other_conv; @@ -1159,7 +1159,7 @@ find_conversation(const guint32 frame_num, const address *addr_a, const address */ DPRINT(("trying exact match: %s:%d -> %s:%d", addr_a_str, port_a, addr_b_str, port_b)); - conversation = conversation_lookup_exact(frame_num, addr_a, port_a, addr_b, port_b, etype); + conversation = conversation_lookup_exact(frame_num, addr_a, port_a, addr_b, port_b, ctype); /* * Look for an alternate conversation in the opposite direction, which * might fit better. Note that using the helper functions such as @@ -1171,7 +1171,7 @@ find_conversation(const guint32 frame_num, const address *addr_a, const address DPRINT(("trying exact match: %s:%d -> %s:%d", addr_b_str, port_b, addr_a_str, port_a)); - other_conv = conversation_lookup_exact(frame_num, addr_b, port_b, addr_a, port_a, etype); + other_conv = conversation_lookup_exact(frame_num, addr_b, port_b, addr_a, port_a, ctype); if (other_conv != NULL) { if (conversation != NULL) { if(other_conv->conv_index > conversation->conv_index) { @@ -1188,7 +1188,7 @@ find_conversation(const guint32 frame_num, const address *addr_a, const address */ DPRINT(("trying exact match: %s:%d -> %s:%d", addr_b_str, port_a, addr_a_str, port_b)); - conversation = conversation_lookup_exact(frame_num, addr_b, port_a, addr_a, port_b, etype); + conversation = conversation_lookup_exact(frame_num, addr_b, port_a, addr_a, port_b, ctype); } DPRINT(("exact match %sfound",conversation?"":"not ")); if (conversation != NULL) @@ -1211,14 +1211,14 @@ find_conversation(const guint32 frame_num, const address *addr_a, const address */ DPRINT(("trying wildcarded match: %s:%d -> *:%d", addr_a_str, port_a, port_b)); - conversation = conversation_lookup_no_addr2(frame_num, addr_a, port_a, port_b, etype); + conversation = conversation_lookup_no_addr2(frame_num, addr_a, port_a, port_b, ctype); if ((conversation == NULL) && (addr_a->type == AT_FC)) { /* In Fibre channel, OXID & RXID are never swapped as * TCP/UDP ports are in TCP/IP. */ DPRINT(("trying wildcarded match: %s:%d -> *:%d", addr_b_str, port_a, port_b)); - conversation = conversation_lookup_no_addr2(frame_num, addr_b, port_a, port_b, etype); + conversation = conversation_lookup_no_addr2(frame_num, addr_b, port_a, port_b, ctype); } if (conversation != NULL) { /* @@ -1233,7 +1233,7 @@ find_conversation(const guint32 frame_num, const address *addr_a, const address * address, unless the CONVERSATION_TEMPLATE option is set.) */ DPRINT(("wildcarded dest address match found")); - if (!(conversation->options & NO_ADDR2) && etype != ENDPOINT_UDP) + if (!(conversation->options & NO_ADDR2) && ctype != CONVERSATION_UDP) { if (!(conversation->options & CONVERSATION_TEMPLATE)) { @@ -1261,7 +1261,7 @@ find_conversation(const guint32 frame_num, const address *addr_a, const address if (!(options & NO_ADDR_B)) { DPRINT(("trying wildcarded match: %s:%d -> *:%d", addr_b_str, port_b, port_a)); - conversation = conversation_lookup_no_addr2(frame_num, addr_b, port_b, port_a, etype); + conversation = conversation_lookup_no_addr2(frame_num, addr_b, port_b, port_a, ctype); if (conversation != NULL) { /* * If this is for a connection-oriented @@ -1272,7 +1272,7 @@ find_conversation(const guint32 frame_num, const address *addr_a, const address * conversation. */ DPRINT(("match found")); - if (etype != ENDPOINT_UDP) { + if (ctype != CONVERSATION_UDP) { if (!(conversation->options & CONVERSATION_TEMPLATE)) { conversation_set_addr2(conversation, addr_a); @@ -1304,13 +1304,13 @@ find_conversation(const guint32 frame_num, const address *addr_a, const address */ DPRINT(("trying wildcarded match: %s:%d -> %s:*", addr_a_str, port_a, addr_b_str)); - conversation = conversation_lookup_no_port2(frame_num, addr_a, port_a, addr_b, etype); + conversation = conversation_lookup_no_port2(frame_num, addr_a, port_a, addr_b, ctype); if ((conversation == NULL) && (addr_a->type == AT_FC)) { /* In Fibre channel, OXID & RXID are never swapped as * TCP/UDP ports are in TCP/IP */ DPRINT(("trying wildcarded match: %s:%d -> %s:*", addr_b_str, port_a, addr_a_str)); - conversation = conversation_lookup_no_port2(frame_num, addr_b, port_a, addr_a, etype); + conversation = conversation_lookup_no_port2(frame_num, addr_b, port_a, addr_a, ctype); } if (conversation != NULL) { /* @@ -1325,7 +1325,7 @@ find_conversation(const guint32 frame_num, const address *addr_a, const address * unless the CONVERSATION_TEMPLATE option is set.) */ DPRINT(("match found")); - if (!(conversation->options & NO_PORT2) && etype != ENDPOINT_UDP) + if (!(conversation->options & NO_PORT2) && ctype != CONVERSATION_UDP) { if (!(conversation->options & CONVERSATION_TEMPLATE)) { @@ -1353,7 +1353,7 @@ find_conversation(const guint32 frame_num, const address *addr_a, const address if (!(options & NO_PORT_B)) { DPRINT(("trying wildcarded match: %s:%d -> %s:*", addr_b_str, port_b, addr_a_str)); - conversation = conversation_lookup_no_port2(frame_num, addr_b, port_b, addr_a, etype); + conversation = conversation_lookup_no_port2(frame_num, addr_b, port_b, addr_a, ctype); if (conversation != NULL) { /* * If this is for a connection-oriented @@ -1364,7 +1364,7 @@ find_conversation(const guint32 frame_num, const address *addr_a, const address * conversation. */ DPRINT(("match found")); - if (etype != ENDPOINT_UDP) + if (ctype != CONVERSATION_UDP) { if (!(conversation->options & CONVERSATION_TEMPLATE)) { @@ -1390,7 +1390,7 @@ find_conversation(const guint32 frame_num, const address *addr_a, const address * (Neither "addr_b" nor "port_b" take part in this lookup.) */ DPRINT(("trying wildcarded match: %s:%d -> *:*", addr_a_str, port_a)); - conversation = conversation_lookup_no_addr2_or_port2(frame_num, addr_a, port_a, etype); + conversation = conversation_lookup_no_addr2_or_port2(frame_num, addr_a, port_a, ctype); if (conversation != NULL) { /* * If this is for a connection-oriented protocol: @@ -1406,7 +1406,7 @@ find_conversation(const guint32 frame_num, const address *addr_a, const address * second port for this conversation. */ DPRINT(("match found")); - if (etype != ENDPOINT_UDP) + if (ctype != CONVERSATION_UDP) { if (!(conversation->options & CONVERSATION_TEMPLATE)) { @@ -1428,7 +1428,7 @@ find_conversation(const guint32 frame_num, const address *addr_a, const address * valid conversation than what is being searched using * addr_a, port_a. */ - if (etype != ENDPOINT_IBQP) + if (ctype != CONVERSATION_IBQP) { /* @@ -1443,11 +1443,11 @@ find_conversation(const guint32 frame_num, const address *addr_a, const address if (addr_a->type == AT_FC) { DPRINT(("trying wildcarded match: %s:%d -> *:*", addr_b_str, port_a)); - conversation = conversation_lookup_no_addr2_or_port2(frame_num, addr_b, port_a, etype); + conversation = conversation_lookup_no_addr2_or_port2(frame_num, addr_b, port_a, ctype); } else { DPRINT(("trying wildcarded match: %s:%d -> *:*", addr_b_str, port_b)); - conversation = conversation_lookup_no_addr2_or_port2(frame_num, addr_b, port_b, etype); + conversation = conversation_lookup_no_addr2_or_port2(frame_num, addr_b, port_b, ctype); } if (conversation != NULL) { /* @@ -1460,7 +1460,7 @@ find_conversation(const guint32 frame_num, const address *addr_a, const address * conversation. */ DPRINT(("match found")); - if (etype != ENDPOINT_UDP) + if (ctype != CONVERSATION_UDP) { if (!(conversation->options & CONVERSATION_TEMPLATE)) { @@ -1489,11 +1489,11 @@ end: } conversation_t * -find_conversation_by_id(const guint32 frame, const endpoint_type etype, const guint32 id) +find_conversation_by_id(const guint32 frame, const conversation_type ctype, const guint32 id) { conversation_element_t elements[2] = { { CE_UINT, .uint_val = id }, - { CE_ENDPOINT, .endpoint_type_val = etype } + { CE_CONVERSATION_TYPE, .conversation_type_val = ctype } }; return conversation_lookup_hashtable(conversation_hashtable_id, frame, elements); @@ -1595,7 +1595,7 @@ try_conversation_call_dissector_helper(conversation_t *conversation, gboolean* d * this function returns FALSE. */ gboolean -try_conversation_dissector(const address *addr_a, const address *addr_b, const endpoint_type etype, +try_conversation_dissector(const address *addr_a, const address *addr_b, const conversation_type ctype, const guint32 port_a, const guint32 port_b, tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data, const guint options) { @@ -1608,14 +1608,14 @@ try_conversation_dissector(const address *addr_a, const address *addr_b, const e DISSECTOR_ASSERT_HINT((options == 0) || (options & NO_MASK_B), "Use NO_ADDR_B and/or NO_PORT_B as option"); /* Try each mode based on option flags */ - conversation = find_conversation(pinfo->num, addr_a, addr_b, etype, port_a, port_b, 0); + conversation = find_conversation(pinfo->num, addr_a, addr_b, ctype, port_a, port_b, 0); if (conversation != NULL) { if (try_conversation_call_dissector_helper(conversation, &dissector_success, tvb, pinfo, tree, data)) return dissector_success; } if (options & NO_ADDR_B) { - conversation = find_conversation(pinfo->num, addr_a, addr_b, etype, port_a, port_b, NO_ADDR_B); + conversation = find_conversation(pinfo->num, addr_a, addr_b, ctype, port_a, port_b, NO_ADDR_B); if (conversation != NULL) { if (try_conversation_call_dissector_helper(conversation, &dissector_success, tvb, pinfo, tree, data)) return dissector_success; @@ -1623,7 +1623,7 @@ try_conversation_dissector(const address *addr_a, const address *addr_b, const e } if (options & NO_PORT_B) { - conversation = find_conversation(pinfo->num, addr_a, addr_b, etype, port_a, port_b, NO_PORT_B); + conversation = find_conversation(pinfo->num, addr_a, addr_b, ctype, port_a, port_b, NO_PORT_B); if (conversation != NULL) { if (try_conversation_call_dissector_helper(conversation, &dissector_success, tvb, pinfo, tree, data)) return dissector_success; @@ -1631,7 +1631,7 @@ try_conversation_dissector(const address *addr_a, const address *addr_b, const e } if (options & (NO_ADDR_B|NO_PORT_B)) { - conversation = find_conversation(pinfo->num, addr_a, addr_b, etype, port_a, port_b, NO_ADDR_B|NO_PORT_B); + conversation = find_conversation(pinfo->num, addr_a, addr_b, ctype, port_a, port_b, NO_ADDR_B|NO_PORT_B); if (conversation != NULL) { if (try_conversation_call_dissector_helper(conversation, &dissector_success, tvb, pinfo, tree, data)) return dissector_success; @@ -1642,12 +1642,12 @@ try_conversation_dissector(const address *addr_a, const address *addr_b, const e } gboolean -try_conversation_dissector_by_id(const endpoint_type etype, const guint32 id, tvbuff_t *tvb, +try_conversation_dissector_by_id(const conversation_type ctype, const guint32 id, tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data) { conversation_t *conversation; - conversation = find_conversation_by_id(pinfo->num, etype, id); + conversation = find_conversation_by_id(pinfo->num, ctype, id); if (conversation != NULL) { if (!conversation->dissector_tree) { @@ -1693,10 +1693,10 @@ find_conversation_pinfo(packet_info *pinfo, const guint options) /* Have we seen this conversation before? */ if (pinfo->use_endpoint) { - DISSECTOR_ASSERT(pinfo->conv_endpoint); - if ((conv = find_conversation(pinfo->num, &pinfo->conv_endpoint->addr1, &pinfo->conv_endpoint->addr2, - pinfo->conv_endpoint->etype, pinfo->conv_endpoint->port1, - pinfo->conv_endpoint->port2, 0)) != NULL) { + DISSECTOR_ASSERT(pinfo->conv_key); + if ((conv = find_conversation(pinfo->num, &pinfo->conv_key->addr1, &pinfo->conv_key->addr2, + pinfo->conv_key->ctype, pinfo->conv_key->port1, + pinfo->conv_key->port2, 0)) != NULL) { DPRINT(("found previous conversation for frame #%u (last_frame=%d)", pinfo->num, conv->last_frame)); if (pinfo->num > conv->last_frame) { @@ -1713,7 +1713,7 @@ find_conversation_pinfo(packet_info *pinfo, const guint options) } } else { if ((conv = find_conversation(pinfo->num, &pinfo->src, &pinfo->dst, - conversation_pt_to_endpoint_type(pinfo->ptype), pinfo->srcport, + conversation_pt_to_conversation_type(pinfo->ptype), pinfo->srcport, pinfo->destport, options)) != NULL) { DPRINT(("found previous conversation for frame #%u (last_frame=%d)", pinfo->num, conv->last_frame)); @@ -1746,14 +1746,14 @@ find_or_create_conversation(packet_info *pinfo) pinfo->num)); DINDENT(); if (pinfo->use_endpoint) { - conv = conversation_new(pinfo->num, &pinfo->conv_endpoint->addr1, &pinfo->conv_endpoint->addr2, - pinfo->conv_endpoint->etype, pinfo->conv_endpoint->port1, - pinfo->conv_endpoint->port2, 0); + conv = conversation_new(pinfo->num, &pinfo->conv_key->addr1, &pinfo->conv_key->addr2, + pinfo->conv_key->ctype, pinfo->conv_key->port1, + pinfo->conv_key->port2, 0); } else if (pinfo->conv_elements) { conv = conversation_new_full(pinfo->num, pinfo->conv_elements); } else { conv = conversation_new(pinfo->num, &pinfo->src, - &pinfo->dst, conversation_pt_to_endpoint_type(pinfo->ptype), + &pinfo->dst, conversation_pt_to_conversation_type(pinfo->ptype), pinfo->srcport, pinfo->destport, 0); } DENDENT(); @@ -1763,17 +1763,17 @@ find_or_create_conversation(packet_info *pinfo) } conversation_t * -find_or_create_conversation_by_id(packet_info *pinfo, const endpoint_type etype, const guint32 id) +find_or_create_conversation_by_id(packet_info *pinfo, const conversation_type ctype, const guint32 id) { conversation_t *conv=NULL; /* Have we seen this conversation before? */ - if ((conv = find_conversation_by_id(pinfo->num, etype, id)) == NULL) { + if ((conv = find_conversation_by_id(pinfo->num, ctype, id)) == NULL) { /* No, this is a new conversation. */ DPRINT(("did not find previous conversation for frame #%u", pinfo->num)); DINDENT(); - conv = conversation_new_by_id(pinfo->num, etype, id); + conv = conversation_new_by_id(pinfo->num, ctype, id); DENDENT(); } @@ -1781,47 +1781,47 @@ find_or_create_conversation_by_id(packet_info *pinfo, const endpoint_type etype, } void -conversation_create_endpoint(struct _packet_info *pinfo, address* addr1, address* addr2, - endpoint_type etype, guint32 port1, guint32 port2) +conversation_create_key_by_address_port_pairs(struct _packet_info *pinfo, address* addr1, address* addr2, + conversation_type ctype, guint32 port1, guint32 port2) { - pinfo->conv_endpoint = wmem_new0(pinfo->pool, struct endpoint); + pinfo->conv_key = wmem_new0(pinfo->pool, struct conversation_key); if (addr1 != NULL) { - copy_address_wmem(pinfo->pool, &pinfo->conv_endpoint->addr1, addr1); + copy_address_wmem(pinfo->pool, &pinfo->conv_key->addr1, addr1); } if (addr2 != NULL) { - copy_address_wmem(pinfo->pool, &pinfo->conv_endpoint->addr2, addr2); + copy_address_wmem(pinfo->pool, &pinfo->conv_key->addr2, addr2); } - pinfo->conv_endpoint->etype = etype; - pinfo->conv_endpoint->port1 = port1; - pinfo->conv_endpoint->port2 = port2; + pinfo->conv_key->ctype = ctype; + pinfo->conv_key->port1 = port1; + pinfo->conv_key->port2 = port2; pinfo->use_endpoint = TRUE; } void -conversation_create_endpoint_by_id(struct _packet_info *pinfo, endpoint_type etype, guint32 id) +conversation_create_key_by_id(struct _packet_info *pinfo, conversation_type ctype, guint32 id) { pinfo->conv_elements = wmem_alloc0(pinfo->pool, sizeof(conversation_element_t) * 2); pinfo->conv_elements[0].type = CE_UINT; pinfo->conv_elements[0].uint_val = id; - pinfo->conv_elements[1].type = CE_ENDPOINT; - pinfo->conv_elements[1].endpoint_type_val = etype; + pinfo->conv_elements[1].type = CE_CONVERSATION_TYPE; + pinfo->conv_elements[1].conversation_type_val = ctype; } guint32 -conversation_get_endpoint_by_id(struct _packet_info *pinfo, endpoint_type etype, const guint options) +conversation_get_id_from_key(struct _packet_info *pinfo, conversation_type ctype, const guint options) { if (pinfo->conv_elements == NULL) { return 0; } - if (pinfo->conv_elements[0].type != CE_UINT || pinfo->conv_elements[1].type != CE_ENDPOINT) { + if (pinfo->conv_elements[0].type != CE_UINT || pinfo->conv_elements[1].type != CE_CONVERSATION_TYPE) { return 0; } - if ((pinfo->conv_elements[1].endpoint_type_val != etype) && ((options & USE_LAST_ENDPOINT) != USE_LAST_ENDPOINT)) { + if ((pinfo->conv_elements[1].conversation_type_val != ctype) && ((options & USE_LAST_ENDPOINT) != USE_LAST_ENDPOINT)) { return 0; } @@ -1881,40 +1881,40 @@ conversation_key_port2(const conversation_element_t * key) } WS_DLL_PUBLIC -endpoint_type conversation_pt_to_endpoint_type(port_type pt) +conversation_type conversation_pt_to_conversation_type(port_type pt) { switch (pt) { case PT_NONE: - return ENDPOINT_NONE; + return CONVERSATION_NONE; case PT_SCTP: - return ENDPOINT_SCTP; + return CONVERSATION_SCTP; case PT_TCP: - return ENDPOINT_TCP; + return CONVERSATION_TCP; case PT_UDP: - return ENDPOINT_UDP; + return CONVERSATION_UDP; case PT_DCCP: - return ENDPOINT_DCCP; + return CONVERSATION_DCCP; case PT_IPX: - return ENDPOINT_IPX; + return CONVERSATION_IPX; case PT_DDP: - return ENDPOINT_DDP; + return CONVERSATION_DDP; case PT_IDP: - return ENDPOINT_IDP; + return CONVERSATION_IDP; case PT_USB: - return ENDPOINT_USB; + return CONVERSATION_USB; case PT_I2C: - return ENDPOINT_I2C; + return CONVERSATION_I2C; case PT_IBQP: - return ENDPOINT_IBQP; + return CONVERSATION_IBQP; case PT_BLUETOOTH: - return ENDPOINT_BLUETOOTH; + return CONVERSATION_BLUETOOTH; case PT_IWARP_MPA: - return ENDPOINT_IWARP_MPA; + return CONVERSATION_IWARP_MPA; } DISSECTOR_ASSERT(FALSE); - return ENDPOINT_NONE; + return CONVERSATION_NONE; } /* diff --git a/epan/conversation.h b/epan/conversation.h index de45014258..6c022fbdae 100644 --- a/epan/conversation.h +++ b/epan/conversation.h @@ -54,62 +54,107 @@ extern "C" { /** Flags to handle endpoints */ #define USE_LAST_ENDPOINT 0x08 /**< Use last endpoint created, regardless of type */ -/* Types of port numbers Wireshark knows about. */ +/* Types of conversations Wireshark knows about. */ typedef enum { - ENDPOINT_NONE, /* no endpoint */ - ENDPOINT_SCTP, /* SCTP */ - ENDPOINT_TCP, /* TCP */ - ENDPOINT_UDP, /* UDP */ - ENDPOINT_DCCP, /* DCCP */ - ENDPOINT_IPX, /* IPX sockets */ - ENDPOINT_NCP, /* NCP connection */ - ENDPOINT_EXCHG, /* Fibre Channel exchange */ - ENDPOINT_DDP, /* DDP AppleTalk connection */ - ENDPOINT_SBCCS, /* FICON */ - ENDPOINT_IDP, /* XNS IDP sockets */ - ENDPOINT_TIPC, /* TIPC PORT */ - ENDPOINT_USB, /* USB endpoint 0xffff means the host */ - ENDPOINT_I2C, - ENDPOINT_IBQP, /* Infiniband QP number */ - ENDPOINT_BLUETOOTH, - ENDPOINT_TDMOP, - ENDPOINT_DVBCI, - ENDPOINT_ISO14443, - ENDPOINT_ISDN, /* ISDN channel number */ - ENDPOINT_H223, /* H.223 logical channel number */ - ENDPOINT_X25, /* X.25 logical channel number */ - ENDPOINT_IAX2, /* IAX2 call id */ - ENDPOINT_DLCI, /* Frame Relay DLCI */ - ENDPOINT_ISUP, /* ISDN User Part CIC */ - ENDPOINT_BICC, /* BICC Circuit identifier */ - ENDPOINT_GSMTAP, - ENDPOINT_IUUP, - ENDPOINT_DVBBBF, /* DVB Base Band Frame ISI/PLP_ID */ - ENDPOINT_IWARP_MPA, /* iWarp MPA */ - ENDPOINT_BT_UTP, /* BitTorrent uTP Connection ID */ - ENDPOINT_LOG, /* Logging source */ -} endpoint_type; + CONVERSATION_NONE, /* no conversation key */ + CONVERSATION_SCTP, /* SCTP */ + CONVERSATION_TCP, /* TCP address/port pairs */ + CONVERSATION_UDP, /* UDP address/port pairs */ + CONVERSATION_DCCP, /* DCCP */ + CONVERSATION_IPX, /* IPX sockets */ + CONVERSATION_NCP, /* NCP connection */ + CONVERSATION_EXCHG, /* Fibre Channel exchange */ + CONVERSATION_DDP, /* DDP AppleTalk address/port pair */ + CONVERSATION_SBCCS, /* FICON */ + CONVERSATION_IDP, /* XNS IDP sockets */ + CONVERSATION_TIPC, /* TIPC PORT */ + CONVERSATION_USB, /* USB endpoint 0xffff means the host */ + CONVERSATION_I2C, + CONVERSATION_IBQP, /* Infiniband QP number */ + CONVERSATION_BLUETOOTH, + CONVERSATION_TDMOP, + CONVERSATION_DVBCI, + CONVERSATION_ISO14443, + CONVERSATION_ISDN, /* ISDN channel number */ + CONVERSATION_H223, /* H.223 logical channel number */ + CONVERSATION_X25, /* X.25 logical channel number */ + CONVERSATION_IAX2, /* IAX2 call id */ + CONVERSATION_DLCI, /* Frame Relay DLCI */ + CONVERSATION_ISUP, /* ISDN User Part CIC */ + CONVERSATION_BICC, /* BICC Circuit identifier */ + CONVERSATION_GSMTAP, + CONVERSATION_IUUP, + CONVERSATION_DVBBBF, /* DVB Base Band Frame ISI/PLP_ID */ + CONVERSATION_IWARP_MPA, /* iWarp MPA */ + CONVERSATION_BT_UTP, /* BitTorrent uTP Connection ID */ + CONVERSATION_LOG, /* Logging source */ +} conversation_type; + +/* + * XXX - for now, we just #define these to be the same as the + * corresponding CONVERSATION_ values, for backwards source + * compatibility. + * + * In the long term, we should make this into a separate enum, + * with elements corresponding to conversation types that do + * not have known endpoints removed. + */ +/* Types of conversation endpoints Wireshark knows about. */ +#define ENDPOINT_NONE CONVERSATION_NONE +#define ENDPOINT_SCTP CONVERSATION_SCTP +#define ENDPOINT_TCP CONVERSATION_TCP +#define ENDPOINT_UDP CONVERSATION_UDP +#define ENDPOINT_DCCP CONVERSATION_DCCP +#define ENDPOINT_IPX CONVERSATION_IPX +#define ENDPOINT_NCP CONVERSATION_NCP +#define ENDPOINT_EXCHG CONVERSATION_EXCHG +#define ENDPOINT_DDP CONVERSATION_DDP +#define ENDPOINT_SBCCS CONVERSATION_SBCCS +#define ENDPOINT_IDP CONVERSATION_IDP +#define ENDPOINT_TIPC CONVERSATION_TIPC +#define ENDPOINT_USB CONVERSATION_USB +#define ENDPOINT_I2C CONVERSATION_I2C +#define ENDPOINT_IBQP CONVERSATION_IBQP +#define ENDPOINT_BLUETOOTH CONVERSATION_BLUETOOTH +#define ENDPOINT_TDMOP CONVERSATION_TDMOP +#define ENDPOINT_DVBCI CONVERSATION_DVBCI +#define ENDPOINT_ISO14443 CONVERSATION_ISO14443 +#define ENDPOINT_ISDN CONVERSATION_ISDN +#define ENDPOINT_H223 CONVERSATION_H223 +#define ENDPOINT_X25 CONVERSATION_X25 +#define ENDPOINT_IAX2 CONVERSATION_IAX2 +#define ENDPOINT_DLCI CONVERSATION_DLCI +#define ENDPOINT_ISUP CONVERSATION_ISUP +#define ENDPOINT_BICC CONVERSATION_BICC +#define ENDPOINT_GSMTAP CONVERSATION_GSMTAP +#define ENDPOINT_IUUP CONVERSATION_IUUP +#define ENDPOINT_DVBBBF CONVERSATION_DVBBBF +#define ENDPOINT_IWARP_MPA CONVERSATION_IWARP_MPA +#define ENDPOINT_BT_UTP CONVERSATION_BT_UTP +#define ENDPOINT_LOG CONVERSATION_LOG + +typedef conversation_type endpoint_type; /** * Conversation element type. */ typedef enum { - CE_ENDPOINT, - CE_ADDRESS, - CE_PORT, - CE_STRING, - CE_UINT, - CE_UINT64, + CE_CONVERSATION_TYPE, /* CONVERSATION_ value */ + CE_ADDRESS, /* address */ + CE_PORT, /* unsigned integer representing a port */ + CE_STRING, /* string */ + CE_UINT, /* unsigned integer not representing a port */ + CE_UINT64, /* 64-bit unsigned integer */ } conversation_element_type; /** * Elements used to identify conversations for *_full routines and pinfo->conv_elements. - * Arrays must be terminated with an element .type set to CE_ENDPOINT. + * Arrays must be terminated with an element .type set to CE_CONVERSATION_TYPE. */ typedef struct conversation_element { conversation_element_type type; union { - endpoint_type endpoint_type_val; + conversation_type conversation_type_val; address addr_val; unsigned int port_val; const char *str_val; @@ -132,11 +177,11 @@ typedef struct conversation { wmem_tree_t *data_list; /** list of data associated with conversation */ wmem_tree_t *dissector_tree; /** tree containing protocol dissector client associated with conversation */ guint options; /** wildcard flags */ - conversation_element_t *key_ptr; /** Keys are conversation element arrays terminated with a CE_ENDPOINT */ + conversation_element_t *key_ptr; /** Keys are conversation element arrays terminated with a CE_CONVERSATION_TYPE */ } conversation_t; -struct endpoint; -typedef struct endpoint* endpoint_t; +struct conversation_key; +typedef struct conversation_key* conversation_key_t; WS_DLL_PUBLIC const address* conversation_key_addr1(const conversation_element_t *key); WS_DLL_PUBLIC guint32 conversation_key_port1(const conversation_element_t *key); @@ -156,7 +201,7 @@ extern void conversation_epan_reset(void); /** * Create a new conversation identified by a list of elements. * @param setup_frame The first frame in the conversation. - * @param elements An array of element types and values. Must not be NULL. Must be terminated with a CE_ENDPOINT element. + * @param elements An array of element types and values. Must not be NULL. Must be terminated with a CE_CONVERSATION_TYPE element. * @return The new conversation. */ WS_DLL_PUBLIC WS_RETNONNULL conversation_t *conversation_new_full(const guint32 setup_frame, conversation_element_t *elements); @@ -181,14 +226,14 @@ WS_DLL_PUBLIC WS_RETNONNULL conversation_t *conversation_new_full(const guint32 * @return The new conversation. */ WS_DLL_PUBLIC WS_RETNONNULL conversation_t *conversation_new(const guint32 setup_frame, const address *addr1, const address *addr2, - const endpoint_type etype, const guint32 port1, const guint32 port2, const guint options); + const conversation_type ctype, const guint32 port1, const guint32 port2, const guint options); -WS_DLL_PUBLIC WS_RETNONNULL conversation_t *conversation_new_by_id(const guint32 setup_frame, const endpoint_type etype, const guint32 id); +WS_DLL_PUBLIC WS_RETNONNULL conversation_t *conversation_new_by_id(const guint32 setup_frame, const conversation_type ctype, const guint32 id); /** * Search for a conversation based on the structure and values of an element list. * @param frame_num Frame number. Must be greater than or equal to the conversation's initial frame number. - * @param elements An array of element types and values. Must not be NULL. Must be terminated with a CE_ENDPOINT element. + * @param elements An array of element types and values. Must not be NULL. Must be terminated with a CE_CONVERSATION_TYPE element. * @return The matching conversation if found, otherwise NULL. */ WS_DLL_PUBLIC conversation_t *find_conversation_full(const guint32 frame_num, conversation_element_t *elements); @@ -234,16 +279,16 @@ WS_DLL_PUBLIC conversation_t *find_conversation_full(const guint32 frame_num, co * @param frame_num Frame number. Must be greater than or equal to the conversation's initial frame number. * @param addr_a The first address in the identifying tuple. * @param addr_b The second address in the identifying tuple. - * @param etype The endpoint type. + * @param ctype The conversation type. * @param port_a The first port in the identifying tuple. * @param port_b The second port in the identifying tuple. * @param options Wildcard options as described above. * @return The matching conversation if found, otherwise NULL. */ WS_DLL_PUBLIC conversation_t *find_conversation(const guint32 frame_num, const address *addr_a, const address *addr_b, - const endpoint_type etype, const guint32 port_a, const guint32 port_b, const guint options); + const conversation_type ctype, const guint32 port_a, const guint32 port_b, const guint options); -WS_DLL_PUBLIC conversation_t *find_conversation_by_id(const guint32 frame, const endpoint_type etype, const guint32 id); +WS_DLL_PUBLIC conversation_t *find_conversation_by_id(const guint32 frame, const conversation_type ctype, const guint32 id); /** A helper function that calls find_conversation() using data from pinfo * The frame number and addresses are taken from pinfo. @@ -266,7 +311,7 @@ WS_DLL_PUBLIC WS_RETNONNULL conversation_t *find_or_create_conversation(packet_i * conversation is not found, calls conversation_new_by_id(). * The frame number is taken from pinfo. */ -WS_DLL_PUBLIC WS_RETNONNULL conversation_t *find_or_create_conversation_by_id(packet_info *pinfo, const endpoint_type etype, const guint32 id); +WS_DLL_PUBLIC WS_RETNONNULL conversation_t *find_or_create_conversation_by_id(packet_info *pinfo, const conversation_type ctype, const guint32 id); /** Associate data with a conversation. * @param conv Conversation. Must not be NULL. @@ -301,32 +346,33 @@ WS_DLL_PUBLIC dissector_handle_t conversation_get_dissector(conversation_t *conv * @param pinfo Packet info. * @param addr1 The first address in the identifying tuple. * @param addr2 The second address in the identifying tuple. - * @param etype The endpoint type. + * @param ctype The conversation type. * @param port1 The first port in the identifying tuple. * @param port2 The second port in the identifying tuple. */ -WS_DLL_PUBLIC void conversation_create_endpoint(struct _packet_info *pinfo, address* addr1, address* addr2, - endpoint_type etype, guint32 port1, guint32 port2); +WS_DLL_PUBLIC void conversation_create_key_by_address_port_pairs(struct _packet_info *pinfo, address* addr1, address* addr2, + conversation_type ctype, guint32 port1, guint32 port2); /** * Save ID information in the current packet info which can be matched by - * conversation_get_endpoint_by_id. Does not support wildcarding. + * conversation_get_conversation_key_by_id. Does not support wildcarding. * @param pinfo Packet info. - * @param etype The endpoint type. + * @param ctype The conversation type. * @param id A unique ID. */ -WS_DLL_PUBLIC void conversation_create_endpoint_by_id(struct _packet_info *pinfo, - endpoint_type etype, guint32 id); +WS_DLL_PUBLIC void conversation_create_key_by_id(struct _packet_info *pinfo, + conversation_type ctype, guint32 id); /** - * @brief conversation_get_endpoint_by_id + * @brief Get the ID value from the conversation key in the packet info. * @param pinfo Packet info. - * @param etype The endpoint type. + * @param ctype The conversation type. * @param options USE_LAST_ENDPOINT or 0. - * @return The endpoint ID if successful, or 0 on failure. + * @return The ID value from the conversation key if successful, or 0 + * on failure. */ -WS_DLL_PUBLIC guint32 conversation_get_endpoint_by_id(struct _packet_info *pinfo, - endpoint_type etype, const guint options); +WS_DLL_PUBLIC guint32 conversation_get_id_from_key(struct _packet_info *pinfo, + conversation_type ctype, const guint options); /** * Given two address/port pairs for a packet, search for a matching @@ -338,11 +384,11 @@ WS_DLL_PUBLIC guint32 conversation_get_endpoint_by_id(struct _packet_info *pinfo * Our caller is responsible to call the data dissector explicitly in case * this function returns FALSE. */ -WS_DLL_PUBLIC gboolean try_conversation_dissector(const address *addr_a, const address *addr_b, const endpoint_type etype, +WS_DLL_PUBLIC gboolean try_conversation_dissector(const address *addr_a, const address *addr_b, const conversation_type ctype, const guint32 port_a, const guint32 port_b, tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data, const guint options); -WS_DLL_PUBLIC gboolean try_conversation_dissector_by_id(const endpoint_type etype, const guint32 id, tvbuff_t *tvb, +WS_DLL_PUBLIC gboolean try_conversation_dissector_by_id(const conversation_type ctype, const guint32 id, tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data); /* These routines are used to set undefined values for a conversation */ @@ -369,11 +415,11 @@ WS_DLL_PUBLIC void conversation_set_addr2(conversation_t *conv, const address *a */ WS_DLL_PUBLIC wmem_map_t *get_conversation_hashtables(void); -/* Temporary function to handle port_type to endpoint_type conversion +/* Temporary function to handle port_type to conversation_type conversion For now it's a 1-1 mapping, but the intention is to remove - many of the port_type instances in favor of endpoint_type + many of the port_type instances in favor of conversation_type */ -WS_DLL_PUBLIC endpoint_type conversation_pt_to_endpoint_type(port_type pt); +WS_DLL_PUBLIC conversation_type conversation_pt_to_conversation_type(port_type pt); #ifdef __cplusplus } diff --git a/epan/conversation_table.c b/epan/conversation_table.c index 6d8d75ae33..304717d8a0 100644 --- a/epan/conversation_table.c +++ b/epan/conversation_table.c @@ -329,22 +329,42 @@ char *get_conversation_address(wmem_allocator_t *allocator, address *addr, gbool } } -char *get_conversation_port(wmem_allocator_t *allocator, guint32 port, endpoint_type etype, gboolean resolve_names) +char *get_conversation_port(wmem_allocator_t *allocator, guint32 port, conversation_type ctype, gboolean resolve_names) { + if(!resolve_names) ctype = CONVERSATION_NONE; + + switch(ctype) { + case(CONVERSATION_TCP): + return tcp_port_to_display(allocator, port); + case(CONVERSATION_UDP): + return udp_port_to_display(allocator, port); + case(CONVERSATION_SCTP): + return sctp_port_to_display(allocator, port); + case(CONVERSATION_DCCP): + return dccp_port_to_display(allocator, port); + default: + return wmem_strdup_printf(allocator, "%d", port); + } +} + +char *get_endpoint_port(wmem_allocator_t *allocator, endpoint_item_t *item, gboolean resolve_names) +{ + endpoint_type etype = item->etype; + if(!resolve_names) etype = ENDPOINT_NONE; switch(etype) { case(ENDPOINT_TCP): - return tcp_port_to_display(allocator, port); + return tcp_port_to_display(allocator, item->port); case(ENDPOINT_UDP): - return udp_port_to_display(allocator, port); + return udp_port_to_display(allocator, item->port); case(ENDPOINT_SCTP): - return sctp_port_to_display(allocator, port); + return sctp_port_to_display(allocator, item->port); case(ENDPOINT_DCCP): - return dccp_port_to_display(allocator, port); + return dccp_port_to_display(allocator, item->port); default: - return wmem_strdup_printf(allocator, "%d", port); + return wmem_strdup_printf(allocator, "%d", item->port); } } @@ -380,13 +400,13 @@ endpoint_get_filter_name(endpoint_item_t *endpoint, conv_filter_type_e filter_ty /* Convert a port number into a string or NULL */ static char * -ct_port_to_str(endpoint_type etype, guint32 port) +ct_port_to_str(conversation_type ctype, guint32 port) { - switch(etype){ - case ENDPOINT_TCP: - case ENDPOINT_UDP: - case ENDPOINT_SCTP: - case ENDPOINT_NCP: + switch(ctype){ + case CONVERSATION_TCP: + case CONVERSATION_UDP: + case CONVERSATION_SCTP: + case CONVERSATION_NCP: return ws_strdup_printf("%d", port); default: break; @@ -405,8 +425,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->etype, conv_item->src_port); - dport = ct_port_to_str(conv_item->etype, conv_item->dst_port); + sport = ct_port_to_str(conv_item->ctype, conv_item->src_port); + dport = ct_port_to_str(conv_item->ctype, conv_item->dst_port); src_addr = address_to_str(NULL, &conv_item->src_address); dst_addr = address_to_str(NULL, &conv_item->dst_address); @@ -563,7 +583,17 @@ char *get_endpoint_filter(endpoint_item_t *endpoint_item) if (usb_address_type == -1) usb_address_type = address_type_get_by_name("AT_USB"); - sport = ct_port_to_str(endpoint_item->etype, endpoint_item->port); + switch(endpoint_item->etype){ + case ENDPOINT_TCP: + case ENDPOINT_UDP: + case ENDPOINT_SCTP: + case ENDPOINT_NCP: + sport = ws_strdup_printf("%d", endpoint_item->port); + break; + default: + sport = NULL; + break; + } src_addr = address_to_str(NULL, &endpoint_item->myaddress); if (endpoint_item->myaddress.type == AT_STRINGZ || endpoint_item->myaddress.type == usb_address_type) { char *new_addr; @@ -594,9 +624,9 @@ char *get_hostlist_filter(endpoint_item_t *endpoint_item) 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, endpoint_type etype) + nstime_t *ts, nstime_t *abs_ts, ct_dissector_info_t *ct_info, conversation_type ctype) { - 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); + 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, ctype); } void @@ -612,7 +642,7 @@ add_conversation_table_data_with_conv_id( nstime_t *ts, nstime_t *abs_ts, ct_dissector_info_t *ct_info, - endpoint_type etype) + conversation_type ctype) { conv_item_t *conv_item = NULL; gboolean is_fwd_direction = FALSE; /* direction of any conversation found */ @@ -664,7 +694,7 @@ add_conversation_table_data_with_conv_id( copy_address(&new_conv_item.src_address, src); copy_address(&new_conv_item.dst_address, dst); new_conv_item.dissector_info = ct_info; - new_conv_item.etype = etype; + new_conv_item.ctype = ctype; new_conv_item.src_port = src_port; new_conv_item.dst_port = dst_port; new_conv_item.conv_id = conv_id; diff --git a/epan/conversation_table.h b/epan/conversation_table.h index a62df60141..cdd29a2cbf 100644 --- a/epan/conversation_table.h +++ b/epan/conversation_table.h @@ -112,12 +112,12 @@ typedef void (*endpoint_gui_init_cb)(struct register_ct* ct, const char *filter) */ typedef struct register_ct register_ct_t; -/** Conversation information */ +/** Conversation list information */ 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 */ - endpoint_type etype; /**< endpoint_type (e.g. ENDPOINT_TCP) */ + conversation_type ctype; /**< conversation key_type (e.g. CONVERSATION_TCP) */ guint32 src_port; /**< source port */ guint32 dst_port; /**< destination port */ conv_id_t conv_id; /**< conversation id */ @@ -294,11 +294,25 @@ 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 etype The endpoint type. + * @param ctype The conversation type. * @param resolve_names Enable name resolution. * @return A string representing the port. + * + * XXX - this should really be a *port* type, as we just supply a port. */ -WS_DLL_PUBLIC char *get_conversation_port(wmem_allocator_t *allocator, guint32 port, endpoint_type etype, gboolean resolve_names); +WS_DLL_PUBLIC char *get_conversation_port(wmem_allocator_t *allocator, guint32 port, conversation_type ctype, gboolean resolve_names); + +/** Get the string representation of the port for an endpoint_item_t. + * + * @param allocator The wmem allocator to use when allocating the string + * + * @param item Pointer to the endpoint_item_t + * @param resolve_names Enable name resolution. + * @return A string representing the port. + * + * XXX - this should really be a *port* type, as we just supply a port. + */ +WS_DLL_PUBLIC char *get_endpoint_port(wmem_allocator_t *allocator, endpoint_item_t *item, gboolean resolve_names); /** Get a display filter for the given conversation and direction. * @@ -332,11 +346,11 @@ WS_DLL_PUBLIC char *get_hostlist_filter(endpoint_item_t *endpoint_item); * @param ts timestamp * @param abs_ts absolute timestamp * @param ct_info callback handlers from the dissector - * @param etype the port type (e.g. PT_TCP) + * @param ctype the conversation type (e.g. CONVERSATION_TCP) */ 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, endpoint_type etype); + ct_dissector_info_t *ct_info, conversation_type ctype); /** 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 @@ -352,13 +366,14 @@ WS_DLL_PUBLIC void add_conversation_table_data(conv_hash_t *ch, const address *s * @param ts timestamp * @param abs_ts absolute timestamp * @param ct_info callback handlers from the dissector - * @param etype the conversation/endpoint type (e.g. ENDPOINT_TCP) + * @param ctype the conversation type (e.g. CONVERSATION_TCP) * @param conv_id a value to help differentiate the conversation in case the address and port quadruple is not sufficiently unique */ 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, endpoint_type etype); + nstime_t *ts, nstime_t *abs_ts, ct_dissector_info_t *ct_info, + conversation_type ctype); /** Add some data to the endpoint table. * @@ -369,7 +384,7 @@ add_conversation_table_data_with_conv_id(conv_hash_t *ch, const address *src, co * @param num_frames number of packets * @param num_bytes number of bytes * @param et_info endpoint information provided by dissector - * @param etype the conversation/endpoint type (e.g. ENDPOINT_TCP) + * @param etype the endpoint type (e.g. ENDPOINT_TCP) */ WS_DLL_PUBLIC void add_endpoint_table_data(conv_hash_t *ch, const address *addr, guint32 port, gboolean sender, int num_frames, int num_bytes, et_dissector_info_t *et_info, endpoint_type etype); diff --git a/epan/dissectors/asn1/h225/h225.cnf b/epan/dissectors/asn1/h225/h225.cnf index 567d0be433..28a22f83c1 100644 --- a/epan/dissectors/asn1/h225/h225.cnf +++ b/epan/dissectors/asn1/h225/h225.cnf @@ -603,9 +603,9 @@ IsupNumber/nationalStandardPartyNumber isupNationalStandardPartyNumber return offset; } - conv=find_conversation(actx->pinfo->num, &src_addr, &src_addr, ENDPOINT_TCP, ip_port, ip_port, NO_ADDR_B|NO_PORT_B); + conv=find_conversation(actx->pinfo->num, &src_addr, &src_addr, CONVERSATION_TCP, ip_port, ip_port, NO_ADDR_B|NO_PORT_B); if(!conv){ - conv=conversation_new(actx->pinfo->num, &src_addr, &src_addr, ENDPOINT_TCP, ip_port, ip_port, NO_ADDR2|NO_PORT2); + conv=conversation_new(actx->pinfo->num, &src_addr, &src_addr, CONVERSATION_TCP, ip_port, ip_port, NO_ADDR2|NO_PORT2); conversation_set_dissector(conv, h245_handle); } } diff --git a/epan/dissectors/asn1/kerberos/kerberos.cnf b/epan/dissectors/asn1/kerberos/kerberos.cnf index b4ed927d9c..3bfa93aca5 100644 --- a/epan/dissectors/asn1/kerberos/kerberos.cnf +++ b/epan/dissectors/asn1/kerberos/kerberos.cnf @@ -607,10 +607,10 @@ KrbFastArmorTypes PROT_PREFIX UPPER_CASE * http://www.ietf.org/internet-drafts/draft-ietf-krb-wg-kerberos-clarifications-07.txt */ if (actx->pinfo->destport == UDP_PORT_KERBEROS && actx->pinfo->ptype == PT_UDP) { - conversation = find_conversation(actx->pinfo->num, &actx->pinfo->src, &actx->pinfo->dst, ENDPOINT_UDP, + conversation = find_conversation(actx->pinfo->num, &actx->pinfo->src, &actx->pinfo->dst, CONVERSATION_UDP, actx->pinfo->srcport, 0, NO_PORT_B); if (conversation == NULL) { - conversation = conversation_new(actx->pinfo->num, &actx->pinfo->src, &actx->pinfo->dst, ENDPOINT_UDP, + conversation = conversation_new(actx->pinfo->num, &actx->pinfo->src, &actx->pinfo->dst, CONVERSATION_UDP, actx->pinfo->srcport, 0, NO_PORT2); conversation_set_dissector(conversation, kerberos_handle_udp); } diff --git a/epan/dissectors/asn1/nbap/nbap.cnf b/epan/dissectors/asn1/nbap/nbap.cnf index 96b71b2d27..c4f4dcbc46 100644 --- a/epan/dissectors/asn1/nbap/nbap.cnf +++ b/epan/dissectors/asn1/nbap/nbap.cnf @@ -1019,7 +1019,7 @@ nbap_private_data->transport_format_set_type = NBAP_CPCH; set_address(&dst_addr, AT_IPv4, 4, &transportLayerAddress_ipv4); - conversation = conversation_new(actx->pinfo->num, &dst_addr, &null_addr, ENDPOINT_UDP, bindingID, 0, NO_ADDR2|NO_PORT2); + conversation = conversation_new(actx->pinfo->num, &dst_addr, &null_addr, CONVERSATION_UDP, bindingID, 0, NO_ADDR2|NO_PORT2); conversation_set_dissector(conversation, fp_handle); @@ -1119,7 +1119,7 @@ nbap_private_data->num_items = 1; set_address(&dst_addr, AT_IPv4, 4, &transportLayerAddress_ipv4); - conversation = conversation_new(actx->pinfo->num, &dst_addr, &null_addr, ENDPOINT_UDP, bindingID, 0, NO_ADDR2|NO_PORT2); + conversation = conversation_new(actx->pinfo->num, &dst_addr, &null_addr, CONVERSATION_UDP, bindingID, 0, NO_ADDR2|NO_PORT2); /* Set dissector */ conversation_set_dissector(conversation, fp_handle); @@ -1229,7 +1229,7 @@ nbap_private_data->transport_format_set_type = NBAP_CPCH; set_address(&dst_addr, AT_IPv4, 4, &transportLayerAddress_ipv4); - conversation = conversation_new(actx->pinfo->num, &dst_addr, &null_addr, ENDPOINT_UDP, bindingID, 0, NO_ADDR2|NO_PORT2); + conversation = conversation_new(actx->pinfo->num, &dst_addr, &null_addr, CONVERSATION_UDP, bindingID, 0, NO_ADDR2|NO_PORT2); /* Set dissector */ conversation_set_dissector(conversation, fp_handle); @@ -1484,13 +1484,13 @@ nbap_private_data->dch_id = 0xFFFFFFFF; set_address(&dst_addr, AT_IPv4, 4, &transportLayerAddress_ipv4); conversation = find_conversation(actx->pinfo->num, &dst_addr, - &null_addr, ENDPOINT_UDP, nbap_private_data->binding_id_port, + &null_addr, CONVERSATION_UDP, nbap_private_data->binding_id_port, 0, NO_ADDR_B|NO_PORT_B); if (conversation == NULL) { /* It's not part of any conversation - create a new one. */ conversation = conversation_new(actx->pinfo->num, &dst_addr, - &null_addr, ENDPOINT_UDP, nbap_private_data->binding_id_port, + &null_addr, CONVERSATION_UDP, nbap_private_data->binding_id_port, 0, NO_ADDR2|NO_PORT2); /* Set dissector */ @@ -1593,7 +1593,7 @@ nbap_private_data->binding_id_port = 0; set_address(&dst_addr, AT_IPv4, 4, &transportLayerAddress_ipv4); conversation = find_conversation(actx->pinfo->num, &dst_addr, - &null_addr, ENDPOINT_UDP, bindingID, + &null_addr, CONVERSATION_UDP, bindingID, 0, NO_ADDR_B|NO_PORT_B); if (conversation) { umts_fp_conversation_info = (umts_fp_conversation_info_t*)conversation_get_proto_data(conversation, proto_fp); @@ -1606,7 +1606,7 @@ nbap_private_data->binding_id_port = 0; /* It's not part of any conversation - create a new one. */ conversation = conversation_new(actx->pinfo->num, &dst_addr, - &null_addr, ENDPOINT_UDP, bindingID, + &null_addr, CONVERSATION_UDP, bindingID, 0, NO_ADDR2|NO_PORT2); /* Set dissector */ @@ -1693,7 +1693,7 @@ nbap_edch_channel_info = nbap_private_data->nbap_edch_channel_info; e_dch_macdflow_id = nbap_private_data->e_dch_macdflow_id; clear_address(&null_addr); p_conv = find_conversation(actx->pinfo->num, &nbap_edch_channel_info[e_dch_macdflow_id].crnc_address, &null_addr, - ENDPOINT_UDP, nbap_edch_channel_info[e_dch_macdflow_id].crnc_port, 0, NO_ADDR_B); + CONVERSATION_UDP, nbap_edch_channel_info[e_dch_macdflow_id].crnc_port, 0, NO_ADDR_B); if(!p_conv) return offset; @@ -1767,7 +1767,7 @@ nbap_private_data->binding_id_port = 0; set_address(&dst_addr, AT_IPv4, 4, &transportLayerAddress_ipv4); old_conversation = find_conversation(actx->pinfo->num, &dst_addr, - &null_addr, ENDPOINT_UDP, bindingID, + &null_addr, CONVERSATION_UDP, bindingID, 0, NO_ADDR_B|NO_PORT_B); if(old_conversation){ @@ -1782,7 +1782,7 @@ nbap_private_data->binding_id_port = 0; /* It's not part of any conversation - create a new one. */ conversation = conversation_new(actx->pinfo->num, &dst_addr, - &null_addr, ENDPOINT_UDP, bindingID, + &null_addr, CONVERSATION_UDP, bindingID, 0, NO_ADDR2|NO_PORT2); /* Set dissector */ @@ -1876,7 +1876,7 @@ nbap_private_data->num_items = 1; /* Check if we have conversation info */ clear_address(&null_addr); p_conv = find_conversation(actx->pinfo->num, &nbap_edch_channel_info[e_dch_macdflow_id].crnc_address, &null_addr, - ENDPOINT_UDP, nbap_edch_channel_info[e_dch_macdflow_id].crnc_port, 0, NO_ADDR_B); + CONVERSATION_UDP, nbap_edch_channel_info[e_dch_macdflow_id].crnc_port, 0, NO_ADDR_B); if(!p_conv) return offset; @@ -2134,13 +2134,13 @@ nbap_hsdsch_channel_info = nbap_get_private_data(actx->pinfo)->nbap_hsdsch_chann address_to_str (actx->pinfo->pool, &(nbap_hsdsch_channel_info[i].crnc_address)), nbap_hsdsch_channel_info[i].crnc_port); conversation = find_conversation(actx->pinfo->num, &(nbap_hsdsch_channel_info[i].crnc_address), &null_addr, - ENDPOINT_UDP, nbap_hsdsch_channel_info[i].crnc_port, 0, NO_ADDR_B); + CONVERSATION_UDP, nbap_hsdsch_channel_info[i].crnc_port, 0, NO_ADDR_B); if (conversation == NULL) { /* It's not part of any conversation - create a new one. */ nbap_debug("Frame %%u HSDSCH-MACdFlows-Information: Set up conv on Port %%u", actx->pinfo->num, nbap_hsdsch_channel_info[i].crnc_port); conversation = conversation_new(actx->pinfo->num, &(nbap_hsdsch_channel_info[i].crnc_address), - &null_addr, ENDPOINT_UDP, nbap_hsdsch_channel_info[i].crnc_port, + &null_addr, CONVERSATION_UDP, nbap_hsdsch_channel_info[i].crnc_port, 0, NO_ADDR2|NO_PORT2); /* Set dissector */ @@ -2259,14 +2259,14 @@ nbap_hsdsch_channel_info = nbap_get_private_data(actx->pinfo)->nbap_hsdsch_chann address_to_str (actx->pinfo->pool, &(nbap_hsdsch_channel_info[i].crnc_address)), nbap_hsdsch_channel_info[i].crnc_port); conversation = find_conversation(actx->pinfo->num, &(nbap_hsdsch_channel_info[i].crnc_address), &null_addr, - ENDPOINT_UDP, nbap_hsdsch_channel_info[i].crnc_port, 0, NO_ADDR_B); + CONVERSATION_UDP, nbap_hsdsch_channel_info[i].crnc_port, 0, NO_ADDR_B); if (conversation == NULL) { /* It's not part of any conversation - create a new one. */ nbap_debug(" Set up conv on Port %%u", nbap_hsdsch_channel_info[i].crnc_port); conversation = conversation_new(actx->pinfo->num, &(nbap_hsdsch_channel_info[i].crnc_address), - &null_addr, ENDPOINT_UDP, nbap_hsdsch_channel_info[i].crnc_port, + &null_addr, CONVERSATION_UDP, nbap_hsdsch_channel_info[i].crnc_port, 0, NO_ADDR2|NO_PORT2); /* Set dissector */ @@ -2397,11 +2397,11 @@ int i; if (nbap_common_channel_info[i].crnc_port != 0){ conversation = find_conversation(actx->pinfo->num, &(nbap_common_channel_info[i].crnc_address), &null_addr, - ENDPOINT_UDP, nbap_common_channel_info[i].crnc_port, 0, NO_ADDR_B); + CONVERSATION_UDP, nbap_common_channel_info[i].crnc_port, 0, NO_ADDR_B); if (conversation == NULL) { conversation = conversation_new(actx->pinfo->num, &(nbap_common_channel_info[i].crnc_address), - &null_addr, ENDPOINT_UDP, nbap_common_channel_info[i].crnc_port, + &null_addr, CONVERSATION_UDP, nbap_common_channel_info[i].crnc_port, 0, NO_ADDR2|NO_PORT2); /* Set dissector */ @@ -2507,7 +2507,7 @@ nbap_hsdsch_channel_info = nbap_private_data->nbap_hsdsch_channel_info; for (i = 0; i < maxNrOfMACdFlows; i++) { if (nbap_hsdsch_channel_info[i].crnc_port != 0){ conversation = find_conversation(actx->pinfo->num, &(nbap_hsdsch_channel_info[i].crnc_address), &null_addr, - ENDPOINT_UDP, nbap_hsdsch_channel_info[i].crnc_port, 0, NO_ADDR_B); + CONVERSATION_UDP, nbap_hsdsch_channel_info[i].crnc_port, 0, NO_ADDR_B); if(conversation != NULL){ umts_fp_conversation_info = (umts_fp_conversation_info_t *)conversation_get_proto_data(conversation, proto_fp); DISSECTOR_ASSERT(umts_fp_conversation_info != NULL); diff --git a/epan/dissectors/asn1/nbap/packet-nbap-template.c b/epan/dissectors/asn1/nbap/packet-nbap-template.c index f744fcc3cf..68c44084a2 100644 --- a/epan/dissectors/asn1/nbap/packet-nbap-template.c +++ b/epan/dissectors/asn1/nbap/packet-nbap-template.c @@ -482,12 +482,12 @@ static void add_hsdsch_bind(packet_info *pinfo){ clear_address(&null_addr); for (i = 0; i < maxNrOfMACdFlows; i++) { if (nbap_hsdsch_channel_info[i].crnc_port != 0){ - conversation = find_conversation(pinfo->num, &(nbap_hsdsch_channel_info[i].crnc_address), &null_addr, ENDPOINT_UDP, + conversation = find_conversation(pinfo->num, &(nbap_hsdsch_channel_info[i].crnc_address), &null_addr, CONVERSATION_UDP, nbap_hsdsch_channel_info[i].crnc_port, 0, NO_ADDR_B); if (conversation == NULL) { /* It's not part of any conversation - create a new one. */ - conversation = conversation_new(pinfo->num, &(nbap_hsdsch_channel_info[i].crnc_address), &null_addr, ENDPOINT_UDP, + conversation = conversation_new(pinfo->num, &(nbap_hsdsch_channel_info[i].crnc_address), &null_addr, CONVERSATION_UDP, nbap_hsdsch_channel_info[i].crnc_port, 0, NO_ADDR2|NO_PORT2); /* Set dissector */ diff --git a/epan/dissectors/asn1/rrc/rrc.cnf b/epan/dissectors/asn1/rrc/rrc.cnf index 11e241d23a..7a8c233a57 100644 --- a/epan/dissectors/asn1/rrc/rrc.cnf +++ b/epan/dissectors/asn1/rrc/rrc.cnf @@ -1313,7 +1313,7 @@ HNBName TYPE=FT_STRING DISPLAY=BASE_NONE /* Finding FP conversation info */ p_conv = (conversation_t *)find_conversation(actx->pinfo->num, &actx->pinfo->net_dst, &actx->pinfo->net_src, - conversation_pt_to_endpoint_type(actx->pinfo->ptype), + conversation_pt_to_conversation_type(actx->pinfo->ptype), actx->pinfo->destport, actx->pinfo->srcport, NO_ADDR_B); /* If the current FP channel is FACH, Adding the C-RNTI / U-RNTI match to the FACH's RNTIs map*/ diff --git a/epan/dissectors/asn1/snmp/packet-snmp-template.c b/epan/dissectors/asn1/snmp/packet-snmp-template.c index 6e159e296a..5421f97a63 100644 --- a/epan/dissectors/asn1/snmp/packet-snmp-template.c +++ b/epan/dissectors/asn1/snmp/packet-snmp-template.c @@ -1927,11 +1927,11 @@ snmp_find_conversation_and_get_conv_data(packet_info *pinfo) { conversation_t *conversation; snmp_conv_info_t *snmp_info = NULL; - conversation = find_conversation(pinfo->fd->num, &pinfo->src, &pinfo->dst, conversation_pt_to_endpoint_type(pinfo->ptype), + conversation = find_conversation(pinfo->fd->num, &pinfo->src, &pinfo->dst, conversation_pt_to_conversation_type(pinfo->ptype), pinfo->srcport, pinfo->destport, 0); if( (conversation == NULL) || (conversation_get_dissector(conversation, pinfo->num)!=snmp_handle) ) { - conversation = conversation_new(pinfo->num, &pinfo->src, &pinfo->dst, conversation_pt_to_endpoint_type(pinfo->ptype), + conversation = conversation_new(pinfo->num, &pinfo->src, &pinfo->dst, conversation_pt_to_conversation_type(pinfo->ptype), pinfo->srcport, pinfo->destport, 0); conversation_set_dissector(conversation, snmp_handle); } diff --git a/epan/dissectors/asn1/t38/packet-t38-template.c b/epan/dissectors/asn1/t38/packet-t38-template.c index 4fe733f7a0..f4c8b2582e 100644 --- a/epan/dissectors/asn1/t38/packet-t38-template.c +++ b/epan/dissectors/asn1/t38/packet-t38-template.c @@ -213,14 +213,14 @@ void t38_add_address(packet_info *pinfo, * Check if the ip address and port combination is not * already registered as a conversation. */ - p_conversation = find_conversation( setup_frame_number, addr, &null_addr, ENDPOINT_UDP, port, other_port, + p_conversation = find_conversation( setup_frame_number, addr, &null_addr, CONVERSATION_UDP, port, other_port, NO_ADDR_B | (!other_port ? NO_PORT_B : 0)); /* * If not, create a new conversation. */ if ( !p_conversation || p_conversation->setup_frame != setup_frame_number) { - p_conversation = conversation_new( setup_frame_number, addr, &null_addr, ENDPOINT_UDP, + p_conversation = conversation_new( setup_frame_number, addr, &null_addr, CONVERSATION_UDP, (guint32)port, (guint32)other_port, NO_ADDR2 | (!other_port ? NO_PORT2 : 0)); } @@ -408,13 +408,13 @@ init_t38_info_conv(packet_info *pinfo) /* find the conversation used for Reassemble and Setup Info */ p_conv = find_conversation(pinfo->num, &pinfo->net_dst, &pinfo->net_src, - conversation_pt_to_endpoint_type(pinfo->ptype), + conversation_pt_to_conversation_type(pinfo->ptype), pinfo->destport, pinfo->srcport, NO_ADDR_B | NO_PORT_B); /* create a conv if it doen't exist */ if (!p_conv) { p_conv = conversation_new(pinfo->num, &pinfo->net_src, &pinfo->net_dst, - conversation_pt_to_endpoint_type(pinfo->ptype), pinfo->srcport, pinfo->destport, NO_ADDR2 | NO_PORT2); + conversation_pt_to_conversation_type(pinfo->ptype), pinfo->srcport, pinfo->destport, NO_ADDR2 | NO_PORT2); /* Set dissector */ conversation_set_dissector(p_conv, t38_udp_handle); diff --git a/epan/dissectors/packet-aeron.c b/epan/dissectors/packet-aeron.c index e7d6984c11..07ab932d7f 100644 --- a/epan/dissectors/packet-aeron.c +++ b/epan/dissectors/packet-aeron.c @@ -390,10 +390,10 @@ static aeron_transport_t * aeron_transport_add(const aeron_conversation_info_t * conversation_t * conv; wmem_map_t * session_map; - conv = find_conversation(frame, cinfo->addr1, cinfo->addr2, ENDPOINT_UDP, cinfo->port1, cinfo->port2, 0); + conv = find_conversation(frame, cinfo->addr1, cinfo->addr2, CONVERSATION_UDP, cinfo->port1, cinfo->port2, 0); if (conv == NULL) { - conv = conversation_new(frame, cinfo->addr1, cinfo->addr2, ENDPOINT_UDP, cinfo->port1, cinfo->port2, 0); + conv = conversation_new(frame, cinfo->addr1, cinfo->addr2, CONVERSATION_UDP, cinfo->port1, cinfo->port2, 0); } if (frame > conv->last_frame) { diff --git a/epan/dissectors/packet-ansi_tcap.c b/epan/dissectors/packet-ansi_tcap.c index 8bf87cfc11..15191dd0e6 100644 --- a/epan/dissectors/packet-ansi_tcap.c +++ b/epan/dissectors/packet-ansi_tcap.c @@ -1773,7 +1773,7 @@ proto_register_ansi_tcap(void) expert_ansi_tcap = expert_register_protocol(proto_ansi_tcap); expert_register_field_array(expert_ansi_tcap, ei, array_length(ei)); - ansi_tcap_module = prefs_register_protocol(proto_ansi_tcap, NULL); + ansi_tcap_module = prefs_register_protocol(proto_ansi_tcap, proto_reg_handoff_ansi_tcap); prefs_register_enum_preference(ansi_tcap_module, "transaction.matchtype", "Type of matching invoke/response", diff --git a/epan/dissectors/packet-asphodel.c b/epan/dissectors/packet-asphodel.c index 2aec1986b0..51bb1d09bc 100644 --- a/epan/dissectors/packet-asphodel.c +++ b/epan/dissectors/packet-asphodel.c @@ -501,10 +501,10 @@ dissect_asphodel_response(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, v proto_tree_add_item(asphodel_tree, hf_asphodel_remote_stream_packet_length, tvb, offset + 4, 2, ENC_BIG_ENDIAN); } - conversation = find_conversation(pinfo->num, &pinfo->src, 0, ENDPOINT_UDP, pinfo->srcport, 0, NO_ADDR_B | NO_PORT_B); + conversation = find_conversation(pinfo->num, &pinfo->src, 0, CONVERSATION_UDP, pinfo->srcport, 0, NO_ADDR_B | NO_PORT_B); if (!conversation) { - conversation = conversation_new(pinfo->num, &pinfo->src, 0, ENDPOINT_TCP, pinfo->srcport, 0, NO_ADDR2 | NO_PORT2); + conversation = conversation_new(pinfo->num, &pinfo->src, 0, CONVERSATION_TCP, pinfo->srcport, 0, NO_ADDR2 | NO_PORT2); conversation_set_dissector(conversation, asphodel_tcp_handle); } @@ -538,10 +538,10 @@ dissect_asphodel_inquiry(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, vo } } - conversation = find_conversation(pinfo->num, &pinfo->src, 0, ENDPOINT_UDP, pinfo->srcport, 0, NO_ADDR_B | NO_PORT_B); + conversation = find_conversation(pinfo->num, &pinfo->src, 0, CONVERSATION_UDP, pinfo->srcport, 0, NO_ADDR_B | NO_PORT_B); if (!conversation) { - conversation = conversation_new(pinfo->num, &pinfo->src, 0, ENDPOINT_UDP, pinfo->srcport, 0, NO_ADDR2 | NO_PORT2); + conversation = conversation_new(pinfo->num, &pinfo->src, 0, CONVERSATION_UDP, pinfo->srcport, 0, NO_ADDR2 | NO_PORT2); conversation_set_dissector(conversation, asphodel_response_handle); } diff --git a/epan/dissectors/packet-at.c b/epan/dissectors/packet-at.c index 8e8e4e0bd2..6f9ee0dd36 100644 --- a/epan/dissectors/packet-at.c +++ b/epan/dissectors/packet-at.c @@ -2491,7 +2491,7 @@ static int dissect_at(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* conversation = find_conversation(pinfo->num, &pinfo->src, &pinfo->dst, - conversation_pt_to_endpoint_type(pinfo->ptype), + conversation_pt_to_conversation_type(pinfo->ptype), pinfo->srcport, pinfo->destport, 0); at_conv = get_at_conv_info(conversation); at_info = get_at_packet_info(pinfo, at_conv); diff --git a/epan/dissectors/packet-atalk.c b/epan/dissectors/packet-atalk.c index 5e291d013e..859a7e378c 100644 --- a/epan/dissectors/packet-atalk.c +++ b/epan/dissectors/packet-atalk.c @@ -891,7 +891,7 @@ dissect_atp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) call_dissector_with_data(sub, new_tvb, pinfo, tree, &aspinfo); conversation_set_dissector(conversation, sub); } - else if (!try_conversation_dissector(&pinfo->src, &pinfo->dst, conversation_pt_to_endpoint_type(pinfo->ptype), + else if (!try_conversation_dissector(&pinfo->src, &pinfo->dst, conversation_pt_to_conversation_type(pinfo->ptype), pinfo->srcport, pinfo->destport, new_tvb,pinfo, tree, &aspinfo, 0)) { call_data_dissector(new_tvb, pinfo, tree); diff --git a/epan/dissectors/packet-bluetooth.c b/epan/dissectors/packet-bluetooth.c index d0ca4ca1a1..448bfcac57 100644 --- a/epan/dissectors/packet-bluetooth.c +++ b/epan/dissectors/packet-bluetooth.c @@ -4435,7 +4435,7 @@ bluetooth_conversation_packet(void *pct, packet_info *pinfo, hash->flags = flags; 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, ENDPOINT_NONE); + &bluetooth_ct_dissector_info, CONVERSATION_NONE); return TAP_PACKET_REDRAW; } @@ -4463,7 +4463,7 @@ get_conversation(packet_info *pinfo, conversation = find_conversation(pinfo->num, src_addr, dst_addr, - ENDPOINT_BLUETOOTH, + CONVERSATION_BLUETOOTH, src_endpoint, dst_endpoint, 0); if (conversation) { return conversation; @@ -4471,7 +4471,7 @@ get_conversation(packet_info *pinfo, conversation = conversation_new(pinfo->num, src_addr, dst_addr, - ENDPOINT_BLUETOOTH, + CONVERSATION_BLUETOOTH, src_endpoint, dst_endpoint, 0); return conversation; } diff --git a/epan/dissectors/packet-bt-utp.c b/epan/dissectors/packet-bt-utp.c index 63cccef93e..23c73a9dce 100644 --- a/epan/dissectors/packet-bt-utp.c +++ b/epan/dissectors/packet-bt-utp.c @@ -246,7 +246,7 @@ get_utp_stream_info(packet_info *pinfo, utp_info_t *utp_info) /* SYN packets are special, they have the connection ID for the other * side, and allow us to know both. */ - conv = find_conversation(pinfo->num, &pinfo->src, &pinfo->dst, ENDPOINT_BT_UTP, + conv = find_conversation(pinfo->num, &pinfo->src, &pinfo->dst, CONVERSATION_BT_UTP, id_up, utp_info->connection, 0); if (!conv) { /* XXX: A SYN for between the same pair of hosts with a duplicate @@ -257,7 +257,7 @@ get_utp_stream_info(packet_info *pinfo, utp_info_t *utp_info) * number matches. (The latter still doesn't help if the client also * doesn't start with random sequence numbers.) */ - conv = conversation_new(pinfo->num, &pinfo->src, &pinfo->dst, ENDPOINT_BT_UTP, id_up, utp_info->connection, 0); + conv = conversation_new(pinfo->num, &pinfo->src, &pinfo->dst, CONVERSATION_BT_UTP, id_up, utp_info->connection, 0); } } else { /* For non-SYN packets, we know our connection ID, but we don't know if @@ -267,21 +267,21 @@ get_utp_stream_info(packet_info *pinfo, utp_info_t *utp_info) * we have a wildcarded conversation around (if we've seen previous * non-SYN packets from our current direction but none in the other.) */ - conv = find_conversation(pinfo->num, &pinfo->src, &pinfo->dst, ENDPOINT_BT_UTP, utp_info->connection, 0, NO_PORT_B); + conv = find_conversation(pinfo->num, &pinfo->src, &pinfo->dst, CONVERSATION_BT_UTP, utp_info->connection, 0, NO_PORT_B); if (!conv) { /* Do we have a complete conversation originated by our src, or * possibly a wildcarded conversation originated in this direction * (but we saw a non-SYN for the non-initiating side first)? */ - conv = find_conversation(pinfo->num, &pinfo->src, &pinfo->dst, ENDPOINT_BT_UTP, utp_info->connection, id_up, 0); + conv = find_conversation(pinfo->num, &pinfo->src, &pinfo->dst, CONVERSATION_BT_UTP, utp_info->connection, id_up, 0); if (!conv) { /* As above, but dst initiated? */ - conv = find_conversation(pinfo->num, &pinfo->src, &pinfo->dst, ENDPOINT_BT_UTP, utp_info->connection, id_down, 0); + conv = find_conversation(pinfo->num, &pinfo->src, &pinfo->dst, CONVERSATION_BT_UTP, utp_info->connection, id_down, 0); if (!conv) { /* Didn't find it, so create a new wildcarded conversation. When we * get a packet for the other direction, find_conversation() above * will set port2 with the other connection ID. */ - conv = conversation_new(pinfo->num, &pinfo->src, &pinfo->dst, ENDPOINT_BT_UTP, utp_info->connection, 0, NO_PORT2); + conv = conversation_new(pinfo->num, &pinfo->src, &pinfo->dst, CONVERSATION_BT_UTP, utp_info->connection, 0, NO_PORT2); } } } diff --git a/epan/dissectors/packet-coap.c b/epan/dissectors/packet-coap.c index 075faa32a3..564d97765f 100644 --- a/epan/dissectors/packet-coap.c +++ b/epan/dissectors/packet-coap.c @@ -354,7 +354,7 @@ find_or_create_conversation_noaddrb(packet_info *pinfo, gboolean request) } /* Have we seen this conversation before? */ if((conv = find_conversation(pinfo->num, addr_a, addr_b, - conversation_pt_to_endpoint_type(pinfo->ptype), port_a, + conversation_pt_to_conversation_type(pinfo->ptype), port_a, port_b, NO_ADDR_B|NO_PORT_B)) != NULL) { if (pinfo->num > conv->last_frame) { conv->last_frame = pinfo->num; @@ -362,7 +362,7 @@ find_or_create_conversation_noaddrb(packet_info *pinfo, gboolean request) } else { /* No, this is a new conversation. */ conv = conversation_new(pinfo->num, &pinfo->src, - &pinfo->dst, conversation_pt_to_endpoint_type(pinfo->ptype), + &pinfo->dst, conversation_pt_to_conversation_type(pinfo->ptype), pinfo->srcport, pinfo->destport, NO_ADDR2|NO_PORT2); } } else { diff --git a/epan/dissectors/packet-dccp.c b/epan/dissectors/packet-dccp.c index 07b35d8b8d..d077804ea5 100644 --- a/epan/dissectors/packet-dccp.c +++ b/epan/dissectors/packet-dccp.c @@ -283,7 +283,7 @@ decode_dccp_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, ENDPOINT_DCCP, sport, + if (try_conversation_dissector(&pinfo->src, &pinfo->dst, CONVERSATION_DCCP, sport, dport, next_tvb, pinfo, tree, NULL, 0)) { return; } @@ -448,7 +448,7 @@ dccpip_conversation_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _U hash->flags = flags; const e_dccphdr *dccphdr=(const e_dccphdr *)vip; - add_conversation_table_data_with_conv_id(hash, &dccphdr->ip_src, &dccphdr->ip_dst, dccphdr->sport, dccphdr->dport, (conv_id_t) dccphdr->stream, 1, pinfo->fd->pkt_len, &pinfo->rel_ts, &pinfo->abs_ts, &dccp_ct_dissector_info, ENDPOINT_DCCP); + add_conversation_table_data_with_conv_id(hash, &dccphdr->ip_src, &dccphdr->ip_dst, dccphdr->sport, dccphdr->dport, (conv_id_t) dccphdr->stream, 1, pinfo->fd->pkt_len, &pinfo->rel_ts, &pinfo->abs_ts, &dccp_ct_dissector_info, CONVERSATION_DCCP); return TAP_PACKET_REDRAW; } @@ -560,7 +560,7 @@ static gchar *dccp_follow_conv_filter(epan_dissect_t *edt _U_, packet_info *pinf 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)) && (pinfo->ptype == PT_DCCP) && - (conv=find_conversation(pinfo->num, &pinfo->net_src, &pinfo->net_dst, ENDPOINT_DCCP, pinfo->srcport, pinfo->destport, 0)) != NULL) + (conv=find_conversation(pinfo->num, &pinfo->net_src, &pinfo->net_dst, CONVERSATION_DCCP, pinfo->srcport, pinfo->destport, 0)) != NULL) { /* DCCP over IPv4/6 */ dccpd = get_dccp_conversation_data(conv, pinfo); diff --git a/epan/dissectors/packet-dcerpc.c b/epan/dissectors/packet-dcerpc.c index 07b07dba33..0a39bb62a6 100644 --- a/epan/dissectors/packet-dcerpc.c +++ b/epan/dissectors/packet-dcerpc.c @@ -762,7 +762,7 @@ dcerpc_add_conv_to_bind_table(decode_dcerpc_bind_values_t *binding) 0, &binding->addr_a, &binding->addr_b, - conversation_pt_to_endpoint_type(binding->ptype), + conversation_pt_to_conversation_type(binding->ptype), binding->port_a, binding->port_b, 0); @@ -772,7 +772,7 @@ dcerpc_add_conv_to_bind_table(decode_dcerpc_bind_values_t *binding) 0, &binding->addr_a, &binding->addr_b, - conversation_pt_to_endpoint_type(binding->ptype), + conversation_pt_to_conversation_type(binding->ptype), binding->port_a, binding->port_b, 0); diff --git a/epan/dissectors/packet-dof.c b/epan/dissectors/packet-dof.c index 6fc7ba6610..47ad9c7502 100644 --- a/epan/dissectors/packet-dof.c +++ b/epan/dissectors/packet-dof.c @@ -5717,17 +5717,17 @@ static int dissect_dof_udp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, } */ /* Register the source address as being DPS for the sender UDP port. */ - conversation = find_conversation(pinfo->fd->num, &pinfo->src, &pinfo->dst, conversation_pt_to_endpoint_type(pinfo->ptype), pinfo->srcport, pinfo->destport, NO_ADDR_B | NO_PORT_B); + conversation = find_conversation(pinfo->fd->num, &pinfo->src, &pinfo->dst, conversation_pt_to_conversation_type(pinfo->ptype), pinfo->srcport, pinfo->destport, NO_ADDR_B | NO_PORT_B); if (!conversation) { - conversation = conversation_new(pinfo->fd->num, &pinfo->src, &pinfo->dst, conversation_pt_to_endpoint_type(pinfo->ptype), pinfo->srcport, pinfo->destport, NO_ADDR2 | NO_PORT2); + conversation = conversation_new(pinfo->fd->num, &pinfo->src, &pinfo->dst, conversation_pt_to_conversation_type(pinfo->ptype), pinfo->srcport, pinfo->destport, NO_ADDR2 | NO_PORT2); conversation_set_dissector(conversation, dof_udp_handle); } /* Find or create the conversation for this transport session. For UDP, the transport session is determined entirely by the * server port. This assumes that the first packet seen is from a client to the server. */ - conversation = find_conversation(pinfo->fd->num, &pinfo->dst, &pinfo->src, ENDPOINT_UDP, pinfo->destport, pinfo->srcport, NO_ADDR_B | NO_PORT_B); + conversation = find_conversation(pinfo->fd->num, &pinfo->dst, &pinfo->src, CONVERSATION_UDP, pinfo->destport, pinfo->srcport, NO_ADDR_B | NO_PORT_B); if (conversation) { /* TODO: Determine if this is valid or not. */ @@ -5736,7 +5736,7 @@ static int dissect_dof_udp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, } if (!conversation) - conversation = conversation_new(pinfo->fd->num, &pinfo->dst, &pinfo->src, ENDPOINT_UDP, pinfo->destport, pinfo->srcport, NO_ADDR2 | NO_PORT2 | CONVERSATION_TEMPLATE); + conversation = conversation_new(pinfo->fd->num, &pinfo->dst, &pinfo->src, CONVERSATION_UDP, pinfo->destport, pinfo->srcport, NO_ADDR2 | NO_PORT2 | CONVERSATION_TEMPLATE); transport_session = (udp_session_data *)conversation_get_proto_data(conversation, proto_2008_1_dof_udp); if (transport_session == NULL) diff --git a/epan/dissectors/packet-dpaux.c b/epan/dissectors/packet-dpaux.c index fd2797eb49..e9461e2f8f 100644 --- a/epan/dissectors/packet-dpaux.c +++ b/epan/dissectors/packet-dpaux.c @@ -177,7 +177,7 @@ dissect_dpaux_from_source(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) struct dpaux_transaction *transaction = NULL; conversation = conversation_new(pinfo->num, &pinfo->src, &pinfo->dst, - ENDPOINT_NONE, pinfo->srcport, pinfo->destport, 0); + CONVERSATION_NONE, pinfo->srcport, pinfo->destport, 0); transaction = wmem_new(wmem_file_scope(), struct dpaux_transaction); transaction->is_native = type; @@ -220,7 +220,7 @@ dissect_dpaux_from_sink(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) proto_item *ti; conversation = find_conversation(pinfo->num, &pinfo->src, &pinfo->dst, - ENDPOINT_NONE, pinfo->srcport, pinfo->destport, 0); + CONVERSATION_NONE, pinfo->srcport, pinfo->destport, 0); if (conversation) transaction = (struct dpaux_transaction*)conversation_get_proto_data( conversation, proto_dpaux); diff --git a/epan/dissectors/packet-drbd.c b/epan/dissectors/packet-drbd.c index 323be2bc0f..a8624abfbc 100644 --- a/epan/dissectors/packet-drbd.c +++ b/epan/dissectors/packet-drbd.c @@ -814,12 +814,12 @@ static conversation_t *find_drbd_conversation(packet_info *pinfo) addr_b = &pinfo->src; } - conversation_t *conv = find_conversation(pinfo->num, addr_a, addr_b, ENDPOINT_TCP, port_a, 0, NO_PORT_B); + conversation_t *conv = find_conversation(pinfo->num, addr_a, addr_b, CONVERSATION_TCP, port_a, 0, NO_PORT_B); if (!conv) { /* CONVERSATION_TEMPLATE prevents the port information being added once * a wildcard search matches. */ - conv = conversation_new(pinfo->num, addr_a, addr_b, ENDPOINT_TCP, port_a, 0, + conv = conversation_new(pinfo->num, addr_a, addr_b, CONVERSATION_TCP, port_a, 0, NO_PORT2|CONVERSATION_TEMPLATE); } diff --git a/epan/dissectors/packet-dvb-s2-bb.c b/epan/dissectors/packet-dvb-s2-bb.c index 300d13df2c..c5e0547bdd 100644 --- a/epan/dissectors/packet-dvb-s2-bb.c +++ b/epan/dissectors/packet-dvb-s2-bb.c @@ -1641,12 +1641,12 @@ static int dissect_dvb_s2_bb(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree virtual_id = isi; pinfo->p2p_dir = P2P_DIR_SENT; } - subcircuit = find_conversation_by_id(pinfo->num, ENDPOINT_DVBBBF, virtual_id); + subcircuit = find_conversation_by_id(pinfo->num, CONVERSATION_DVBBBF, virtual_id); if (subcircuit == NULL) { - subcircuit = conversation_new_by_id(pinfo->num, ENDPOINT_DVBBBF, virtual_id); + subcircuit = conversation_new_by_id(pinfo->num, CONVERSATION_DVBBBF, virtual_id); } - /* conversation_create_endpoint() could be useful for the subdissectors + /* conversation_create_key_by_address_port_pairs() could be useful for the subdissectors * this calls (whether GSE or TS, and replace passing the packet data * below), but it could cause problems when the subdissectors of those * subdissectors try and call find_or_create_conversation(). diff --git a/epan/dissectors/packet-dvbci.c b/epan/dissectors/packet-dvbci.c index 5fa6622c2d..53e77f6464 100644 --- a/epan/dissectors/packet-dvbci.c +++ b/epan/dissectors/packet-dvbci.c @@ -4426,7 +4426,7 @@ dissect_dvbci_spdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, break; } col_append_sep_str(pinfo->cinfo, COL_INFO, NULL, "Session opened"); - conv = conversation_new_by_id(pinfo->num, ENDPOINT_DVBCI, CT_ID(ssnb, tcid)); + conv = conversation_new_by_id(pinfo->num, CONVERSATION_DVBCI, CT_ID(ssnb, tcid)); /* we always add the resource id immediately after the circuit was created */ conversation_add_proto_data(conv, proto_dvbci, GUINT_TO_POINTER(res_id)); @@ -4447,7 +4447,7 @@ dissect_dvbci_spdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, ssnb = tvb_get_ntohs(tvb, offset+1); proto_tree_add_item(sess_tree, hf_dvbci_sess_nb, tvb, offset+1, 2, ENC_BIG_ENDIAN); - conv = find_conversation_by_id(pinfo->num, ENDPOINT_DVBCI, CT_ID(ssnb, tcid)); + conv = find_conversation_by_id(pinfo->num, CONVERSATION_DVBCI, CT_ID(ssnb, tcid)); if (conv) conv->last_frame = pinfo->num; break; @@ -4464,7 +4464,7 @@ dissect_dvbci_spdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, } if (ssnb && !conv) - conv = find_conversation_by_id(pinfo->num, ENDPOINT_DVBCI, CT_ID(ssnb, tcid)); + conv = find_conversation_by_id(pinfo->num, CONVERSATION_DVBCI, CT_ID(ssnb, tcid)); /* if the packet contains no resource id, we add the cached id from the circuit so that each packet has a resource id that can be diff --git a/epan/dissectors/packet-eap.c b/epan/dissectors/packet-eap.c index 6a3e175a5c..4229d5a14f 100644 --- a/epan/dissectors/packet-eap.c +++ b/epan/dissectors/packet-eap.c @@ -1848,7 +1848,7 @@ dissect_eap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_) } if (conversation == NULL) { conversation = conversation_new(pinfo_conv->num, &pinfo_conv->src, - &pinfo_conv->dst, conversation_pt_to_endpoint_type(pinfo_conv->ptype), + &pinfo_conv->dst, conversation_pt_to_conversation_type(pinfo_conv->ptype), pinfo_conv->srcport, pinfo_conv->destport, 0); } diff --git a/epan/dissectors/packet-enip.c b/epan/dissectors/packet-enip.c index 9259f671bf..4e5e526767 100644 --- a/epan/dissectors/packet-enip.c +++ b/epan/dissectors/packet-enip.c @@ -1172,11 +1172,11 @@ enip_conv_info_t* get_conversation_info_one_direction(packet_info* pinfo, addres // Similar logic to find_or_create_conversation(), but since I/O traffic // is on UDP, the pinfo parameter doesn't have the correct information. conversation_t* conversation = find_conversation(pinfo->num, src_address, &dest_address, - ENDPOINT_UDP, connid_info->port, 0, NO_PORT_B); + CONVERSATION_UDP, connid_info->port, 0, NO_PORT_B); if (conversation == NULL) { conversation = conversation_new(pinfo->num, src_address, &dest_address, - ENDPOINT_UDP, connid_info->port, 0, NO_PORT2); + CONVERSATION_UDP, connid_info->port, 0, NO_PORT2); } enip_conv_info_t* enip_info = (enip_conv_info_t*)conversation_get_proto_data(conversation, proto_enip); @@ -1356,7 +1356,7 @@ enip_get_io_connid(packet_info *pinfo, guint32 connid, enum enip_connid_type* pc */ conversation = find_conversation(pinfo->num, &pinfo->src, &pinfo->dst, - conversation_pt_to_endpoint_type(pinfo->ptype), + conversation_pt_to_conversation_type(pinfo->ptype), pinfo->destport, 0, NO_PORT_B); if (conversation == NULL) diff --git a/epan/dissectors/packet-epl.c b/epan/dissectors/packet-epl.c index 9efd797a94..908e35dc5d 100644 --- a/epan/dissectors/packet-epl.c +++ b/epan/dissectors/packet-epl.c @@ -2220,7 +2220,7 @@ epl_get_convo(packet_info *pinfo, int opts) node_addr = &epl_placeholder_mac; if ((epan_convo = find_conversation(pinfo->num, node_addr, node_addr, - conversation_pt_to_endpoint_type(pinfo->ptype), node_port, node_port, NO_ADDR_B|NO_PORT_B))) + conversation_pt_to_conversation_type(pinfo->ptype), node_port, node_port, NO_ADDR_B|NO_PORT_B))) { /* XXX Do I need to check setup_frame != pinfo->num in order to not * create unnecessary new conversations? @@ -2237,7 +2237,7 @@ epl_get_convo(packet_info *pinfo, int opts) { new_convo_creation: epan_convo = conversation_new(pinfo->num, node_addr, node_addr, - conversation_pt_to_endpoint_type(pinfo->ptype), node_port, node_port, NO_ADDR2|NO_PORT2); + conversation_pt_to_conversation_type(pinfo->ptype), node_port, node_port, NO_ADDR2|NO_PORT2); } convo = (struct epl_convo*)conversation_get_proto_data(epan_convo, proto_epl); diff --git a/epan/dissectors/packet-epmd.c b/epan/dissectors/packet-epmd.c index 3e3f56782c..9a23695b8d 100644 --- a/epan/dissectors/packet-epmd.c +++ b/epan/dissectors/packet-epmd.c @@ -246,7 +246,7 @@ dissect_epmd_response(packet_info *pinfo, tvbuff_t *tvb, gint offset, proto_tree } col_append_fstr(pinfo->cinfo, COL_INFO, " %s port=%d", name, port); if (!pinfo->fd->visited) { - conv = conversation_new(pinfo->num, &pinfo->src, &pinfo->dst, ENDPOINT_TCP, port, 0, NO_PORT2); + conv = conversation_new(pinfo->num, &pinfo->src, &pinfo->dst, CONVERSATION_TCP, port, 0, NO_PORT2); conversation_set_dissector(conv, edp_handle); } break; diff --git a/epan/dissectors/packet-eth.c b/epan/dissectors/packet-eth.c index 3089fe3133..9ac0977026 100644 --- a/epan/dissectors/packet-eth.c +++ b/epan/dissectors/packet-eth.c @@ -162,7 +162,7 @@ eth_conversation_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _U_, hash->flags = flags; 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, ENDPOINT_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, CONVERSATION_NONE); return TAP_PACKET_REDRAW; } diff --git a/epan/dissectors/packet-fc.c b/epan/dissectors/packet-fc.c index c561f0ee0d..d39cba3d53 100644 --- a/epan/dissectors/packet-fc.c +++ b/epan/dissectors/packet-fc.c @@ -201,7 +201,7 @@ fc_conversation_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _U_, c hash->flags = flags; 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, ENDPOINT_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, CONVERSATION_NONE); return TAP_PACKET_REDRAW; } @@ -722,9 +722,9 @@ dissect_fc_helper (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gboolean if(!is_ifcp){ set_address_tvb (&pinfo->dst, AT_FC, 3, tvb, offset+1); set_address_tvb (&pinfo->src, AT_FC, 3, tvb, offset+5); - conversation_create_endpoint(pinfo, &pinfo->src, &pinfo->dst, ENDPOINT_EXCHG, 0, 0); + conversation_create_key_by_address_port_pairs(pinfo, &pinfo->src, &pinfo->dst, CONVERSATION_EXCHG, 0, 0); } else { - conversation_create_endpoint(pinfo, &pinfo->src, &pinfo->dst, ENDPOINT_EXCHG, pinfo->srcport, pinfo->destport); + conversation_create_key_by_address_port_pairs(pinfo, &pinfo->src, &pinfo->dst, CONVERSATION_EXCHG, pinfo->srcport, pinfo->destport); } set_address(&fchdr->d_id, pinfo->dst.type, pinfo->dst.len, pinfo->dst.data); set_address(&fchdr->s_id, pinfo->src.type, pinfo->src.len, pinfo->src.data); diff --git a/epan/dissectors/packet-fcdns.c b/epan/dissectors/packet-fcdns.c index f6108014a6..9d1781d814 100644 --- a/epan/dissectors/packet-fcdns.c +++ b/epan/dissectors/packet-fcdns.c @@ -1472,11 +1472,11 @@ dissect_fcdns (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data) if ((opcode != FCCT_MSG_ACC) && (opcode != FCCT_MSG_RJT)) { conversation = find_conversation (pinfo->num, &pinfo->src, &pinfo->dst, - conversation_pt_to_endpoint_type(pinfo->ptype), fchdr->oxid, + conversation_pt_to_conversation_type(pinfo->ptype), fchdr->oxid, fchdr->rxid, NO_PORT_B); if (!conversation) { conversation = conversation_new (pinfo->num, &pinfo->src, &pinfo->dst, - conversation_pt_to_endpoint_type(pinfo->ptype), fchdr->oxid, + conversation_pt_to_conversation_type(pinfo->ptype), fchdr->oxid, fchdr->rxid, NO_PORT2); } @@ -1506,7 +1506,7 @@ dissect_fcdns (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data) else { /* Opcode is ACC or RJT */ conversation = find_conversation (pinfo->num, &pinfo->src, &pinfo->dst, - conversation_pt_to_endpoint_type(pinfo->ptype), fchdr->oxid, + conversation_pt_to_conversation_type(pinfo->ptype), fchdr->oxid, fchdr->rxid, NO_PORT_B); isreq = 0; if (!conversation) { diff --git a/epan/dissectors/packet-fcels.c b/epan/dissectors/packet-fcels.c index b426bb7a7d..e1f1ad388f 100644 --- a/epan/dissectors/packet-fcels.c +++ b/epan/dissectors/packet-fcels.c @@ -1859,12 +1859,12 @@ dissect_fcels (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data) new_options = NO_PORT2; } conversation = find_conversation (pinfo->num, &pinfo->dst, &pinfo->src, - conversation_pt_to_endpoint_type(pinfo->ptype), fchdr->oxid, + conversation_pt_to_conversation_type(pinfo->ptype), fchdr->oxid, fchdr->rxid, find_options); if (!conversation) { conversation = conversation_new (pinfo->num, &pinfo->dst, &pinfo->src, - conversation_pt_to_endpoint_type(pinfo->ptype), fchdr->oxid, + conversation_pt_to_conversation_type(pinfo->ptype), fchdr->oxid, fchdr->rxid, new_options); } @@ -1894,7 +1894,7 @@ dissect_fcels (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data) find_options = NO_PORT_B; conversation = find_conversation (pinfo->num, &pinfo->dst, &pinfo->src, - conversation_pt_to_endpoint_type(pinfo->ptype), fchdr->oxid, + conversation_pt_to_conversation_type(pinfo->ptype), fchdr->oxid, fchdr->rxid, find_options); if (!conversation) { /* FLOGI has two ways to save state: without the src and using just @@ -1916,7 +1916,7 @@ dissect_fcels (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data) addrdata[2] = dstfc[2]; set_address (&dstaddr, AT_FC, 3, addrdata); conversation = find_conversation (pinfo->num, &dstaddr, &pinfo->src, - conversation_pt_to_endpoint_type(pinfo->ptype), fchdr->oxid, + conversation_pt_to_conversation_type(pinfo->ptype), fchdr->oxid, fchdr->rxid, find_options); } @@ -1924,7 +1924,7 @@ dissect_fcels (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data) /* Finally check for FLOGI with both NO_PORT2 and NO_ADDR2 set */ find_options = NO_ADDR2 | NO_PORT2; conversation = find_conversation (pinfo->num, &pinfo->src, &pinfo->dst, - conversation_pt_to_endpoint_type(pinfo->ptype), fchdr->oxid, + conversation_pt_to_conversation_type(pinfo->ptype), fchdr->oxid, fchdr->rxid, find_options); if (!conversation) { if (tree && (opcode == FC_ELS_ACC)) { diff --git a/epan/dissectors/packet-fcfcs.c b/epan/dissectors/packet-fcfcs.c index 5d3bd2a277..a8239450d3 100644 --- a/epan/dissectors/packet-fcfcs.c +++ b/epan/dissectors/packet-fcfcs.c @@ -701,11 +701,11 @@ dissect_fcfcs (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data) if ((opcode != FCCT_MSG_ACC) && (opcode != FCCT_MSG_RJT)) { conversation = find_conversation (pinfo->num, &pinfo->src, &pinfo->dst, - conversation_pt_to_endpoint_type(pinfo->ptype), fchdr->oxid, + conversation_pt_to_conversation_type(pinfo->ptype), fchdr->oxid, fchdr->rxid, NO_PORT_B); if (!conversation) { conversation = conversation_new (pinfo->num, &pinfo->src, &pinfo->dst, - conversation_pt_to_endpoint_type(pinfo->ptype), fchdr->oxid, + conversation_pt_to_conversation_type(pinfo->ptype), fchdr->oxid, fchdr->rxid, NO_PORT2); } @@ -735,7 +735,7 @@ dissect_fcfcs (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data) else { /* Opcode is ACC or RJT */ conversation = find_conversation (pinfo->num, &pinfo->src, &pinfo->dst, - conversation_pt_to_endpoint_type(pinfo->ptype), fchdr->oxid, + conversation_pt_to_conversation_type(pinfo->ptype), fchdr->oxid, fchdr->rxid, NO_PORT_B); isreq = 0; if (!conversation) { diff --git a/epan/dissectors/packet-fcfzs.c b/epan/dissectors/packet-fcfzs.c index cbd84c3b91..1c2b764e85 100644 --- a/epan/dissectors/packet-fcfzs.c +++ b/epan/dissectors/packet-fcfzs.c @@ -524,11 +524,11 @@ dissect_fcfzs(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data) if ((opcode != FCCT_MSG_ACC) && (opcode != FCCT_MSG_RJT)) { conversation = find_conversation(pinfo->num, &pinfo->src, &pinfo->dst, - conversation_pt_to_endpoint_type(pinfo->ptype), fchdr->oxid, + conversation_pt_to_conversation_type(pinfo->ptype), fchdr->oxid, fchdr->rxid, NO_PORT_B); if (!conversation) { conversation = conversation_new(pinfo->num, &pinfo->src, &pinfo->dst, - conversation_pt_to_endpoint_type(pinfo->ptype), fchdr->oxid, + conversation_pt_to_conversation_type(pinfo->ptype), fchdr->oxid, fchdr->rxid, NO_PORT2); } @@ -559,7 +559,7 @@ dissect_fcfzs(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data) else { /* Opcode is ACC or RJT */ conversation = find_conversation(pinfo->num, &pinfo->src, &pinfo->dst, - conversation_pt_to_endpoint_type(pinfo->ptype), fchdr->oxid, + conversation_pt_to_conversation_type(pinfo->ptype), fchdr->oxid, fchdr->rxid, NO_PORT_B); isreq = FALSE; if (!conversation) { diff --git a/epan/dissectors/packet-fcsb3.c b/epan/dissectors/packet-fcsb3.c index d3c0ef72d6..11795f59fe 100644 --- a/epan/dissectors/packet-fcsb3.c +++ b/epan/dissectors/packet-fcsb3.c @@ -675,7 +675,7 @@ static int dissect_fc_sbccs (tvbuff_t *tvb, packet_info *pinfo, /* Retrieve conversation state to determine expected payload */ conversation = find_conversation (pinfo->num, &pinfo->src, &pinfo->dst, - ENDPOINT_SBCCS, ch_cu_id, dev_addr, 0); + CONVERSATION_SBCCS, ch_cu_id, dev_addr, 0); if (conversation) { #if 0 @@ -689,7 +689,7 @@ static int dissect_fc_sbccs (tvbuff_t *tvb, packet_info *pinfo, conversation = #endif conversation_new (pinfo->num, &pinfo->src, &pinfo->dst, - ENDPOINT_SBCCS, ch_cu_id, dev_addr, 0); + CONVERSATION_SBCCS, ch_cu_id, dev_addr, 0); #if 0 task_key.conv_id = conversation->index; task_key.task_id = ccw; diff --git a/epan/dissectors/packet-fcswils.c b/epan/dissectors/packet-fcswils.c index a9bcfa4b9c..4f4fbfc9eb 100644 --- a/epan/dissectors/packet-fcswils.c +++ b/epan/dissectors/packet-fcswils.c @@ -1680,11 +1680,11 @@ dissect_fcswils(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data) /* Register conversation if this is not a response */ if ((opcode != FC_SWILS_SWACC) && (opcode != FC_SWILS_SWRJT)) { conversation = find_conversation(pinfo->num, &pinfo->src, &pinfo->dst, - conversation_pt_to_endpoint_type(pinfo->ptype), fchdr->oxid, + conversation_pt_to_conversation_type(pinfo->ptype), fchdr->oxid, fchdr->rxid, NO_PORT_B); if (!conversation) { conversation = conversation_new(pinfo->num, &pinfo->src, &pinfo->dst, - conversation_pt_to_endpoint_type(pinfo->ptype), fchdr->oxid, + conversation_pt_to_conversation_type(pinfo->ptype), fchdr->oxid, fchdr->rxid, NO_PORT2); } @@ -1712,7 +1712,7 @@ dissect_fcswils(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data) else { /* Opcode is ACC or RJT */ conversation = find_conversation(pinfo->num, &pinfo->src, &pinfo->dst, - conversation_pt_to_endpoint_type(pinfo->ptype), fchdr->oxid, + conversation_pt_to_conversation_type(pinfo->ptype), fchdr->oxid, fchdr->rxid, NO_PORT_B); isreq = FC_SWILS_RPLY; if (!conversation) { diff --git a/epan/dissectors/packet-fddi.c b/epan/dissectors/packet-fddi.c index 7b34be0ed5..8fec793657 100644 --- a/epan/dissectors/packet-fddi.c +++ b/epan/dissectors/packet-fddi.c @@ -161,7 +161,7 @@ fddi_conversation_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _U_, hash->flags = flags; 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, ENDPOINT_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, CONVERSATION_NONE); return TAP_PACKET_REDRAW; } diff --git a/epan/dissectors/packet-fp_mux.c b/epan/dissectors/packet-fp_mux.c index 042cda22e8..5660dabd81 100644 --- a/epan/dissectors/packet-fp_mux.c +++ b/epan/dissectors/packet-fp_mux.c @@ -89,7 +89,7 @@ static void dissect_payload(tvbuff_t *next_tvb, packet_info *pinfo, proto_tree * p_add_proto_data(wmem_file_scope(), pinfo, proto_umts_rlc, 0, fp_mux_info->rlcinfos[payload_index]); /* Trying a dissector assigned to the conversation (Usually from NBAP) */ - conv_dissected = try_conversation_dissector(&pinfo->dst, &pinfo->src, ENDPOINT_UDP, + conv_dissected = try_conversation_dissector(&pinfo->dst, &pinfo->src, CONVERSATION_UDP, pinfo->destport, pinfo->srcport, next_tvb, pinfo, tree, NULL, 0); if (!conv_dissected) { /* No conversation dissector / TVB was rejected, try other options */ diff --git a/epan/dissectors/packet-fpp.c b/epan/dissectors/packet-fpp.c index 41210fac74..2f7a82a547 100644 --- a/epan/dissectors/packet-fpp.c +++ b/epan/dissectors/packet-fpp.c @@ -510,13 +510,13 @@ dissect_preemption(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { } prev_crc = 0; - conv = find_conversation_by_id(pinfo->num, ENDPOINT_NONE, interface_id | packet_direction); + conv = find_conversation_by_id(pinfo->num, CONVERSATION_NONE, interface_id | packet_direction); /* Create a conversation at every SMD-S fragment. Find the conversation for every SMD-C fragment.*/ if (pck_type == FPP_Packet_Init) { /* will be used for seeding the crc calculation */ if (!PINFO_FD_VISITED(pinfo)) { - conv = conversation_new_by_id(pinfo->num, ENDPOINT_NONE, interface_id | packet_direction); + conv = conversation_new_by_id(pinfo->num, CONVERSATION_NONE, interface_id | packet_direction); /* XXX Is this needed? */ find_conversation_pinfo(pinfo, 0); } diff --git a/epan/dissectors/packet-fr.c b/epan/dissectors/packet-fr.c index a4abdbf17c..269fadb385 100644 --- a/epan/dissectors/packet-fr.c +++ b/epan/dissectors/packet-fr.c @@ -506,7 +506,7 @@ dissect_fr_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_tree_add_uint(fr_tree, hf_fr_dlci, tvb, 0, offset, addr); } - conversation_create_endpoint_by_id(pinfo, ENDPOINT_DLCI, addr); + conversation_create_key_by_id(pinfo, CONVERSATION_DLCI, addr); col_add_fstr(pinfo->cinfo, COL_INFO, "DLCI %u", addr); } diff --git a/epan/dissectors/packet-ftp.c b/epan/dissectors/packet-ftp.c index c9003d7014..e7ace57328 100644 --- a/epan/dissectors/packet-ftp.c +++ b/epan/dissectors/packet-ftp.c @@ -388,7 +388,7 @@ static void create_and_link_data_conversation(packet_info *pinfo, ftp_data_conversation_t *p_ftp_data_conv; conversation_t *data_conversation = conversation_new(pinfo->num, addr_a, addr_b, - ENDPOINT_TCP, + CONVERSATION_TCP, port_a, port_b, NO_PORT2); conversation_set_dissector(data_conversation, ftpdata_handle); diff --git a/epan/dissectors/packet-geonw.c b/epan/dissectors/packet-geonw.c index 211502ef03..6eac35ec53 100644 --- a/epan/dissectors/packet-geonw.c +++ b/epan/dissectors/packet-geonw.c @@ -690,10 +690,10 @@ static geonw_transaction_t *transaction_start(packet_info * pinfo, proto_tree * proto_item *it; /* Handle the conversation tracking */ - conversation = find_conversation(pinfo->num, &pinfo->src, &pinfo->dst, conversation_pt_to_endpoint_type(pinfo->ptype), HT_LS, HT_LS, 0); + conversation = find_conversation(pinfo->num, &pinfo->src, &pinfo->dst, conversation_pt_to_conversation_type(pinfo->ptype), HT_LS, HT_LS, 0); if (conversation == NULL) { /* No, this is a new conversation. */ - conversation = conversation_new(pinfo->num, &pinfo->src, &pinfo->dst, conversation_pt_to_endpoint_type(pinfo->ptype), HT_LS, HT_LS, 0); + conversation = conversation_new(pinfo->num, &pinfo->src, &pinfo->dst, conversation_pt_to_conversation_type(pinfo->ptype), HT_LS, HT_LS, 0); } geonw_info = (geonw_conv_info_t *)conversation_get_proto_data(conversation, proto_geonw); if (geonw_info == NULL) { @@ -761,7 +761,7 @@ static geonw_transaction_t *transaction_end(packet_info * pinfo, proto_tree * tr nstime_t ns; double resp_time; - conversation = find_conversation(pinfo->num, &pinfo->src, &pinfo->dst, conversation_pt_to_endpoint_type(pinfo->ptype), HT_LS, HT_LS, 0); + conversation = find_conversation(pinfo->num, &pinfo->src, &pinfo->dst, conversation_pt_to_conversation_type(pinfo->ptype), HT_LS, HT_LS, 0); if (conversation == NULL) { return NULL; } diff --git a/epan/dissectors/packet-gsmtap.c b/epan/dissectors/packet-gsmtap.c index 298a15b5dd..e126635a45 100644 --- a/epan/dissectors/packet-gsmtap.c +++ b/epan/dissectors/packet-gsmtap.c @@ -853,7 +853,7 @@ dissect_gsmtap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _ /* Try to build an identifier of different 'streams' */ /* (AFCN _cant_ be used because of hopping */ - conversation_create_endpoint_by_id(pinfo, ENDPOINT_GSMTAP, (timeslot << 3) | subslot); + conversation_create_key_by_id(pinfo, CONVERSATION_GSMTAP, (timeslot << 3) | subslot); if (tree) { guint8 channel; diff --git a/epan/dissectors/packet-h223.c b/epan/dissectors/packet-h223.c index fce306e871..1250832d5e 100644 --- a/epan/dissectors/packet-h223.c +++ b/epan/dissectors/packet-h223.c @@ -395,10 +395,10 @@ init_logical_channel( guint32 start_frame, h223_call_info* call_info, int vc, in guint32 circuit_id = circuit_chain_lookup(call_info, vc); conversation_t *subcircuit; h223_vc_info *vc_info; - subcircuit = find_conversation_by_id( start_frame, ENDPOINT_H223, circuit_id); + subcircuit = find_conversation_by_id( start_frame, CONVERSATION_H223, circuit_id); if( subcircuit == NULL ) { - subcircuit = conversation_new_by_id( start_frame, ENDPOINT_H223, circuit_id); + subcircuit = conversation_new_by_id( start_frame, CONVERSATION_H223, circuit_id); #ifdef DEBUG_H223 ws_debug("%d: Created new circuit %d for call %p VC %d", start_frame, circuit_id, call_info, vc); #endif @@ -438,13 +438,13 @@ create_call_info( guint32 start_frame ) /* find or create call_info struct for calls over circuits (eg, IAX) */ static h223_call_info * -find_or_create_call_info_circ(packet_info * pinfo, endpoint_type etype, guint32 circuit_id) +find_or_create_call_info_circ(packet_info * pinfo, conversation_type ctype, guint32 circuit_id) { h223_call_info *datax; conversation_t *circ = NULL; - if(etype != ENDPOINT_NONE) - circ = find_conversation_by_id( pinfo->num, etype, circuit_id); + if(ctype != CONVERSATION_NONE) + circ = find_conversation_by_id( pinfo->num, ctype, circuit_id); if(circ == NULL) return NULL; @@ -493,7 +493,7 @@ find_or_create_call_info_conv(packet_info * pinfo) */ conv2 = find_conversation( pinfo->num, &pinfo->dst,&pinfo->src, - conversation_pt_to_endpoint_type(pinfo->ptype), + conversation_pt_to_conversation_type(pinfo->ptype), pinfo->destport,pinfo->srcport, 0 ); if(conv2 != NULL) datax = (h223_call_info *)conversation_get_proto_data(conv2, proto_h223); @@ -543,11 +543,11 @@ find_or_create_call_info_conv(packet_info * pinfo) } static h223_call_info * -find_or_create_call_info ( packet_info * pinfo, endpoint_type etype, guint32 circuit_id ) +find_or_create_call_info ( packet_info * pinfo, conversation_type ctype, guint32 circuit_id ) { h223_call_info *datax; - datax = find_or_create_call_info_circ(pinfo, etype, circuit_id); + datax = find_or_create_call_info_circ(pinfo, ctype, circuit_id); if(datax == NULL) datax = find_or_create_call_info_conv(pinfo); return datax; @@ -722,14 +722,15 @@ static void dissect_mux_sdu_fragment(tvbuff_t *volatile next_tvb, packet_info *pinfo, guint32 pkt_offset, proto_tree *pdu_tree, h223_call_info* call_info, guint16 vc, - gboolean end_of_mux_sdu, endpoint_type orig_etype, guint32 orig_circuit) + gboolean end_of_mux_sdu, conversation_type orig_ctype, + guint32 orig_circuit) { TRY { /* update the circuit details before passing to a subdissector */ guint32 circuit_id = circuit_chain_lookup(call_info, vc); - conversation_create_endpoint_by_id(pinfo, ENDPOINT_H223, circuit_id); + conversation_create_key_by_id(pinfo, CONVERSATION_H223, circuit_id); - conversation_t *subcircuit = find_conversation_by_id(pinfo->num, ENDPOINT_H223, circuit_id); + conversation_t *subcircuit = find_conversation_by_id(pinfo->num, CONVERSATION_H223, circuit_id); proto_tree *vc_tree; proto_item *vc_item; h223_vc_info *vc_info = NULL; @@ -793,7 +794,7 @@ dissect_mux_sdu_fragment(tvbuff_t *volatile next_tvb, packet_info *pinfo, /* restore the original circuit details for future PDUs */ FINALLY { - conversation_create_endpoint_by_id(pinfo, orig_etype, orig_circuit); + conversation_create_key_by_id(pinfo, orig_ctype, orig_circuit); } ENDTRY; } @@ -835,7 +836,8 @@ dissect_mux_payload_by_me_list( tvbuff_t *tvb, packet_info *pinfo, guint32 pkt_offset, proto_tree *pdu_tree, h223_call_info* call_info, h223_mux_element *me, guint32 offset, - gboolean endOfMuxSdu, endpoint_type etype, guint32 circuit_id) + gboolean endOfMuxSdu, conversation_type ctype, + guint32 circuit_id) { guint32 len = tvb_reported_length(tvb); guint32 frag_len; @@ -848,12 +850,12 @@ dissect_mux_payload_by_me_list( tvbuff_t *tvb, packet_info *pinfo, offset + sublist_len <= len; offset = dissect_mux_payload_by_me_list( tvb, pinfo, pkt_offset, pdu_tree, call_info, me->sublist, offset, endOfMuxSdu, - etype, circuit_id) ); + ctype, circuit_id) ); } else { for(i = 0; i < me->repeat_count; ++i) offset = dissect_mux_payload_by_me_list( tvb, pinfo, pkt_offset, pdu_tree, call_info, me->sublist, offset, endOfMuxSdu, - etype, circuit_id); + ctype, circuit_id); } } else { if ( me->repeat_count == 0 ) @@ -865,7 +867,7 @@ dissect_mux_payload_by_me_list( tvbuff_t *tvb, packet_info *pinfo, next_tvb = tvb_new_subset_length(tvb, offset, frag_len); dissect_mux_sdu_fragment( next_tvb, pinfo, pkt_offset + offset, pdu_tree, call_info, me->vc, (offset+frag_len==len) && endOfMuxSdu, - etype, circuit_id); + ctype, circuit_id); offset += frag_len; } } @@ -889,14 +891,15 @@ dissect_mux_payload_by_me_list( tvbuff_t *tvb, packet_info *pinfo, static void dissect_mux_payload( tvbuff_t *tvb, packet_info *pinfo, guint32 pkt_offset, proto_tree *pdu_tree, h223_call_info *call_info, - guint8 mc, gboolean endOfMuxSdu, endpoint_type etype, guint32 circuit_id ) + guint8 mc, gboolean endOfMuxSdu, conversation_type ctype, + guint32 circuit_id ) { guint32 len = tvb_reported_length(tvb); h223_mux_element* me = find_h223_mux_element( &(call_info->direction_data[pinfo->p2p_dir ? 0 : 1]), mc, pinfo->num, pkt_offset ); if( me ) { - dissect_mux_payload_by_me_list( tvb, pinfo, pkt_offset, pdu_tree, call_info, me, 0, endOfMuxSdu, etype, circuit_id ); + dissect_mux_payload_by_me_list( tvb, pinfo, pkt_offset, pdu_tree, call_info, me, 0, endOfMuxSdu, ctype, circuit_id ); } else { /* no entry found in mux-table. ignore packet and dissect as data */ proto_tree *vc_tree = NULL; @@ -923,7 +926,8 @@ dissect_mux_payload( tvbuff_t *tvb, packet_info *pinfo, guint32 pkt_offset, */ static void dissect_mux_pdu( tvbuff_t *tvb, packet_info *pinfo, guint32 pkt_offset, - proto_tree *h223_tree, h223_call_info *call_info, endpoint_type etype, guint32 circuit_id) + proto_tree *h223_tree, h223_call_info *call_info, + conversation_type ctype, guint32 circuit_id) { guint32 offset = 0; /* actual (as opposed to reported) payload len */ @@ -1039,7 +1043,7 @@ dissect_mux_pdu( tvbuff_t *tvb, packet_info *pinfo, guint32 pkt_offset, if(mpl > 0) { pdu_tvb = tvb_new_subset_length_caplen(tvb, offset, len, mpl); if(errors != -1) { - dissect_mux_payload(pdu_tvb,pinfo,pkt_offset+offset,pdu_tree,call_info,mc,end_of_mux_sdu, etype, circuit_id); + dissect_mux_payload(pdu_tvb,pinfo,pkt_offset+offset,pdu_tree,call_info,mc,end_of_mux_sdu, ctype, circuit_id); } else { call_dissector(data_handle,pdu_tvb,pinfo,pdu_tree); } @@ -1166,7 +1170,8 @@ h223_mux_check_hdlc(int h223_level, guint32 nbytes, guint32 tail_buf) static gint dissect_mux_pdu_fragment( tvbuff_t *tvb, guint32 start_offset, packet_info *pinfo, proto_tree *h223_tree, - h223_call_info *call_info, endpoint_type etype, guint32 circuit_id) + h223_call_info *call_info, conversation_type ctype, + guint32 circuit_id) { tvbuff_t *volatile next_tvb; volatile guint32 offset = start_offset; @@ -1242,7 +1247,7 @@ dissect_mux_pdu_fragment( tvbuff_t *tvb, guint32 start_offset, * data. */ TRY { - dissect_mux_pdu( next_tvb, pinfo, start_offset, h223_tree, call_info, etype, circuit_id); + dissect_mux_pdu( next_tvb, pinfo, start_offset, h223_tree, call_info, ctype, circuit_id); } CATCH_NONFATAL_ERRORS { show_exception(tvb, pinfo, h223_tree, EXCEPT_CODE, GET_MESSAGE); @@ -1264,7 +1269,7 @@ dissect_mux_pdu_fragment( tvbuff_t *tvb, guint32 start_offset, * line up with the end of a pdu. */ static void -dissect_h223_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, endpoint_type etype, guint32 circuit_id) +dissect_h223_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, conversation_type ctype, guint32 circuit_id) { proto_tree *h223_tree = NULL; proto_item *h223_item = NULL; @@ -1277,7 +1282,7 @@ dissect_h223_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, endpoin col_clear(pinfo->cinfo, COL_INFO); /* find or create the call_info for this call */ - call_info = find_or_create_call_info(pinfo, etype, circuit_id); + call_info = find_or_create_call_info(pinfo, ctype, circuit_id); /* add the 'h223' tree to the main tree */ if (tree) { @@ -1287,7 +1292,7 @@ dissect_h223_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, endpoin while( offset < tvb_reported_length( tvb )) { int res = dissect_mux_pdu_fragment( tvb, offset, pinfo, - h223_tree, call_info, etype, circuit_id); + h223_tree, call_info, ctype, circuit_id); if(res <= 0) { /* the end of the tvb held the start of a PDU */ pinfo->desegment_offset = offset; @@ -1328,14 +1333,14 @@ dissect_h223_circuit_data(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, v DISSECTOR_ASSERT(data); circuit_info = *((iax2_dissector_info_t*)data); - dissect_h223_common(tvb, pinfo, tree, circuit_info.etype, circuit_info.circuit_id); + dissect_h223_common(tvb, pinfo, tree, circuit_info.ctype, circuit_info.circuit_id); return tvb_captured_length(tvb); } static int dissect_h223(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) { - dissect_h223_common(tvb, pinfo, tree, ENDPOINT_NONE, 0); + dissect_h223_common(tvb, pinfo, tree, CONVERSATION_NONE, 0); return tvb_captured_length(tvb); } @@ -1347,7 +1352,7 @@ dissect_h223(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_ * normal entry point. */ static void -dissect_h223_bitswapped_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, endpoint_type etype, guint32 circuit_id) +dissect_h223_bitswapped_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, conversation_type ctype, guint32 circuit_id) { tvbuff_t *reversed_tvb; guint8 *datax; @@ -1367,7 +1372,7 @@ dissect_h223_bitswapped_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tr /* Add the reversed data to the data source list. */ add_new_data_source(pinfo, reversed_tvb, "Bit-swapped H.223 frame" ); - dissect_h223_common(reversed_tvb,pinfo,tree,etype,circuit_id); + dissect_h223_common(reversed_tvb,pinfo,tree,ctype,circuit_id); } static int @@ -1378,14 +1383,14 @@ dissect_h223_bitswapped_circuit_data(tvbuff_t *tvb, packet_info *pinfo, proto_tr DISSECTOR_ASSERT(data); circuit_info = *((iax2_dissector_info_t*)data); - dissect_h223_bitswapped_common(tvb, pinfo, tree, circuit_info.etype, circuit_info.circuit_id); + dissect_h223_bitswapped_common(tvb, pinfo, tree, circuit_info.ctype, circuit_info.circuit_id); return tvb_captured_length(tvb); } static int dissect_h223_bitswapped(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) { - dissect_h223_bitswapped_common(tvb, pinfo, tree, ENDPOINT_NONE, 0); + dissect_h223_bitswapped_common(tvb, pinfo, tree, CONVERSATION_NONE, 0); return tvb_captured_length(tvb); } diff --git a/epan/dissectors/packet-h225.c b/epan/dissectors/packet-h225.c index 084281a32f..2132002b7e 100644 --- a/epan/dissectors/packet-h225.c +++ b/epan/dissectors/packet-h225.c @@ -1704,9 +1704,9 @@ dissect_h225_H245TransportAddress(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t return offset; } - conv=find_conversation(actx->pinfo->num, &src_addr, &src_addr, ENDPOINT_TCP, ip_port, ip_port, NO_ADDR_B|NO_PORT_B); + conv=find_conversation(actx->pinfo->num, &src_addr, &src_addr, CONVERSATION_TCP, ip_port, ip_port, NO_ADDR_B|NO_PORT_B); if(!conv){ - conv=conversation_new(actx->pinfo->num, &src_addr, &src_addr, ENDPOINT_TCP, ip_port, ip_port, NO_ADDR2|NO_PORT2); + conv=conversation_new(actx->pinfo->num, &src_addr, &src_addr, CONVERSATION_TCP, ip_port, ip_port, NO_ADDR2|NO_PORT2); conversation_set_dissector(conv, h245_handle); } } diff --git a/epan/dissectors/packet-hartip.c b/epan/dissectors/packet-hartip.c index bc20d1339a..67b4a739b9 100644 --- a/epan/dissectors/packet-hartip.c +++ b/epan/dissectors/packet-hartip.c @@ -1271,12 +1271,12 @@ hartip_set_conversation(packet_info *pinfo) * for this protocol. */ conversation = find_conversation(pinfo->num, - &pinfo->src, &pinfo->dst, conversation_pt_to_endpoint_type(pinfo->ptype), + &pinfo->src, &pinfo->dst, conversation_pt_to_conversation_type(pinfo->ptype), pinfo->srcport, 0, NO_PORT_B); if( (conversation == NULL) || (conversation_get_dissector(conversation, pinfo->num) != hartip_udp_handle) ) { conversation = conversation_new(pinfo->num, - &pinfo->src, &pinfo->dst, conversation_pt_to_endpoint_type(pinfo->ptype), + &pinfo->src, &pinfo->dst, conversation_pt_to_conversation_type(pinfo->ptype), pinfo->srcport, 0, NO_PORT2); conversation_set_dissector(conversation, hartip_udp_handle); } diff --git a/epan/dissectors/packet-http.c b/epan/dissectors/packet-http.c index 491a2040ed..487af82d4b 100644 --- a/epan/dissectors/packet-http.c +++ b/epan/dissectors/packet-http.c @@ -2627,7 +2627,7 @@ http_payload_subdissector(tvbuff_t *tvb, proto_tree *tree, destport = pinfo->destport; } - conv = find_conversation(pinfo->num, &pinfo->src, &pinfo->dst, ENDPOINT_TCP, srcport, destport, 0); + conv = find_conversation(pinfo->num, &pinfo->src, &pinfo->dst, CONVERSATION_TCP, srcport, destport, 0); /* We may get stuck in a recursion loop if we let process_tcp_payload() call us. * So, if the port in the URI is one we're registered for or we have set up a diff --git a/epan/dissectors/packet-http2.c b/epan/dissectors/packet-http2.c index 9f8872ec0b..e903fa8e76 100644 --- a/epan/dissectors/packet-http2.c +++ b/epan/dissectors/packet-http2.c @@ -2367,7 +2367,7 @@ http2_follow_conv_filter(epan_dissect_t *edt _U_, packet_info *pinfo, guint *str 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)) && (pinfo->ptype == PT_TCP) && - (conversation=find_conversation(pinfo->num, &pinfo->net_src, &pinfo->net_dst, ENDPOINT_TCP, pinfo->srcport, pinfo->destport, 0)) != NULL) + (conversation=find_conversation(pinfo->num, &pinfo->net_src, &pinfo->net_dst, CONVERSATION_TCP, pinfo->srcport, pinfo->destport, 0)) != NULL) { h2session = get_http2_session(pinfo, conversation); tcpd = get_tcp_conversation_data(conversation, pinfo); diff --git a/epan/dissectors/packet-iax2.c b/epan/dissectors/packet-iax2.c index bf67ffdee9..7766f1468f 100644 --- a/epan/dissectors/packet-iax2.c +++ b/epan/dissectors/packet-iax2.c @@ -786,12 +786,12 @@ typedef struct iax_call_data { -/* creates a new ENDPOINT_IAX2 circuit with a specified circuit id for a call +/* creates a new CONVERSATION_IAX2 circuit with a specified circuit id for a call * * typically a call has up to three associated circuits: an original source, an * original destination, and the result of a transfer. * - * For each endpoint, a ENDPOINT_IAX2 circuit is created and added to the call_data + * For each endpoint, a CONVERSATION_IAX2 circuit is created and added to the call_data * by this function * * 'reversed' should be true if this end is the one which would have _received_ @@ -814,7 +814,7 @@ static conversation_t *iax2_new_circuit_for_call(packet_info *pinfo, proto_item return NULL; } - conv = conversation_new_by_id(framenum, ENDPOINT_IAX2, + conv = conversation_new_by_id(framenum, CONVERSATION_IAX2, circuit_id); conversation_add_proto_data(conv, proto_iax2, iax_call); @@ -867,7 +867,7 @@ static iax_call_data *iax_lookup_call_from_dest(packet_info *pinfo, proto_item * iax_call_data *iax_call; gboolean reversed = FALSE; - dst_conv = find_conversation_by_id(framenum, ENDPOINT_IAX2, dst_circuit_id); + dst_conv = find_conversation_by_id(framenum, CONVERSATION_IAX2, dst_circuit_id); if (!dst_conv) { #ifdef DEBUG_HASHING @@ -884,7 +884,7 @@ static iax_call_data *iax_lookup_call_from_dest(packet_info *pinfo, proto_item * iax_call = (iax_call_data *)conversation_get_proto_data(dst_conv, proto_iax2); - /* there's no way we can create a ENDPOINT_IAX2 circuit without adding + /* there's no way we can create a CONVERSATION_IAX2 circuit without adding iax call data to it; assert this */ DISSECTOR_ASSERT(iax_call); @@ -997,12 +997,12 @@ static iax_call_data *iax_lookup_call( packet_info *pinfo, * packet. */ - src_conv = find_conversation_by_id(pinfo->num, ENDPOINT_IAX2, src_circuit_id); + src_conv = find_conversation_by_id(pinfo->num, CONVERSATION_IAX2, src_circuit_id); if (src_conv) { iax_call = (iax_call_data *)conversation_get_proto_data(src_conv, proto_iax2); - /* there's no way we can create a ENDPOINT_IAX2 circuit without adding + /* there's no way we can create a CONVERSATION_IAX2 circuit without adding iax call data to it; assert this */ DISSECTOR_ASSERT(iax_call); @@ -2308,7 +2308,7 @@ static void process_iax_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, * tbd what the best thing to do here is. */ memset(&dissector_info, 0, sizeof(dissector_info)); } else { - dissector_info.etype = ENDPOINT_IAX2; + dissector_info.ctype = CONVERSATION_IAX2; dissector_info.circuit_id = (guint32)iax_packet->call_data->forward_circuit_ids[0]; } diff --git a/epan/dissectors/packet-iax2.h b/epan/dissectors/packet-iax2.h index 0211599b78..acca29a8ca 100644 --- a/epan/dissectors/packet-iax2.h +++ b/epan/dissectors/packet-iax2.h @@ -244,7 +244,7 @@ typedef struct _iax2_info_t /* Container for passing data between dissectors */ typedef struct _iax2_dissector_info_t { - endpoint_type etype; + conversation_type ctype; guint32 circuit_id; } iax2_dissector_info_t; diff --git a/epan/dissectors/packet-icmp.c b/epan/dissectors/packet-icmp.c index 2db4e36d9f..e92b99a08a 100644 --- a/epan/dissectors/packet-icmp.c +++ b/epan/dissectors/packet-icmp.c @@ -480,13 +480,13 @@ static conversation_t *_find_or_create_conversation(packet_info * pinfo) /* Have we seen this conversation before? */ conv = - find_conversation(pinfo->num, &pinfo->src, &pinfo->dst, conversation_pt_to_endpoint_type(pinfo->ptype), + find_conversation(pinfo->num, &pinfo->src, &pinfo->dst, conversation_pt_to_conversation_type(pinfo->ptype), 0, 0, 0); if (conv == NULL) { /* No, this is a new conversation. */ conv = conversation_new(pinfo->num, &pinfo->src, - &pinfo->dst, conversation_pt_to_endpoint_type(pinfo->ptype), 0, 0, 0); + &pinfo->dst, conversation_pt_to_conversation_type(pinfo->ptype), 0, 0, 0); } return conv; } @@ -1230,7 +1230,7 @@ static icmp_transaction_t *transaction_end(packet_info * pinfo, conversation = find_conversation(pinfo->num, &pinfo->src, &pinfo->dst, - conversation_pt_to_endpoint_type(pinfo->ptype), 0, 0, 0); + conversation_pt_to_conversation_type(pinfo->ptype), 0, 0, 0); if (conversation == NULL) { return NULL; } diff --git a/epan/dissectors/packet-icmpv6.c b/epan/dissectors/packet-icmpv6.c index 71c142c0a3..e2d9b09714 100644 --- a/epan/dissectors/packet-icmpv6.c +++ b/epan/dissectors/packet-icmpv6.c @@ -1437,11 +1437,11 @@ static conversation_t *_find_or_create_conversation(packet_info *pinfo) /* Have we seen this conversation before? */ conv = find_conversation(pinfo->num, &pinfo->src, &pinfo->dst, - conversation_pt_to_endpoint_type(pinfo->ptype), 0, 0, 0); + conversation_pt_to_conversation_type(pinfo->ptype), 0, 0, 0); if (conv == NULL) { /* No, this is a new conversation. */ conv = conversation_new(pinfo->num, &pinfo->src, &pinfo->dst, - conversation_pt_to_endpoint_type(pinfo->ptype), 0, 0, 0); + conversation_pt_to_conversation_type(pinfo->ptype), 0, 0, 0); } return conv; } @@ -1558,7 +1558,7 @@ static icmp_transaction_t *transaction_end(packet_info *pinfo, proto_tree *tree, double resp_time; conversation = find_conversation(pinfo->num, &pinfo->src, &pinfo->dst, - conversation_pt_to_endpoint_type(pinfo->ptype), 0, 0, 0); + conversation_pt_to_conversation_type(pinfo->ptype), 0, 0, 0); if (conversation == NULL) return NULL; diff --git a/epan/dissectors/packet-idn.c b/epan/dissectors/packet-idn.c index 38f1e9fbc3..af61d6d221 100644 --- a/epan/dissectors/packet-idn.c +++ b/epan/dissectors/packet-idn.c @@ -407,7 +407,7 @@ static int dissect_idn_message_acknowledgement(tvbuff_t *tvb, int offset, proto_ static configuration_info *get_configuration_info(packet_info *pinfo, int channel_id) { configuration_info *config = NULL; - conversation_t *conv = find_conversation(pinfo->fd->num, &pinfo->src, &pinfo->dst, conversation_pt_to_endpoint_type(pinfo->ptype), pinfo->srcport, pinfo->destport, channel_id); + conversation_t *conv = find_conversation(pinfo->fd->num, &pinfo->src, &pinfo->dst, conversation_pt_to_conversation_type(pinfo->ptype), pinfo->srcport, pinfo->destport, channel_id); if(conv) config = (configuration_info *)conversation_get_proto_data(conv, proto_idn); if(!config) @@ -883,7 +883,7 @@ static int dissect_idn_channel_configuration_header(tvbuff_t *tvb, packet_info * config->count = wmem_alloc0_array(wmem_file_scope(), int, word_count+1); config->base = wmem_alloc0_array(wmem_file_scope(), int, word_count+1); - conv = conversation_new(pinfo->fd->num, &pinfo->src, &pinfo->dst, conversation_pt_to_endpoint_type(pinfo->ptype), pinfo->srcport, pinfo->destport, channel_id); + conv = conversation_new(pinfo->fd->num, &pinfo->src, &pinfo->dst, conversation_pt_to_conversation_type(pinfo->ptype), pinfo->srcport, pinfo->destport, channel_id); conversation_add_proto_data(conv, proto_idn, config); return offset; diff --git a/epan/dissectors/packet-ieee80211.c b/epan/dissectors/packet-ieee80211.c index 0920788955..380ce33028 100644 --- a/epan/dissectors/packet-ieee80211.c +++ b/epan/dissectors/packet-ieee80211.c @@ -8000,7 +8000,7 @@ wlan_conversation_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _U_, hash->flags = flags; 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, ENDPOINT_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, CONVERSATION_NONE); return TAP_PACKET_REDRAW; } diff --git a/epan/dissectors/packet-ieee802154.c b/epan/dissectors/packet-ieee802154.c index 4cc70e2665..f313414553 100644 --- a/epan/dissectors/packet-ieee802154.c +++ b/epan/dissectors/packet-ieee802154.c @@ -1325,10 +1325,10 @@ static conversation_t *_find_or_create_conversation(packet_info *pinfo, const ad conversation_t *conv = NULL; /* Have we seen this conversation before? */ - conv = find_conversation(pinfo->num, src_addr, dst_addr, ENDPOINT_NONE, 0, 0, 0); + conv = find_conversation(pinfo->num, src_addr, dst_addr, CONVERSATION_NONE, 0, 0, 0); if (conv == NULL) { /* No, this is a new conversation. */ - conv = conversation_new(pinfo->num, src_addr, dst_addr, ENDPOINT_NONE, 0, 0, 0); + conv = conversation_new(pinfo->num, src_addr, dst_addr, CONVERSATION_NONE, 0, 0, 0); } return conv; } @@ -5598,7 +5598,7 @@ static tap_packet_status ieee802154_conversation_packet(void *pct, packet_info * add_conversation_table_data(hash, &pinfo->dl_src, &pinfo->dl_dst, 0, 0, 1, pinfo->fd->pkt_len, &pinfo->rel_ts, &pinfo->abs_ts, - &ieee802154_ct_dissector_info, ENDPOINT_NONE); + &ieee802154_ct_dissector_info, CONVERSATION_NONE); return TAP_PACKET_REDRAW; } diff --git a/epan/dissectors/packet-infiniband.c b/epan/dissectors/packet-infiniband.c index 238bdde119..73c8e4e7f7 100644 --- a/epan/dissectors/packet-infiniband.c +++ b/epan/dissectors/packet-infiniband.c @@ -2605,7 +2605,7 @@ static void update_sport(packet_info *pinfo) conversation_infiniband_data *conv_data; conv = find_conversation(pinfo->num, &pinfo->dst, &pinfo->dst, - ENDPOINT_IBQP, pinfo->destport, pinfo->destport, NO_ADDR_B|NO_PORT_B); + CONVERSATION_IBQP, pinfo->destport, pinfo->destport, NO_ADDR_B|NO_PORT_B); if (!conv) return; @@ -3306,13 +3306,13 @@ create_conv_and_add_proto_data(packet_info *pinfo, guint64 service_id, proto_data->src_qp = src_port; memcpy(&proto_data->mad_private_data[0], mad_data, MAD_DATA_SIZE); conv = conversation_new(pinfo->num, addr, addr, - ENDPOINT_IBQP, port, port, options); + CONVERSATION_IBQP, port, port, options); conversation_add_proto_data(conv, proto_infiniband, proto_data); /* next, register the conversation using the LIDs */ set_address(addr, AT_IB, sizeof(guint16), wmem_memdup(pinfo->pool, &lid, sizeof lid)); conv = conversation_new(pinfo->num, addr, addr, - ENDPOINT_IBQP, port, port, options); + CONVERSATION_IBQP, port, port, options); conversation_add_proto_data(conv, proto_infiniband, proto_data); } @@ -3358,7 +3358,7 @@ static void save_conversation_info(packet_info *pinfo, guint8 *local_gid, guint8 proto_data->client_to_server = TRUE; conv = conversation_new(pinfo->num, &pinfo->src, &pinfo->dst, - ENDPOINT_IBQP, pinfo->srcport, pinfo->destport, 0); + CONVERSATION_IBQP, pinfo->srcport, pinfo->destport, 0); conversation_add_proto_data(conv, proto_infiniband, proto_data); /* create unidirection conversation for packets that will flow from @@ -3567,7 +3567,7 @@ static void create_bidi_conv(packet_info *pinfo, connection_context *connection) proto_data->client_to_server = FALSE; memset(&proto_data->mad_private_data[0], 0, MAD_DATA_SIZE); conv = conversation_new(pinfo->num, &pinfo->src, &pinfo->dst, - ENDPOINT_IBQP, connection->resp_qp, + CONVERSATION_IBQP, connection->resp_qp, connection->req_qp, 0); conversation_add_proto_data(conv, proto_infiniband, proto_data); } @@ -3618,7 +3618,7 @@ static void update_passive_conv_info(packet_info *pinfo, conversation_infiniband_data *conv_data; conv = find_conversation(pinfo->num, &pinfo->dst, &pinfo->dst, - ENDPOINT_IBQP, connection->req_qp, connection->req_qp, + CONVERSATION_IBQP, connection->req_qp, connection->req_qp, NO_ADDR_B|NO_PORT_B); if (!conv) return; /* nothing to do with no conversation context */ diff --git a/epan/dissectors/packet-infiniband_sdp.c b/epan/dissectors/packet-infiniband_sdp.c index 025d8b6c27..2f6ff5f606 100644 --- a/epan/dissectors/packet-infiniband_sdp.c +++ b/epan/dissectors/packet-infiniband_sdp.c @@ -249,14 +249,14 @@ dissect_ib_sdp_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *d will not work since we do not have the source QP. this WILL succeed when we're still in the process of CM negotiations */ conv = find_conversation(pinfo->num, &pinfo->src, &pinfo->dst, - ENDPOINT_IBQP, pinfo->srcport, pinfo->destport, 0); + CONVERSATION_IBQP, pinfo->srcport, pinfo->destport, 0); if (!conv) { /* if not, try to find an established RC channel. recall Infiniband conversations are registered with one side of the channel. since the packet is only guaranteed to contain the qpn of the destination, we'll use this */ conv = find_conversation(pinfo->num, &pinfo->dst, &pinfo->dst, - ENDPOINT_IBQP, pinfo->destport, pinfo->destport, NO_ADDR_B|NO_PORT_B); + CONVERSATION_IBQP, pinfo->destport, pinfo->destport, NO_ADDR_B|NO_PORT_B); if (!conv) return FALSE; /* nothing to do with no conversation context */ diff --git a/epan/dissectors/packet-ip.c b/epan/dissectors/packet-ip.c index 10cd228eb8..489c737529 100644 --- a/epan/dissectors/packet-ip.c +++ b/epan/dissectors/packet-ip.c @@ -511,7 +511,7 @@ ip_conversation_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _U_, c hash->flags = flags; 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, ENDPOINT_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, CONVERSATION_NONE); return TAP_PACKET_REDRAW; } diff --git a/epan/dissectors/packet-ippusb.c b/epan/dissectors/packet-ippusb.c index b68156de5b..f440b3ec1e 100644 --- a/epan/dissectors/packet-ippusb.c +++ b/epan/dissectors/packet-ippusb.c @@ -219,7 +219,7 @@ dissect_ippusb(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data) } } else { - conv = conversation_new(pinfo->num, &pinfo->src, &pinfo->dst, ENDPOINT_TCP, + conv = conversation_new(pinfo->num, &pinfo->src, &pinfo->dst, CONVERSATION_TCP, pinfo->srcport, pinfo->destport, 0); } diff --git a/epan/dissectors/packet-ipv6.c b/epan/dissectors/packet-ipv6.c index 6aa8696863..1e2771f6a8 100644 --- a/epan/dissectors/packet-ipv6.c +++ b/epan/dissectors/packet-ipv6.c @@ -536,7 +536,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, ENDPOINT_NONE); + &ipv6_ct_dissector_info, CONVERSATION_NONE); return TAP_PACKET_REDRAW; } diff --git a/epan/dissectors/packet-ipx.c b/epan/dissectors/packet-ipx.c index 9d10f35b2c..9142e3f137 100644 --- a/epan/dissectors/packet-ipx.c +++ b/epan/dissectors/packet-ipx.c @@ -156,7 +156,7 @@ ipx_conversation_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _U_, 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, ENDPOINT_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, CONVERSATION_NONE); return TAP_PACKET_REDRAW; } @@ -673,7 +673,7 @@ dissect_spx(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) * SPX session using that source port; can that happen? If so, * we should probably use the direction, as well as the conversation, * as part of the hash key; if we do that, we can probably just - * use ENDPOINT_IPX as the port type, and possibly get rid of ENDPOINT_NCP. + * use CONVERSATION_IPX as the port type, and possibly get rid of CONVERSATION_NCP. * * According to * @@ -698,7 +698,7 @@ dissect_spx(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) */ if (!pinfo->fd->visited) { conversation = find_conversation(pinfo->num, &pinfo->src, - &pinfo->dst, ENDPOINT_NCP, pinfo->srcport, + &pinfo->dst, CONVERSATION_NCP, pinfo->srcport, pinfo->srcport, 0); if (conversation == NULL) { /* @@ -706,7 +706,7 @@ dissect_spx(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) * a new one. */ conversation = conversation_new(pinfo->num, &pinfo->src, - &pinfo->dst, ENDPOINT_NCP, pinfo->srcport, + &pinfo->dst, CONVERSATION_NCP, pinfo->srcport, pinfo->srcport, 0); } diff --git a/epan/dissectors/packet-iscsi.c b/epan/dissectors/packet-iscsi.c index b753712660..88a81ba56c 100644 --- a/epan/dissectors/packet-iscsi.c +++ b/epan/dissectors/packet-iscsi.c @@ -576,7 +576,7 @@ iscsi_dissect_TargetAddress(packet_info *pinfo, tvbuff_t* tvb, proto_tree *tree, if (addr && !pinfo->fd->visited) { conversation_t *conv; - conv = conversation_new(pinfo->num, addr, addr, ENDPOINT_TCP, port, port, NO_ADDR2|NO_PORT2); + conv = conversation_new(pinfo->num, addr, addr, CONVERSATION_TCP, port, port, NO_ADDR2|NO_PORT2); if (conv == NULL) { return; } diff --git a/epan/dissectors/packet-isdn.c b/epan/dissectors/packet-isdn.c index e77b82ba4f..c134492991 100644 --- a/epan/dissectors/packet-isdn.c +++ b/epan/dissectors/packet-isdn.c @@ -121,7 +121,7 @@ dissect_isdn(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data) /* * Set up a circuit for this channel, and assign it a dissector. */ - conv = find_or_create_conversation_by_id(pinfo, ENDPOINT_ISDN, + conv = find_or_create_conversation_by_id(pinfo, CONVERSATION_ISDN, isdn->channel); if (conversation_get_dissector(conv, 0) == NULL) { @@ -193,7 +193,7 @@ dissect_isdn(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data) } } - if (!try_conversation_dissector_by_id(ENDPOINT_ISDN, isdn->channel, + if (!try_conversation_dissector_by_id(CONVERSATION_ISDN, isdn->channel, tvb, pinfo, tree, data)) call_data_dissector(tvb, pinfo, tree); diff --git a/epan/dissectors/packet-iser.c b/epan/dissectors/packet-iser.c index 5ca26fd22c..c80fde6e8c 100644 --- a/epan/dissectors/packet-iser.c +++ b/epan/dissectors/packet-iser.c @@ -222,14 +222,14 @@ dissect_iser(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, will not work since we do not have the source QP. this WILL succeed when we're still in the process of CM negotiations */ conv = find_conversation(pinfo->num, &pinfo->src, &pinfo->dst, - ENDPOINT_IBQP, pinfo->srcport, pinfo->destport, 0); + CONVERSATION_IBQP, pinfo->srcport, pinfo->destport, 0); if (!conv) { /* if not, try to find an established RC channel. recall Infiniband conversations are registered with one side of the channel. since the packet is only guaranteed to contain the qpn of the destination, we'll use this */ conv = find_conversation(pinfo->num, &pinfo->dst, &pinfo->dst, - ENDPOINT_IBQP, pinfo->destport, pinfo->destport, NO_ADDR_B|NO_PORT_B); + CONVERSATION_IBQP, pinfo->destport, pinfo->destport, NO_ADDR_B|NO_PORT_B); if (!conv) return FALSE; /* nothing to do with no conversation context */ diff --git a/epan/dissectors/packet-isns.c b/epan/dissectors/packet-isns.c index 726d76c584..4dd1b699ff 100644 --- a/epan/dissectors/packet-isns.c +++ b/epan/dissectors/packet-isns.c @@ -747,7 +747,7 @@ dissect_isns_attr_port(tvbuff_t *tvb, guint offset, proto_tree *tree, int hf_ind guint16 port = tvb_get_ntohs(tvb, offset+2); gboolean is_udp = ((tvb_get_ntohs(tvb, offset) & 0x01) == 0x01); conversation_t *conversation; - endpoint_type et; + conversation_type ckt; dissector_handle_t handle; proto_tree_add_uint(tree, hf_index, tvb, offset, 4, port); @@ -755,19 +755,19 @@ dissect_isns_attr_port(tvbuff_t *tvb, guint offset, proto_tree *tree, int hf_ind if ((isns_port_type == ISNS_ESI_PORT) || (isns_port_type == ISNS_SCN_PORT)) { if (is_udp) { - et = ENDPOINT_UDP; + ckt = CONVERSATION_UDP; handle = isns_udp_handle; } else { - et = ENDPOINT_TCP; + ckt = CONVERSATION_TCP; handle = isns_tcp_handle; } conversation = find_conversation(pinfo->num, - &pinfo->src, &pinfo->dst, et, port, 0, NO_PORT_B); + &pinfo->src, &pinfo->dst, ckt, port, 0, NO_PORT_B); if (conversation == NULL) { conversation = conversation_new(pinfo->num, - &pinfo->src, &pinfo->dst, et, port, 0, NO_PORT2_FORCE); + &pinfo->src, &pinfo->dst, ckt, port, 0, NO_PORT2_FORCE); conversation_set_dissector(conversation, handle); } } diff --git a/epan/dissectors/packet-iso14443.c b/epan/dissectors/packet-iso14443.c index d193c965f7..49c73b9b2e 100644 --- a/epan/dissectors/packet-iso14443.c +++ b/epan/dissectors/packet-iso14443.c @@ -698,7 +698,7 @@ static int dissect_iso14443_ats(tvbuff_t *tvb, gint offset, col_set_str(pinfo->cinfo, COL_INFO, "ATS"); proto_item_append_text(ti, ": ATS"); - conv = conversation_new_by_id(pinfo->num, ENDPOINT_ISO14443, ISO14443_CIRCUIT_ID); + conv = conversation_new_by_id(pinfo->num, CONVERSATION_ISO14443, ISO14443_CIRCUIT_ID); conversation_add_proto_data(conv, proto_iso14443, GUINT_TO_POINTER((guint)ISO14443_A)); offset_tl = offset; @@ -929,7 +929,7 @@ dissect_iso14443_cmd_type_attrib(tvbuff_t *tvb, packet_info *pinfo, col_set_str(pinfo->cinfo, COL_INFO, "Response to Attrib"); proto_item_append_text(ti, ": Response to Attrib"); - conv = conversation_new_by_id(pinfo->num, ENDPOINT_ISO14443, ISO14443_CIRCUIT_ID); + conv = conversation_new_by_id(pinfo->num, CONVERSATION_ISO14443, ISO14443_CIRCUIT_ID); conversation_add_proto_data(conv, proto_iso14443, GUINT_TO_POINTER((guint)ISO14443_B)); mbli = tvb_get_guint8(tvb, offset) >> 4; @@ -1107,7 +1107,7 @@ dissect_iso14443_cmd_type_block(tvbuff_t *tvb, packet_info *pinfo, guint32 computed_checksum = 0; guint flags = PROTO_CHECKSUM_NO_FLAGS; - conv = find_conversation_by_id(pinfo->num, ENDPOINT_ISO14443, ISO14443_CIRCUIT_ID); + conv = find_conversation_by_id(pinfo->num, CONVERSATION_ISO14443, ISO14443_CIRCUIT_ID); if (conv) t = (iso14443_type_t)GPOINTER_TO_UINT(conversation_get_proto_data(conv, proto_iso14443)); @@ -1397,7 +1397,7 @@ static int dissect_iso14443(tvbuff_t *tvb, /* all events that are not data transfers close the connection to the card (e.g. the field is switched on or off) */ - conv = find_conversation_by_id(pinfo->num, ENDPOINT_ISO14443, ISO14443_CIRCUIT_ID); + conv = find_conversation_by_id(pinfo->num, CONVERSATION_ISO14443, ISO14443_CIRCUIT_ID); if (conv) conv->last_frame = pinfo->num; } diff --git a/epan/dissectors/packet-isup.c b/epan/dissectors/packet-isup.c index c5399391f9..64799f3031 100644 --- a/epan/dissectors/packet-isup.c +++ b/epan/dissectors/packet-isup.c @@ -10405,7 +10405,7 @@ dissect_isup(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_ isup_tree = proto_item_add_subtree(ti, ett_isup); proto_tree_add_uint(isup_tree, hf_isup_cic, tvb, CIC_OFFSET, CIC_LENGTH, cic); } - conversation_create_endpoint_by_id(pinfo, ENDPOINT_ISUP, cic); + conversation_create_key_by_id(pinfo, CONVERSATION_ISUP, cic); message_tvb = tvb_new_subset_remaining(tvb, CIC_LENGTH); dissect_ansi_isup_message(message_tvb, pinfo, isup_tree, ISUP_ITU_STANDARD_VARIANT, cic); break; @@ -10454,7 +10454,7 @@ dissect_isup(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_ isup_tree = proto_item_add_subtree(ti, ett_isup); proto_tree_add_uint(isup_tree, hf_isup_cic, tvb, CIC_OFFSET, CIC_LENGTH, cic); } - conversation_create_endpoint_by_id(pinfo, ENDPOINT_ISUP, cic); + conversation_create_key_by_id(pinfo, CONVERSATION_ISUP, cic); message_tvb = tvb_new_subset_remaining(tvb, CIC_LENGTH); dissect_isup_message(message_tvb, pinfo, isup_tree, itu_isup_variant, cic); } @@ -10508,7 +10508,7 @@ dissect_bicc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_ bicc_cic = tvb_get_letohl(tvb, BICC_CIC_OFFSET); - conversation_create_endpoint_by_id(pinfo, ENDPOINT_BICC, bicc_cic); + conversation_create_key_by_id(pinfo, CONVERSATION_BICC, bicc_cic); col_clear(pinfo->cinfo, COL_INFO); if (isup_show_cic_in_info) { diff --git a/epan/dissectors/packet-iuup.c b/epan/dissectors/packet-iuup.c index 4fa17d8ced..12983b448f 100644 --- a/epan/dissectors/packet-iuup.c +++ b/epan/dissectors/packet-iuup.c @@ -617,7 +617,7 @@ static int dissect_iuup(tvbuff_t* tvb_in, packet_info* pinfo, proto_tree* tree, phdr &= 0x7fff; - conversation_create_endpoint_by_id(pinfo, ENDPOINT_IUUP, phdr); + conversation_create_key_by_id(pinfo, CONVERSATION_IUUP, phdr); tvb = tvb_new_subset_length(tvb_in,2,len); } @@ -650,7 +650,7 @@ static int dissect_iuup(tvbuff_t* tvb_in, packet_info* pinfo, proto_tree* tree, proto_tree_add_item(iuup_tree,hf_iuup_rfci,tvb,1,1,ENC_BIG_ENDIAN); add_hdr_crc(tvb, pinfo, iuup_tree); add_payload_crc(tvb, pinfo, iuup_tree); - dissect_iuup_payload(tvb,pinfo,iuup_tree,second_octet & 0x3f,4, conversation_get_endpoint_by_id(pinfo, ENDPOINT_IUUP, USE_LAST_ENDPOINT)); + dissect_iuup_payload(tvb,pinfo,iuup_tree,second_octet & 0x3f,4, conversation_get_id_from_key(pinfo, CONVERSATION_IUUP, USE_LAST_ENDPOINT)); return tvb_captured_length(tvb); case PDUTYPE_DATA_NO_CRC: col_append_fstr(pinfo->cinfo, COL_INFO," RFCI %u", (guint)(second_octet & 0x3f)); @@ -664,7 +664,7 @@ static int dissect_iuup(tvbuff_t* tvb_in, packet_info* pinfo, proto_tree* tree, proto_tree_add_item(iuup_tree,hf_iuup_rfci,tvb,1,1,ENC_BIG_ENDIAN); add_hdr_crc(tvb, pinfo, iuup_tree); - dissect_iuup_payload(tvb,pinfo,iuup_tree,second_octet & 0x3f,3, conversation_get_endpoint_by_id(pinfo, ENDPOINT_IUUP, USE_LAST_ENDPOINT)); + dissect_iuup_payload(tvb,pinfo,iuup_tree,second_octet & 0x3f,3, conversation_get_id_from_key(pinfo, CONVERSATION_IUUP, USE_LAST_ENDPOINT)); return tvb_captured_length(tvb); case PDUTYPE_DATA_CONTROL_PROC: if (tree) { @@ -715,7 +715,7 @@ static int dissect_iuup(tvbuff_t* tvb_in, packet_info* pinfo, proto_tree* tree, switch( second_octet & PROCEDURE_MASK ) { case PROC_INIT: add_payload_crc(tvb, pinfo, iuup_tree); - dissect_iuup_init(tvb,pinfo,iuup_tree, conversation_get_endpoint_by_id(pinfo, ENDPOINT_IUUP, USE_LAST_ENDPOINT)); + dissect_iuup_init(tvb,pinfo,iuup_tree, conversation_get_id_from_key(pinfo, CONVERSATION_IUUP, USE_LAST_ENDPOINT)); return tvb_captured_length(tvb); case PROC_RATE: add_payload_crc(tvb, pinfo, iuup_tree); diff --git a/epan/dissectors/packet-jxta.c b/epan/dissectors/packet-jxta.c index 6ca37c203e..d57d2780a3 100644 --- a/epan/dissectors/packet-jxta.c +++ b/epan/dissectors/packet-jxta.c @@ -192,7 +192,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, ENDPOINT_NONE); + 0, 0, 1, jxtahdr->size, NULL, NULL, &jxta_ct_dissector_info, CONVERSATION_NONE); return TAP_PACKET_REDRAW; } @@ -765,11 +765,11 @@ static conversation_t *get_peer_conversation(packet_info * pinfo, jxta_stream_co if ((AT_NONE != tpt_conv_data->initiator_address.type) && (AT_NONE != tpt_conv_data->receiver_address.type)) { peer_conversation = find_conversation(pinfo->num, &tpt_conv_data->initiator_address, &tpt_conv_data->receiver_address, - ENDPOINT_NONE, 0, 0, NO_PORT_B); + CONVERSATION_NONE, 0, 0, NO_PORT_B); if (create && (NULL == peer_conversation)) { peer_conversation = conversation_new(pinfo->num, &tpt_conv_data->initiator_address, - &tpt_conv_data->receiver_address, ENDPOINT_NONE, 0, 0, NO_PORT2); + &tpt_conv_data->receiver_address, CONVERSATION_NONE, 0, 0, NO_PORT2); conversation_set_dissector(peer_conversation, stream_jxta_handle); } diff --git a/epan/dissectors/packet-k12.c b/epan/dissectors/packet-k12.c index 436afe7c8f..cb55983de2 100644 --- a/epan/dissectors/packet-k12.c +++ b/epan/dissectors/packet-k12.c @@ -211,7 +211,7 @@ dissect_k12(tvbuff_t* tvb,packet_info* pinfo,proto_tree* tree, void* data _U_) * XXX: this is prone to collisions! * we need an uniform way to manage circuits between dissectors */ - conversation_create_endpoint_by_id(pinfo, ENDPOINT_NONE, g_str_hash(circuit_str)); + conversation_create_key_by_id(pinfo, CONVERSATION_NONE, g_str_hash(circuit_str)); proto_tree_add_uint(k12_tree, hf_k12_atm_vp, tvb, 0, 0, pinfo->pseudo_header->k12.input_info.atm.vp); diff --git a/epan/dissectors/packet-kerberos.c b/epan/dissectors/packet-kerberos.c index 1abf2631fd..cbdf452c48 100644 --- a/epan/dissectors/packet-kerberos.c +++ b/epan/dissectors/packet-kerberos.c @@ -6063,10 +6063,10 @@ dissect_kerberos_KDC_REQ_BODY(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int * http://www.ietf.org/internet-drafts/draft-ietf-krb-wg-kerberos-clarifications-07.txt */ if (actx->pinfo->destport == UDP_PORT_KERBEROS && actx->pinfo->ptype == PT_UDP) { - conversation = find_conversation(actx->pinfo->num, &actx->pinfo->src, &actx->pinfo->dst, ENDPOINT_UDP, + conversation = find_conversation(actx->pinfo->num, &actx->pinfo->src, &actx->pinfo->dst, CONVERSATION_UDP, actx->pinfo->srcport, 0, NO_PORT_B); if (conversation == NULL) { - conversation = conversation_new(actx->pinfo->num, &actx->pinfo->src, &actx->pinfo->dst, ENDPOINT_UDP, + conversation = conversation_new(actx->pinfo->num, &actx->pinfo->src, &actx->pinfo->dst, CONVERSATION_UDP, actx->pinfo->srcport, 0, NO_PORT2); conversation_set_dissector(conversation, kerberos_handle_udp); } diff --git a/epan/dissectors/packet-l2tp.c b/epan/dissectors/packet-l2tp.c index a99c4b1762..08e6b1316b 100644 --- a/epan/dissectors/packet-l2tp.c +++ b/epan/dissectors/packet-l2tp.c @@ -2906,16 +2906,16 @@ dissect_l2tp_udp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data * the assigned L2TP port the entire time, due to NAT, firewalls, etc. * We support both methods by using conversations with no second port. */ - conv = find_conversation(pinfo->num, &pinfo->src, &pinfo->dst, ENDPOINT_UDP, + conv = find_conversation(pinfo->num, &pinfo->src, &pinfo->dst, CONVERSATION_UDP, pinfo->srcport, pinfo->destport, NO_PORT_B); if (conv == NULL || (conversation_get_dissector(conv, pinfo->num) != l2tp_udp_handle)) { - conv = find_conversation(pinfo->num, &pinfo->dst, &pinfo->src, ENDPOINT_UDP, + conv = find_conversation(pinfo->num, &pinfo->dst, &pinfo->src, CONVERSATION_UDP, pinfo->destport, pinfo->srcport, NO_PORT_B); } if ((conv == NULL) || (conversation_get_dissector(conv, pinfo->num) != l2tp_udp_handle)) { - conv = conversation_new(pinfo->num, &pinfo->src, &pinfo->dst, ENDPOINT_UDP, + conv = conversation_new(pinfo->num, &pinfo->src, &pinfo->dst, CONVERSATION_UDP, pinfo->srcport, 0, NO_PORT2); conversation_set_dissector(conv, l2tp_udp_handle); } diff --git a/epan/dissectors/packet-lapdm.c b/epan/dissectors/packet-lapdm.c index 8c14d140b4..f596f90d4c 100644 --- a/epan/dissectors/packet-lapdm.c +++ b/epan/dissectors/packet-lapdm.c @@ -317,7 +317,7 @@ dissect_lapdm(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data) pinfo->fragmented = m; /* Rely on caller to provide a way to group fragments */ - fragment_id = (conversation_get_endpoint_by_id(pinfo, ENDPOINT_GSMTAP, USE_LAST_ENDPOINT) << 4) | (sapi << 1) | pinfo->p2p_dir; + fragment_id = (conversation_get_id_from_key(pinfo, CONVERSATION_GSMTAP, USE_LAST_ENDPOINT) << 4) | (sapi << 1) | pinfo->p2p_dir; if (!PINFO_FD_VISITED(pinfo)) { /* Check if new N(S) is equal to previous N(S) (to avoid adding retransmissions in reassembly table) @@ -377,7 +377,7 @@ dissect_lapdm(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data) { if (!PINFO_FD_VISITED(pinfo) && ((control & XDLC_S_U_MASK) == XDLC_U) && ((control & XDLC_U_MODIFIER_MASK) == XDLC_SABM)) { /* SABM frame; reset the last N(S) to an invalid value */ - guint32 fragment_id = (conversation_get_endpoint_by_id(pinfo, ENDPOINT_GSMTAP, USE_LAST_ENDPOINT) << 4) | (sapi << 1) | pinfo->p2p_dir; + guint32 fragment_id = (conversation_get_id_from_key(pinfo, CONVERSATION_GSMTAP, USE_LAST_ENDPOINT) << 4) | (sapi << 1) | pinfo->p2p_dir; wmem_map_insert(lapdm_last_n_s_map, GUINT_TO_POINTER(fragment_id), GUINT_TO_POINTER(0)); } diff --git a/epan/dissectors/packet-lapsat.c b/epan/dissectors/packet-lapsat.c index f94e6b4104..e4254ba691 100644 --- a/epan/dissectors/packet-lapsat.c +++ b/epan/dissectors/packet-lapsat.c @@ -505,7 +505,7 @@ dissect_lapsat(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* dissec pinfo->fragmented = !!(addr & LAPSAT_SI); /* Rely on caller to provide a way to group fragments */ - fragment_id = (conversation_get_endpoint_by_id(pinfo, ENDPOINT_GSMTAP, USE_LAST_ENDPOINT) << 3) | (sapi << 1) | pinfo->p2p_dir; + fragment_id = (conversation_get_id_from_key(pinfo, CONVERSATION_GSMTAP, USE_LAST_ENDPOINT) << 3) | (sapi << 1) | pinfo->p2p_dir; /* Fragment reconstruction helpers */ fd_m = fragment_add_seq_next( diff --git a/epan/dissectors/packet-lbmpdmtcp.c b/epan/dissectors/packet-lbmpdmtcp.c index 73c6a73607..c3b1279ae7 100644 --- a/epan/dissectors/packet-lbmpdmtcp.c +++ b/epan/dissectors/packet-lbmpdmtcp.c @@ -77,10 +77,10 @@ static lbmtcp_transport_t * lbmtcp_transport_add(const address * address1, guint lbmtcp_transport_t * entry; conversation_t * conv = NULL; - conv = find_conversation(frame, address1, address2, ENDPOINT_TCP, port1, port2, 0); + conv = find_conversation(frame, address1, address2, CONVERSATION_TCP, port1, port2, 0); if (conv == NULL) { - conv = conversation_new(frame, address1, address2, ENDPOINT_TCP, port1, port2, 0); + conv = conversation_new(frame, address1, address2, CONVERSATION_TCP, port1, port2, 0); } entry = (lbmtcp_transport_t *) conversation_get_proto_data(conv, lbmpdm_tcp_protocol_handle); if (entry != NULL) diff --git a/epan/dissectors/packet-lbtrm.c b/epan/dissectors/packet-lbtrm.c index 89ebd92ae9..a03e1e064e 100644 --- a/epan/dissectors/packet-lbtrm.c +++ b/epan/dissectors/packet-lbtrm.c @@ -47,7 +47,7 @@ static lbtrm_transport_t * lbtrm_transport_unicast_find(const address * source_a conversation_t * conv = NULL; wmem_tree_t * session_tree = NULL; - conv = find_conversation(frame, source_address, &lbtrm_null_address, ENDPOINT_UDP, source_port, 0, 0); + conv = find_conversation(frame, source_address, &lbtrm_null_address, CONVERSATION_UDP, source_port, 0, 0); if (conv != NULL) { if (frame > conv->last_frame) @@ -69,10 +69,10 @@ static void lbtrm_transport_unicast_add(const address * source_address, guint16 wmem_tree_t * session_tree = NULL; lbtrm_transport_t * transport_entry = NULL; - conv = find_conversation(frame, source_address, &lbtrm_null_address, ENDPOINT_UDP, source_port, 0, 0); + conv = find_conversation(frame, source_address, &lbtrm_null_address, CONVERSATION_UDP, source_port, 0, 0); if (conv == NULL) { - conv = conversation_new(frame, source_address, &lbtrm_null_address, ENDPOINT_UDP, source_port, 0, 0); + conv = conversation_new(frame, source_address, &lbtrm_null_address, CONVERSATION_UDP, source_port, 0, 0); } session_tree = (wmem_tree_t *) conversation_get_proto_data(conv, proto_lbtrm); if (session_tree == NULL) @@ -93,7 +93,7 @@ static lbtrm_transport_t * lbtrm_transport_find(const address * source_address, wmem_tree_t * session_tree = NULL; conversation_t * conv = NULL; - conv = find_conversation(frame, source_address, multicast_group, ENDPOINT_UDP, source_port, dest_port, 0); + conv = find_conversation(frame, source_address, multicast_group, CONVERSATION_UDP, source_port, dest_port, 0); if (conv != NULL) { if (frame > conv->last_frame) @@ -115,10 +115,10 @@ lbtrm_transport_t * lbtrm_transport_add(const address * source_address, guint16 conversation_t * conv = NULL; wmem_tree_t * session_tree = NULL; - conv = find_conversation(frame, source_address, multicast_group, ENDPOINT_UDP, source_port, dest_port, 0); + conv = find_conversation(frame, source_address, multicast_group, CONVERSATION_UDP, source_port, dest_port, 0); if (conv == NULL) { - conv = conversation_new(frame, source_address, multicast_group, ENDPOINT_UDP, source_port, dest_port, 0); + conv = conversation_new(frame, source_address, multicast_group, CONVERSATION_UDP, source_port, dest_port, 0); } if (frame > conv->last_frame) { diff --git a/epan/dissectors/packet-lbtru.c b/epan/dissectors/packet-lbtru.c index 2ac9c443b7..9c0e0c322e 100644 --- a/epan/dissectors/packet-lbtru.c +++ b/epan/dissectors/packet-lbtru.c @@ -45,7 +45,7 @@ static lbtru_transport_t * lbtru_transport_find(const address * source_address, wmem_tree_t * session_tree = NULL; conversation_t * conv = NULL; - conv = find_conversation(frame, source_address, &lbtru_null_address, ENDPOINT_UDP, source_port, 0, 0); + conv = find_conversation(frame, source_address, &lbtru_null_address, CONVERSATION_UDP, source_port, 0, 0); if (conv != NULL) { if (frame != 0) @@ -74,10 +74,10 @@ lbtru_transport_t * lbtru_transport_add(const address * source_address, guint16 wmem_tree_t * session_tree = NULL; conversation_t * conv = NULL; - conv = find_conversation(frame, source_address, &lbtru_null_address, ENDPOINT_UDP, source_port, 0, 0); + conv = find_conversation(frame, source_address, &lbtru_null_address, CONVERSATION_UDP, source_port, 0, 0); if (conv == NULL) { - conv = conversation_new(frame, source_address, &lbtru_null_address, ENDPOINT_UDP, source_port, 0, 0); + conv = conversation_new(frame, source_address, &lbtru_null_address, CONVERSATION_UDP, source_port, 0, 0); } if (frame != 0) { @@ -121,7 +121,7 @@ static lbtru_client_transport_t * lbtru_client_transport_find(lbtru_transport_t { return (NULL); } - client_conv = find_conversation(frame, &(transport->source_address), receiver_address, ENDPOINT_UDP, transport->source_port, receiver_port, 0); + client_conv = find_conversation(frame, &(transport->source_address), receiver_address, CONVERSATION_UDP, transport->source_port, receiver_port, 0); if (client_conv != NULL) { wmem_tree_t * session_tree = NULL; @@ -170,10 +170,10 @@ static lbtru_client_transport_t * lbtru_client_transport_add(lbtru_transport_t * entry->sm_high_sqn = 0; /* See if a conversation for this address/port pair exists. */ - client_conv = find_conversation(frame, &(transport->source_address), receiver_address, ENDPOINT_UDP, transport->source_port, receiver_port, 0); + client_conv = find_conversation(frame, &(transport->source_address), receiver_address, CONVERSATION_UDP, transport->source_port, receiver_port, 0); if (client_conv == NULL) { - client_conv = conversation_new(frame, &(transport->source_address), receiver_address, ENDPOINT_UDP, transport->source_port, receiver_port, 0); + client_conv = conversation_new(frame, &(transport->source_address), receiver_address, CONVERSATION_UDP, transport->source_port, receiver_port, 0); session_tree = wmem_tree_new(wmem_file_scope()); conversation_add_proto_data(client_conv, proto_lbtru, (void *) session_tree); } diff --git a/epan/dissectors/packet-lbttcp.c b/epan/dissectors/packet-lbttcp.c index 82c69562f1..a7664c5aae 100644 --- a/epan/dissectors/packet-lbttcp.c +++ b/epan/dissectors/packet-lbttcp.c @@ -47,7 +47,7 @@ lbttcp_transport_t * lbttcp_transport_find(const address * source_address, guint conversation_t * conv = NULL; lbttcp_transport_conv_data_t * conv_data = NULL; - conv = find_conversation(frame, source_address, &lbttcp_null_address, ENDPOINT_TCP, source_port, 0, 0); + conv = find_conversation(frame, source_address, &lbttcp_null_address, CONVERSATION_TCP, source_port, 0, 0); if (conv != NULL) { conv_data = (lbttcp_transport_conv_data_t *) conversation_get_proto_data(conv, proto_lbttcp); @@ -79,10 +79,10 @@ lbttcp_transport_t * lbttcp_transport_add(const address * source_address, guint1 conversation_t * conv = NULL; lbttcp_transport_conv_data_t * conv_data = NULL; - conv = find_conversation(frame, source_address, &lbttcp_null_address, ENDPOINT_TCP, source_port, 0, 0); + conv = find_conversation(frame, source_address, &lbttcp_null_address, CONVERSATION_TCP, source_port, 0, 0); if (conv == NULL) { - conv = conversation_new(frame, source_address, &lbttcp_null_address, ENDPOINT_TCP, source_port, 0, 0); + conv = conversation_new(frame, source_address, &lbttcp_null_address, CONVERSATION_TCP, source_port, 0, 0); } conv_data = (lbttcp_transport_conv_data_t *) conversation_get_proto_data(conv, proto_lbttcp); if (conv_data == NULL) @@ -112,7 +112,7 @@ static lbttcp_client_transport_t * lbttcp_client_transport_find(lbttcp_transport { return (NULL); } - client_conv = find_conversation(frame, &(transport->source_address), receiver_address, ENDPOINT_TCP, transport->source_port, receiver_port, 0); + client_conv = find_conversation(frame, &(transport->source_address), receiver_address, CONVERSATION_TCP, transport->source_port, receiver_port, 0); if (client_conv != NULL) { wmem_tree_t * session_tree = NULL; @@ -147,10 +147,10 @@ static lbttcp_client_transport_t * lbttcp_client_transport_add(lbttcp_transport_ entry->id = transport->next_client_id++; /* See if a conversation for this address/port pair exists. */ - client_conv = find_conversation(frame, &(transport->source_address), receiver_address, ENDPOINT_TCP, transport->source_port, receiver_port, 0); + client_conv = find_conversation(frame, &(transport->source_address), receiver_address, CONVERSATION_TCP, transport->source_port, receiver_port, 0); if (client_conv == NULL) { - client_conv = conversation_new(frame, &(transport->source_address), receiver_address, ENDPOINT_TCP, transport->source_port, receiver_port, 0); + client_conv = conversation_new(frame, &(transport->source_address), receiver_address, CONVERSATION_TCP, transport->source_port, receiver_port, 0); session_tree = wmem_tree_new(wmem_file_scope()); conversation_add_proto_data(client_conv, proto_lbttcp, (void *) session_tree); } @@ -188,7 +188,7 @@ gboolean lbttcp_transport_sid_find(const address * source_address, guint16 sourc lbttcp_transport_conv_data_t * conv_data = NULL; lbttcp_transport_t * transport = NULL; - conv = find_conversation(frame, source_address, &lbttcp_null_address, ENDPOINT_TCP, source_port, 0, 0); + conv = find_conversation(frame, source_address, &lbttcp_null_address, CONVERSATION_TCP, source_port, 0, 0); if (conv == NULL) { return (FALSE); @@ -217,10 +217,10 @@ void lbttcp_transport_sid_add(const address * source_address, guint16 source_por lbttcp_transport_conv_data_t * conv_data = NULL; lbttcp_transport_t * transport = NULL; - conv = find_conversation(frame, source_address, &lbttcp_null_address, ENDPOINT_TCP, source_port, 0, 0); + conv = find_conversation(frame, source_address, &lbttcp_null_address, CONVERSATION_TCP, source_port, 0, 0); if (conv == NULL) { - conv = conversation_new(frame, source_address, &lbttcp_null_address, ENDPOINT_TCP, source_port, 0, 0); + conv = conversation_new(frame, source_address, &lbttcp_null_address, CONVERSATION_TCP, source_port, 0, 0); } conv_data = (lbttcp_transport_conv_data_t *) conversation_get_proto_data(conv, proto_lbttcp); if (conv_data == NULL) diff --git a/epan/dissectors/packet-ldss.c b/epan/dissectors/packet-ldss.c index ca2d08f7bb..a7fe94112d 100644 --- a/epan/dissectors/packet-ldss.c +++ b/epan/dissectors/packet-ldss.c @@ -198,7 +198,7 @@ static void prepare_ldss_transfer_conv(ldss_broadcast_t *broadcast) { if (!find_conversation(broadcast->num, &broadcast->broadcaster->addr, &broadcast->broadcaster->addr, - ENDPOINT_TCP, broadcast->broadcaster->port, broadcast->broadcaster->port, NO_ADDR_B|NO_PORT_B)) { + CONVERSATION_TCP, broadcast->broadcaster->port, broadcast->broadcaster->port, NO_ADDR_B|NO_PORT_B)) { conversation_t *transfer_conv; ldss_transfer_info_t *transfer_info; @@ -207,7 +207,7 @@ prepare_ldss_transfer_conv(ldss_broadcast_t *broadcast) /* Preparation for later push/pull dissection */ transfer_conv = conversation_new (broadcast->num, &broadcast->broadcaster->addr, &broadcast->broadcaster->addr, - ENDPOINT_TCP, broadcast->broadcaster->port, broadcast->broadcaster->port, NO_ADDR2|NO_PORT2); + CONVERSATION_TCP, broadcast->broadcaster->port, broadcast->broadcaster->port, NO_ADDR2|NO_PORT2); conversation_add_proto_data(transfer_conv, proto_ldss, transfer_info); conversation_set_dissector(transfer_conv, ldss_tcp_handle); } @@ -446,7 +446,7 @@ dissect_ldss_transfer (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void /* Look for the transfer conversation; this was created during * earlier broadcast dissection (see prepare_ldss_transfer_conv) */ transfer_conv = find_conversation (pinfo->num, &pinfo->src, &pinfo->dst, - ENDPOINT_TCP, pinfo->srcport, pinfo->destport, 0); + CONVERSATION_TCP, pinfo->srcport, pinfo->destport, 0); DISSECTOR_ASSERT(transfer_conv); transfer_info = (ldss_transfer_info_t *)conversation_get_proto_data(transfer_conv, proto_ldss); DISSECTOR_ASSERT(transfer_info); diff --git a/epan/dissectors/packet-lnet.c b/epan/dissectors/packet-lnet.c index a52f18050d..5b2b802f19 100644 --- a/epan/dissectors/packet-lnet.c +++ b/epan/dissectors/packet-lnet.c @@ -250,11 +250,11 @@ get_lnet_conv(packet_info *pinfo, guint64 match_bits) { lnet_conv_info_t *conv_info; // Ignore ports because this is kernel level and there can only be one Lustre instance per server - conversation = find_conversation(pinfo->num, &pinfo->src, &pinfo->dst, conversation_pt_to_endpoint_type(pinfo->ptype), + conversation = find_conversation(pinfo->num, &pinfo->src, &pinfo->dst, conversation_pt_to_conversation_type(pinfo->ptype), 0, 0, 0); if (conversation == NULL) conversation = conversation_new(pinfo->num, &pinfo->src, - &pinfo->dst, conversation_pt_to_endpoint_type(pinfo->ptype), 0, 0, 0); + &pinfo->dst, conversation_pt_to_conversation_type(pinfo->ptype), 0, 0, 0); conv_info = (lnet_conv_info_t *)conversation_get_proto_data(conversation, proto_lnet); if (!conv_info) { diff --git a/epan/dissectors/packet-lustre.c b/epan/dissectors/packet-lustre.c index ad1e6bb027..cd656d0fa8 100644 --- a/epan/dissectors/packet-lustre.c +++ b/epan/dissectors/packet-lustre.c @@ -1618,11 +1618,11 @@ lustre_get_trans(packet_info *pinfo, struct lnet_trans_info *info) lustre_trans_t *trans; // Ignore ports because this is kernel level and there can only be one Lustre instance per server - conversation = find_conversation(pinfo->num, &pinfo->src, &pinfo->dst, conversation_pt_to_endpoint_type(pinfo->ptype), + conversation = find_conversation(pinfo->num, &pinfo->src, &pinfo->dst, conversation_pt_to_conversation_type(pinfo->ptype), 0, 0, 0); if (conversation == NULL) conversation = conversation_new(pinfo->num, &pinfo->src, - &pinfo->dst, conversation_pt_to_endpoint_type(pinfo->ptype), 0, 0, 0); + &pinfo->dst, conversation_pt_to_conversation_type(pinfo->ptype), 0, 0, 0); conv_info = (lustre_conv_info_t *)conversation_get_proto_data(conversation, proto_lustre); if (!conv_info) { diff --git a/epan/dissectors/packet-mgcp.c b/epan/dissectors/packet-mgcp.c index b00f651fd4..f8de090a45 100644 --- a/epan/dissectors/packet-mgcp.c +++ b/epan/dissectors/packet-mgcp.c @@ -1293,7 +1293,7 @@ static void dissect_mgcp_firstline(tvbuff_t *tvb, packet_info *pinfo, proto_tree * if you do that. */ conversation = find_conversation(pinfo->num, &null_address, - &pinfo->dst, conversation_pt_to_endpoint_type(pinfo->ptype), pinfo->srcport, + &pinfo->dst, conversation_pt_to_conversation_type(pinfo->ptype), pinfo->srcport, pinfo->destport, 0); } if (conversation != NULL) @@ -1394,7 +1394,7 @@ static void dissect_mgcp_firstline(tvbuff_t *tvb, packet_info *pinfo, proto_tree * if you do that. */ conversation = find_conversation(pinfo->num, &pinfo->src, - &null_address, conversation_pt_to_endpoint_type(pinfo->ptype), pinfo->srcport, + &null_address, conversation_pt_to_conversation_type(pinfo->ptype), pinfo->srcport, pinfo->destport, 0); } if (conversation == NULL) @@ -1403,13 +1403,13 @@ static void dissect_mgcp_firstline(tvbuff_t *tvb, packet_info *pinfo, proto_tree if (pinfo->ptype == PT_TCP) { conversation = conversation_new(pinfo->num, &pinfo->src, - &pinfo->dst, ENDPOINT_TCP, pinfo->srcport, + &pinfo->dst, CONVERSATION_TCP, pinfo->srcport, pinfo->destport, 0); } else { conversation = conversation_new(pinfo->num, &pinfo->src, - &null_address, conversation_pt_to_endpoint_type(pinfo->ptype), pinfo->srcport, + &null_address, conversation_pt_to_conversation_type(pinfo->ptype), pinfo->srcport, pinfo->destport, 0); } } diff --git a/epan/dissectors/packet-ms-mms.c b/epan/dissectors/packet-ms-mms.c index 2510b7662e..5053c59fd8 100644 --- a/epan/dissectors/packet-ms-mms.c +++ b/epan/dissectors/packet-ms-mms.c @@ -296,7 +296,7 @@ static void dissect_media_stream_mbr_selector(tvbuff_t *tvb, proto_tree *tree, g static void dissect_header_request(tvbuff_t *tvb, proto_tree *tree, guint offset); static void dissect_stop_button_pressed(tvbuff_t *tvb, proto_tree *tree, guint offset); -static void msmms_data_add_address(packet_info *pinfo, address *addr, endpoint_type et, int port); +static void msmms_data_add_address(packet_info *pinfo, address *addr, conversation_type ckt, int port); @@ -751,21 +751,21 @@ static void dissect_client_transport_info(tvbuff_t *tvb, packet_info *pinfo, pro /* Use this information to set up a conversation for the data stream */ if (fields_matched == 6) { - endpoint_type et = ENDPOINT_NONE; + conversation_type ckt = CONVERSATION_NONE; /* Work out the port type */ if (strncmp(protocol, "UDP", 3) == 0) { - et = ENDPOINT_UDP; + ckt = CONVERSATION_UDP; } else if (strncmp(protocol, "TCP", 3) == 0) { - et = ENDPOINT_TCP; + ckt = CONVERSATION_TCP; } /* Set the dissector for indicated conversation */ - if (et != ENDPOINT_NONE) + if (ckt != CONVERSATION_NONE) { guint8 octets[4]; address addr; @@ -776,7 +776,7 @@ static void dissect_client_transport_info(tvbuff_t *tvb, packet_info *pinfo, pro addr.type = AT_IPv4; addr.len = 4; addr.data = octets; - msmms_data_add_address(pinfo, &addr, et, port); + msmms_data_add_address(pinfo, &addr, ckt, port); } } } @@ -1097,7 +1097,7 @@ static void dissect_stop_button_pressed(tvbuff_t *tvb, proto_tree *tree, guint o /********************************************************/ /* Helper function to set up an MS-MMS data conversation */ /********************************************************/ -static void msmms_data_add_address(packet_info *pinfo, address *addr, endpoint_type et, int port) +static void msmms_data_add_address(packet_info *pinfo, address *addr, conversation_type ckt, int port) { address null_addr; conversation_t *p_conv; @@ -1114,13 +1114,13 @@ static void msmms_data_add_address(packet_info *pinfo, address *addr, endpoint_t /* Check if the ip address and port combination is not * already registered as a conversation. */ - p_conv = find_conversation(pinfo->num, addr, &null_addr, et, port, 0, + p_conv = find_conversation(pinfo->num, addr, &null_addr, ckt, port, 0, NO_ADDR_B | NO_PORT_B); /* If not, create a new conversation. */ if (!p_conv) { - p_conv = conversation_new(pinfo->num, addr, &null_addr, et, + p_conv = conversation_new(pinfo->num, addr, &null_addr, ckt, (guint32)port, 0, NO_ADDR2 | NO_PORT2); } diff --git a/epan/dissectors/packet-msproxy.c b/epan/dissectors/packet-msproxy.c index fdac3fde20..ec05d2b12d 100644 --- a/epan/dissectors/packet-msproxy.c +++ b/epan/dissectors/packet-msproxy.c @@ -161,7 +161,7 @@ typedef struct { guint32 clnt_port; guint32 dst_port; guint32 server_int_port; - endpoint_type etype; + conversation_type ctype; }hash_entry_t; @@ -172,7 +172,7 @@ typedef struct { guint32 clnt_port; guint32 server_int_port; guint32 remote_port; - endpoint_type etype; + conversation_type ctype; }redirect_entry_t; @@ -202,7 +202,7 @@ static int msproxy_sub_dissector( tvbuff_t *tvb, packet_info *pinfo, col_set_str(pinfo->cinfo, COL_PROTOCOL, "MS Proxy"); col_set_str(pinfo->cinfo, COL_INFO, - (( redirect_info->etype == ENDPOINT_TCP) ? "TCP stream" : + (( redirect_info->ctype == CONVERSATION_TCP) ? "TCP stream" : "UDP packets")); if ( tree) { @@ -228,7 +228,7 @@ static int msproxy_sub_dissector( tvbuff_t *tvb, packet_info *pinfo, *ptr = redirect_info->remote_port; - if ( redirect_info->etype == ENDPOINT_TCP) + if ( redirect_info->ctype == CONVERSATION_TCP) decode_tcp_ports( tvb, 0, pinfo, tree, pinfo->srcport, pinfo->destport, NULL, NULL); else @@ -267,12 +267,12 @@ static void add_msproxy_conversation( packet_info *pinfo, } conversation = find_conversation( pinfo->num, &pinfo->src, - &pinfo->dst, hash_info->etype, hash_info->server_int_port, + &pinfo->dst, hash_info->ctype, hash_info->server_int_port, hash_info->clnt_port, 0); if ( !conversation) { conversation = conversation_new( pinfo->num, &pinfo->src, &pinfo->dst, - hash_info->etype, hash_info->server_int_port, + hash_info->ctype, hash_info->server_int_port, hash_info->clnt_port, 0); } conversation_set_dissector(conversation, msproxy_sub_handle); @@ -283,7 +283,7 @@ static void add_msproxy_conversation( packet_info *pinfo, new_conv_info->clnt_port = hash_info->clnt_port; new_conv_info->remote_port = hash_info->dst_port; new_conv_info->server_int_port = hash_info->server_int_port; - new_conv_info->etype = hash_info->etype; + new_conv_info->ctype = hash_info->ctype; conversation_add_proto_data(conversation, proto_msproxy, new_conv_info); @@ -455,7 +455,7 @@ static void dissect_tcp_bind(tvbuff_t *tvb, int offset, /* dissector. */ - conv_info->etype = ENDPOINT_TCP; + conv_info->ctype = CONVERSATION_TCP; if ( tree) { offset += 6; @@ -478,7 +478,7 @@ static void dissect_request_connect(tvbuff_t *tvb, int offset, /* decode the connect request, display */ - conv_info->etype = ENDPOINT_TCP; + conv_info->ctype = CONVERSATION_TCP; offset += 20; @@ -579,12 +579,12 @@ static void dissect_udp_bind(tvbuff_t *tvb, int offset, proto_tree *tree, hash_entry_t *conv_info) { /* - * Dissect the udp bind request. Load the endpoint type (ENDPOINT_UDP) - * and the remote address so bind_info can use it to create conversation - * dissector. + * Dissect the udp bind request. Load the conversation key type + * (CONVERSATION_UDP) and the remote address so bind_info + * can use it to create conversation dissector. */ - conv_info->etype = ENDPOINT_UDP; + conv_info->ctype = CONVERSATION_UDP; offset += 8; @@ -809,7 +809,7 @@ static void dissect_connect_ack( tvbuff_t *tvb, int offset, packet_info *pinfo, offset, 2, ENC_BIG_ENDIAN); - conv_info->etype = ENDPOINT_TCP; + conv_info->ctype = CONVERSATION_TCP; conv_info->server_int_port = tvb_get_ntohs( tvb, offset); offset += 2; diff --git a/epan/dissectors/packet-msrp.c b/epan/dissectors/packet-msrp.c index c60b582822..fbf2514bb8 100644 --- a/epan/dissectors/packet-msrp.c +++ b/epan/dissectors/packet-msrp.c @@ -165,14 +165,14 @@ msrp_add_address( packet_info *pinfo, * Check if the ip address and port combination is not * already registered as a conversation. */ - p_conv = find_conversation( pinfo->num, addr, &null_addr, ENDPOINT_TCP, port, 0, + p_conv = find_conversation( pinfo->num, addr, &null_addr, CONVERSATION_TCP, port, 0, NO_ADDR_B | NO_PORT_B); /* * If not, create a new conversation. */ if (!p_conv) { - p_conv = conversation_new( pinfo->num, addr, &null_addr, ENDPOINT_TCP, + p_conv = conversation_new( pinfo->num, addr, &null_addr, CONVERSATION_TCP, (guint32)port, 0, NO_ADDR2 | NO_PORT2); } @@ -219,7 +219,7 @@ show_setup_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { /* First time, get info from conversation */ p_conv = find_conversation(pinfo->num, &pinfo->net_dst, &pinfo->net_src, - ENDPOINT_TCP, + CONVERSATION_TCP, pinfo->destport, pinfo->srcport, 0); if (p_conv) diff --git a/epan/dissectors/packet-mtp2.c b/epan/dissectors/packet-mtp2.c index e6aa336ded..1e83c20456 100644 --- a/epan/dissectors/packet-mtp2.c +++ b/epan/dissectors/packet-mtp2.c @@ -940,12 +940,12 @@ dissect_mtp2_bitstream(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void #endif /* find conversation related to this packet */ - conversation = find_conversation(pinfo->fd->num,&pinfo->src, &pinfo->dst,conversation_pt_to_endpoint_type(pinfo->ptype), pinfo->srcport, pinfo->destport, 0); + conversation = find_conversation(pinfo->fd->num,&pinfo->src, &pinfo->dst,conversation_pt_to_conversation_type(pinfo->ptype), pinfo->srcport, pinfo->destport, 0); /* if there is no conversation or it does not contain the per packet data we need */ if (conversation == NULL) { /* there was no conversation => this packet is the first in a new conversation => let's create it */ /* here we decide about the direction, every following packet with the same direction as this first one will be a forward packet */ - conversation = conversation_new(pinfo->fd->num,&pinfo->src, &pinfo->dst,conversation_pt_to_endpoint_type(pinfo->ptype), pinfo->srcport, pinfo->destport, 0); + conversation = conversation_new(pinfo->fd->num,&pinfo->src, &pinfo->dst,conversation_pt_to_conversation_type(pinfo->ptype), pinfo->srcport, pinfo->destport, 0); } /* there is no proto data in the conversation */ diff --git a/epan/dissectors/packet-nano.c b/epan/dissectors/packet-nano.c index 41cd4c57f4..b876ac09cf 100644 --- a/epan/dissectors/packet-nano.c +++ b/epan/dissectors/packet-nano.c @@ -735,7 +735,7 @@ static int dissect_nano_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, // try to find this conversation if ((conversation = find_conversation_pinfo(pinfo, 0)) == NULL) { // create new conversation - conversation = conversation_new(pinfo->num, &pinfo->src, &pinfo->dst, conversation_pt_to_endpoint_type(pinfo->ptype), + conversation = conversation_new(pinfo->num, &pinfo->src, &pinfo->dst, conversation_pt_to_conversation_type(pinfo->ptype), pinfo->srcport, pinfo->destport, 0); } diff --git a/epan/dissectors/packet-nbap.c b/epan/dissectors/packet-nbap.c index 57e06b86a1..046997e016 100644 --- a/epan/dissectors/packet-nbap.c +++ b/epan/dissectors/packet-nbap.c @@ -10452,7 +10452,7 @@ nbap_hsdsch_channel_info = nbap_private_data->nbap_hsdsch_channel_info; for (i = 0; i < maxNrOfMACdFlows; i++) { if (nbap_hsdsch_channel_info[i].crnc_port != 0){ conversation = find_conversation(actx->pinfo->num, &(nbap_hsdsch_channel_info[i].crnc_address), &null_addr, - ENDPOINT_UDP, nbap_hsdsch_channel_info[i].crnc_port, 0, NO_ADDR_B); + CONVERSATION_UDP, nbap_hsdsch_channel_info[i].crnc_port, 0, NO_ADDR_B); if(conversation != NULL){ umts_fp_conversation_info = (umts_fp_conversation_info_t *)conversation_get_proto_data(conversation, proto_fp); DISSECTOR_ASSERT(umts_fp_conversation_info != NULL); @@ -18535,7 +18535,7 @@ nbap_edch_channel_info = nbap_private_data->nbap_edch_channel_info; e_dch_macdflow_id = nbap_private_data->e_dch_macdflow_id; clear_address(&null_addr); p_conv = find_conversation(actx->pinfo->num, &nbap_edch_channel_info[e_dch_macdflow_id].crnc_address, &null_addr, - ENDPOINT_UDP, nbap_edch_channel_info[e_dch_macdflow_id].crnc_port, 0, NO_ADDR_B); + CONVERSATION_UDP, nbap_edch_channel_info[e_dch_macdflow_id].crnc_port, 0, NO_ADDR_B); if(!p_conv) return offset; @@ -18830,7 +18830,7 @@ nbap_private_data->num_items = 1; /* Check if we have conversation info */ clear_address(&null_addr); p_conv = find_conversation(actx->pinfo->num, &nbap_edch_channel_info[e_dch_macdflow_id].crnc_address, &null_addr, - ENDPOINT_UDP, nbap_edch_channel_info[e_dch_macdflow_id].crnc_port, 0, NO_ADDR_B); + CONVERSATION_UDP, nbap_edch_channel_info[e_dch_macdflow_id].crnc_port, 0, NO_ADDR_B); if(!p_conv) return offset; @@ -18953,7 +18953,7 @@ nbap_private_data->binding_id_port = 0; set_address(&dst_addr, AT_IPv4, 4, &transportLayerAddress_ipv4); old_conversation = find_conversation(actx->pinfo->num, &dst_addr, - &null_addr, ENDPOINT_UDP, bindingID, + &null_addr, CONVERSATION_UDP, bindingID, 0, NO_ADDR_B|NO_PORT_B); if(old_conversation){ @@ -18968,7 +18968,7 @@ nbap_private_data->binding_id_port = 0; /* It's not part of any conversation - create a new one. */ conversation = conversation_new(actx->pinfo->num, &dst_addr, - &null_addr, ENDPOINT_UDP, bindingID, + &null_addr, CONVERSATION_UDP, bindingID, 0, NO_ADDR2|NO_PORT2); /* Set dissector */ @@ -23663,11 +23663,11 @@ int i; if (nbap_common_channel_info[i].crnc_port != 0){ conversation = find_conversation(actx->pinfo->num, &(nbap_common_channel_info[i].crnc_address), &null_addr, - ENDPOINT_UDP, nbap_common_channel_info[i].crnc_port, 0, NO_ADDR_B); + CONVERSATION_UDP, nbap_common_channel_info[i].crnc_port, 0, NO_ADDR_B); if (conversation == NULL) { conversation = conversation_new(actx->pinfo->num, &(nbap_common_channel_info[i].crnc_address), - &null_addr, ENDPOINT_UDP, nbap_common_channel_info[i].crnc_port, + &null_addr, CONVERSATION_UDP, nbap_common_channel_info[i].crnc_port, 0, NO_ADDR2|NO_PORT2); /* Set dissector */ @@ -24137,13 +24137,13 @@ dissect_nbap_HSDSCH_FDD_Information(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_ address_to_str (actx->pinfo->pool, &(nbap_hsdsch_channel_info[i].crnc_address)), nbap_hsdsch_channel_info[i].crnc_port); conversation = find_conversation(actx->pinfo->num, &(nbap_hsdsch_channel_info[i].crnc_address), &null_addr, - ENDPOINT_UDP, nbap_hsdsch_channel_info[i].crnc_port, 0, NO_ADDR_B); + CONVERSATION_UDP, nbap_hsdsch_channel_info[i].crnc_port, 0, NO_ADDR_B); if (conversation == NULL) { /* It's not part of any conversation - create a new one. */ nbap_debug("Frame %u HSDSCH-MACdFlows-Information: Set up conv on Port %u", actx->pinfo->num, nbap_hsdsch_channel_info[i].crnc_port); conversation = conversation_new(actx->pinfo->num, &(nbap_hsdsch_channel_info[i].crnc_address), - &null_addr, ENDPOINT_UDP, nbap_hsdsch_channel_info[i].crnc_port, + &null_addr, CONVERSATION_UDP, nbap_hsdsch_channel_info[i].crnc_port, 0, NO_ADDR2|NO_PORT2); /* Set dissector */ @@ -24483,14 +24483,14 @@ dissect_nbap_HSDSCH_Information_to_Modify(tvbuff_t *tvb _U_, int offset _U_, asn address_to_str (actx->pinfo->pool, &(nbap_hsdsch_channel_info[i].crnc_address)), nbap_hsdsch_channel_info[i].crnc_port); conversation = find_conversation(actx->pinfo->num, &(nbap_hsdsch_channel_info[i].crnc_address), &null_addr, - ENDPOINT_UDP, nbap_hsdsch_channel_info[i].crnc_port, 0, NO_ADDR_B); + CONVERSATION_UDP, nbap_hsdsch_channel_info[i].crnc_port, 0, NO_ADDR_B); if (conversation == NULL) { /* It's not part of any conversation - create a new one. */ nbap_debug(" Set up conv on Port %u", nbap_hsdsch_channel_info[i].crnc_port); conversation = conversation_new(actx->pinfo->num, &(nbap_hsdsch_channel_info[i].crnc_address), - &null_addr, ENDPOINT_UDP, nbap_hsdsch_channel_info[i].crnc_port, + &null_addr, CONVERSATION_UDP, nbap_hsdsch_channel_info[i].crnc_port, 0, NO_ADDR2|NO_PORT2); /* Set dissector */ @@ -29250,13 +29250,13 @@ nbap_private_data->dch_id = 0xFFFFFFFF; set_address(&dst_addr, AT_IPv4, 4, &transportLayerAddress_ipv4); conversation = find_conversation(actx->pinfo->num, &dst_addr, - &null_addr, ENDPOINT_UDP, nbap_private_data->binding_id_port, + &null_addr, CONVERSATION_UDP, nbap_private_data->binding_id_port, 0, NO_ADDR_B|NO_PORT_B); if (conversation == NULL) { /* It's not part of any conversation - create a new one. */ conversation = conversation_new(actx->pinfo->num, &dst_addr, - &null_addr, ENDPOINT_UDP, nbap_private_data->binding_id_port, + &null_addr, CONVERSATION_UDP, nbap_private_data->binding_id_port, 0, NO_ADDR2|NO_PORT2); /* Set dissector */ @@ -29391,7 +29391,7 @@ nbap_private_data->binding_id_port = 0; set_address(&dst_addr, AT_IPv4, 4, &transportLayerAddress_ipv4); conversation = find_conversation(actx->pinfo->num, &dst_addr, - &null_addr, ENDPOINT_UDP, bindingID, + &null_addr, CONVERSATION_UDP, bindingID, 0, NO_ADDR_B|NO_PORT_B); if (conversation) { umts_fp_conversation_info = (umts_fp_conversation_info_t*)conversation_get_proto_data(conversation, proto_fp); @@ -29404,7 +29404,7 @@ nbap_private_data->binding_id_port = 0; /* It's not part of any conversation - create a new one. */ conversation = conversation_new(actx->pinfo->num, &dst_addr, - &null_addr, ENDPOINT_UDP, bindingID, + &null_addr, CONVERSATION_UDP, bindingID, 0, NO_ADDR2|NO_PORT2); /* Set dissector */ @@ -32950,7 +32950,7 @@ nbap_private_data->transport_format_set_type = NBAP_CPCH; set_address(&dst_addr, AT_IPv4, 4, &transportLayerAddress_ipv4); - conversation = conversation_new(actx->pinfo->num, &dst_addr, &null_addr, ENDPOINT_UDP, bindingID, 0, NO_ADDR2|NO_PORT2); + conversation = conversation_new(actx->pinfo->num, &dst_addr, &null_addr, CONVERSATION_UDP, bindingID, 0, NO_ADDR2|NO_PORT2); /* Set dissector */ conversation_set_dissector(conversation, fp_handle); @@ -33124,7 +33124,7 @@ nbap_private_data->num_items = 1; set_address(&dst_addr, AT_IPv4, 4, &transportLayerAddress_ipv4); - conversation = conversation_new(actx->pinfo->num, &dst_addr, &null_addr, ENDPOINT_UDP, bindingID, 0, NO_ADDR2|NO_PORT2); + conversation = conversation_new(actx->pinfo->num, &dst_addr, &null_addr, CONVERSATION_UDP, bindingID, 0, NO_ADDR2|NO_PORT2); /* Set dissector */ conversation_set_dissector(conversation, fp_handle); @@ -33268,7 +33268,7 @@ nbap_private_data->transport_format_set_type = NBAP_CPCH; set_address(&dst_addr, AT_IPv4, 4, &transportLayerAddress_ipv4); - conversation = conversation_new(actx->pinfo->num, &dst_addr, &null_addr, ENDPOINT_UDP, bindingID, 0, NO_ADDR2|NO_PORT2); + conversation = conversation_new(actx->pinfo->num, &dst_addr, &null_addr, CONVERSATION_UDP, bindingID, 0, NO_ADDR2|NO_PORT2); conversation_set_dissector(conversation, fp_handle); @@ -55751,12 +55751,12 @@ static void add_hsdsch_bind(packet_info *pinfo){ clear_address(&null_addr); for (i = 0; i < maxNrOfMACdFlows; i++) { if (nbap_hsdsch_channel_info[i].crnc_port != 0){ - conversation = find_conversation(pinfo->num, &(nbap_hsdsch_channel_info[i].crnc_address), &null_addr, ENDPOINT_UDP, + conversation = find_conversation(pinfo->num, &(nbap_hsdsch_channel_info[i].crnc_address), &null_addr, CONVERSATION_UDP, nbap_hsdsch_channel_info[i].crnc_port, 0, NO_ADDR_B); if (conversation == NULL) { /* It's not part of any conversation - create a new one. */ - conversation = conversation_new(pinfo->num, &(nbap_hsdsch_channel_info[i].crnc_address), &null_addr, ENDPOINT_UDP, + conversation = conversation_new(pinfo->num, &(nbap_hsdsch_channel_info[i].crnc_address), &null_addr, CONVERSATION_UDP, nbap_hsdsch_channel_info[i].crnc_port, 0, NO_ADDR2|NO_PORT2); /* Set dissector */ diff --git a/epan/dissectors/packet-ncp.c b/epan/dissectors/packet-ncp.c index 2fc6f29e1c..29be6962ca 100644 --- a/epan/dissectors/packet-ncp.c +++ b/epan/dissectors/packet-ncp.c @@ -766,7 +766,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, ENDPOINT_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, CONVERSATION_NCP); } return TAP_PACKET_REDRAW; @@ -885,7 +885,7 @@ dissect_ncp_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, * connection. */ conversation = find_conversation(pinfo->num, &pinfo->src, &pinfo->dst, - ENDPOINT_NCP, (guint32) pinfo->srcport, (guint32) pinfo->destport, + CONVERSATION_NCP, (guint32) pinfo->srcport, (guint32) pinfo->destport, 0); if ((ncpiph.length & 0x80000000) || ncpiph.signature == NCPIP_RPLY) { /* First time through we will record the initial connection and task @@ -909,7 +909,7 @@ dissect_ncp_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, * - create a new one. */ conversation = conversation_new(pinfo->num, &pinfo->src, - &pinfo->dst, ENDPOINT_NCP, (guint32) pinfo->srcport, (guint32) pinfo->destport, 0); + &pinfo->dst, CONVERSATION_NCP, (guint32) pinfo->srcport, (guint32) pinfo->destport, 0); mncp_hash_insert(conversation, nw_connection, header.task, pinfo); } /* If this is a request packet then we @@ -951,7 +951,7 @@ dissect_ncp_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, * - create a new one. */ conversation = conversation_new(pinfo->num, &pinfo->src, - &pinfo->dst, ENDPOINT_NCP, (guint32) pinfo->srcport, (guint32) pinfo->destport, 0); + &pinfo->dst, CONVERSATION_NCP, (guint32) pinfo->srcport, (guint32) pinfo->destport, 0); mncp_hash_insert(conversation, nw_connection, header.task, pinfo); } /* find the record telling us the request diff --git a/epan/dissectors/packet-ncp2222.inc b/epan/dissectors/packet-ncp2222.inc index 37c28d4d07..7659fc683f 100644 --- a/epan/dissectors/packet-ncp2222.inc +++ b/epan/dissectors/packet-ncp2222.inc @@ -6832,7 +6832,7 @@ nds_defrag(tvbuff_t *tvb, packet_info *pinfo, guint32 nw_connection, guint8 sequ if (!pinfo->fd->visited) { /* Find the conversation whence the request would have come. */ conversation = find_conversation(pinfo->num, &pinfo->src, &pinfo->dst, - ENDPOINT_NCP, nw_connection, nw_connection, 0); + CONVERSATION_NCP, nw_connection, nw_connection, 0); if (conversation != NULL) { /* find the record telling us the request made that caused this reply */ @@ -7192,12 +7192,12 @@ dissect_ncp_request(tvbuff_t *tvb, packet_info *pinfo, as being part of a single conversation so that we can let the user select that conversation to be displayed.) */ conversation = find_conversation(pinfo->num, &pinfo->src, &pinfo->dst, - ENDPOINT_NCP, nw_connection, nw_connection, 0); + CONVERSATION_NCP, nw_connection, nw_connection, 0); if (conversation == NULL) { /* It's not part of any conversation - create a new one. */ conversation = conversation_new(pinfo->num, &pinfo->src, &pinfo->dst, - ENDPOINT_NCP, nw_connection, nw_connection, 0); + CONVERSATION_NCP, nw_connection, nw_connection, 0); } request_value = ncp_hash_insert(conversation, sequence, ncp_rec, pinfo->num); request_value->req_frame_num = pinfo->num; @@ -7351,7 +7351,7 @@ dissect_ncp_request(tvbuff_t *tvb, packet_info *pinfo, if (!request_value) { conversation = find_conversation(pinfo->num, &pinfo->src, &pinfo->dst, - ENDPOINT_NCP, nw_connection, nw_connection, 0); + CONVERSATION_NCP, nw_connection, nw_connection, 0); if (conversation != NULL) { /* find the record telling us the request made that caused this reply */ @@ -8022,7 +8022,7 @@ dissect_ncp_reply(tvbuff_t *tvb, packet_info *pinfo, if (!pinfo->fd->visited) { /* Find the conversation whence the request would have come. */ conversation = find_conversation(pinfo->num, &pinfo->src, &pinfo->dst, - ENDPOINT_NCP, nw_connection, nw_connection, 0); + CONVERSATION_NCP, nw_connection, nw_connection, 0); if (conversation != NULL) { /* find the record telling us the request made that caused this reply */ @@ -8042,7 +8042,7 @@ dissect_ncp_reply(tvbuff_t *tvb, packet_info *pinfo, proper request packet. */ else { conversation = find_conversation(pinfo->num, - &pinfo->src, &pinfo->dst, ENDPOINT_NCP, 65535, 65535, 0); + &pinfo->src, &pinfo->dst, CONVERSATION_NCP, 65535, 65535, 0); if (conversation != NULL) { /* find the record telling us the request made that caused this reply */ @@ -8056,7 +8056,7 @@ dissect_ncp_reply(tvbuff_t *tvb, packet_info *pinfo, } else { conversation = find_conversation(pinfo->num, - &pinfo->src, &pinfo->dst, ENDPOINT_NCP, 0, 0, 0); + &pinfo->src, &pinfo->dst, CONVERSATION_NCP, 0, 0, 0); if (conversation != NULL) { /* find the record telling us the request made that caused this reply */ @@ -8076,7 +8076,7 @@ dissect_ncp_reply(tvbuff_t *tvb, packet_info *pinfo, else { /*request_value = p_get_proto_data(wmem_file_scope(), pinfo, proto_ncp);*/ conversation = find_conversation(pinfo->num, &pinfo->src, &pinfo->dst, - ENDPOINT_NCP, nw_connection, nw_connection, 0); + CONVERSATION_NCP, nw_connection, nw_connection, 0); if (conversation != NULL) { request_value = ncp_hash_lookup(conversation, @@ -8348,11 +8348,11 @@ dissect_nds_request(tvbuff_t *tvb, packet_info *pinfo, let the user select that conversation to be displayed.) */ conversation = find_conversation(pinfo->num, &pinfo->src, &pinfo->dst, - ENDPOINT_NCP, nw_connection, nw_connection, 0); + CONVERSATION_NCP, nw_connection, nw_connection, 0); if (conversation == NULL) { /* It's not part of any conversation - create a new one. */ conversation = conversation_new(pinfo->num, &pinfo->src, &pinfo->dst, - ENDPOINT_NCP, nw_connection, nw_connection, 0); + CONVERSATION_NCP, nw_connection, nw_connection, 0); } if (!pinfo->fd->visited) { @@ -9450,13 +9450,13 @@ dissect_ping_req(tvbuff_t *tvb, packet_info *pinfo, let the user select that conversation to be displayed.) */ conversation = find_conversation(pinfo->num, &pinfo->src, &pinfo->dst, - ENDPOINT_NCP, nw_connection, nw_connection, 0); + CONVERSATION_NCP, nw_connection, nw_connection, 0); if (conversation == NULL) { /* It's not part of any conversation - create a new one. */ conversation = conversation_new(pinfo->num, &pinfo->src, &pinfo->dst, - ENDPOINT_NCP, nw_connection, nw_connection, 0); + CONVERSATION_NCP, nw_connection, nw_connection, 0); } request_value = ncp_hash_insert(conversation, sequence, ncp_rec, pinfo->num); diff --git a/epan/dissectors/packet-ndps.c b/epan/dissectors/packet-ndps.c index 7c27d8099c..c6d59d0313 100644 --- a/epan/dissectors/packet-ndps.c +++ b/epan/dissectors/packet-ndps.c @@ -4262,13 +4262,13 @@ ndps_defrag(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, spx_info *spx_i { /* Lets see if this is a new conversation */ conversation = find_conversation(pinfo->num, &pinfo->src, &pinfo->dst, - ENDPOINT_NCP, (guint32) pinfo->srcport, (guint32) pinfo->srcport, 0); + CONVERSATION_NCP, (guint32) pinfo->srcport, (guint32) pinfo->srcport, 0); if (conversation == NULL) { /* It's not part of any conversation - create a new one. */ conversation = conversation_new(pinfo->num, &pinfo->src, &pinfo->dst, - ENDPOINT_NCP, (guint32) pinfo->srcport, (guint32) pinfo->srcport, 0); + CONVERSATION_NCP, (guint32) pinfo->srcport, (guint32) pinfo->srcport, 0); } /* So now we need to get the request info for this conversation */ @@ -4454,13 +4454,13 @@ dissect_ndps_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ndps_tree, g let the user select that conversation to be displayed.) */ conversation = find_conversation(pinfo->num, &pinfo->src, &pinfo->dst, - ENDPOINT_NCP, (guint32) pinfo->srcport, (guint32) pinfo->srcport, 0); + CONVERSATION_NCP, (guint32) pinfo->srcport, (guint32) pinfo->srcport, 0); if (conversation == NULL) { /* It's not part of any conversation - create a new one. */ conversation = conversation_new(pinfo->num, &pinfo->src, &pinfo->dst, - ENDPOINT_NCP, (guint32) pinfo->srcport, (guint32) pinfo->srcport, 0); + CONVERSATION_NCP, (guint32) pinfo->srcport, (guint32) pinfo->srcport, 0); } request_value = ndps_hash_insert(conversation, (guint32) pinfo->srcport); @@ -6708,7 +6708,7 @@ dissect_ndps_reply(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ndps_tree, int if (!pinfo->fd->visited) { /* Find the conversation whence the request would have come. */ conversation = find_conversation(pinfo->num, &pinfo->src, &pinfo->dst, - ENDPOINT_NCP, (guint32) pinfo->destport, (guint32) pinfo->destport, 0); + CONVERSATION_NCP, (guint32) pinfo->destport, (guint32) pinfo->destport, 0); if (conversation != NULL) { /* find the record telling us the request made that caused this reply */ diff --git a/epan/dissectors/packet-nvme-rdma.c b/epan/dissectors/packet-nvme-rdma.c index 13940ece7e..2375e33343 100644 --- a/epan/dissectors/packet-nvme-rdma.c +++ b/epan/dissectors/packet-nvme-rdma.c @@ -180,7 +180,7 @@ find_ib_conversation(packet_info *pinfo, conversation_infiniband_data **uni_conv conversation_infiniband_data *conv_data; conv = find_conversation(pinfo->num, &pinfo->dst, &pinfo->dst, - ENDPOINT_IBQP, pinfo->destport, pinfo->destport, + CONVERSATION_IBQP, pinfo->destport, pinfo->destport, NO_ADDR_B|NO_PORT_B); if (!conv) return NULL; /* nothing to do with no conversation context */ @@ -194,7 +194,7 @@ find_ib_conversation(packet_info *pinfo, conversation_infiniband_data **uni_conv * conversation, so that we can relate to nvme q. */ return find_conversation(pinfo->num, &pinfo->src, &pinfo->dst, - ENDPOINT_IBQP, pinfo->srcport, pinfo->destport, 0); + CONVERSATION_IBQP, pinfo->srcport, pinfo->destport, 0); } static guint16 find_nvme_qid(packet_info *pinfo) @@ -204,7 +204,7 @@ static guint16 find_nvme_qid(packet_info *pinfo) guint16 qid; conv = find_conversation(pinfo->num, &pinfo->dst, &pinfo->dst, - ENDPOINT_IBQP, pinfo->destport, pinfo->destport, + CONVERSATION_IBQP, pinfo->destport, pinfo->destport, NO_ADDR_B|NO_PORT_B); if (!conv) return 0; /* nothing to do with no conversation context */ @@ -218,7 +218,7 @@ static guint16 find_nvme_qid(packet_info *pinfo) return qid; } conv = find_conversation(pinfo->num, &pinfo->src, &pinfo->src, - ENDPOINT_IBQP, conv_data->src_qp, conv_data->src_qp, + CONVERSATION_IBQP, conv_data->src_qp, conv_data->src_qp, NO_ADDR_B|NO_PORT_B); if (!conv) return 0; @@ -256,7 +256,7 @@ find_ib_cm_conversation(packet_info *pinfo) conversation_t *conv; conv = find_conversation(pinfo->num, &pinfo->src, &pinfo->dst, - ENDPOINT_IBQP, pinfo->srcport, pinfo->destport, 0); + CONVERSATION_IBQP, pinfo->srcport, pinfo->destport, 0); if (!conv) return NULL; diff --git a/epan/dissectors/packet-opensafety.c b/epan/dissectors/packet-opensafety.c index e269e7e2ae..4e7f46d108 100644 --- a/epan/dissectors/packet-opensafety.c +++ b/epan/dissectors/packet-opensafety.c @@ -2005,7 +2005,7 @@ opensafety_conversation_packet(void *pct, packet_info *pinfo, alloc_address_wmem(pinfo->pool, dst, AT_NUMERIC, (int) sizeof(guint16), &receiver); add_conversation_table_data(hash, src, dst, 0, 0, 1, osinfo->msg_len, &pinfo->rel_ts, &pinfo->abs_ts, - &opensafety_ct_dissector_info, ENDPOINT_NONE); + &opensafety_ct_dissector_info, CONVERSATION_NONE); return TAP_PACKET_REDRAW; } diff --git a/epan/dissectors/packet-portmap.c b/epan/dissectors/packet-portmap.c index 47e2e8de29..6dd62c3a1a 100644 --- a/epan/dissectors/packet-portmap.c +++ b/epan/dissectors/packet-portmap.c @@ -128,9 +128,9 @@ dissect_getport_reply(tvbuff_t *tvb, packet_info *pinfo _U_, port=tvb_get_ntohl(tvb, offset); if(port){ conversation_t *conv; - conv=find_conversation(pinfo->num, &pinfo->src, &pinfo->dst, ENDPOINT_UDP, port, 0, NO_ADDR_B|NO_PORT_B); + conv=find_conversation(pinfo->num, &pinfo->src, &pinfo->dst, CONVERSATION_UDP, port, 0, NO_ADDR_B|NO_PORT_B); if(!conv){ - conv=conversation_new(pinfo->num, &pinfo->src, &pinfo->dst, ENDPOINT_UDP, port, 0, NO_ADDR2|NO_PORT2); + conv=conversation_new(pinfo->num, &pinfo->src, &pinfo->dst, CONVERSATION_UDP, port, 0, NO_ADDR2|NO_PORT2); } conversation_set_dissector(conv, rpc_handle); } diff --git a/epan/dissectors/packet-radius.c b/epan/dissectors/packet-radius.c index 7fa3a4bced..ddda9c2490 100644 --- a/epan/dissectors/packet-radius.c +++ b/epan/dissectors/packet-radius.c @@ -2052,13 +2052,13 @@ dissect_radius(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _ * if you do that. */ conversation = find_conversation(pinfo->num, &pinfo->src, - &null_address, conversation_pt_to_endpoint_type(pinfo->ptype), pinfo->srcport, + &null_address, conversation_pt_to_conversation_type(pinfo->ptype), pinfo->srcport, pinfo->destport, 0); if (conversation == NULL) { /* It's not part of any conversation - create a new one. */ conversation = conversation_new(pinfo->num, &pinfo->src, - &null_address, conversation_pt_to_endpoint_type(pinfo->ptype), pinfo->srcport, + &null_address, conversation_pt_to_conversation_type(pinfo->ptype), pinfo->srcport, pinfo->destport, 0); } @@ -2190,7 +2190,7 @@ dissect_radius(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _ * if you do that. */ conversation = find_conversation(pinfo->num, &null_address, - &pinfo->dst, conversation_pt_to_endpoint_type(pinfo->ptype), pinfo->srcport, pinfo->destport, 0); + &pinfo->dst, conversation_pt_to_conversation_type(pinfo->ptype), pinfo->srcport, pinfo->destport, 0); if (conversation == NULL) { /* Nothing more to do here */ break; diff --git a/epan/dissectors/packet-rdt.c b/epan/dissectors/packet-rdt.c index f4385117c7..06be6a25aa 100644 --- a/epan/dissectors/packet-rdt.c +++ b/epan/dissectors/packet-rdt.c @@ -232,13 +232,13 @@ void rdt_add_address(packet_info *pinfo, /* Check if the ip address and port combination is not already registered as a conversation. */ - p_conv = find_conversation(pinfo->num, addr, &null_addr, ENDPOINT_UDP, port, other_port, + p_conv = find_conversation(pinfo->num, addr, &null_addr, CONVERSATION_UDP, port, other_port, NO_ADDR_B | (!other_port ? NO_PORT_B : 0)); /* If not, create a new conversation. */ if ( !p_conv || p_conv->setup_frame != pinfo->num) { - p_conv = conversation_new(pinfo->num, addr, &null_addr, ENDPOINT_UDP, + p_conv = conversation_new(pinfo->num, addr, &null_addr, CONVERSATION_UDP, (guint32)port, (guint32)other_port, NO_ADDR2 | (!other_port ? NO_PORT2 : 0)); } @@ -1184,7 +1184,7 @@ static void show_setup_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { /* First time, get info from conversation */ p_conv = find_conversation(pinfo->num, &pinfo->net_dst, &pinfo->net_src, - conversation_pt_to_endpoint_type(pinfo->ptype), + conversation_pt_to_conversation_type(pinfo->ptype), pinfo->destport, pinfo->srcport, NO_ADDR_B); if (p_conv) { diff --git a/epan/dissectors/packet-reload-framing.c b/epan/dissectors/packet-reload-framing.c index 6e7bf77639..37aecb175f 100644 --- a/epan/dissectors/packet-reload-framing.c +++ b/epan/dissectors/packet-reload-framing.c @@ -211,7 +211,7 @@ dissect_reload_framing_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tr if (!conversation) { conversation = conversation_new(pinfo->num, &pinfo->src, &pinfo->dst, - conversation_pt_to_endpoint_type(pinfo->ptype), pinfo->srcport, pinfo->destport, 0); + conversation_pt_to_conversation_type(pinfo->ptype), pinfo->srcport, pinfo->destport, 0); } /* diff --git a/epan/dissectors/packet-rpc.c b/epan/dissectors/packet-rpc.c index 0047d7906c..01953ea9ac 100644 --- a/epan/dissectors/packet-rpc.c +++ b/epan/dissectors/packet-rpc.c @@ -1687,18 +1687,18 @@ get_conversation_for_call(packet_info *pinfo) * if you use NO_ADDR_B. */ conversation = find_conversation(pinfo->num, - &pinfo->src, &null_address, conversation_pt_to_endpoint_type(pinfo->ptype), + &pinfo->src, &null_address, conversation_pt_to_conversation_type(pinfo->ptype), pinfo->destport, 0, NO_ADDR_B|NO_PORT_B); } if (conversation == NULL) { if (pinfo->ptype == PT_TCP || pinfo->ptype == PT_IBQP || pinfo->ptype == PT_IWARP_MPA) { conversation = conversation_new(pinfo->num, - &pinfo->src, &pinfo->dst, conversation_pt_to_endpoint_type(pinfo->ptype), + &pinfo->src, &pinfo->dst, conversation_pt_to_conversation_type(pinfo->ptype), pinfo->srcport, pinfo->destport, 0); } else { conversation = conversation_new(pinfo->num, - &pinfo->src, &null_address, conversation_pt_to_endpoint_type(pinfo->ptype), + &pinfo->src, &null_address, conversation_pt_to_conversation_type(pinfo->ptype), pinfo->destport, 0, NO_ADDR2|NO_PORT2); } } @@ -1739,7 +1739,7 @@ find_conversation_for_reply(packet_info *pinfo) * if you use NO_ADDR_B. */ conversation = find_conversation(pinfo->num, - &pinfo->dst, &null_address, conversation_pt_to_endpoint_type(pinfo->ptype), + &pinfo->dst, &null_address, conversation_pt_to_conversation_type(pinfo->ptype), pinfo->srcport, 0, NO_ADDR_B|NO_PORT_B); } return conversation; @@ -1754,22 +1754,22 @@ new_conversation_for_reply(packet_info *pinfo) { case PT_TCP: conversation = conversation_new(pinfo->num, - &pinfo->src, &pinfo->dst, ENDPOINT_TCP, + &pinfo->src, &pinfo->dst, CONVERSATION_TCP, pinfo->srcport, pinfo->destport, 0); break; case PT_IBQP: conversation = conversation_new(pinfo->num, - &pinfo->src, &pinfo->dst, ENDPOINT_IBQP, + &pinfo->src, &pinfo->dst, CONVERSATION_IBQP, pinfo->srcport, pinfo->destport, 0); break; case PT_IWARP_MPA: conversation = conversation_new(pinfo->num, - &pinfo->src, &pinfo->dst, ENDPOINT_IWARP_MPA, + &pinfo->src, &pinfo->dst, CONVERSATION_IWARP_MPA, pinfo->srcport, pinfo->destport, 0); break; default: conversation = conversation_new(pinfo->num, - &pinfo->dst, &null_address, conversation_pt_to_endpoint_type(pinfo->ptype), + &pinfo->dst, &null_address, conversation_pt_to_conversation_type(pinfo->ptype), pinfo->srcport, 0, NO_ADDR2|NO_PORT2); break; } diff --git a/epan/dissectors/packet-rrc.c b/epan/dissectors/packet-rrc.c index bd467b7541..8c5beec020 100644 --- a/epan/dissectors/packet-rrc.c +++ b/epan/dissectors/packet-rrc.c @@ -39372,7 +39372,7 @@ dissect_rrc_C_RNTI(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, prot /* Finding FP conversation info */ p_conv = (conversation_t *)find_conversation(actx->pinfo->num, &actx->pinfo->net_dst, &actx->pinfo->net_src, - conversation_pt_to_endpoint_type(actx->pinfo->ptype), + conversation_pt_to_conversation_type(actx->pinfo->ptype), actx->pinfo->destport, actx->pinfo->srcport, NO_ADDR_B); /* If the current FP channel is FACH, Adding the C-RNTI / U-RNTI match to the FACH's RNTIs map*/ diff --git a/epan/dissectors/packet-rsvp.c b/epan/dissectors/packet-rsvp.c index f537c09733..0bc6b30d2f 100644 --- a/epan/dissectors/packet-rsvp.c +++ b/epan/dissectors/packet-rsvp.c @@ -2120,7 +2120,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, ENDPOINT_NONE); + 0, 0, 1, pinfo->fd->pkt_len, &pinfo->rel_ts, &pinfo->abs_ts, &rsvp_ct_dissector_info, CONVERSATION_NONE); return TAP_PACKET_REDRAW; } diff --git a/epan/dissectors/packet-rtcp.c b/epan/dissectors/packet-rtcp.c index 714c7473e3..04dfa2eab9 100644 --- a/epan/dissectors/packet-rtcp.c +++ b/epan/dissectors/packet-rtcp.c @@ -934,14 +934,14 @@ void srtcp_add_address( packet_info *pinfo, * Check if the ip address and port combination is not * already registered as a conversation. */ - p_conv = find_conversation( pinfo->num, addr, &null_addr, ENDPOINT_UDP, port, other_port, + p_conv = find_conversation( pinfo->num, addr, &null_addr, CONVERSATION_UDP, port, other_port, NO_ADDR_B | (!other_port ? NO_PORT_B : 0)); /* * If not, create a new conversation. */ if ( ! p_conv ) { - p_conv = conversation_new( pinfo->num, addr, &null_addr, ENDPOINT_UDP, + p_conv = conversation_new( pinfo->num, addr, &null_addr, CONVERSATION_UDP, (guint32)port, (guint32)other_port, NO_ADDR2 | (!other_port ? NO_PORT2 : 0)); } @@ -4044,7 +4044,7 @@ void show_setup_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) conversation_t *p_conv; /* First time, get info from conversation */ p_conv = find_conversation(pinfo->num, &pinfo->net_dst, &pinfo->net_src, - conversation_pt_to_endpoint_type(pinfo->ptype), + conversation_pt_to_conversation_type(pinfo->ptype), pinfo->destport, pinfo->srcport, NO_ADDR_B); if (p_conv) @@ -4122,13 +4122,13 @@ static void remember_outgoing_sr(packet_info *pinfo, guint32 lsr) Even though we think of this as an outgoing packet being sent, we store the time as being received by the destination. */ p_conv = find_conversation(pinfo->num, &pinfo->net_dst, &pinfo->net_src, - conversation_pt_to_endpoint_type(pinfo->ptype), + conversation_pt_to_conversation_type(pinfo->ptype), pinfo->destport, pinfo->srcport, NO_ADDR_B); /* If the conversation doesn't exist, create it now. */ if (!p_conv) { - p_conv = conversation_new(pinfo->num, &pinfo->net_dst, &pinfo->net_src, ENDPOINT_UDP, + p_conv = conversation_new(pinfo->num, &pinfo->net_dst, &pinfo->net_src, CONVERSATION_UDP, pinfo->destport, pinfo->srcport, NO_ADDR2); if (!p_conv) @@ -4214,7 +4214,7 @@ static void calculate_roundtrip_delay(tvbuff_t *tvb, packet_info *pinfo, /* Look for captured timestamp of last SR in conversation of sender */ /* of this packet */ p_conv = find_conversation(pinfo->num, &pinfo->net_src, &pinfo->net_dst, - conversation_pt_to_endpoint_type(pinfo->ptype), + conversation_pt_to_conversation_type(pinfo->ptype), pinfo->srcport, pinfo->destport, NO_ADDR_B); if (!p_conv) { @@ -4398,7 +4398,7 @@ dissect_rtcp_common( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* /* first see if this conversation is encrypted SRTP, and if so do not try to dissect the payload(s) */ p_conv = find_conversation(pinfo->num, &pinfo->net_src, &pinfo->net_dst, - conversation_pt_to_endpoint_type(pinfo->ptype), + conversation_pt_to_conversation_type(pinfo->ptype), pinfo->srcport, pinfo->destport, NO_ADDR_B); if (p_conv) { diff --git a/epan/dissectors/packet-rtmpt.c b/epan/dissectors/packet-rtmpt.c index 8211fe4b31..248df5f6d3 100644 --- a/epan/dissectors/packet-rtmpt.c +++ b/epan/dissectors/packet-rtmpt.c @@ -2404,16 +2404,16 @@ dissect_rtmpt_http(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* da cdir = pinfo->srcport == pinfo->match_uint; if (cdir) { - conv = find_conversation(pinfo->num, &pinfo->dst, &pinfo->src, conversation_pt_to_endpoint_type(pinfo->ptype), 0, pinfo->srcport, 0); + conv = find_conversation(pinfo->num, &pinfo->dst, &pinfo->src, conversation_pt_to_conversation_type(pinfo->ptype), 0, pinfo->srcport, 0); if (!conv) { RTMPT_DEBUG("RTMPT new conversation\n"); - conv = conversation_new(pinfo->num, &pinfo->dst, &pinfo->src, conversation_pt_to_endpoint_type(pinfo->ptype), 0, pinfo->srcport, 0); + conv = conversation_new(pinfo->num, &pinfo->dst, &pinfo->src, conversation_pt_to_conversation_type(pinfo->ptype), 0, pinfo->srcport, 0); } } else { - conv = find_conversation(pinfo->num, &pinfo->src, &pinfo->dst, conversation_pt_to_endpoint_type(pinfo->ptype), 0, pinfo->destport, 0); + conv = find_conversation(pinfo->num, &pinfo->src, &pinfo->dst, conversation_pt_to_conversation_type(pinfo->ptype), 0, pinfo->destport, 0); if (!conv) { RTMPT_DEBUG("RTMPT new conversation\n"); - conv = conversation_new(pinfo->num, &pinfo->src, &pinfo->dst, conversation_pt_to_endpoint_type(pinfo->ptype), 0, pinfo->destport, 0); + conv = conversation_new(pinfo->num, &pinfo->src, &pinfo->dst, conversation_pt_to_conversation_type(pinfo->ptype), 0, pinfo->destport, 0); } } diff --git a/epan/dissectors/packet-rtp.c b/epan/dissectors/packet-rtp.c index b137c19323..5d6c93caf0 100644 --- a/epan/dissectors/packet-rtp.c +++ b/epan/dissectors/packet-rtp.c @@ -969,14 +969,14 @@ bluetooth_add_address(packet_info *pinfo, address *addr, guint32 stream_number, * Check if the ip address and port combination is not * already registered as a conversation. */ - p_conv = find_conversation(setup_frame_number, addr, &null_addr, ENDPOINT_BLUETOOTH, stream_number, stream_number, + p_conv = find_conversation(setup_frame_number, addr, &null_addr, CONVERSATION_BLUETOOTH, stream_number, stream_number, NO_ADDR_B | NO_PORT_B); /* * If not, create a new conversation. */ if (!p_conv || p_conv->setup_frame != setup_frame_number) { - p_conv = conversation_new(setup_frame_number, addr, &null_addr, ENDPOINT_BLUETOOTH, stream_number, stream_number, + p_conv = conversation_new(setup_frame_number, addr, &null_addr, CONVERSATION_BLUETOOTH, stream_number, stream_number, NO_ADDR2 | NO_PORT2); } @@ -1080,7 +1080,7 @@ srtp_add_address(packet_info *pinfo, const port_type ptype, address *addr, int p * Check if the ip address and port combination is not * already registered as a conversation. */ - p_conv = find_conversation(setup_frame_number, addr, &null_addr, conversation_pt_to_endpoint_type(ptype), port, other_port, + p_conv = find_conversation(setup_frame_number, addr, &null_addr, conversation_pt_to_conversation_type(ptype), port, other_port, NO_ADDR_B | (!other_port ? NO_PORT_B : 0)); if (p_conv) { @@ -1100,7 +1100,7 @@ srtp_add_address(packet_info *pinfo, const port_type ptype, address *addr, int p * If not, create a new conversation. */ if (!p_conv || p_conv->setup_frame != setup_frame_number) { - p_conv = conversation_new(setup_frame_number, addr, &null_addr, conversation_pt_to_endpoint_type(ptype), + p_conv = conversation_new(setup_frame_number, addr, &null_addr, conversation_pt_to_conversation_type(ptype), (guint32)port, (guint32)other_port, NO_ADDR2 | (!other_port ? NO_PORT2 : 0)); } @@ -1290,11 +1290,11 @@ dissect_rtp_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data } /* Create a conversation in case none exists so as to allow reassembly code to work */ - if (!find_conversation(pinfo->num, &pinfo->net_dst, &pinfo->net_src, conversation_pt_to_endpoint_type(pinfo->ptype), + if (!find_conversation(pinfo->num, &pinfo->net_dst, &pinfo->net_src, conversation_pt_to_conversation_type(pinfo->ptype), pinfo->destport, pinfo->srcport, NO_ADDR_B)) { conversation_t *p_conv; struct _rtp_conversation_info *p_conv_data; - p_conv = conversation_new(pinfo->num, &pinfo->net_dst, &pinfo->net_src, conversation_pt_to_endpoint_type(pinfo->ptype), + p_conv = conversation_new(pinfo->num, &pinfo->net_dst, &pinfo->net_src, conversation_pt_to_conversation_type(pinfo->ptype), pinfo->destport, pinfo->srcport, NO_ADDR2); p_conv_data = (struct _rtp_conversation_info *)conversation_get_proto_data(p_conv, proto_rtp); if (! p_conv_data) { @@ -2625,7 +2625,7 @@ get_conv_info(packet_info *pinfo, struct _rtp_info *rtp_info) /* First time, get info from conversation */ p_conv = find_conversation(pinfo->num, &pinfo->net_dst, &pinfo->net_src, - conversation_pt_to_endpoint_type(pinfo->ptype), + conversation_pt_to_conversation_type(pinfo->ptype), pinfo->destport, pinfo->srcport, NO_ADDR_B); if (p_conv) { diff --git a/epan/dissectors/packet-sctp.c b/epan/dissectors/packet-sctp.c index 080523af7c..0097458039 100644 --- a/epan/dissectors/packet-sctp.c +++ b/epan/dissectors/packet-sctp.c @@ -788,7 +788,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, ENDPOINT_SCTP); + sctphdr->sport, sctphdr->dport, 1, pinfo->fd->pkt_len, &pinfo->rel_ts, &pinfo->abs_ts, &sctp_ct_dissector_info, CONVERSATION_SCTP); return TAP_PACKET_REDRAW; diff --git a/epan/dissectors/packet-sll.c b/epan/dissectors/packet-sll.c index 0de8bb31ec..f20176a76e 100644 --- a/epan/dissectors/packet-sll.c +++ b/epan/dissectors/packet-sll.c @@ -144,7 +144,7 @@ sll_conversation_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _U_, const sll_tap_data *tap_data = (const sll_tap_data*)vip; - add_conversation_table_data(hash, &tap_data->src_address, &no_dst, 0, 0, 1, pinfo->fd->pkt_len, &pinfo->rel_ts, &pinfo->abs_ts, &sll_ct_dissector_info, ENDPOINT_NONE); + add_conversation_table_data(hash, &tap_data->src_address, &no_dst, 0, 0, 1, pinfo->fd->pkt_len, &pinfo->rel_ts, &pinfo->abs_ts, &sll_ct_dissector_info, CONVERSATION_NONE); return TAP_PACKET_REDRAW; } diff --git a/epan/dissectors/packet-snmp.c b/epan/dissectors/packet-snmp.c index 75bb8de4ed..c5fe7b77e1 100644 --- a/epan/dissectors/packet-snmp.c +++ b/epan/dissectors/packet-snmp.c @@ -3167,11 +3167,11 @@ snmp_find_conversation_and_get_conv_data(packet_info *pinfo) { conversation_t *conversation; snmp_conv_info_t *snmp_info = NULL; - conversation = find_conversation(pinfo->fd->num, &pinfo->src, &pinfo->dst, conversation_pt_to_endpoint_type(pinfo->ptype), + conversation = find_conversation(pinfo->fd->num, &pinfo->src, &pinfo->dst, conversation_pt_to_conversation_type(pinfo->ptype), pinfo->srcport, pinfo->destport, 0); if( (conversation == NULL) || (conversation_get_dissector(conversation, pinfo->num)!=snmp_handle) ) { - conversation = conversation_new(pinfo->num, &pinfo->src, &pinfo->dst, conversation_pt_to_endpoint_type(pinfo->ptype), + conversation = conversation_new(pinfo->num, &pinfo->src, &pinfo->dst, conversation_pt_to_conversation_type(pinfo->ptype), pinfo->srcport, pinfo->destport, 0); conversation_set_dissector(conversation, snmp_handle); } diff --git a/epan/dissectors/packet-socks.c b/epan/dissectors/packet-socks.c index 8282ec67c9..7adfcd5fc5 100644 --- a/epan/dissectors/packet-socks.c +++ b/epan/dissectors/packet-socks.c @@ -379,7 +379,7 @@ socks_udp_dissector(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* d static void new_udp_conversation( socks_hash_entry_t *hash_info, packet_info *pinfo){ - conversation_t *conversation = conversation_new( pinfo->num, &pinfo->src, &pinfo->dst, ENDPOINT_UDP, + conversation_t *conversation = conversation_new( pinfo->num, &pinfo->src, &pinfo->dst, CONVERSATION_UDP, hash_info->udp_port, hash_info->port, 0); DISSECTOR_ASSERT( conversation); @@ -1047,7 +1047,7 @@ dissect_socks(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data) { return 0; conversation = conversation_new(pinfo->num, &pinfo->src, &pinfo->dst, - conversation_pt_to_endpoint_type(pinfo->ptype), pinfo->srcport, pinfo->destport, 0); + conversation_pt_to_conversation_type(pinfo->ptype), pinfo->srcport, pinfo->destport, 0); } hash_info = (socks_hash_entry_t *)conversation_get_proto_data(conversation,proto_socks); diff --git a/epan/dissectors/packet-soupbintcp.c b/epan/dissectors/packet-soupbintcp.c index 218e88c086..e14c42d3f9 100644 --- a/epan/dissectors/packet-soupbintcp.c +++ b/epan/dissectors/packet-soupbintcp.c @@ -199,7 +199,7 @@ dissect_soupbintcp_common( conv = conversation_new(pinfo->num, &pinfo->src, &pinfo->dst, - conversation_pt_to_endpoint_type(pinfo->ptype), + conversation_pt_to_conversation_type(pinfo->ptype), pinfo->srcport, pinfo->destport, 0); diff --git a/epan/dissectors/packet-sprt.c b/epan/dissectors/packet-sprt.c index b17212155d..cac165d0ba 100644 --- a/epan/dissectors/packet-sprt.c +++ b/epan/dissectors/packet-sprt.c @@ -770,14 +770,14 @@ void sprt_add_address(packet_info *pinfo, * Check if the ip address and port combination is not * already registered as a conversation. */ - p_conv = find_conversation(setup_frame_number, addr, &null_addr, ENDPOINT_UDP, port, other_port, + p_conv = find_conversation(setup_frame_number, addr, &null_addr, CONVERSATION_UDP, port, other_port, NO_ADDR_B | (!other_port ? NO_PORT_B : 0)); /* * If not, create a new conversation. */ if (!p_conv || p_conv->setup_frame != setup_frame_number) { - p_conv = conversation_new(setup_frame_number, addr, &null_addr, ENDPOINT_UDP, + p_conv = conversation_new(setup_frame_number, addr, &null_addr, CONVERSATION_UDP, (guint32)port, (guint32)other_port, NO_ADDR2 | (!other_port ? NO_PORT2 : 0)); } diff --git a/epan/dissectors/packet-t38.c b/epan/dissectors/packet-t38.c index 83e701658a..337b7d22c6 100644 --- a/epan/dissectors/packet-t38.c +++ b/epan/dissectors/packet-t38.c @@ -258,14 +258,14 @@ void t38_add_address(packet_info *pinfo, * Check if the ip address and port combination is not * already registered as a conversation. */ - p_conversation = find_conversation( setup_frame_number, addr, &null_addr, ENDPOINT_UDP, port, other_port, + p_conversation = find_conversation( setup_frame_number, addr, &null_addr, CONVERSATION_UDP, port, other_port, NO_ADDR_B | (!other_port ? NO_PORT_B : 0)); /* * If not, create a new conversation. */ if ( !p_conversation || p_conversation->setup_frame != setup_frame_number) { - p_conversation = conversation_new( setup_frame_number, addr, &null_addr, ENDPOINT_UDP, + p_conversation = conversation_new( setup_frame_number, addr, &null_addr, CONVERSATION_UDP, (guint32)port, (guint32)other_port, NO_ADDR2 | (!other_port ? NO_PORT2 : 0)); } @@ -997,13 +997,13 @@ init_t38_info_conv(packet_info *pinfo) /* find the conversation used for Reassemble and Setup Info */ p_conv = find_conversation(pinfo->num, &pinfo->net_dst, &pinfo->net_src, - conversation_pt_to_endpoint_type(pinfo->ptype), + conversation_pt_to_conversation_type(pinfo->ptype), pinfo->destport, pinfo->srcport, NO_ADDR_B | NO_PORT_B); /* create a conv if it doen't exist */ if (!p_conv) { p_conv = conversation_new(pinfo->num, &pinfo->net_src, &pinfo->net_dst, - conversation_pt_to_endpoint_type(pinfo->ptype), pinfo->srcport, pinfo->destport, NO_ADDR2 | NO_PORT2); + conversation_pt_to_conversation_type(pinfo->ptype), pinfo->srcport, pinfo->destport, NO_ADDR2 | NO_PORT2); /* Set dissector */ conversation_set_dissector(p_conv, t38_udp_handle); diff --git a/epan/dissectors/packet-tcp.c b/epan/dissectors/packet-tcp.c index 41c4681d66..fe1cc2de1c 100644 --- a/epan/dissectors/packet-tcp.c +++ b/epan/dissectors/packet-tcp.c @@ -935,7 +935,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, ENDPOINT_TCP); + &pinfo->rel_ts, &pinfo->abs_ts, &tcp_ct_dissector_info, CONVERSATION_TCP); return TAP_PACKET_REDRAW; } @@ -951,7 +951,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, ENDPOINT_TCP); + &pinfo->rel_ts, &pinfo->abs_ts, &tcp_ct_dissector_info, CONVERSATION_TCP); return TAP_PACKET_REDRAW; } @@ -1101,7 +1101,7 @@ gchar *tcp_follow_conv_filter(epan_dissect_t *edt _U_, packet_info *pinfo, guint 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)) && (pinfo->ptype == PT_TCP) && - (conv=find_conversation(pinfo->num, &pinfo->net_src, &pinfo->net_dst, ENDPOINT_TCP, pinfo->srcport, pinfo->destport, 0)) != NULL) + (conv=find_conversation(pinfo->num, &pinfo->net_src, &pinfo->net_dst, CONVERSATION_TCP, pinfo->srcport, pinfo->destport, 0)) != NULL) { /* TCP over IPv4/6 */ tcpd=get_tcp_conversation_data(conv, pinfo); @@ -1460,7 +1460,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, ENDPOINT_TCP, src_port, dst_port, 0); + conversation_t *conversation = find_conversation(pinfo->num, &pinfo->src, &pinfo->dst, CONVERSATION_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); @@ -1796,7 +1796,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, ENDPOINT_TCP, local_port, remote_port, 0); + conv = find_conversation(frame_num, local_addr, remote_addr, CONVERSATION_TCP, local_port, remote_port, 0); if (!conv) { return; } @@ -7032,7 +7032,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, ENDPOINT_TCP, + if (try_conversation_dissector(&pinfo->src, &pinfo->dst, CONVERSATION_TCP, src_port, dst_port, next_tvb, pinfo, tree, tcpinfo, 0)) { pinfo->want_pdu_tracking -= !!(pinfo->want_pdu_tracking); handle_export_pdu_conversation(pinfo, next_tvb, src_port, dst_port, tcpinfo); @@ -7425,10 +7425,10 @@ dissect_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) * reusing ports (see issue 15097), as find_or_create_conversation automatically * extends the conversation found. This extension is done later. */ - conv = find_conversation(pinfo->num, &pinfo->src, &pinfo->dst, ENDPOINT_TCP, pinfo->srcport, pinfo->destport, 0); + conv = find_conversation(pinfo->num, &pinfo->src, &pinfo->dst, CONVERSATION_TCP, pinfo->srcport, pinfo->destport, 0); if(!conv) { conv = conversation_new(pinfo->num, &pinfo->src, - &pinfo->dst, ENDPOINT_TCP, + &pinfo->dst, CONVERSATION_TCP, pinfo->srcport, pinfo->destport, 0); /* we need to know when a conversation is new then we initialize the completeness correctly */ conversation_is_new = TRUE; @@ -7449,7 +7449,7 @@ dissect_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) if(tcph->th_seq!=tcpd->fwd->base_seq) { if (!(pinfo->fd->visited)) { - conv=conversation_new(pinfo->num, &pinfo->src, &pinfo->dst, ENDPOINT_TCP, pinfo->srcport, pinfo->destport, 0); + conv=conversation_new(pinfo->num, &pinfo->src, &pinfo->dst, CONVERSATION_TCP, pinfo->srcport, pinfo->destport, 0); tcpd=get_tcp_conversation_data(conv,pinfo); if(!tcpd->ta) diff --git a/epan/dissectors/packet-tdmop.c b/epan/dissectors/packet-tdmop.c index 044d961cbc..4e8deac237 100644 --- a/epan/dissectors/packet-tdmop.c +++ b/epan/dissectors/packet-tdmop.c @@ -104,7 +104,7 @@ static int dissect_tdmop(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, vo offset += 1; /*conversation*/ - conversation_create_endpoint(pinfo, &pinfo->src, &pinfo->dst, ENDPOINT_TDMOP, srcch, dstch); + conversation_create_key_by_address_port_pairs(pinfo, &pinfo->src, &pinfo->dst, CONVERSATION_TDMOP, srcch, dstch); /*flags*/ proto_tree_add_item(tdmop_tree, hf_tdmop_Flags, tvb, offset, 1, ENC_NA); diff --git a/epan/dissectors/packet-tftp.c b/epan/dissectors/packet-tftp.c index bb91c04647..37e96c99f2 100644 --- a/epan/dissectors/packet-tftp.c +++ b/epan/dissectors/packet-tftp.c @@ -803,7 +803,7 @@ static conversation_t* create_tftp_conversation(packet_info *pinfo) conversation_t* conversation = NULL; if (!PINFO_FD_VISITED(pinfo)) { /* New read or write request on first pass, so create conversation with client port only */ - conversation = conversation_new(pinfo->num, &pinfo->src, &pinfo->dst, ENDPOINT_UDP, + conversation = conversation_new(pinfo->num, &pinfo->src, &pinfo->dst, CONVERSATION_UDP, pinfo->srcport, 0, NO_PORT2); conversation_set_dissector(conversation, tftp_handle); /* Store conversation in this frame */ @@ -919,7 +919,7 @@ dissect_tftp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_ { /* Not the initial read or write request */ /* Look for wildcarded conversation based upon client port */ - if ((conversation = find_conversation(pinfo->num, &pinfo->dst, &pinfo->src, ENDPOINT_UDP, + if ((conversation = find_conversation(pinfo->num, &pinfo->dst, &pinfo->src, CONVERSATION_UDP, pinfo->destport, 0, NO_PORT_B)) && conversation_get_dissector(conversation, pinfo->num) == tftp_handle) { #if 0 /* XXX: While setting the wildcarded port makes sense, if we do that, @@ -933,7 +933,7 @@ dissect_tftp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_ if (pinfo->destport == conversation_key_port1(conversation->key_ptr)) conversation_set_port2(conversation, pinfo->srcport); #endif - } else if ((conversation = find_conversation(pinfo->num, &pinfo->src, &pinfo->dst, ENDPOINT_UDP, + } else if ((conversation = find_conversation(pinfo->num, &pinfo->src, &pinfo->dst, CONVERSATION_UDP, pinfo->srcport, 0, NO_PORT_B)) && conversation_get_dissector(conversation, pinfo->num) == tftp_handle) { } else { diff --git a/epan/dissectors/packet-tipc.c b/epan/dissectors/packet-tipc.c index 5ba857c25e..a8d3fb906f 100644 --- a/epan/dissectors/packet-tipc.c +++ b/epan/dissectors/packet-tipc.c @@ -2291,7 +2291,7 @@ dissect_tipc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_ proto_tree_add_item_ret_uint(tipc_tree, hf_tipc_dst_port, tipc_tvb, offset, 4, ENC_BIG_ENDIAN, &destport); } - conversation_create_endpoint(pinfo, &pinfo->src, &pinfo->dst, ENDPOINT_TIPC, srcport, destport); + conversation_create_key_by_address_port_pairs(pinfo, &pinfo->src, &pinfo->dst, CONVERSATION_TIPC, srcport, destport); offset = offset + 4; /* 20 - 24 Bytes diff --git a/epan/dissectors/packet-tls.c b/epan/dissectors/packet-tls.c index 245b798eb3..eea53b9afa 100644 --- a/epan/dissectors/packet-tls.c +++ b/epan/dissectors/packet-tls.c @@ -3502,11 +3502,11 @@ void ssl_set_master_secret(guint32 frame_num, address *addr_srv, address *addr_c ssl_debug_printf("\nssl_set_master_secret enter frame #%u\n", frame_num); - conversation = find_conversation(frame_num, addr_srv, addr_cli, conversation_pt_to_endpoint_type(ptype), port_srv, port_cli, 0); + conversation = find_conversation(frame_num, addr_srv, addr_cli, conversation_pt_to_conversation_type(ptype), port_srv, port_cli, 0); if (!conversation) { /* create a new conversation */ - conversation = conversation_new(frame_num, addr_srv, addr_cli, conversation_pt_to_endpoint_type(ptype), port_srv, port_cli, 0); + conversation = conversation_new(frame_num, addr_srv, addr_cli, conversation_pt_to_conversation_type(ptype), port_srv, port_cli, 0); ssl_debug_printf(" new conversation = %p created\n", (void *)conversation); } ssl = ssl_get_session(conversation, tls_handle); diff --git a/epan/dissectors/packet-tr.c b/epan/dissectors/packet-tr.c index 7a75ec0232..5e3390c8e1 100644 --- a/epan/dissectors/packet-tr.c +++ b/epan/dissectors/packet-tr.c @@ -144,7 +144,7 @@ tr_conversation_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _U_, c 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, ENDPOINT_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, CONVERSATION_NONE); return TAP_PACKET_REDRAW; } diff --git a/epan/dissectors/packet-twamp.c b/epan/dissectors/packet-twamp.c index a68759cc45..f89d40dfcd 100644 --- a/epan/dissectors/packet-twamp.c +++ b/epan/dissectors/packet-twamp.c @@ -299,10 +299,10 @@ dissect_twamp_control(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void session = (twamp_session_t*) list->data; session->receiver_port = receiver_port; - cp->conversation = find_conversation(pinfo->fd->num, &pinfo->dst, &pinfo->src, ENDPOINT_UDP, + cp->conversation = find_conversation(pinfo->fd->num, &pinfo->dst, &pinfo->src, CONVERSATION_UDP, session->sender_port, session->receiver_port, 0); if (cp->conversation == NULL /*|| cp->conversation->dissector_handle != twamp_test_handle*/) { - cp->conversation = conversation_new(pinfo->fd->num, &pinfo->dst, &pinfo->src, ENDPOINT_UDP, + cp->conversation = conversation_new(pinfo->fd->num, &pinfo->dst, &pinfo->src, CONVERSATION_UDP, session->sender_port, session->receiver_port, 0); if (cp->conversation) { /* create conversation specific data for test sessions */ diff --git a/epan/dissectors/packet-udp.c b/epan/dissectors/packet-udp.c index 33b0a2d848..d0d4692a34 100644 --- a/epan/dissectors/packet-udp.c +++ b/epan/dissectors/packet-udp.c @@ -281,7 +281,7 @@ udpip_conversation_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _U_ 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); + &udp_ct_dissector_info, CONVERSATION_UDP); return TAP_PACKET_REDRAW; } @@ -388,7 +388,7 @@ static gchar *udp_follow_conv_filter(epan_dissect_t *edt _U_, packet_info *pinfo 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)) && (pinfo->ptype == PT_UDP) && - (conv=find_conversation(pinfo->num, &pinfo->net_src, &pinfo->net_dst, ENDPOINT_UDP, pinfo->srcport, pinfo->destport, 0)) != NULL) + (conv=find_conversation(pinfo->num, &pinfo->net_src, &pinfo->net_dst, CONVERSATION_UDP, pinfo->srcport, pinfo->destport, 0)) != NULL) { /* UDP over IPv4/6 */ udpd=get_udp_conversation_data(conv, pinfo); @@ -443,7 +443,7 @@ add_udp_process_info(guint32 frame_num, address *local_addr, address *remote_add return; } - conv = find_conversation(frame_num, local_addr, remote_addr, ENDPOINT_UDP, local_port, remote_port, 0); + conv = find_conversation(frame_num, local_addr, remote_addr, CONVERSATION_UDP, local_port, remote_port, 0); if (!conv) { return; } @@ -534,7 +534,7 @@ static void handle_export_pdu_conversation(packet_info *pinfo, tvbuff_t *tvb, int uh_dport, int uh_sport) { if (have_tap_listener(exported_pdu_tap)) { - conversation_t *conversation = find_conversation(pinfo->num, &pinfo->dst, &pinfo->src, ENDPOINT_UDP, uh_dport, uh_sport, 0); + conversation_t *conversation = find_conversation(pinfo->num, &pinfo->dst, &pinfo->src, CONVERSATION_UDP, uh_dport, uh_sport, 0); if (conversation != NULL) { dissector_handle_t handle = (dissector_handle_t)wmem_tree_lookup32_le(conversation->dissector_tree, pinfo->num); if (handle != NULL) { @@ -602,7 +602,7 @@ decode_udp_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->dst, &pinfo->src, ENDPOINT_UDP, + if (try_conversation_dissector(&pinfo->dst, &pinfo->src, CONVERSATION_UDP, uh_dport, uh_sport, next_tvb, pinfo, tree, NULL, NO_ADDR_B|NO_PORT_B)) { handle_export_pdu_conversation(pinfo, next_tvb, uh_dport, uh_sport); return; diff --git a/epan/dissectors/packet-uma.c b/epan/dissectors/packet-uma.c index bc09bd5f30..eff33afbe6 100644 --- a/epan/dissectors/packet-uma.c +++ b/epan/dissectors/packet-uma.c @@ -1464,13 +1464,13 @@ dissect_uma_IE(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset) set_address(&dst_addr, AT_IPv4, 4, &GPRS_user_data_ipv4_address); conversation = find_conversation(pinfo->num, &dst_addr, - &null_addr, ENDPOINT_UDP, GPRS_user_data_transport_UDP_port, + &null_addr, CONVERSATION_UDP, GPRS_user_data_transport_UDP_port, 0, NO_ADDR_B|NO_PORT_B); if (conversation == NULL) { /* It's not part of any conversation - create a new one. */ conversation = conversation_new(pinfo->num, &dst_addr, - &null_addr, ENDPOINT_UDP, GPRS_user_data_transport_UDP_port , + &null_addr, CONVERSATION_UDP, GPRS_user_data_transport_UDP_port , 0, NO_ADDR2|NO_PORT2); /* Set dissector */ @@ -1496,13 +1496,13 @@ dissect_uma_IE(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset) set_address(&dst_addr, AT_IPv4, 4, &unc_ipv4_address); conversation = find_conversation(pinfo->num, &dst_addr, - &null_addr, ENDPOINT_TCP, UNC_tcp_port, + &null_addr, CONVERSATION_TCP, UNC_tcp_port, 0, NO_ADDR_B|NO_PORT_B); if (conversation == NULL) { /* It's not part of any conversation - create a new one. */ conversation = conversation_new(pinfo->num, &dst_addr, - &null_addr, ENDPOINT_TCP, UNC_tcp_port, + &null_addr, CONVERSATION_TCP, UNC_tcp_port, 0, NO_ADDR2|NO_PORT2); /* Set dissector */ conversation_set_dissector(conversation, uma_tcp_handle); diff --git a/epan/dissectors/packet-umts_fp.c b/epan/dissectors/packet-umts_fp.c index 70c142b8c9..9b70b8a909 100644 --- a/epan/dissectors/packet-umts_fp.c +++ b/epan/dissectors/packet-umts_fp.c @@ -4051,26 +4051,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, - conversation_pt_to_endpoint_type(pinfo->ptype), + conversation_pt_to_conversation_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, - conversation_pt_to_endpoint_type(pinfo->ptype), + conversation_pt_to_conversation_type(pinfo->ptype), pinfo->destport, pinfo->srcport, NO_ADDR2); } 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, - conversation_pt_to_endpoint_type(pinfo->ptype), + conversation_pt_to_conversation_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, - conversation_pt_to_endpoint_type(pinfo->ptype), + conversation_pt_to_conversation_type(pinfo->ptype), pinfo->srcport, pinfo->destport, NO_ADDR2); } conversation_add_proto_data(other_direction_conv, proto_fp, umts_fp_conversation_info); @@ -4090,7 +4090,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, - conversation_pt_to_endpoint_type(pinfo->ptype), + conversation_pt_to_conversation_type(pinfo->ptype), pinfo->destport, pinfo->srcport, NO_ADDR_B); if (p_conv != NULL) { @@ -4146,7 +4146,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, - conversation_pt_to_endpoint_type(pinfo->ptype), + conversation_pt_to_conversation_type(pinfo->ptype), pinfo->destport, pinfo->srcport, NO_ADDR2); } return FALSE; @@ -4225,7 +4225,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, - conversation_pt_to_endpoint_type(pinfo->ptype), + conversation_pt_to_conversation_type(pinfo->ptype), pinfo->destport, pinfo->srcport, NO_ADDR_B); if (p_conv != NULL) { @@ -4335,7 +4335,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, - conversation_pt_to_endpoint_type(pinfo->ptype), + conversation_pt_to_conversation_type(pinfo->ptype), pinfo->destport, pinfo->srcport, NO_ADDR_B); if (p_conv != NULL) { @@ -4450,7 +4450,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, - conversation_pt_to_endpoint_type(pinfo->ptype), + conversation_pt_to_conversation_type(pinfo->ptype), pinfo->destport, pinfo->srcport, NO_ADDR_B); if (p_conv != NULL) { @@ -4576,7 +4576,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, - conversation_pt_to_endpoint_type(pinfo->ptype), + conversation_pt_to_conversation_type(pinfo->ptype), pinfo->destport, pinfo->srcport, NO_ADDR_B); if (p_conv != NULL) { @@ -4780,7 +4780,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, - conversation_pt_to_endpoint_type(pinfo->ptype), + conversation_pt_to_conversation_type(pinfo->ptype), pinfo->destport, pinfo->srcport, NO_ADDR_B); if (p_conv != NULL) { @@ -4911,7 +4911,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, - conversation_pt_to_endpoint_type(pinfo->ptype), + conversation_pt_to_conversation_type(pinfo->ptype), pinfo->destport, pinfo->srcport, NO_ADDR_B); if (p_conv != NULL) { @@ -5081,7 +5081,7 @@ heur_dissect_fp_edch_type_1(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, /* Trying to find existing conversation */ p_conv = (conversation_t *)find_conversation(pinfo->num, &pinfo->net_dst, &pinfo->net_src, - conversation_pt_to_endpoint_type(pinfo->ptype), + conversation_pt_to_conversation_type(pinfo->ptype), pinfo->destport, pinfo->srcport, NO_ADDR_B); if (p_conv != NULL) { @@ -5241,7 +5241,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, - conversation_pt_to_endpoint_type(pinfo->ptype), + conversation_pt_to_conversation_type(pinfo->ptype), pinfo->destport, pinfo->srcport, NO_ADDR_B); /* Check if FP Conversation Info is attached */ @@ -5802,7 +5802,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, - conversation_pt_to_endpoint_type(pinfo->ptype), + conversation_pt_to_conversation_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); @@ -5811,7 +5811,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, - conversation_pt_to_endpoint_type(pinfo->ptype), + conversation_pt_to_conversation_type(pinfo->ptype), pinfo->destport, pinfo->srcport, NO_ADDR_B); if (p_conv) { p_conv_data = (umts_fp_conversation_info_t *)conversation_get_proto_data(p_conv, proto_fp); diff --git a/epan/dissectors/packet-umts_mac.c b/epan/dissectors/packet-umts_mac.c index 2396c6be05..61043df2a7 100644 --- a/epan/dissectors/packet-umts_mac.c +++ b/epan/dissectors/packet-umts_mac.c @@ -241,7 +241,7 @@ static guint16 tree_add_common_dcch_dtch_fields(tvbuff_t *tvb, packet_info *pinf proto_tree_add_bits_item(tree, hf_mac_crnti, tvb, 4, 16, ENC_BIG_ENDIAN); c_rnti = tvb_get_bits16(tvb, bitoffs, 16,ENC_BIG_ENDIAN); p_conv = (conversation_t *)find_conversation(pinfo->num, &pinfo->net_dst, &pinfo->net_src, - conversation_pt_to_endpoint_type(pinfo->ptype), + conversation_pt_to_conversation_type(pinfo->ptype), pinfo->destport, pinfo->srcport, NO_ADDR_B); if (p_conv != NULL) { umts_fp_conversation_info = (umts_fp_conversation_info_t *)conversation_get_proto_data(p_conv, proto_fp); diff --git a/epan/dissectors/packet-usb.c b/epan/dissectors/packet-usb.c index bb73e2532a..bc7b9edc92 100644 --- a/epan/dissectors/packet-usb.c +++ b/epan/dissectors/packet-usb.c @@ -1796,7 +1796,7 @@ get_usb_conversation(packet_info *pinfo, */ conversation = find_conversation(pinfo->num, src_addr, dst_addr, - conversation_pt_to_endpoint_type(pinfo->ptype), + conversation_pt_to_conversation_type(pinfo->ptype), src_endpoint, dst_endpoint, 0); if (conversation) { return conversation; @@ -1805,7 +1805,7 @@ get_usb_conversation(packet_info *pinfo, /* We don't yet have a conversation, so create one. */ conversation = conversation_new(pinfo->num, src_addr, dst_addr, - conversation_pt_to_endpoint_type(pinfo->ptype), + conversation_pt_to_conversation_type(pinfo->ptype), src_endpoint, dst_endpoint, 0); return conversation; } @@ -1850,7 +1850,7 @@ get_existing_usb_ep_conv_info(packet_info* pinfo, guint16 bus_id, guint16 device set_address(&dst, usb_address_type, USB_ADDR_LEN, (char *)dst_addr); conversation = find_conversation(pinfo->num, &src, &dst, - conversation_pt_to_endpoint_type(PT_USB), + conversation_pt_to_conversation_type(PT_USB), src_addr->endpoint, dst_addr->endpoint, 0); if (conversation) { usb_conv_info = (usb_conv_info_t *)conversation_get_proto_data(conversation, proto_usb); @@ -1880,7 +1880,7 @@ usb_conversation_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _U_, conv_hash_t *hash = (conv_hash_t*) pct; hash->flags = flags; - 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); + 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, CONVERSATION_NONE); return TAP_PACKET_REDRAW; } diff --git a/epan/dissectors/packet-vj-comp.c b/epan/dissectors/packet-vj-comp.c index a0d92769da..ebe4136df7 100644 --- a/epan/dissectors/packet-vj-comp.c +++ b/epan/dissectors/packet-vj-comp.c @@ -191,9 +191,9 @@ vjc_find_conversation(packet_info *pinfo, guint32 vjc_cnum, gboolean create) return conv; } - conv = find_conversation_by_id(pinfo->num, ENDPOINT_NONE, vjc_cnum); + conv = find_conversation_by_id(pinfo->num, CONVERSATION_NONE, vjc_cnum); if (!conv && create) { - conv = conversation_new_by_id(pinfo->num, ENDPOINT_NONE, vjc_cnum); + conv = conversation_new_by_id(pinfo->num, CONVERSATION_NONE, vjc_cnum); } return conv; diff --git a/epan/dissectors/packet-vnc.c b/epan/dissectors/packet-vnc.c index bf95114597..0fa17e1dea 100644 --- a/epan/dissectors/packet-vnc.c +++ b/epan/dissectors/packet-vnc.c @@ -1101,7 +1101,7 @@ static gboolean test_vnc_protocol(tvbuff_t *tvb, packet_info *pinfo, if (vnc_is_client_or_server_version_message(tvb, NULL, NULL)) { conversation = conversation_new(pinfo->num, &pinfo->src, - &pinfo->dst, conversation_pt_to_endpoint_type(pinfo->ptype), + &pinfo->dst, conversation_pt_to_conversation_type(pinfo->ptype), pinfo->srcport, pinfo->destport, 0); conversation_set_dissector(conversation, vnc_handle); diff --git a/epan/dissectors/packet-wsp.c b/epan/dissectors/packet-wsp.c index 7986439cc7..1a53fcbf16 100644 --- a/epan/dissectors/packet-wsp.c +++ b/epan/dissectors/packet-wsp.c @@ -3990,10 +3990,10 @@ dissect_redirect(tvbuff_t *tvb, int offset, packet_info *pinfo, redir_address.data = (const guint8 *)&address_ipv4; /* Find a conversation based on redir_address and pinfo->dst */ conv = find_conversation(pinfo->num, &redir_address, &pinfo->dst, - ENDPOINT_UDP, port_num, 0, NO_PORT_B); + CONVERSATION_UDP, port_num, 0, NO_PORT_B); if (conv == NULL) { /* This conversation does not exist yet */ conv = conversation_new(pinfo->num, &redir_address, - &pinfo->dst, ENDPOINT_UDP, port_num, 0, NO_PORT2); + &pinfo->dst, CONVERSATION_UDP, port_num, 0, NO_PORT2); } /* Apply WSP dissection to the conversation */ conversation_set_dissector(conv, dissector_handle); @@ -4023,10 +4023,10 @@ dissect_redirect(tvbuff_t *tvb, int offset, packet_info *pinfo, redir_address.data = (const guint8 *)&address_ipv6; /* Find a conversation based on redir_address and pinfo->dst */ conv = find_conversation(pinfo->num, &redir_address, &pinfo->dst, - ENDPOINT_UDP, port_num, 0, NO_PORT_B); + CONVERSATION_UDP, port_num, 0, NO_PORT_B); if (conv == NULL) { /* This conversation does not exist yet */ conv = conversation_new(pinfo->num, &redir_address, - &pinfo->dst, ENDPOINT_UDP, port_num, 0, NO_PORT2); + &pinfo->dst, CONVERSATION_UDP, port_num, 0, NO_PORT2); } /* Apply WSP dissection to the conversation */ conversation_set_dissector(conv, dissector_handle); diff --git a/epan/dissectors/packet-x25.c b/epan/dissectors/packet-x25.c index 55537c4715..d3817c2617 100644 --- a/epan/dissectors/packet-x25.c +++ b/epan/dissectors/packet-x25.c @@ -535,7 +535,7 @@ x25_hash_add_proto_start(guint16 vc, guint32 frame, dissector_handle_t dissect) /* * Is there already a circuit with this VC number? */ - conv = find_conversation_by_id(frame, ENDPOINT_X25, vc); + conv = find_conversation_by_id(frame, CONVERSATION_X25, vc); if (conv != NULL) { /* * Yes - close it, as we're creating a new one. @@ -546,7 +546,7 @@ x25_hash_add_proto_start(guint16 vc, guint32 frame, dissector_handle_t dissect) /* * Set up a new circuit. */ - conv = conversation_new_by_id(frame, ENDPOINT_X25, vc); + conv = conversation_new_by_id(frame, CONVERSATION_X25, vc); /* * Set its dissector. @@ -562,7 +562,7 @@ x25_hash_add_proto_end(guint16 vc, guint32 frame) /* * Try to find the circuit. */ - conv = find_conversation_by_id(frame, ENDPOINT_X25, vc); + conv = find_conversation_by_id(frame, CONVERSATION_X25, vc); /* * If we succeeded, close it. @@ -1229,7 +1229,7 @@ dissect_x25_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, modulo = ((bytes0_1 & 0x2000) ? 128 : 8); vc = (int)(bytes0_1 & 0x0FFF); - conversation_create_endpoint_by_id(pinfo, ENDPOINT_X25, vc); + conversation_create_key_by_id(pinfo, CONVERSATION_X25, vc); if (bytes0_1 & X25_ABIT) toa = TRUE; else toa = FALSE; @@ -1923,7 +1923,7 @@ dissect_x25_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, next_tvb = tvb_new_subset_remaining(tvb, localoffset); /* See if there's already a dissector for this circuit. */ - if (try_conversation_dissector_by_id(ENDPOINT_X25, vc, next_tvb, pinfo, + if (try_conversation_dissector_by_id(CONVERSATION_X25, vc, next_tvb, pinfo, tree, &q_bit_set)) { return; /* found it and dissected it */ } diff --git a/epan/dissectors/packet-xyplex.c b/epan/dissectors/packet-xyplex.c index 3a7fa3c4f8..81bd4acc4b 100644 --- a/epan/dissectors/packet-xyplex.c +++ b/epan/dissectors/packet-xyplex.c @@ -99,10 +99,10 @@ dissect_xyplex(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _ * return_port. */ conversation = find_conversation(pinfo->num, &pinfo->src, &pinfo->dst, - ENDPOINT_TCP, return_port, 0, NO_PORT_B); + CONVERSATION_TCP, return_port, 0, NO_PORT_B); if (conversation == NULL) { conversation = conversation_new(pinfo->num, &pinfo->src, &pinfo->dst, - ENDPOINT_TCP, return_port, 0, NO_PORT2); + CONVERSATION_TCP, return_port, 0, NO_PORT2); conversation_set_dissector(conversation, xyplex_handle); } return offset; diff --git a/epan/dissectors/packet-zbee-nwk.c b/epan/dissectors/packet-zbee-nwk.c index 48928b9c02..c1c0e8f003 100644 --- a/epan/dissectors/packet-zbee-nwk.c +++ b/epan/dissectors/packet-zbee-nwk.c @@ -1820,7 +1820,7 @@ static tap_packet_status zbee_nwk_conversation_packet(void *pct, packet_info *pi add_conversation_table_data(hash, &pinfo->net_src, &pinfo->net_dst, 0, 0, 1, pinfo->fd->pkt_len, &pinfo->rel_ts, &pinfo->abs_ts, - &zbee_nwk_ct_dissector_info, ENDPOINT_NONE); + &zbee_nwk_ct_dissector_info, CONVERSATION_NONE); return TAP_PACKET_REDRAW; } diff --git a/epan/dissectors/packet-zbncp.c b/epan/dissectors/packet-zbncp.c index 6ca0cd1b87..ef9f1088b3 100644 --- a/epan/dissectors/packet-zbncp.c +++ b/epan/dissectors/packet-zbncp.c @@ -4695,7 +4695,7 @@ dissect_zbncp_packet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint memcpy(zbncp_ctx_str, tmp, strlen(tmp) + 1); conversation = conversation_new(pinfo->num, &pinfo->src, &pinfo->dst, - conversation_pt_to_endpoint_type(pinfo->ptype), + conversation_pt_to_conversation_type(pinfo->ptype), pinfo->srcport, pinfo->destport, 0); conversation_add_proto_data(conversation, zbncp_frame, (void *)zbncp_ctx_str); @@ -4710,7 +4710,7 @@ dissect_zbncp_packet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint dissect_zbncp_fragmentation_body(tvb, pinfo, tree, offset); conversation = find_conversation(pinfo->num, &pinfo->src, &pinfo->dst, - conversation_pt_to_endpoint_type(pinfo->ptype), + conversation_pt_to_conversation_type(pinfo->ptype), pinfo->srcport, pinfo->destport, 0); if (conversation != NULL) diff --git a/epan/packet.c b/epan/packet.c index 2947e5e03e..679475cb92 100644 --- a/epan/packet.c +++ b/epan/packet.c @@ -591,7 +591,7 @@ dissect_record(epan_dissect_t *edt, int file_type_subtype, edt->pi.noreassembly_reason = ""; edt->pi.ptype = PT_NONE; edt->pi.use_endpoint = FALSE; - edt->pi.conv_endpoint = NULL; + edt->pi.conv_key = NULL; edt->pi.conv_elements = NULL; edt->pi.p2p_dir = P2P_DIR_UNKNOWN; edt->pi.link_dir = LINK_DIR_UNKNOWN; @@ -665,7 +665,7 @@ dissect_file(epan_dissect_t *edt, wtap_rec *rec, edt->pi.noreassembly_reason = ""; edt->pi.ptype = PT_NONE; edt->pi.use_endpoint = FALSE; - edt->pi.conv_endpoint = NULL; + edt->pi.conv_key = NULL; edt->pi.conv_elements = NULL; edt->pi.p2p_dir = P2P_DIR_UNKNOWN; edt->pi.link_dir = LINK_DIR_UNKNOWN; diff --git a/epan/packet_info.h b/epan/packet_info.h index a10caa04f2..b86a8654f7 100644 --- a/epan/packet_info.h +++ b/epan/packet_info.h @@ -15,7 +15,7 @@ #include "tvbuff.h" #include "address.h" -struct endpoint; +struct conversation_key; struct conversation_element; /** @file @@ -72,7 +72,7 @@ typedef struct _packet_info { guint32 match_uint; /**< matched uint for calling subdissector from table */ const char *match_string; /**< matched string for calling subdissector from table */ gboolean use_endpoint; /**< TRUE if endpoint member should be used for conversations */ - struct endpoint* conv_endpoint; /**< Data that can be used for address+port conversations, including wildcarding */ + struct conversation_key* conv_key; /**< Data that can be used for address+port conversations, including wildcarding */ struct conversation_element *conv_elements; /**< Arbritrary conversation identifier; can't be wildcarded */ guint16 can_desegment; /**< >0 if this segment could be desegmented. A dissector that can offer this API (e.g. diff --git a/plugins/epan/falco_bridge/packet-falco-bridge.c b/plugins/epan/falco_bridge/packet-falco-bridge.c index 039f8d0df2..765433764a 100644 --- a/plugins/epan/falco_bridge/packet-falco-bridge.c +++ b/plugins/epan/falco_bridge/packet-falco-bridge.c @@ -577,7 +577,7 @@ dissect_sinsp_span(tvbuff_t* tvb, packet_info* pinfo, proto_tree* tree, void* da REPORT_DISSECTOR_BUG("Field %s has an unrecognized or mismatched type %u != %u", hfinfo->abbrev, sfe->type, hfinfo->type); } - if (conv_el.type != CE_ENDPOINT) { + if (conv_el.type != CE_CONVERSATION_TYPE) { wmem_array_append_one(conversation_elements, conv_el); } } @@ -589,8 +589,8 @@ dissect_sinsp_span(tvbuff_t* tvb, packet_info* pinfo, proto_tree* tree, void* da unsigned num_conv_els = wmem_array_get_count(conversation_elements); if (num_conv_els > 0) { conversation_element_t conv_el; - conv_el.type = CE_ENDPOINT; - conv_el.endpoint_type_val = ENDPOINT_LOG; + conv_el.type = CE_CONVERSATION_TYPE; + conv_el.conversation_type_val = CONVERSATION_LOG; wmem_array_append_one(conversation_elements, conv_el); pinfo->conv_elements = (conversation_element_t *) wmem_array_get_raw(conversation_elements); conversation_t *conv = find_conversation_pinfo(pinfo, 0); diff --git a/plugins/epan/irda/packet-irda.c b/plugins/epan/irda/packet-irda.c index 2e0c02c11f..d3c2c835df 100644 --- a/plugins/epan/irda/packet-irda.c +++ b/plugins/epan/irda/packet-irda.c @@ -557,7 +557,7 @@ static void dissect_iap_request(tvbuff_t* tvb, packet_info* pinfo, proto_tree* r set_address(&destaddr, irda_address_type, 1, &circuit_id); - conv = find_conversation(pinfo->num, &srcaddr, &destaddr, ENDPOINT_NONE, pinfo->srcport, pinfo->destport, 0); + conv = find_conversation(pinfo->num, &srcaddr, &destaddr, CONVERSATION_NONE, pinfo->srcport, pinfo->destport, 0); if (conv) { iap_conv = (iap_conversation_t*)conversation_get_proto_data(conv, proto_iap); @@ -579,7 +579,7 @@ static void dissect_iap_request(tvbuff_t* tvb, packet_info* pinfo, proto_tree* r } else { - conv = conversation_new(pinfo->num, &srcaddr, &destaddr, ENDPOINT_NONE, pinfo->srcport, pinfo->destport, 0); + conv = conversation_new(pinfo->num, &srcaddr, &destaddr, CONVERSATION_NONE, pinfo->srcport, pinfo->destport, 0); iap_conv = wmem_new(wmem_file_scope(), iap_conversation_t); conversation_add_proto_data(conv, proto_iap, (void*)iap_conv); } @@ -699,7 +699,7 @@ static void dissect_iap_result(tvbuff_t* tvb, packet_info* pinfo, proto_tree* ro set_address(&destaddr, irda_address_type, 1, &circuit_id); /* Find result value dissector */ - conv = find_conversation(pinfo->num, &srcaddr, &destaddr, ENDPOINT_NONE, pinfo->srcport, pinfo->destport, 0); + conv = find_conversation(pinfo->num, &srcaddr, &destaddr, CONVERSATION_NONE, pinfo->srcport, pinfo->destport, 0); if (conv) { num = pinfo->num; @@ -980,7 +980,7 @@ static void dissect_appl_proto(tvbuff_t* tvb, packet_info* pinfo, proto_tree* ro set_address(&destaddr, irda_address_type, 1, &circuit_id); /* Find result value dissector */ - conv = find_conversation(pinfo->num, &srcaddr, &destaddr, ENDPOINT_NONE, pinfo->srcport, pinfo->destport, 0); + conv = find_conversation(pinfo->num, &srcaddr, &destaddr, CONVERSATION_NONE, pinfo->srcport, pinfo->destport, 0); if (conv) { num = pinfo->num; @@ -1208,7 +1208,7 @@ void add_lmp_conversation(packet_info* pinfo, guint8 dlsap, gboolean ttp, dissec dest = circuit_id ^ CMD_FRAME; set_address(&destaddr, irda_address_type, 1, &dest); - conv = find_conversation(pinfo->num, &destaddr, &srcaddr, ENDPOINT_NONE, dlsap, 0, NO_PORT_B); + conv = find_conversation(pinfo->num, &destaddr, &srcaddr, CONVERSATION_NONE, dlsap, 0, NO_PORT_B); if (conv) { lmp_conv = (lmp_conversation_t*)conversation_get_proto_data(conv, proto_irlmp); @@ -1229,7 +1229,7 @@ void add_lmp_conversation(packet_info* pinfo, guint8 dlsap, gboolean ttp, dissec } else { - conv = conversation_new(pinfo->num, &destaddr, &srcaddr, ENDPOINT_NONE, dlsap, 0, NO_PORT2); + conv = conversation_new(pinfo->num, &destaddr, &srcaddr, CONVERSATION_NONE, dlsap, 0, NO_PORT2); lmp_conv = wmem_new(wmem_file_scope(), lmp_conversation_t); conversation_add_proto_data(conv, proto_irlmp, (void*)lmp_conv); } diff --git a/plugins/epan/profinet/packet-dcerpc-pn-io.c b/plugins/epan/profinet/packet-dcerpc-pn-io.c index 35fa90fc88..4fe6e815ee 100644 --- a/plugins/epan/profinet/packet-dcerpc-pn-io.c +++ b/plugins/epan/profinet/packet-dcerpc-pn-io.c @@ -10185,12 +10185,12 @@ dissect_ARBlockReq_block(tvbuff_t *tvb, int offset, /* When ARType==IOCARSR, then find or create conversation for this frame */ if (!PINFO_FD_VISITED(pinfo)) { /* Get current conversation endpoints using MAC addresses */ - conversation = find_conversation(pinfo->num, &pinfo->dl_src, &pinfo->dl_dst, ENDPOINT_UDP, 0, 0, 0); + conversation = find_conversation(pinfo->num, &pinfo->dl_src, &pinfo->dl_dst, CONVERSATION_UDP, 0, 0, 0); if (conversation == NULL) { /* Create new conversation, if no "Ident OK" frame as been dissected yet! * Need to switch dl_src & dl_dst, as current packet is sent by controller and not by device. * All conversations are based on Device MAC as addr1 */ - conversation = conversation_new(pinfo->num, &pinfo->dl_dst, &pinfo->dl_src, ENDPOINT_UDP, 0, 0, 0); + conversation = conversation_new(pinfo->num, &pinfo->dl_dst, &pinfo->dl_src, CONVERSATION_UDP, 0, 0, 0); } /* Try to get apdu status switch information from the conversation */ @@ -10422,10 +10422,10 @@ dissect_IOCRBlockReq_block(tvbuff_t *tvb, int offset, iocr_mac_addr = (u16IOCRType == PN_INPUT_CR) ? pinfo->dl_dst : pinfo->dl_src; /* Get current conversation endpoints using MAC addresses */ - conversation_time_aware = find_conversation(pinfo->num, &cyclic_mac_addr, &iocr_mac_addr, ENDPOINT_NONE, 0, 0, 0); + conversation_time_aware = find_conversation(pinfo->num, &cyclic_mac_addr, &iocr_mac_addr, CONVERSATION_NONE, 0, 0, 0); if (conversation_time_aware == NULL) { - conversation_time_aware = conversation_new(pinfo->num, &iocr_mac_addr, &cyclic_mac_addr, ENDPOINT_NONE, 0, 0, 0); + conversation_time_aware = conversation_new(pinfo->num, &iocr_mac_addr, &cyclic_mac_addr, CONVERSATION_NONE, 0, 0, 0); } conversation_add_proto_data(conversation_time_aware, proto_pn_io_time_aware_status, wmem_map_lookup(pnio_time_aware_frame_map, GUINT_TO_POINTER(pinfo->num))); @@ -10455,12 +10455,12 @@ dissect_IOCRBlockReq_block(tvbuff_t *tvb, int offset, /* Notice: Handle Input & Output seperate!!! */ if (!PINFO_FD_VISITED(pinfo)) { /* Get current conversation endpoints using MAC addresses */ - conversation = find_conversation(pinfo->num, &pinfo->dl_src, &pinfo->dl_dst, ENDPOINT_NONE, 0, 0, 0); + conversation = find_conversation(pinfo->num, &pinfo->dl_src, &pinfo->dl_dst, CONVERSATION_NONE, 0, 0, 0); if (conversation == NULL) { /* Create new conversation, if no "Ident OK" frame as been dissected yet! * Need to switch dl_src & dl_dst, as Connect Request is sent by controller and not by device. * All conversations are based on Device MAC as addr1 */ - conversation = conversation_new(pinfo->num, &pinfo->dl_dst, &pinfo->dl_src, ENDPOINT_NONE, 0, 0, 0); + conversation = conversation_new(pinfo->num, &pinfo->dl_dst, &pinfo->dl_src, CONVERSATION_NONE, 0, 0, 0); } current_aruuid_frame = pn_find_aruuid_frame_setup(pinfo); @@ -11265,12 +11265,12 @@ dissect_DataDescription(tvbuff_t *tvb, int offset, /* Save new data for IO Data Objects */ if (!PINFO_FD_VISITED(pinfo)) { /* Get current conversation endpoints using MAC addresses */ - conversation = find_conversation(pinfo->num, &pinfo->dl_src, &pinfo->dl_dst, ENDPOINT_NONE, 0, 0, 0); + conversation = find_conversation(pinfo->num, &pinfo->dl_src, &pinfo->dl_dst, CONVERSATION_NONE, 0, 0, 0); if (conversation == NULL) { /* Create new conversation, if no "Ident OK" frame as been dissected yet! * Need to switch dl_src & dl_dst, as current packet is sent by controller and not by device. * All conversations are based on Device MAC as addr1 */ - conversation = conversation_new(pinfo->num, &pinfo->dl_dst, &pinfo->dl_src, ENDPOINT_NONE, 0, 0, 0); + conversation = conversation_new(pinfo->num, &pinfo->dl_dst, &pinfo->dl_src, CONVERSATION_NONE, 0, 0, 0); } current_aruuid_frame = pn_find_aruuid_frame_setup(pinfo); @@ -11514,12 +11514,12 @@ dissect_ExpectedSubmoduleBlockReq_block(tvbuff_t *tvb, int offset, /* Get current conversation endpoints using MAC addresses */ - conversation = find_conversation(pinfo->num, &pinfo->dl_src, &pinfo->dl_dst, ENDPOINT_NONE, 0, 0, 0); + conversation = find_conversation(pinfo->num, &pinfo->dl_src, &pinfo->dl_dst, CONVERSATION_NONE, 0, 0, 0); if (conversation == NULL) { /* Create new conversation, if no "Ident OK" frame as been dissected yet! * Need to switch dl_src & dl_dst, as current packet is sent by controller and not by device. * All conversations are based on Device MAC as addr1 */ - conversation = conversation_new(pinfo->num, &pinfo->dl_dst, &pinfo->dl_src, ENDPOINT_NONE, 0, 0, 0); + conversation = conversation_new(pinfo->num, &pinfo->dl_dst, &pinfo->dl_src, CONVERSATION_NONE, 0, 0, 0); } current_aruuid_frame = pn_find_aruuid_frame_setup(pinfo); @@ -11935,9 +11935,9 @@ dissect_ModuleDiffBlock_block(tvbuff_t *tvb, int offset, if (!PINFO_FD_VISITED(pinfo)) { /* Get current conversation endpoints using MAC addresses */ - conversation = find_conversation(pinfo->num, &pinfo->dl_src, &pinfo->dl_dst, ENDPOINT_NONE, 0, 0, 0); + conversation = find_conversation(pinfo->num, &pinfo->dl_src, &pinfo->dl_dst, CONVERSATION_NONE, 0, 0, 0); if (conversation == NULL) { - conversation = conversation_new(pinfo->num, &pinfo->dl_src, &pinfo->dl_dst, ENDPOINT_NONE, 0, 0, 0); + conversation = conversation_new(pinfo->num, &pinfo->dl_src, &pinfo->dl_dst, CONVERSATION_NONE, 0, 0, 0); } current_aruuid_frame = pn_find_aruuid_frame_setup(pinfo); @@ -13635,12 +13635,12 @@ dissect_ProfiSafeParameterRequest(tvbuff_t *tvb, int offset, if (!PINFO_FD_VISITED(pinfo)) { /* Get current conversation endpoints using MAC addresses */ - conversation = find_conversation(pinfo->num, &pinfo->dl_src, &pinfo->dl_dst, ENDPOINT_NONE, 0, 0, 0); + conversation = find_conversation(pinfo->num, &pinfo->dl_src, &pinfo->dl_dst, CONVERSATION_NONE, 0, 0, 0); if (conversation == NULL) { /* Create new conversation, if no "Ident OK" frame as been dissected yet! * Need to switch dl_src & dl_dst, as current packet is sent by controller and not by device. * All conversations are based on Device MAC as addr1 */ - conversation = conversation_new(pinfo->num, &pinfo->dl_dst, &pinfo->dl_src, ENDPOINT_NONE, 0, 0, 0); + conversation = conversation_new(pinfo->num, &pinfo->dl_dst, &pinfo->dl_src, CONVERSATION_NONE, 0, 0, 0); } current_aruuid_frame = pn_find_aruuid_frame_setup(pinfo); @@ -13715,12 +13715,12 @@ dissect_RecordDataWrite(tvbuff_t *tvb, int offset, /* PROFISafe */ /* Get current conversation endpoints using MAC addresses */ - conversation = find_conversation(pinfo->num, &pinfo->dl_src, &pinfo->dl_dst, ENDPOINT_NONE, 0, 0, 0); + conversation = find_conversation(pinfo->num, &pinfo->dl_src, &pinfo->dl_dst, CONVERSATION_NONE, 0, 0, 0); if (conversation == NULL) { /* Create new conversation, if no "Ident OK" frame as been dissected yet! * Need to switch dl_src & dl_dst, as current packet is sent by controller and not by device. * All conversations are based on Device MAC as addr1 */ - conversation = conversation_new(pinfo->num, &pinfo->dl_dst, &pinfo->dl_src, ENDPOINT_NONE, 0, 0, 0); + conversation = conversation_new(pinfo->num, &pinfo->dl_dst, &pinfo->dl_src, CONVERSATION_NONE, 0, 0, 0); } current_aruuid_frame = pn_find_aruuid_frame_setup(pinfo); @@ -14186,7 +14186,7 @@ dissect_PNIO_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, return TRUE; /* TimeAwareness Information needed for dissecting RTC3 - RTSteam frames */ - conversation = find_conversation(pinfo->num, &pinfo->dl_src, &pinfo->dl_dst, ENDPOINT_NONE, 0, 0, 0); + conversation = find_conversation(pinfo->num, &pinfo->dl_src, &pinfo->dl_dst, CONVERSATION_NONE, 0, 0, 0); if (conversation != NULL) { isTimeAware = GPOINTER_TO_UINT(conversation_get_proto_data(conversation, proto_pn_io_time_aware_status)); diff --git a/plugins/epan/profinet/packet-pn-dcp.c b/plugins/epan/profinet/packet-pn-dcp.c index d6fe8cd171..b9ab22ba85 100644 --- a/plugins/epan/profinet/packet-pn-dcp.c +++ b/plugins/epan/profinet/packet-pn-dcp.c @@ -714,15 +714,15 @@ dissect_PNDCP_Suboption_Device(tvbuff_t *tvb, int offset, packet_info *pinfo, if (PINFO_FD_VISITED(pinfo) == FALSE) { /* Create a conversation between the MAC addresses */ - conversation = find_conversation(pinfo->num, &pinfo->dl_src, &pinfo->dl_dst, ENDPOINT_NONE, 0, 0, 0); + conversation = find_conversation(pinfo->num, &pinfo->dl_src, &pinfo->dl_dst, CONVERSATION_NONE, 0, 0, 0); if (conversation == NULL) { /* Create new conversation, need to switch dl_src & dl_dst if not a response * All conversations are based on Device MAC as addr1 */ if (is_response) { - conversation = conversation_new(pinfo->num, &pinfo->dl_src, &pinfo->dl_dst, ENDPOINT_NONE, 0, 0, 0); + conversation = conversation_new(pinfo->num, &pinfo->dl_src, &pinfo->dl_dst, CONVERSATION_NONE, 0, 0, 0); } else { - conversation = conversation_new(pinfo->num, &pinfo->dl_dst, &pinfo->dl_src, ENDPOINT_NONE, 0, 0, 0); + conversation = conversation_new(pinfo->num, &pinfo->dl_dst, &pinfo->dl_src, CONVERSATION_NONE, 0, 0, 0); } } @@ -771,15 +771,15 @@ dissect_PNDCP_Suboption_Device(tvbuff_t *tvb, int offset, packet_info *pinfo, if (PINFO_FD_VISITED(pinfo) == FALSE) { /* Create a conversation between the MAC addresses */ - conversation = find_conversation(pinfo->num, &pinfo->dl_src, &pinfo->dl_dst, ENDPOINT_NONE, 0, 0, 0); + conversation = find_conversation(pinfo->num, &pinfo->dl_src, &pinfo->dl_dst, CONVERSATION_NONE, 0, 0, 0); if (conversation == NULL) { /* Create new conversation, need to switch dl_src & dl_dst if not a response * All conversations are based on Device MAC as addr1 */ if (is_response) { - conversation = conversation_new(pinfo->num, &pinfo->dl_src, &pinfo->dl_dst, ENDPOINT_NONE, 0, 0, 0); + conversation = conversation_new(pinfo->num, &pinfo->dl_src, &pinfo->dl_dst, CONVERSATION_NONE, 0, 0, 0); } else { - conversation = conversation_new(pinfo->num, &pinfo->dl_dst, &pinfo->dl_src, ENDPOINT_NONE, 0, 0, 0); + conversation = conversation_new(pinfo->num, &pinfo->dl_dst, &pinfo->dl_src, CONVERSATION_NONE, 0, 0, 0); } } @@ -802,15 +802,15 @@ dissect_PNDCP_Suboption_Device(tvbuff_t *tvb, int offset, packet_info *pinfo, if (PINFO_FD_VISITED(pinfo) == FALSE) { /* Create a conversation between the MAC addresses */ - conversation = find_conversation(pinfo->num, &pinfo->dl_src, &pinfo->dl_dst, ENDPOINT_NONE, 0, 0, 0); + conversation = find_conversation(pinfo->num, &pinfo->dl_src, &pinfo->dl_dst, CONVERSATION_NONE, 0, 0, 0); if (conversation == NULL) { /* Create new conversation, need to switch dl_src & dl_dst if not a response * All conversations are based on Device MAC as addr1 */ if (is_response) { - conversation = conversation_new(pinfo->num, &pinfo->dl_src, &pinfo->dl_dst, ENDPOINT_NONE, 0, 0, 0); + conversation = conversation_new(pinfo->num, &pinfo->dl_src, &pinfo->dl_dst, CONVERSATION_NONE, 0, 0, 0); } else { - conversation = conversation_new(pinfo->num, &pinfo->dl_dst, &pinfo->dl_src, ENDPOINT_NONE, 0, 0, 0); + conversation = conversation_new(pinfo->num, &pinfo->dl_dst, &pinfo->dl_src, CONVERSATION_NONE, 0, 0, 0); } } @@ -969,9 +969,9 @@ dissect_PNDCP_Suboption_Device(tvbuff_t *tvb, int offset, packet_info *pinfo, if (pinfo->fd->visited == FALSE) { /* Create a conversation between the MAC addresses */ - conversation = find_conversation(pinfo->num, &pinfo->dl_src, &pinfo->dl_dst, ENDPOINT_NONE, 0, 0, 0); + conversation = find_conversation(pinfo->num, &pinfo->dl_src, &pinfo->dl_dst, CONVERSATION_NONE, 0, 0, 0); if (conversation == NULL) { - conversation = conversation_new(pinfo->num, &pinfo->dl_src, &pinfo->dl_dst, ENDPOINT_NONE, 0, 0, 0); + conversation = conversation_new(pinfo->num, &pinfo->dl_src, &pinfo->dl_dst, CONVERSATION_NONE, 0, 0, 0); } station_info = (stationInfo*)conversation_get_proto_data(conversation, proto_pn_dcp); @@ -1204,9 +1204,9 @@ dissect_PNDCP_Suboption_TSN(tvbuff_t* tvb, int offset, packet_info* pinfo, if (pinfo->fd->visited == FALSE) { /* Create a conversation between the MAC addresses */ - conversation = find_conversation(pinfo->num, &pinfo->dl_src, &pinfo->dl_dst, ENDPOINT_NONE, 0, 0, 0); + conversation = find_conversation(pinfo->num, &pinfo->dl_src, &pinfo->dl_dst, CONVERSATION_NONE, 0, 0, 0); if (conversation == NULL) { - conversation = conversation_new(pinfo->num, &pinfo->dl_src, &pinfo->dl_dst, ENDPOINT_NONE, 0, 0, 0); + conversation = conversation_new(pinfo->num, &pinfo->dl_src, &pinfo->dl_dst, CONVERSATION_NONE, 0, 0, 0); } station_info = (stationInfo*)conversation_get_proto_data(conversation, proto_pn_dcp); diff --git a/plugins/epan/profinet/packet-pn-rsi.c b/plugins/epan/profinet/packet-pn-rsi.c index b050d68a6d..85a6cd94f4 100644 --- a/plugins/epan/profinet/packet-pn-rsi.c +++ b/plugins/epan/profinet/packet-pn-rsi.c @@ -299,10 +299,10 @@ dissect_pn_rta_remaining_user_data_bytes(tvbuff_t *tvb, int offset, packet_info if (pinfo->srcport != 0 && pinfo->destport != 0) { /* COTP over RFC1006/TCP, try reassembling */ - conv = find_conversation(pinfo->fd->num, &pinfo->src, &pinfo->dst, ENDPOINT_NONE, + conv = find_conversation(pinfo->fd->num, &pinfo->src, &pinfo->dst, CONVERSATION_NONE, pinfo->srcport, pinfo->destport, 0); if (!conv) { - conv = conversation_new(pinfo->fd->num, &pinfo->src, &pinfo->dst, ENDPOINT_NONE, + conv = conversation_new(pinfo->fd->num, &pinfo->src, &pinfo->dst, CONVERSATION_NONE, pinfo->srcport, pinfo->destport, 0); } @@ -312,10 +312,10 @@ dissect_pn_rta_remaining_user_data_bytes(tvbuff_t *tvb, int offset, packet_info } else { /* plain COTP transport (without RFC1006/TCP), try reassembling */ - conv = find_conversation(pinfo->fd->num, &pinfo->src, &pinfo->dst, ENDPOINT_NONE, + conv = find_conversation(pinfo->fd->num, &pinfo->src, &pinfo->dst, CONVERSATION_NONE, pinfo->clnp_srcref, pinfo->clnp_dstref, 0); if (!conv) { - conv = conversation_new(pinfo->fd->num, &pinfo->src, &pinfo->dst, ENDPOINT_NONE, + conv = conversation_new(pinfo->fd->num, &pinfo->src, &pinfo->dst, CONVERSATION_NONE, pinfo->clnp_srcref, pinfo->clnp_dstref, 0); } diff --git a/plugins/epan/profinet/packet-pn-rt.c b/plugins/epan/profinet/packet-pn-rt.c index 252123e365..5b2ebeb1cc 100644 --- a/plugins/epan/profinet/packet-pn-rt.c +++ b/plugins/epan/profinet/packet-pn-rt.c @@ -171,7 +171,7 @@ dissect_DataStatus(tvbuff_t *tvb, int offset, proto_tree *tree, packet_info *pin u8DataValid = (u8DataStatus >> 2) & 0x01; /* if PN Connect Request has been read, IOC mac is dl_src and IOD mac is dl_dst */ - conversation = find_conversation(pinfo->num, &pinfo->dl_src, &pinfo->dl_dst, ENDPOINT_UDP, 0, 0, 0); + conversation = find_conversation(pinfo->num, &pinfo->dl_src, &pinfo->dl_dst, CONVERSATION_UDP, 0, 0, 0); if (conversation != NULL) { apdu_status_switch = (apduStatusSwitch*)conversation_get_proto_data(conversation, proto_pn_io_apdu_status); @@ -642,7 +642,7 @@ dissect_pn_rt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U } /* TimeAwareness Information needed for differentiating RTC3 - RTSteam frames */ - conversation = find_conversation(pinfo->num, &pinfo->dl_src, &pinfo->dl_dst, ENDPOINT_NONE, 0, 0, 0); + conversation = find_conversation(pinfo->num, &pinfo->dl_src, &pinfo->dl_dst, CONVERSATION_NONE, 0, 0, 0); if (conversation != NULL) { isTimeAware = GPOINTER_TO_UINT(conversation_get_proto_data(conversation, proto_pn_io_time_aware_status)); diff --git a/plugins/epan/profinet/packet-pn-rtc-one.c b/plugins/epan/profinet/packet-pn-rtc-one.c index 668c3cc1a2..d3e88b549a 100644 --- a/plugins/epan/profinet/packet-pn-rtc-one.c +++ b/plugins/epan/profinet/packet-pn-rtc-one.c @@ -495,7 +495,7 @@ dissect_PNIO_C_SDU_RTC1(tvbuff_t *tvb, int offset, return(tvb_captured_length(tvb)); /* Only dissect cyclic RTC1 frames, if PN Connect Request has been read */ - conversation = find_conversation(pinfo->num, &pinfo->dl_src, &pinfo->dl_dst, ENDPOINT_NONE, 0, 0, 0); + conversation = find_conversation(pinfo->num, &pinfo->dl_src, &pinfo->dl_dst, CONVERSATION_NONE, 0, 0, 0); /* Detect input data package and output data package */ if (conversation != NULL) { diff --git a/sharkd_session.c b/sharkd_session.c index 734b0af46a..947f1c66cd 100644 --- a/sharkd_session.c +++ b/sharkd_session.c @@ -2183,8 +2183,8 @@ sharkd_session_process_tap_conv_cb(void *arg) if (proto_with_port) { - sharkd_json_value_string("sport", (src_port = get_conversation_port(NULL, iui->src_port, iui->etype, iu->resolve_port))); - sharkd_json_value_string("dport", (dst_port = get_conversation_port(NULL, iui->dst_port, iui->etype, iu->resolve_port))); + sharkd_json_value_string("sport", (src_port = get_conversation_port(NULL, iui->src_port, iui->ctype, iu->resolve_port))); + sharkd_json_value_string("dport", (dst_port = get_conversation_port(NULL, iui->dst_port, iui->ctype, iu->resolve_port))); wmem_free(NULL, src_port); wmem_free(NULL, dst_port); @@ -2231,7 +2231,7 @@ sharkd_session_process_tap_conv_cb(void *arg) if (proto_with_port) { - sharkd_json_value_string("port", (port_str = get_conversation_port(NULL, endpoint->port, endpoint->etype, iu->resolve_port))); + sharkd_json_value_string("port", (port_str = get_endpoint_port(NULL, endpoint, iu->resolve_port))); wmem_free(NULL, port_str); } diff --git a/ui/cli/tap-endpoints.c b/ui/cli/tap-endpoints.c index dfbf87518f..557811b677 100644 --- a/ui/cli/tap-endpoints.c +++ b/ui/cli/tap-endpoints.c @@ -70,7 +70,7 @@ endpoints_draw(void *arg) conversation_str = get_conversation_address(NULL, &endpoint->myaddress, TRUE); if (display_port) { /* XXX - TODO: make port resolution configurable (through gbl_resolv_flags?) */ - port_str = get_conversation_port(NULL, endpoint->port, endpoint->etype, TRUE); + port_str = get_endpoint_port(NULL, endpoint, TRUE); printf("%-20s %5s %6" PRIu64 " %9" PRIu64 " %6" PRIu64 " %9" PRIu64 " %6" PRIu64 " %9" PRIu64 " \n", diff --git a/ui/cli/tap-iousers.c b/ui/cli/tap-iousers.c index af21fff5fb..33b5eb392e 100644 --- a/ui/cli/tap-iousers.c +++ b/ui/cli/tap-iousers.c @@ -107,8 +107,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->etype, TRUE); - dst_port = get_conversation_port(NULL, iui->dst_port, iui->etype, TRUE); + src_port = get_conversation_port(NULL, iui->src_port, iui->ctype, TRUE); + dst_port = get_conversation_port(NULL, iui->dst_port, iui->ctype, TRUE); src = wmem_strconcat(NULL, src_addr, ":", src_port, NULL); dst = wmem_strconcat(NULL, dst_addr, ":", dst_port, NULL); printf("%-26s <-> %-26s %6" PRIu64 " %-9s" diff --git a/ui/qt/conversation_dialog.cpp b/ui/qt/conversation_dialog.cpp index e8bec0ef5e..9acd5b90f6 100644 --- a/ui/qt/conversation_dialog.cpp +++ b/ui/qt/conversation_dialog.cpp @@ -135,11 +135,11 @@ void ConversationDialog::followStream() return; int endpointType = trafficTab()->currentItemData(ATapDataModel::ENDPOINT_DATATYPE).toInt(); - if (endpointType != ENDPOINT_TCP && endpointType != ENDPOINT_UDP) + if (endpointType != CONVERSATION_TCP && endpointType != CONVERSATION_UDP) return; follow_type_t ftype = FOLLOW_TCP; - if (endpointType == ENDPOINT_UDP) + if (endpointType == CONVERSATION_UDP) ftype = FOLLOW_UDP; int convId = trafficTab()->currentItemData(ATapDataModel::CONVERSATION_ID).toInt(); @@ -155,7 +155,7 @@ void ConversationDialog::graphTcp() return; int endpointType = trafficTab()->currentItemData(ATapDataModel::ENDPOINT_DATATYPE).toInt(); - if (endpointType != ENDPOINT_TCP) + if (endpointType != CONVERSATION_TCP) return; int convId = trafficTab()->currentItemData(ATapDataModel::CONVERSATION_ID).toInt(); @@ -178,10 +178,10 @@ void ConversationDialog::tabChanged(int) if (!file_closed_) { int endpointType = trafficTab()->currentItemData(ATapDataModel::ENDPOINT_DATATYPE).toInt(); switch(endpointType) { - case ENDPOINT_TCP: + case CONVERSATION_TCP: graph = true; // Fall through - case ENDPOINT_UDP: + case CONVERSATION_UDP: follow = true; break; } diff --git a/ui/qt/conversation_hash_tables_dialog.cpp b/ui/qt/conversation_hash_tables_dialog.cpp index 80dec2e482..1e0de6b01d 100644 --- a/ui/qt/conversation_hash_tables_dialog.cpp +++ b/ui/qt/conversation_hash_tables_dialog.cpp @@ -55,7 +55,7 @@ fill_named_table(gpointer key, gpointer value _U_, gpointer user_data) case CE_UINT64: title = QString("UInt64 %1").arg(uint64_count++); break; - case CE_ENDPOINT: + case CE_CONVERSATION_TYPE: html_table->append(QString("Endpoint")); goto title_done; break; @@ -86,8 +86,8 @@ title_done: case CE_UINT64: val = QString::number(cur_el->uint64_val); break; - case CE_ENDPOINT: - html_table->append(QString("%1").arg(QString::number(cur_el->endpoint_type_val))); + case CE_CONVERSATION_TYPE: + html_table->append(QString("%1").arg(QString::number(cur_el->conversation_type_val))); goto val_done; break; } diff --git a/ui/qt/models/atap_data_model.cpp b/ui/qt/models/atap_data_model.cpp index dc67fd4947..ee3163b77c 100644 --- a/ui/qt/models/atap_data_model.cpp +++ b/ui/qt/models/atap_data_model.cpp @@ -399,7 +399,7 @@ QVariant EndpointDataModel::data(const QModelIndex &idx, int role) const } case ENDP_COLUMN_PORT: if (_resolveNames) { - char* port_str = get_conversation_port(NULL, item->port, item->etype, _resolveNames); + char* port_str = get_endpoint_port(NULL, item, _resolveNames); QString q_port_str(port_str); wmem_free(NULL, port_str); return q_port_str; @@ -619,7 +619,7 @@ QVariant ConversationDataModel::data(const QModelIndex &idx, int role) const } case CONV_COLUMN_SRC_PORT: if (_resolveNames) { - char* port_str = get_conversation_port(NULL, conv_item->src_port, conv_item->etype, _resolveNames); + char* port_str = get_conversation_port(NULL, conv_item->src_port, conv_item->ctype, _resolveNames); QString q_port_str(port_str); wmem_free(NULL, port_str); return q_port_str; @@ -635,7 +635,7 @@ QVariant ConversationDataModel::data(const QModelIndex &idx, int role) const } case CONV_COLUMN_DST_PORT: if (_resolveNames) { - char* port_str = get_conversation_port(NULL, conv_item->dst_port, conv_item->etype, _resolveNames); + char* port_str = get_conversation_port(NULL, conv_item->dst_port, conv_item->ctype, _resolveNames); QString q_port_str(port_str); wmem_free(NULL, port_str); return q_port_str; @@ -728,7 +728,7 @@ QVariant ConversationDataModel::data(const QModelIndex &idx, int role) const return QVariant::fromValue(span_data); } } else if (role == ATapDataModel::ENDPOINT_DATATYPE) { - return (int)(conv_item->etype); + return (int)(conv_item->ctype); } else if (role == ATapDataModel::CONVERSATION_ID) { return (int)(conv_item->conv_id); } else if (role == ATapDataModel::ROW_IS_FILTERED) { @@ -772,7 +772,7 @@ bool ConversationDataModel::showConversationId(int row) const return false; conv_item_t *conv_item = (conv_item_t *)&g_array_index(storage_, conv_item_t, row); - if (conv_item && (conv_item->etype == ENDPOINT_TCP || conv_item->etype == ENDPOINT_UDP)) + if (conv_item && (conv_item->ctype == CONVERSATION_TCP || conv_item->ctype == CONVERSATION_UDP)) return true; return false; } diff --git a/ui/qt/widgets/traffic_tree.cpp b/ui/qt/widgets/traffic_tree.cpp index 577079296c..fc0fdffedd 100644 --- a/ui/qt/widgets/traffic_tree.cpp +++ b/ui/qt/widgets/traffic_tree.cpp @@ -591,7 +591,7 @@ QMenu * TrafficTree::createActionSubMenu(FilterAction::Action cur_action, QModel if (isConversation && conv_item) { QMenu *subsubmenu = subMenu->addMenu(FilterAction::actionTypeName(at)); if (hasConvId && (cur_action == FilterAction::ActionApply || cur_action == FilterAction::ActionPrepare)) { - QString filter = QString("%1.stream eq %2").arg(conv_item->etype == ENDPOINT_TCP ? "tcp" : "udp").arg(conv_item->conv_id); + QString filter = QString("%1.stream eq %2").arg(conv_item->ctype == CONVERSATION_TCP ? "tcp" : "udp").arg(conv_item->conv_id); FilterAction * act = new FilterAction(subsubmenu, cur_action, at, tr("Filter on stream id")); act->setProperty("filter", filter); subsubmenu->addAction(act);