/* Compare two conversation keys for an exact match.  */
static gint conversation_match_exact(gconstpointer v, gconstpointer w)
/* Compare two conversation keys for an exact match.  */
static gint conversation_match_exact(gconstpointer v, gconstpointer w)
{
	const conversation_key *v1 = (const conversation_key *)v;
	const conversation_key *v2 = (const conversation_key *)w;
	if (v1->ptype != v2->ptype)
		return 0;
	if (v1->port1 == v2->port1 &&
	    v1->port2 == v2->port2 &&
	    addresses_equal(&v1->addr1, &v2->addr1) &&
	    addresses_equal(&v1->addr2, &v2->addr2)) {
		return 1;
	}
	if (v1->port2 == v2->port1 &&
	    v1->port1 == v2->port2 &&
	    addresses_equal(&v1->addr2, &v2->addr1) &&
	    addresses_equal(&v1->addr1, &v2->addr2)) {
		return 1;
	}
	return 0;
}