From 30ae0a90471a26534b65bdb2126a5c823b129e2a Mon Sep 17 00:00:00 2001
From: emcho
+ * Two instances of TransportAddress represent the same
+ * address if both the InetAddresses (or hostnames if it is unresolved),
+ * port numbers, and Transports are equal.
+ *
+ * If both addresses are unresolved, then the hostname, the port & and
+ * the Transport are compared.
+ *
+ * @param obj the object to compare against.
+ * @return true if the objects are the same and
+ * false otherwise.
+ * @see java.net.InetAddress#equals(java.lang.Object)
+ */
+ public boolean equalsTransportAddress(Object obj)
+ {
+ return super.equals(obj)
+ &&( ((TransportAddress)obj).getTransport() == getTransport() );
+ }
}
diff --git a/src/org/ice4j/attribute/AddressAttribute.java b/src/org/ice4j/attribute/AddressAttribute.java
index d77f75f..00ce3e1 100644
--- a/src/org/ice4j/attribute/AddressAttribute.java
+++ b/src/org/ice4j/attribute/AddressAttribute.java
@@ -1,12 +1,11 @@
/*
- * Stun4j, the OpenSource Java Solution for NAT and Firewall Traversal.
+ * ice4j, the OpenSource Java Solution for NAT and Firewall Traversal.
+ * Maintained by the SIP Communicator community (http://sip-communicator.org).
*
- * Distributable under LGPL license.
- * See terms of license at gnu.org.
+ * Distributable under LGPL license. See terms of license at gnu.org.
*/
package org.ice4j.attribute;
-import java.util.Arrays;
import java.net.*;
import org.ice4j.*;
@@ -14,7 +13,7 @@ import org.ice4j.*;
/**
* This class is used to represent Stun attributes that contain an address. Such
* attributes are:
- *
+ *
* MAPPED-ADDRESS
* The different attributes are distinguished by the attributeType of
* org.ice4j.attribute.Attribute.
- *
+ *
* Address attributes indicate the mapped IP address and
* port. They consist of an eight bit address family, and a sixteen bit
* port, followed by a fixed length value representing the IP address.
- *
+ *
* The port is a network byte ordered representation of the mapped port.
* The address family is always 0x01, corresponding to IPv4. The first
* 8 bits of the MAPPED-ADDRESS are ignored, for the purposes of
* aligning parameters on natural boundaries. The IPv4 address is 32
* bits.
- *
- *
- * Organisation: Louis Pasteur University, Strasbourg, France Network Research Team (http://www-r2.u-strasbg.fr)
* RESPONSE-ADDRESS
* SOURCE-ADDRESS
@@ -23,14 +22,16 @@ import org.ice4j.*;
* ALTERNATE-SERVER
* XOR-PEER-ADDRESS
* XOR-RELAYED-ADDRESS
- *
+ *
* 0 1 2 3
* 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
@@ -39,21 +40,26 @@ import org.ice4j.*;
* | Address |
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
*
+ *