2 * Routines for building lists of packets that are part of a "conversation"
6 * Ethereal - Network traffic analyzer
7 * By Gerald Combs <gerald@ethereal.com>
8 * Copyright 1998 Gerald Combs
10 * This program is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU General Public License
12 * as published by the Free Software Foundation; either version 2
13 * of the License, or (at your option) any later version.
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
34 #include "conversation.h"
37 * Hash table for conversations with no wildcards.
39 static GHashTable *conversation_hashtable_exact = NULL;
42 * Hash table for conversations with one wildcard address.
44 static GHashTable *conversation_hashtable_no_addr2 = NULL;
47 * Hash table for conversations with one wildcard port.
49 static GHashTable *conversation_hashtable_no_port2 = NULL;
52 * Hash table for conversations with one wildcard address and port.
54 static GHashTable *conversation_hashtable_no_addr2_or_port2 = NULL;
56 static GMemChunk *conversation_key_chunk = NULL;
57 static GMemChunk *conversation_chunk = NULL;
60 typedef struct conversation_key {
61 struct conversation_key *next;
70 * Linked list of conversation keys, so we can, before freeing them all,
71 * free the address data allocations associated with them.
73 static conversation_key *conversation_keys;
75 static guint32 new_index;
77 static int conversation_init_count = 200;
80 * Protocol-specific data attached to a conversation_t structure - protocol
81 * index and opaque pointer.
83 typedef struct _conv_proto_data {
88 static GMemChunk *conv_proto_data_area = NULL;
91 * Compute the hash value for two given address/port pairs if the match
95 conversation_hash_exact(gconstpointer v)
97 const conversation_key *key = (const conversation_key *)v;
102 for (i = 0; i < key->addr1.len; i++)
103 hash_val += key->addr1.data[i];
105 hash_val += key->port1;
107 for (i = 0; i < key->addr2.len; i++)
108 hash_val += key->addr2.data[i];
110 hash_val += key->port2;
116 * Compare two conversation keys for an exact match.
119 conversation_match_exact(gconstpointer v, gconstpointer w)
121 const conversation_key *v1 = (const conversation_key *)v;
122 const conversation_key *v2 = (const conversation_key *)w;
124 if (v1->ptype != v2->ptype)
125 return 0; /* different types of port */
128 * Are the first and second port 1 values the same, the first and
129 * second port 2 values the same, the first and second address
130 * 1 values the same, and the first and second address 2 values
133 if (v1->port1 == v2->port1 &&
134 v1->port2 == v2->port2 &&
135 ADDRESSES_EQUAL(&v1->addr1, &v2->addr1) &&
136 ADDRESSES_EQUAL(&v1->addr2, &v2->addr2)) {
138 * Yes. It's the same conversation, and the two
139 * address/port pairs are going in the same direction.
145 * Is the first port 2 the same as the second port 1, the first
146 * port 1 the same as the second port 2, the first address 2
147 * the same as the second address 1, and the first address 1
148 * the same as the second address 2?
150 if (v1->port2 == v2->port1 &&
151 v1->port1 == v2->port2 &&
152 ADDRESSES_EQUAL(&v1->addr2, &v2->addr1) &&
153 ADDRESSES_EQUAL(&v1->addr1, &v2->addr2)) {
155 * Yes. It's the same conversation, and the two
156 * address/port pairs are going in opposite directions.
162 * The addresses or the ports don't match.
168 * Compute the hash value for two given address/port pairs if the match
169 * has a wildcard address 2.
172 conversation_hash_no_addr2(gconstpointer v)
174 const conversation_key *key = (const conversation_key *)v;
179 for (i = 0; i < key->addr1.len; i++)
180 hash_val += key->addr1.data[i];
182 hash_val += key->port1;
184 hash_val += key->port2;
190 * Compare two conversation keys, except for the address 2 value.
191 * We don't check both directions of the conversation - the routine
192 * doing the hash lookup has to do two searches, as the hash key
193 * will be different for the two directions.
196 conversation_match_no_addr2(gconstpointer v, gconstpointer w)
198 const conversation_key *v1 = (const conversation_key *)v;
199 const conversation_key *v2 = (const conversation_key *)w;
201 if (v1->ptype != v2->ptype)
202 return 0; /* different types of port */
205 * Are the first and second port 1 values the same, the first and
206 * second port 2 valuess the same, and the first and second
207 * address 1 values the same?
209 if (v1->port1 == v2->port1 &&
210 v1->port2 == v2->port2 &&
211 ADDRESSES_EQUAL(&v1->addr1, &v2->addr1)) {
213 * Yes. It's the same conversation, and the two
214 * address/port pairs are going in the same direction.
220 * The addresses or the ports don't match.
226 * Compute the hash value for two given address/port pairs if the match
227 * has a wildcard port 2.
230 conversation_hash_no_port2(gconstpointer v)
232 const conversation_key *key = (const conversation_key *)v;
237 for (i = 0; i < key->addr1.len; i++)
238 hash_val += key->addr1.data[i];
240 hash_val += key->port1;
242 for (i = 0; i < key->addr2.len; i++)
243 hash_val += key->addr2.data[i];
249 * Compare two conversation keys, except for the port 2 value.
250 * We don't check both directions of the conversation - the routine
251 * doing the hash lookup has to do two searches, as the hash key
252 * will be different for the two directions.
255 conversation_match_no_port2(gconstpointer v, gconstpointer w)
257 const conversation_key *v1 = (const conversation_key *)v;
258 const conversation_key *v2 = (const conversation_key *)w;
260 if (v1->ptype != v2->ptype)
261 return 0; /* different types of port */
264 * Are the first and second port 1 values the same, the first and
265 * second address 1 values the same, and the first and second
266 * address 2 values the same?
268 if (v1->port1 == v2->port1 &&
269 ADDRESSES_EQUAL(&v1->addr1, &v2->addr1) &&
270 ADDRESSES_EQUAL(&v1->addr2, &v2->addr2)) {
272 * Yes. It's the same conversation, and the two
273 * address/port pairs are going in the same direction.
279 * The addresses or the ports don't match.
285 * Compute the hash value for two given address/port pairs if the match
286 * has a wildcard address 2 and port 2.
289 conversation_hash_no_addr2_or_port2(gconstpointer v)
291 const conversation_key *key = (const conversation_key *)v;
296 for (i = 0; i < key->addr1.len; i++)
297 hash_val += key->addr1.data[i];
299 hash_val += key->port1;
305 * Compare the address 1 and port 1 in the two conversation keys.
306 * We don't check both directions of the conversation - the routine
307 * doing the hash lookup has to do two searches, as the hash key
308 * will be different for the two directions.
311 conversation_match_no_addr2_or_port2(gconstpointer v, gconstpointer w)
313 const conversation_key *v1 = (const conversation_key *)v;
314 const conversation_key *v2 = (const conversation_key *)w;
316 if (v1->ptype != v2->ptype)
317 return 0; /* different types of port */
320 * Are the first and second port 1 values the same and the first
321 * and second address 1 values the same?
323 if (v1->port1 == v2->port1 &&
324 ADDRESSES_EQUAL(&v1->addr1, &v2->addr1)) {
326 * Yes. It's the same conversation, and the two
327 * address/port pairs are going in the same direction.
333 * The addresses or the ports don't match.
339 * Initialize some variables every time a file is loaded or re-loaded.
340 * Destroy all existing conversations, and create a new hash table
341 * for the conversations in the new file.
344 conversation_init(void)
346 conversation_key *key;
349 * Free the addresses associated with the conversation keys.
351 for (key = conversation_keys; key != NULL; key = key->next) {
353 * Grr. I guess the theory here is that freeing
354 * something sure as heck modifies it, so you
355 * want to ban attempts to free it, but, alas,
356 * if we make the "data" field of an "address"
357 * structure not a "const", the compiler whines if
358 * we try to make it point into the data for a packet,
359 * as that's a "const" array (and should be, as dissectors
360 * shouldn't trash it).
362 * So we cast the complaint into oblivion, and rely on
363 * the fact that these addresses are known to have had
364 * their data mallocated, i.e. they don't point into,
365 * say, the middle of the data for a packet.
367 g_free((gpointer)key->addr1.data);
368 g_free((gpointer)key->addr2.data);
370 conversation_keys = NULL;
371 if (conversation_hashtable_exact != NULL)
372 g_hash_table_destroy(conversation_hashtable_exact);
373 if (conversation_hashtable_no_addr2 != NULL)
374 g_hash_table_destroy(conversation_hashtable_no_addr2);
375 if (conversation_hashtable_no_port2 != NULL)
376 g_hash_table_destroy(conversation_hashtable_no_port2);
377 if (conversation_hashtable_no_addr2_or_port2 != NULL)
378 g_hash_table_destroy(conversation_hashtable_no_addr2_or_port2);
379 if (conversation_key_chunk != NULL)
380 g_mem_chunk_destroy(conversation_key_chunk);
381 if (conversation_chunk != NULL)
382 g_mem_chunk_destroy(conversation_chunk);
385 * Free up any space allocated for conversation protocol data
388 * We can free the space, as the structures it contains are
389 * pointed to by conversation data structures that were freed
392 if (conv_proto_data_area != NULL)
393 g_mem_chunk_destroy(conv_proto_data_area);
395 conversation_hashtable_exact =
396 g_hash_table_new(conversation_hash_exact,
397 conversation_match_exact);
398 conversation_hashtable_no_addr2 =
399 g_hash_table_new(conversation_hash_no_addr2,
400 conversation_match_no_addr2);
401 conversation_hashtable_no_port2 =
402 g_hash_table_new(conversation_hash_no_port2,
403 conversation_match_no_port2);
404 conversation_hashtable_no_addr2_or_port2 =
405 g_hash_table_new(conversation_hash_no_addr2_or_port2,
406 conversation_match_no_addr2_or_port2);
407 conversation_key_chunk = g_mem_chunk_new("conversation_key_chunk",
408 sizeof(conversation_key),
409 conversation_init_count * sizeof(struct conversation_key),
411 conversation_chunk = g_mem_chunk_new("conversation_chunk",
412 sizeof(conversation_t),
413 conversation_init_count * sizeof(conversation_t),
417 * Allocate a new area for conversation protocol data items.
419 conv_proto_data_area = g_mem_chunk_new("conv_proto_data_area",
420 sizeof(conv_proto_data), 20 * sizeof(conv_proto_data), /* FIXME*/
424 * Start the conversation indices over at 0.
430 * Given two address/port pairs for a packet, create a new conversation
431 * to contain packets between those address/port pairs.
433 * The options field is used to specify whether the address 2 value
434 * and/or port 2 value are not given and any value is acceptable
435 * when searching for this conversation.
438 conversation_new(address *addr1, address *addr2, port_type ptype,
439 guint32 port1, guint32 port2, guint options)
441 conversation_t *conversation;
442 conversation_key *new_key;
444 new_key = g_mem_chunk_alloc(conversation_key_chunk);
445 new_key->next = conversation_keys;
446 conversation_keys = new_key;
447 COPY_ADDRESS(&new_key->addr1, addr1);
448 COPY_ADDRESS(&new_key->addr2, addr2);
449 new_key->ptype = ptype;
450 new_key->port1 = port1;
451 new_key->port2 = port2;
453 conversation = g_mem_chunk_alloc(conversation_chunk);
454 conversation->index = new_index;
455 conversation->data_list = NULL;
457 /* clear dissector handle */
458 conversation->dissector_handle = NULL;
460 /* set the options and key pointer */
461 conversation->options = options;
462 conversation->key_ptr = new_key;
466 if (options & NO_ADDR2) {
467 if (options & (NO_PORT2|NO_PORT2_FORCE)) {
468 g_hash_table_insert(conversation_hashtable_no_addr2_or_port2,
469 new_key, conversation);
471 g_hash_table_insert(conversation_hashtable_no_addr2,
472 new_key, conversation);
475 if (options & (NO_PORT2|NO_PORT2_FORCE)) {
476 g_hash_table_insert(conversation_hashtable_no_port2,
477 new_key, conversation);
479 g_hash_table_insert(conversation_hashtable_exact,
480 new_key, conversation);
487 * Set the port 2 value in a key. Remove the original from table,
488 * update the options and port values, insert the updated key.
491 conversation_set_port2(conversation_t *conv, guint32 port)
494 * If the port 2 value is not wildcarded, don't set it.
496 if ((!(conv->options & NO_PORT2)) || (conv->options & NO_PORT2_FORCE))
499 if (conv->options & NO_ADDR2) {
500 g_hash_table_remove(conversation_hashtable_no_addr2_or_port2,
503 g_hash_table_remove(conversation_hashtable_no_port2,
506 conv->options &= ~NO_PORT2;
507 conv->key_ptr->port2 = port;
508 if (conv->options & NO_ADDR2) {
509 g_hash_table_insert(conversation_hashtable_no_addr2,
510 conv->key_ptr, conv);
512 g_hash_table_insert(conversation_hashtable_exact,
513 conv->key_ptr, conv);
518 * Set the address 2 value in a key. Remove the original from
519 * table, update the options and port values, insert the updated key.
522 conversation_set_addr2(conversation_t *conv, address *addr)
525 * If the address 2 value is not wildcarded, don't set it.
527 if (!(conv->options & NO_ADDR2))
530 if (conv->options & NO_PORT2) {
531 g_hash_table_remove(conversation_hashtable_no_addr2_or_port2,
534 g_hash_table_remove(conversation_hashtable_no_addr2,
537 conv->options &= ~NO_ADDR2;
538 COPY_ADDRESS(&conv->key_ptr->addr2, addr);
539 if (conv->options & NO_PORT2) {
540 g_hash_table_insert(conversation_hashtable_no_port2,
541 conv->key_ptr, conv);
543 g_hash_table_insert(conversation_hashtable_exact,
544 conv->key_ptr, conv);
549 * Search a particular hash table for a conversaton with the specified
550 * addr1, port1, addr2, and port2.
552 static conversation_t *
553 conversation_lookup_hashtable(GHashTable *hashtable, address *addr1, address *addr2,
554 port_type ptype, guint32 port1, guint32 port2)
556 conversation_key key;
559 * We don't make a copy of the address data, we just copy the
560 * pointer to it, as "key" disappears when we return.
567 return g_hash_table_lookup(hashtable, &key);
572 * Given two address/port pairs for a packet, search for a conversation
573 * containing packets between those address/port pairs. Returns NULL if
576 * We try to find the most exact match that we can, and then proceed to
577 * try wildcard matches on the "addr_b" and/or "port_b" argument if a more
578 * exact match failed.
580 * Either or both of the "addr_b" and "port_b" arguments may be specified as
581 * a wildcard by setting the NO_ADDR_B or NO_PORT_B flags in the "options"
582 * argument. We do only wildcard matches on addresses and ports specified
587 * if neither "addr_b" nor "port_b" were specified as wildcards, we
588 * do an exact match (addr_a/port_a and addr_b/port_b) and, if that
589 * succeeds, we return a pointer to the matched conversation;
591 * otherwise, if "port_b" wasn't specified as a wildcard, we try to
592 * match any address 2 with the specified port 2 (addr_a/port_a and
593 * {any}/addr_b) and, if that succeeds, we return a pointer to the
594 * matched conversation;
596 * otherwise, if "addr_b" wasn't specified as a wildcard, we try to
597 * match any port 2 with the specified address 2 (addr_a/port_a and
598 * addr_b/{any}) and, if that succeeds, we return a pointer to the
599 * matched conversation;
601 * otherwise, we try to match any address 2 and any port 2
602 * (addr_a/port_a and {any}/{any}) and, if that succeeds, we return
603 * a pointer to the matched conversation;
605 * otherwise, we found no matching conversation, and return NULL.
608 find_conversation(address *addr_a, address *addr_b, port_type ptype,
609 guint32 port_a, guint32 port_b, guint options)
611 conversation_t *conversation;
614 * First try an exact match, if we have two addresses and ports.
616 if (!(options & (NO_ADDR_B|NO_PORT_B))) {
618 * Neither search address B nor search port B are wildcarded,
619 * start out with an exact match.
620 * Exact matches check both directions.
623 conversation_lookup_hashtable(conversation_hashtable_exact,
624 addr_a, addr_b, ptype,
626 if ((conversation == NULL) && (addr_a->type == AT_FC)) {
627 /* In Fibre channel, OXID & RXID are never swapped as
628 * TCP/UDP ports are in TCP/IP.
631 conversation_lookup_hashtable(conversation_hashtable_exact,
632 addr_b, addr_a, ptype,
635 if (conversation != NULL)
640 * Well, that didn't find anything. Try matches that wildcard
641 * one of the addresses, if we have two ports.
643 if (!(options & NO_PORT_B)) {
645 * Search port B isn't wildcarded.
647 * First try looking for a conversation with the specified
648 * address A and port A as the first address and port, and
649 * with any address and the specified port B as the second
651 * ("addr_b" doesn't take part in this lookup.)
654 conversation_lookup_hashtable(conversation_hashtable_no_addr2,
655 addr_a, addr_b, ptype, port_a, port_b);
656 if ((conversation == NULL) && (addr_a->type == AT_FC)) {
657 /* In Fibre channel, OXID & RXID are never swapped as
658 * TCP/UDP ports are in TCP/IP.
661 conversation_lookup_hashtable(conversation_hashtable_no_addr2,
662 addr_b, addr_a, ptype,
665 if (conversation != NULL) {
667 * If search address B isn't wildcarded, and this
668 * is for a connection-oriented protocol, set the
669 * second address for this conversation to address
670 * B, as that's the address that matched the
671 * wildcarded second address for this conversation.
673 * (XXX - this assumes that, for all connection-
674 * oriented protocols, the endpoints of a connection
675 * have only one address each, i.e. you don't get
676 * packets in a given direction coming from more than
679 if (!(options & NO_ADDR_B) && ptype != PT_UDP)
680 conversation_set_addr2(conversation, addr_b);
685 * Well, that didn't find anything.
686 * If search address B was specified, try looking for a
687 * conversation with the specified address B and port B as
688 * the first address and port, and with any address and the
689 * specified port A as the second address and port (this
690 * packet may be going in the opposite direction from the
691 * first packet in the conversation).
692 * ("addr_a" doesn't take part in this lookup.)
694 if (!(options & NO_ADDR_B)) {
696 conversation_lookup_hashtable(conversation_hashtable_no_addr2,
697 addr_b, addr_a, ptype, port_b, port_a);
698 if (conversation != NULL) {
700 * If this is for a connection-oriented
701 * protocol, set the second address for
702 * this conversation to address A, as
703 * that's the address that matched the
704 * wildcarded second address for this
707 if (ptype != PT_UDP) {
708 conversation_set_addr2(conversation,
717 * Well, that didn't find anything. Try matches that wildcard
718 * one of the ports, if we have two addresses.
720 if (!(options & NO_ADDR_B)) {
722 * Search address B isn't wildcarded.
724 * First try looking for a conversation with the specified
725 * address A and port A as the first address and port, and
726 * with the specified address B and any port as the second
728 * ("port_b" doesn't take part in this lookup.)
731 conversation_lookup_hashtable(conversation_hashtable_no_port2,
732 addr_a, addr_b, ptype, port_a, port_b);
733 if ((conversation == NULL) && (addr_a->type == AT_FC)) {
734 /* In Fibre channel, OXID & RXID are never swapped as
735 * TCP/UDP ports are in TCP/IP
738 conversation_lookup_hashtable(conversation_hashtable_no_port2,
739 addr_b, addr_a, ptype, port_a, port_b);
741 if (conversation != NULL) {
743 * If search port B isn't wildcarded, and this is
744 * for a connection-oriented protocol, set the
745 * second port for this conversation to port B,
746 * as that's the port that matched the wildcarded
747 * second port for this conversation.
749 * (XXX - this assumes that, for all connection-
750 * oriented protocols, the endpoints of a connection
751 * have only one port each, i.e. you don't get
752 * packets in a given direction coming from more than
755 if (!(options & NO_PORT_B) && ptype != PT_UDP)
756 conversation_set_port2(conversation, port_b);
761 * Well, that didn't find anything.
762 * If search port B was specified, try looking for a
763 * conversation with the specified address B and port B
764 * as the first address and port, and with the specified
765 * address A and any port as the second address and port
766 * (this packet may be going in the opposite direction
767 * from the first packet in the conversation).
768 * ("port_a" doesn't take part in this lookup.)
770 if (!(options & NO_PORT_B)) {
772 conversation_lookup_hashtable(conversation_hashtable_no_port2,
773 addr_b, addr_a, ptype, port_b, port_a);
774 if (conversation != NULL) {
776 * If this is for a connection-oriented
777 * protocol, set the second port for
778 * this conversation to port A, as
779 * that's the address that matched the
780 * wildcarded second address for this
783 if (ptype != PT_UDP) {
784 conversation_set_port2(conversation,
793 * Well, that didn't find anything. Try matches that wildcard
794 * one address/port pair.
796 * First try looking for a conversation with the specified address A
797 * and port A as the first address and port.
798 * (Neither "addr_b" nor "port_b" take part in this lookup.)
801 conversation_lookup_hashtable(conversation_hashtable_no_addr2_or_port2,
802 addr_a, addr_b, ptype, port_a, port_b);
803 if (conversation != NULL) {
805 * If this is for a connection-oriented protocol:
807 * if search address B isn't wildcarded, set the
808 * second address for this conversation to address
809 * B, as that's the address that matched the
810 * wildcarded second address for this conversation;
812 * if search port B isn't wildcarded, set the
813 * second port for this conversation to port B,
814 * as that's the port that matched the wildcarded
815 * second port for this conversation.
817 if (ptype != PT_UDP) {
818 if (!(options & NO_ADDR_B))
819 conversation_set_addr2(conversation, addr_b);
820 if (!(options & NO_PORT_B))
821 conversation_set_port2(conversation, port_b);
827 * Well, that didn't find anything.
828 * If search address and port B were specified, try looking for a
829 * conversation with the specified address B and port B as the
830 * first address and port, and with any second address and port
831 * (this packet may be going in the opposite direction from the
832 * first packet in the conversation).
833 * (Neither "addr_a" nor "port_a" take part in this lookup.)
835 if (addr_a->type == AT_FC)
837 conversation_lookup_hashtable(conversation_hashtable_no_addr2_or_port2,
838 addr_b, addr_a, ptype, port_a,
842 conversation_lookup_hashtable(conversation_hashtable_no_addr2_or_port2,
843 addr_b, addr_a, ptype, port_b,
845 if (conversation != NULL) {
847 * If this is for a connection-oriented protocol, set the
848 * second address for this conversation to address A, as
849 * that's the address that matched the wildcarded second
850 * address for this conversation, and set the second port
851 * for this conversation to port A, as that's the port
852 * that matched the wildcarded second port for this
855 if (ptype != PT_UDP) {
856 conversation_set_addr2(conversation, addr_a);
857 conversation_set_port2(conversation, port_a);
863 * We found no conversation.
869 p_compare(gconstpointer a, gconstpointer b)
871 const conv_proto_data *ap = (const conv_proto_data *)a;
872 const conv_proto_data *bp = (const conv_proto_data *)b;
874 if (ap->proto > bp->proto)
876 else if (ap->proto == bp->proto)
883 conversation_add_proto_data(conversation_t *conv, int proto, void *proto_data)
885 conv_proto_data *p1 = g_mem_chunk_alloc(conv_proto_data_area);
888 p1->proto_data = proto_data;
890 /* Add it to the list of items for this conversation. */
892 conv->data_list = g_slist_insert_sorted(conv->data_list, (gpointer *)p1,
897 conversation_get_proto_data(conversation_t *conv, int proto)
899 conv_proto_data temp, *p1;
903 temp.proto_data = NULL;
905 item = g_slist_find_custom(conv->data_list, (gpointer *)&temp,
909 p1 = (conv_proto_data *)item->data;
910 return p1->proto_data;
917 conversation_delete_proto_data(conversation_t *conv, int proto)
919 conv_proto_data temp;
923 temp.proto_data = NULL;
925 item = g_slist_find_custom(conv->data_list, (gpointer *)&temp,
929 conv->data_list = g_slist_remove(conv->data_list, item);
933 conversation_set_dissector(conversation_t *conversation,
934 dissector_handle_t handle)
936 conversation->dissector_handle = handle;
940 * Given two address/port pairs for a packet, search for a matching
941 * conversation and, if found and it has a conversation dissector,
942 * call that dissector and return TRUE, otherwise return FALSE.
945 try_conversation_dissector(address *addr_a, address *addr_b, port_type ptype,
946 guint32 port_a, guint32 port_b, tvbuff_t *tvb, packet_info *pinfo,
949 conversation_t *conversation;
951 conversation = find_conversation(addr_a, addr_b, ptype, port_a,
954 if (conversation != NULL) {
955 if (conversation->dissector_handle == NULL)
957 call_dissector(conversation->dissector_handle, tvb, pinfo,