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.
This commit is contained in:
Guy Harris 2022-08-25 19:42:38 -07:00
parent b65b95dda4
commit 8195bdd340
147 changed files with 819 additions and 723 deletions

View File

@ -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;
}
/*

View File

@ -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
}

View File

@ -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;

View File

@ -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);

View File

@ -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);
}
}

View File

@ -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);
}

View File

@ -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);

View File

@ -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 */

View File

@ -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*/

View File

@ -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);
}

View File

@ -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);

View File

@ -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)
{

View File

@ -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",

View File

@ -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);
}

View File

@ -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);

View File

@ -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);

View File

@ -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;
}

View File

@ -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);
}
}
}

View File

@ -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 {

View File

@ -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);

View File

@ -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);

View File

@ -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)

View File

@ -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);

View File

@ -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);
}

View File

@ -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().

View File

@ -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

View File

@ -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);
}

View File

@ -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)

View File

@ -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);

View File

@ -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;

View File

@ -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, &eth_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, &eth_ct_dissector_info, CONVERSATION_NONE);
return TAP_PACKET_REDRAW;
}

View File

@ -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);

View File

@ -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) {

View File

@ -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)) {

View File

@ -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) {

View File

@ -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) {

View File

@ -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;

View File

@ -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) {

View File

@ -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;
}

View File

@ -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 */

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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);

View File

@ -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;
}

View File

@ -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;

View File

@ -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);
}

View File

@ -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);
}
}

View File

@ -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);
}

View File

@ -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

View File

@ -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);

View File

@ -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];
}

View File

@ -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;

View File

@ -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;
}

View File

@ -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;

View File

@ -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;

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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 */

View File

@ -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 */

View File

@ -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;
}

View File

@ -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);
}

View File

@ -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;
}

View File

@ -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);
}

View File

@ -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;
}

View File

@ -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);

View File

@ -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 */

View File

@ -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);
}
}

View File

@ -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;
}

View File

@ -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) {

View File

@ -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);

View File

@ -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);
}

View File

@ -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);

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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));
}

View File

@ -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(

View File

@ -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)

View File

@ -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)
{

View File

@ -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);
}

View File

@ -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)

View File

@ -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);

View File

@ -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) {

View File

@ -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) {

View File

@ -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);
}
}

View File

@ -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);
}

View File

@ -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;

View File

@ -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)

View File

@ -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 */

View File

@ -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);
}

View File

@ -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 */

View File

@ -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

View File

@ -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);

View File

@ -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 */

View File

@ -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;

View File

@ -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;
}

View File

@ -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);
}

View File

@ -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;

View File

@ -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)
{

View File

@ -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);
}
/*

View File

@ -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;
}

Some files were not shown because too many files have changed in this diff Show More