file header update

This commit is contained in:
emcho 2010-04-25 14:40:58 +00:00
parent fb8267afc8
commit 78f1393764
39 changed files with 239 additions and 340 deletions

View File

@ -1,19 +1,15 @@
/* /*
* 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. * Distributable under LGPL license. See terms of license at gnu.org.
* See terms of license at gnu.org.
*/ */
package org.ice4j; package org.ice4j;
/** /**
* A StunException is thrown when a general STUN exception is encountered. * A StunException is thrown when a general STUN exception is encountered.
* *
* <p>Copyright: Copyright (c) 2003</p>
* <p>Organization: Louis Pasteur University, Strasbourg, France</p>
* <p>Network Research Team (http://www-r2.u-strasbg.fr)</p>
* @author Emil Ivov * @author Emil Ivov
* @version 0.1
*/ */
public class StunException extends Exception public class StunException extends Exception
{ {

View File

@ -28,11 +28,7 @@ package org.ice4j.attribute;
* aligning parameters on natural boundaries. The IPv4 address is 32 * aligning parameters on natural boundaries. The IPv4 address is 32
* bits. * bits.
* *
* <p>Copyright: Copyright (c) 2008</p>
* <p>Organisation: Louis Pasteur University, Strasbourg, France</p>
* <p>Network Research Team (http://www-r2.u-strasbg.fr)</p></p>
* @author Sebastien Vincent * @author Sebastien Vincent
* @version 0.1
*/ */
public class AlternateServerAttribute extends AddressAttribute public class AlternateServerAttribute extends AddressAttribute

View File

@ -1,8 +1,8 @@
/* /*
* 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. * Distributable under LGPL license. See terms of license at gnu.org.
* See terms of license at gnu.org.
*/ */
package org.ice4j.attribute; package org.ice4j.attribute;
@ -58,13 +58,9 @@ import org.ice4j.*;
* 0x8029: ICE-CONTROLLED <br/> * 0x8029: ICE-CONTROLLED <br/>
* 0x802A: ICE-CONTROLLING <br/> * 0x802A: ICE-CONTROLLING <br/>
* *
* <p>Copyright: Copyright (c) 2003-2008</p>
* <p> Organisation: Louis Pasteur University, Strasbourg, France</p>
* <p> Network Research Team (http://www-r2.u-strasbg.fr)</p>
* @author Emil Ivov * @author Emil Ivov
* @author Sebastien Vincent * @author Sebastien Vincent
* @author Namal Senarathne * @author Namal Senarathne
* @version 0.1
*/ */
public abstract class Attribute public abstract class Attribute
{ {
@ -180,8 +176,8 @@ public abstract class Attribute
* @param attributeValue a binary array containing this attribute's field * @param attributeValue a binary array containing this attribute's field
* values and NOT containing the attribute header. * values and NOT containing the attribute header.
* @param offset the position where attribute values begin (most often * @param offset the position where attribute values begin (most often
* offset is equal to the index of the first byte after * offset is equal to the index of the first byte after
* length) * length)
* @param length the length of the binary array. * @param length the length of the binary array.
* @throws StunException if attrubteValue contains invalid data. * @throws StunException if attrubteValue contains invalid data.
*/ */

View File

@ -1,8 +1,8 @@
/* /*
* 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. * Distributable under LGPL license. See terms of license at gnu.org.
* See terms of license at gnu.org.
*/ */
package org.ice4j.attribute; package org.ice4j.attribute;
@ -12,12 +12,8 @@ import org.ice4j.*;
* The class provides utilities for decoding a binary stream into an Attribute * The class provides utilities for decoding a binary stream into an Attribute
* class. * class.
* *
* <p>Copyright: Copyright (c) 2003-2008</p>
* <p>Organization: Louis Pasteur University, Strasbourg, France</p>
* <p>Network Research Team (http://www-r2.u-strasbg.fr)</p>
* @author Emil Ivov * @author Emil Ivov
* @author Sebastien Vincent * @author Sebastien Vincent
* @version 0.1
*/ */
public class AttributeDecoder public class AttributeDecoder
{ {

View File

@ -1,24 +1,20 @@
/** 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. * Distributable under LGPL license. See terms of license at gnu.org.
* See terms of license at gnu.org.
*/ */
package org.ice4j.attribute; package org.ice4j.attribute;
import org.ice4j.*; import org.ice4j.*;
/** /**
*
* This class provides factory methods to allow an application to create * This class provides factory methods to allow an application to create
* STUN / TURN / ICE Attributes from a particular implementation. * STUN / TURN / ICE Attributes from a particular implementation.
* *
* <p>Copyright: Copyright (c) 2003-2008</p>
* <p>Organisation: Louis Pasteur University, Strasbourg, France</p>
* <p>Network Research Team (http://www-r2.u-strasbg.fr)</p></p>
* @author Emil Ivov * @author Emil Ivov
* @author Sebastien Vincent * @author Sebastien Vincent
* @author Namal Senarathne * @author Namal Senarathne
* @version 0.1
*/ */
public class AttributeFactory public class AttributeFactory
{ {

View File

@ -1,8 +1,8 @@
/* /*
* 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. * Distributable under LGPL license. See terms of license at gnu.org.
* See terms of license at gnu.org.
*/ */
package org.ice4j.attribute; package org.ice4j.attribute;
@ -30,11 +30,7 @@ import org.ice4j.*;
* server to send the Binding Response with a different port than the * server to send the Binding Response with a different port than the
* one the Binding Request was received on. * one the Binding Request was received on.
* *
* <p>Copyright: Copyright (c) 2003</p>
* <p>Organisation: Louis Pasteur University, Strasbourg, France</p>
* <p>Network Research Team (http://www-r2.u-strasbg.fr)</p></p>
* @author Emil Ivov * @author Emil Ivov
* @version 0.1
*/ */
public class ChangeRequestAttribute public class ChangeRequestAttribute
@ -197,8 +193,8 @@ public class ChangeRequestAttribute
* @param attributeValue a binary array containing this attribute's field * @param attributeValue a binary array containing this attribute's field
* values and NOT containing the attribute header. * values and NOT containing the attribute header.
* @param offset the position where attribute values begin (most often * @param offset the position where attribute values begin (most often
* offset is equal to the index of the first byte after * offset is equal to the index of the first byte after
* length) * length)
* @param length the length of the binary array. * @param length the length of the binary array.
* @throws StunException if attrubteValue contains invalid data. * @throws StunException if attrubteValue contains invalid data.
*/ */

View File

@ -1,8 +1,8 @@
/* /*
* 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. * Distributable under LGPL license. See terms of license at gnu.org.
* See terms of license at gnu.org.
*/ */
package org.ice4j.attribute; package org.ice4j.attribute;
@ -15,11 +15,7 @@ package org.ice4j.attribute;
* Response, independent of the value of the flags. Its syntax is * Response, independent of the value of the flags. Its syntax is
* identical to MAPPED-ADDRESS. * identical to MAPPED-ADDRESS.
* *
* <p>Copyright: Copyright (c) 2003</p>
* <p>Organisation: Louis Pasteur University, Strasbourg, France</p>
* <p>Network Research Team (http://www-r2.u-strasbg.fr)</p></p>
* @author Emil Ivov * @author Emil Ivov
* @version 0.1
*/ */
public class ChangedAddressAttribute extends AddressAttribute public class ChangedAddressAttribute extends AddressAttribute

View File

@ -1,8 +1,8 @@
/* /*
* Ice4j, 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. * Distributable under LGPL license. See terms of license at gnu.org.
* See terms of license at gnu.org.
*/ */
package org.ice4j.attribute; package org.ice4j.attribute;
@ -13,7 +13,6 @@ import org.ice4j.*;
* channel the TURN client want to send data. * channel the TURN client want to send data.
* *
* @author Sebastien Vincent * @author Sebastien Vincent
* @version 0.1
*/ */
public class ChannelNumberAttribute extends Attribute public class ChannelNumberAttribute extends Attribute
{ {

View File

@ -1,8 +1,8 @@
/* /*
* Ice4j, 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. * Distributable under LGPL license. See terms of license at gnu.org.
* See terms of license at gnu.org.
*/ */
package org.ice4j.attribute; package org.ice4j.attribute;
@ -19,7 +19,6 @@ import org.ice4j.*;
* attributes on word boundaries. * attributes on word boundaries.
* *
* @author Sebastien Vincent * @author Sebastien Vincent
* @version 0.1
*/ */
public class DataAttribute public class DataAttribute
extends Attribute extends Attribute

View File

@ -1,8 +1,8 @@
/* /*
* Ice4j, 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. * Distributable under LGPL license. See terms of license at gnu.org.
* See terms of license at gnu.org.
*/ */
package org.ice4j.attribute; package org.ice4j.attribute;
@ -14,7 +14,6 @@ import org.ice4j.*;
* in IPv4 headers when relaying client data. * in IPv4 headers when relaying client data.
* *
* @author Sebastien Vincent * @author Sebastien Vincent
* @version 0.1
*/ */
public class DontFragmentAttribute extends Attribute public class DontFragmentAttribute extends Attribute
{ {

View File

@ -1,8 +1,8 @@
/* /*
* 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. * Distributable under LGPL license. See terms of license at gnu.org.
* See terms of license at gnu.org.
*/ */
package org.ice4j.attribute; package org.ice4j.attribute;
@ -71,11 +71,7 @@ import org.ice4j.*;
* 600 (Global Failure:) The server is refusing to fulfill the request. * 600 (Global Failure:) The server is refusing to fulfill the request.
* The client should not retry. * The client should not retry.
* *
* <p>Copyright: Copyright (c) 2003</p>
* <p>Organization: Louis Pasteur University, Strasbourg, France</p>
* <p>Network Research Team (http://www-r2.u-strasbg.fr)</p>
* @author Emil Ivov * @author Emil Ivov
* @version 0.1
*/ */
public class ErrorCodeAttribute extends Attribute public class ErrorCodeAttribute extends Attribute
{ {
@ -366,8 +362,8 @@ public class ErrorCodeAttribute extends Attribute
* @param attributeValue a binary array containing this attribute's field * @param attributeValue a binary array containing this attribute's field
* values and NOT containing the attribute header. * values and NOT containing the attribute header.
* @param offset the position where attribute values begin (most often * @param offset the position where attribute values begin (most often
* offset is equal to the index of the first byte after * offset is equal to the index of the first byte after
* length) * length)
* @param length the length of the binary array. * @param length the length of the binary array.
* @throws StunException if attrubteValue contains invalid data. * @throws StunException if attrubteValue contains invalid data.
*/ */

View File

@ -1,8 +1,8 @@
/* /*
* Ice4j, 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. * Distributable under LGPL license. See terms of license at gnu.org.
* See terms of license at gnu.org.
*/ */
package org.ice4j.attribute; package org.ice4j.attribute;
@ -17,7 +17,6 @@ import org.ice4j.*;
* R : ask to reserve a second port.<br/> * R : ask to reserve a second port.<br/>
* *
* @author Sebastien Vincent * @author Sebastien Vincent
* @version 0.1
*/ */
public class EvenPortAttribute extends Attribute public class EvenPortAttribute extends Attribute
{ {

View File

@ -1,8 +1,8 @@
/* /*
* Ice4j, 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. * Distributable under LGPL license. See terms of license at gnu.org.
* See terms of license at gnu.org.
*/ */
package org.ice4j.attribute; package org.ice4j.attribute;
@ -13,7 +13,6 @@ import org.ice4j.*;
* from packets of other protocols. * from packets of other protocols.
* *
* @author Sebastien Vincent * @author Sebastien Vincent
* @version 0.1
*/ */
public class FingerprintAttribute extends Attribute public class FingerprintAttribute extends Attribute
{ {

View File

@ -1,8 +1,8 @@
/* /*
* Ice4j, 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. * Distributable under LGPL license. See terms of license at gnu.org.
* See terms of license at gnu.org.
*/ */
package org.ice4j.attribute; package org.ice4j.attribute;
@ -13,7 +13,6 @@ import org.ice4j.*;
* of TURN allocations. * of TURN allocations.
* *
* @author Sebastien Vincent * @author Sebastien Vincent
* @version 0.1
*/ */
public class LifetimeAttribute extends Attribute public class LifetimeAttribute extends Attribute
{ {

View File

@ -1,8 +1,8 @@
/* /*
* 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. * Distributable under LGPL license. See terms of license at gnu.org.
* See terms of license at gnu.org.
*/ */
package org.ice4j.attribute; package org.ice4j.attribute;
@ -25,11 +25,7 @@ package org.ice4j.attribute;
* aligning parameters on natural boundaries. The IPv4 address is 32 * aligning parameters on natural boundaries. The IPv4 address is 32
* bits. * bits.
* *
* <p>Copyright: Copyright (c) 2003</p>
* <p>Organisation: Louis Pasteur University, Strasbourg, France</p>
* <p>Network Research Team (http://www-r2.u-strasbg.fr)</p></p>
* @author Emil Ivov * @author Emil Ivov
* @version 0.1
*/ */
public class MappedAddressAttribute extends AddressAttribute public class MappedAddressAttribute extends AddressAttribute

View File

@ -1,8 +1,8 @@
/* /*
* Ice4j, 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. * Distributable under LGPL license. See terms of license at gnu.org.
* See terms of license at gnu.org.
*/ */
package org.ice4j.attribute; package org.ice4j.attribute;
@ -14,7 +14,6 @@ import org.ice4j.*;
* The NONCE attribute is used for authentification. * The NONCE attribute is used for authentification.
* *
* @author Sebastien Vincent * @author Sebastien Vincent
* @version 0.1
*/ */
public class NonceAttribute extends Attribute public class NonceAttribute extends Attribute
{ {

View File

@ -1,8 +1,8 @@
/* /*
* 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. * Distributable under LGPL license. See terms of license at gnu.org.
* See terms of license at gnu.org.
*/ */
package org.ice4j.attribute; package org.ice4j.attribute;
@ -17,11 +17,7 @@ import org.ice4j.*;
* dealing with attributes in received messages, and generating messages * dealing with attributes in received messages, and generating messages
* containing attributes not explicitly supported by the stack. * containing attributes not explicitly supported by the stack.
* *
* <p>Copyright: Copyright (c) 2003</p>
* <p>Organisation: Louis Pasteur University, Strasbourg, France</p>
* <p>Network Research Team (http://www-r2.u-strasbg.fr)</p></p>
* @author Emil Ivov * @author Emil Ivov
* @version 0.1
* *
*/ */
public class OptionalAttribute public class OptionalAttribute

View File

@ -1,8 +1,8 @@
/* /*
* 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. * Distributable under LGPL license. See terms of license at gnu.org.
* See terms of license at gnu.org.
*/ */
package org.ice4j.attribute; package org.ice4j.attribute;
@ -20,25 +20,26 @@ import org.ice4j.*;
* @author Namal Senarathne * @author Namal Senarathne
*/ */
public class PriorityAttribute public class PriorityAttribute
extends Attribute extends Attribute
{ {
/** /**
* The length of the Data contained in the Priority Attribute * The length of the Data contained in the Priority Attribute
*/ */
private static final char DATA_LENGTH_PRIORITY = 4; private static final char DATA_LENGTH_PRIORITY = 4;
/** /**
* The priority value specified in the attribute * The priority value specified in the attribute. An int should be enough
*/ * to store this value, but long is used, since candidate and candidate-pair
private long priority = 0; // int is enough to store this value, but long is used, since * classes use long to store priority values
// candidate and candidate-pair classes use long to store priority values */
private long priority = 0;
public PriorityAttribute() public PriorityAttribute()
{ {
super(PRIORITY); super(PRIORITY);
} }
/** /**
* Reconstructs the priority value from the given byte array * Reconstructs the priority value from the given byte array
* and stores it in the 'long' variable * and stores it in the 'long' variable
* *
@ -49,35 +50,35 @@ public class PriorityAttribute
* @param length the length of the binary array. * @param length the length of the binary array.
* @throws StunException if attrubteValue contains invalid data. * @throws StunException if attrubteValue contains invalid data.
*/ */
void decodeAttributeBody(byte[] attributeValue, char offset, char length) void decodeAttributeBody(byte[] attributeValue, char offset, char length)
throws StunException throws StunException
{ {
// array used to hold the intermediate long values reconstructed from the // array used to hold the intermediate long values reconstructed from the
// attributeValue array // attributeValue array
long[] values = new long[4]; long[] values = new long[4];
// Reading in the network byte order (Big-Endian) // Reading in the network byte order (Big-Endian)
values[0] = (long)((attributeValue[offset++] & 0xff) << 24); values[0] = (long)((attributeValue[offset++] & 0xff) << 24);
values[1] = (long)((attributeValue[offset++] & 0xff) << 16); values[1] = (long)((attributeValue[offset++] & 0xff) << 16);
values[2] = (long)((attributeValue[offset++] & 0xff) << 8); values[2] = (long)((attributeValue[offset++] & 0xff) << 8);
values[3] = (long)(attributeValue[offset++] & 0xff); values[3] = (long)(attributeValue[offset++] & 0xff);
// reconstructing the priority value // reconstructing the priority value
this.priority = values[0] | values[1] | values[2] | values[3]; this.priority = values[0] | values[1] | values[2] | values[3];
} }
/** /**
* Returns a binary representation of this attribute. * Returns a binary representation of this attribute.
* *
* @return a binary representation of this attribute. * @return a binary representation of this attribute.
*/ */
public byte[] encode() public byte[] encode()
{ {
char type = getAttributeType(); char type = getAttributeType();
byte[] binValue = new byte[HEADER_LENGTH + getDataLength()]; byte[] binValue = new byte[HEADER_LENGTH + getDataLength()];
//Type //Type
binValue[0] = (byte)(type>>8); binValue[0] = (byte)(type>>8);
binValue[1] = (byte)(type&0x00FF); binValue[1] = (byte)(type&0x00FF);
@ -93,79 +94,79 @@ public class PriorityAttribute
return binValue; return binValue;
} }
/** /**
* Compares two STUN Attributes. Two attributes are considered equal when they * Compares two STUN Attributes. Two attributes are considered equal when they
* have the same type length and value. * have the same type length and value.
* *
* @param obj the object to compare this attribute with. * @param obj the object to compare this attribute with.
* @return true if the attributes are equal and false otherwise. * @return true if the attributes are equal and false otherwise.
*/ */
public boolean equals(Object obj) public boolean equals(Object obj)
{ {
if (! (obj instanceof PriorityAttribute) if (! (obj instanceof PriorityAttribute)
|| obj == null) || obj == null)
return false; return false;
if (obj == this) if (obj == this)
return true; return true;
PriorityAttribute att = (PriorityAttribute) obj; PriorityAttribute att = (PriorityAttribute) obj;
if (att.getAttributeType() != getAttributeType() if (att.getAttributeType() != getAttributeType()
|| att.getDataLength() != getDataLength() || att.getDataLength() != getDataLength()
|| (priority != att.priority)) || (priority != att.priority))
return false; return false;
return true; return true;
} }
/** /**
* Returns the length of this attribute's body. * Returns the length of this attribute's body.
* *
* @return the length of this attribute's value. * @return the length of this attribute's value.
*/ */
public char getDataLength() public char getDataLength()
{ {
return DATA_LENGTH_PRIORITY; return DATA_LENGTH_PRIORITY;
} }
/** /**
* Returns the human readable name of this attribute. * Returns the human readable name of this attribute.
* *
* @return this attribute's name. * @return this attribute's name.
*/ */
public String getName() public String getName()
{ {
return "PRIORITY"; return "PRIORITY";
} }
/** /**
* Returns the priority specified in the PRIORITY Attribute * Returns the priority specified in the PRIORITY Attribute
* *
* @return long specifying the priority * @return long specifying the priority
*/ */
public long getPriority() public long getPriority()
{ {
return priority; return priority;
} }
/** /**
* Sets the priority of the PRIORITY Attribute with the specified value * Sets the priority of the PRIORITY Attribute with the specified value
* *
* @param priority the long variable specifying the priority value * @param priority the long variable specifying the priority value
* *
* @throws StunException throws StunException if indicated priority value is illegal * @throws StunException throws StunException if indicated priority value is illegal
*/ */
public void setPriority(long priority) public void setPriority(long priority)
throws StunException throws StunException
{ {
/* Priority must be between 1 and (2^31 - 1) */ /* Priority must be between 1 and (2^31 - 1) */
if(priority <= 0 || priority > 0x7FFFFFFFL) if(priority <= 0 || priority > 0x7FFFFFFFL)
throw new StunException(StunException.ILLEGAL_ARGUMENT, "Priority must be " + throw new StunException(StunException.ILLEGAL_ARGUMENT, "Priority must be " +
"between 0 and (2**31 - 1)"); "between 0 and (2**31 - 1)");
else else
this.priority = priority; this.priority = priority;
} }
} }

View File

@ -1,8 +1,8 @@
/* /*
* Ice4j, 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. * Distributable under LGPL license. See terms of license at gnu.org.
* See terms of license at gnu.org.
*/ */
package org.ice4j.attribute; package org.ice4j.attribute;
@ -15,7 +15,6 @@ import org.ice4j.*;
* "realm value" as described in RFC3261 but without the double quotes. * "realm value" as described in RFC3261 but without the double quotes.
* *
* @author Sebastien Vincent * @author Sebastien Vincent
* @version 0.1
*/ */
public class RealmAttribute extends Attribute public class RealmAttribute extends Attribute
{ {

View File

@ -1,8 +1,8 @@
/* /*
* 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. * Distributable under LGPL license. See terms of license at gnu.org.
* See terms of license at gnu.org.
*/ */
package org.ice4j.attribute; package org.ice4j.attribute;
@ -16,11 +16,7 @@ package org.ice4j.attribute;
* *
* Its syntax is identical to the MAPPED-ADDRESS attribute. * Its syntax is identical to the MAPPED-ADDRESS attribute.
* *
* <p>Copyright: Copyright (c) 2003</p>
* <p>Organisation: Louis Pasteur University, Strasbourg, France</p>
* <p>Network Research Team (http://www-r2.u-strasbg.fr)</p></p>
* @author Emil Ivov * @author Emil Ivov
* @version 0.1
*/ */
public class ReflectedFromAttribute extends AddressAttribute public class ReflectedFromAttribute extends AddressAttribute

View File

@ -1,8 +1,8 @@
/* /*
* Ice4j, 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. * Distributable under LGPL license. See terms of license at gnu.org.
* See terms of license at gnu.org.
*/ */
package org.ice4j.attribute; package org.ice4j.attribute;
@ -16,7 +16,6 @@ import org.ice4j.*;
* Support of TCP is detailed in draft-ietf-behave-turn-tcp-05. * Support of TCP is detailed in draft-ietf-behave-turn-tcp-05.
* *
* @author Sebastien Vincent * @author Sebastien Vincent
* @version 0.1
*/ */
public class RequestedTransportAttribute extends Attribute public class RequestedTransportAttribute extends Attribute
{ {

View File

@ -1,8 +1,8 @@
/* /*
* Ice4j, 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. * Distributable under LGPL license. See terms of license at gnu.org.
* See terms of license at gnu.org.
*/ */
package org.ice4j.attribute; package org.ice4j.attribute;
@ -14,9 +14,7 @@ import org.ice4j.*;
* The RESERVATION-TOKEN attribute contains a token that identifie a reservation port * The RESERVATION-TOKEN attribute contains a token that identifie a reservation port
* on a TURN server. The value is on 64 bits (8 bytes). * on a TURN server. The value is on 64 bits (8 bytes).
* *
* <p>Organization Network Research Team, Louis Pasteur University</p>
* @author Sebastien Vincent * @author Sebastien Vincent
* @version 0.1
*/ */
public class ReservationTokenAttribute public class ReservationTokenAttribute
extends Attribute extends Attribute

View File

@ -1,8 +1,8 @@
/* /*
* 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. * Distributable under LGPL license. See terms of license at gnu.org.
* See terms of license at gnu.org.
*/ */
package org.ice4j.attribute; package org.ice4j.attribute;
@ -11,11 +11,7 @@ package org.ice4j.attribute;
* Binding Request should be sent. Its syntax is identical to MAPPED- * Binding Request should be sent. Its syntax is identical to MAPPED-
* ADDRESS. * ADDRESS.
* *
* <p>Copyright: Copyright (c) 2003</p>
* <p>Organisation: Louis Pasteur University, Strasbourg, France</p>
* <p>Network Research Team (http://www-r2.u-strasbg.fr)</p></p>
* @author Emil Ivov * @author Emil Ivov
* @version 0.1
*/ */
public class ResponseAddressAttribute extends AddressAttribute public class ResponseAddressAttribute extends AddressAttribute

View File

@ -1,8 +1,8 @@
/* /*
* 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. * Distributable under LGPL license. See terms of license at gnu.org.
* See terms of license at gnu.org.
*/ */
package org.ice4j.attribute; package org.ice4j.attribute;
@ -19,10 +19,8 @@ import org.ice4j.*;
* multiple of 4 (measured in bytes) in order to guarantee alignment of * multiple of 4 (measured in bytes) in order to guarantee alignment of
* attributes on word boundaries. * attributes on word boundaries.
* *
* <p>Organization Network Research Team, Louis Pasteur University</p>
* @author Emil Ivov * @author Emil Ivov
* @author Sebastien Vincent * @author Sebastien Vincent
* @version 0.1
*/ */
public class SoftwareAttribute public class SoftwareAttribute
extends Attribute extends Attribute

View File

@ -1,8 +1,8 @@
/* /*
* 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. * Distributable under LGPL license. See terms of license at gnu.org.
* See terms of license at gnu.org.
*/ */
package org.ice4j.attribute; package org.ice4j.attribute;
@ -11,11 +11,7 @@ package org.ice4j.attribute;
* indicates the source IP address and port that the server is sending * indicates the source IP address and port that the server is sending
* the response from. Its syntax is identical to that of MAPPED-ADDRESS. * the response from. Its syntax is identical to that of MAPPED-ADDRESS.
* *
* <p>Copyright: Copyright (c) 2003</p>
* <p>Organisation: Louis Pasteur University, Strasbourg, France</p>
* <p>Network Research Team (http://www-r2.u-strasbg.fr)</p></p>
* @author Emil Ivov * @author Emil Ivov
* @version 0.1
*/ */
public class SourceAddressAttribute extends AddressAttribute public class SourceAddressAttribute extends AddressAttribute

View File

@ -1,8 +1,8 @@
/* /*
* 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. * Distributable under LGPL license. See terms of license at gnu.org.
* See terms of license at gnu.org.
*/ */
package org.ice4j.attribute; package org.ice4j.attribute;
@ -29,11 +29,7 @@ import org.ice4j.*;
* | Attribute 3 Type | Attribute 4 Type ... * | Attribute 3 Type | Attribute 4 Type ...
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
* *
* <p>Copyright: Copyright (c) 2003</p>
* <p>Organisation: Louis Pasteur University, Strasbourg, France</p>
* <p>Network Research Team (http://www-r2.u-strasbg.fr)</p></p>
* @author Emil Ivov * @author Emil Ivov
* @version 0.1
*/ */
public class UnknownAttributesAttribute extends Attribute public class UnknownAttributesAttribute extends Attribute
{ {

View File

@ -1,8 +1,8 @@
/* /*
* Ice4j, 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. * Distributable under LGPL license. See terms of license at gnu.org.
* See terms of license at gnu.org.
*/ */
package org.ice4j.attribute; package org.ice4j.attribute;
@ -15,7 +15,6 @@ import org.ice4j.*;
* The value of USERNAME is a variable length value. * The value of USERNAME is a variable length value.
* *
* @author Sebastien Vincent * @author Sebastien Vincent
* @version 0.1
*/ */
public class UsernameAttribute extends Attribute public class UsernameAttribute extends Attribute
{ {

View File

@ -44,10 +44,7 @@ import org.ice4j.message.*;
* equal to the IP address in MAPPED-ADDRESS, exclusive or'ed with the * equal to the IP address in MAPPED-ADDRESS, exclusive or'ed with the
* entire 128 bit transaction ID. * entire 128 bit transaction ID.
* *
* <p>Copyright: Copyright (c) 2005.</p>
* <p>Organization: Network Research Team, Louis Pasteur University</p>
* @author Emil Ivov * @author Emil Ivov
* @version 1.0
*/ */
public class XorMappedAddressAttribute public class XorMappedAddressAttribute
extends AddressAttribute extends AddressAttribute

View File

@ -1,8 +1,8 @@
/* /*
* 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. * Distributable under LGPL license. See terms of license at gnu.org.
* See terms of license at gnu.org.
*/ */
package org.ice4j.attribute; package org.ice4j.attribute;
@ -19,9 +19,7 @@ import org.ice4j.*;
* This attribute has a length of zero, and therefore contains no other * This attribute has a length of zero, and therefore contains no other
* information past the common attribute header. * information past the common attribute header.
* *
* <p>Organization: Net Research Team, Louis Pasteur University</p>
* @author Emil Ivov * @author Emil Ivov
* @version 0.1
*/ */
public class XorOnlyAttribute public class XorOnlyAttribute
extends Attribute extends Attribute

View File

@ -1,8 +1,8 @@
/* /*
* Ice4j, 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. * Distributable under LGPL license. See terms of license at gnu.org.
* See terms of license at gnu.org.
*/ */
package org.ice4j.attribute; package org.ice4j.attribute;
@ -13,7 +13,6 @@ package org.ice4j.attribute;
* It has the same format as XOR-MAPPED-ADDRESS. * It has the same format as XOR-MAPPED-ADDRESS.
* *
* @author Sebastien Vincent * @author Sebastien Vincent
* @version 0.1
*/ */
public class XorPeerAddressAttribute extends XorMappedAddressAttribute public class XorPeerAddressAttribute extends XorMappedAddressAttribute
{ {

View File

@ -1,8 +1,8 @@
/* /*
* Ice4j, 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. * Distributable under LGPL license. See terms of license at gnu.org.
* See terms of license at gnu.org.
*/ */
package org.ice4j.attribute; package org.ice4j.attribute;
@ -13,7 +13,6 @@ package org.ice4j.attribute;
* It has the same format as XOR-MAPPED-ADDRESS. * It has the same format as XOR-MAPPED-ADDRESS.
* *
* @author Sebastien Vincent * @author Sebastien Vincent
* @version 0.1
*/ */
public class XorRelayedAddressAttribute extends XorMappedAddressAttribute public class XorRelayedAddressAttribute extends XorMappedAddressAttribute
{ {

View File

@ -1,8 +1,8 @@
/* /*
* Ice4j, 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. * Distributable under LGPL license. See terms of license at gnu.org.
* See terms of license at gnu.org.
*/ */
package org.ice4j.message; package org.ice4j.message;
@ -25,10 +25,7 @@ import org.ice4j.*;
* | | * | |
* +-------------------------------+ * +-------------------------------+
* *
* <p>Organisation: <p> Louis Pasteur University, Strasbourg, France</p>
* <p>Network Research Team (http://www-r2.u-strasbg.fr)</p></p>
* @author Sebastien Vincent * @author Sebastien Vincent
* @version 0.1
*/ */
public class ChannelData public class ChannelData
{ {

View File

@ -1,23 +1,18 @@
/* /*
* Ice4j, 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. * Distributable under LGPL license. See terms of license at gnu.org.
* See terms of license at gnu.org.
*/ */
package org.ice4j.message; package org.ice4j.message;
import org.ice4j.*;
/** /**
* An indication descendant of the message class. * An indication descendant of the message class.
* *
* For example, indication messages is used by TURN protocol * For example, indication messages is used by TURN protocol
* to send and receive encapsulated data. * to send and receive encapsulated data.
* *
* <p>Organisation: <p> Louis Pasteur University, Strasbourg, France</p>
* <p>Network Research Team (http://www-r2.u-strasbg.fr)</p></p>
* @author Sebastien Vincent * @author Sebastien Vincent
* @version 0.1
*/ */
public class Indication extends Message public class Indication extends Message
{ {

View File

@ -1,22 +1,17 @@
/* /*
* 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. * Distributable under LGPL license. See terms of license at gnu.org.
* See terms of license at gnu.org.
*/ */
package org.ice4j.message; package org.ice4j.message;
import org.ice4j.*;
/** /**
* A request descendant of the message class. The primary purpose of the * A request descendant of the message class. The primary purpose of the
* Request class is to allow better functional definition of the classes in the * Request class is to allow better functional definition of the classes in the
* stack package. * stack package.
* *
* <p>Organisation: <p> Louis Pasteur University, Strasbourg, France</p>
* <p>Network Research Team (http://www-r2.u-strasbg.fr)</p></p>
* @author Emil Ivov * @author Emil Ivov
* @version 0.1
*/ */
public class Request extends Message public class Request extends Message

View File

@ -1,18 +1,15 @@
/* /*
* 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. * Distributable under LGPL license. See terms of license at gnu.org.
* See terms of license at gnu.org.
*/ */
package org.ice4j.stack; package org.ice4j.stack;
/** /**
* Generic Error Handler. * Generic Error Handler.
* *
* <p>Organization: <p> Louis Pasteur University, Strasbourg, France.</p>
* <p>Network Research Team (http://www-r2.u-strasbg.fr)</p>
* @author Emil Ivov * @author Emil Ivov
* @version 0.1
*/ */
interface ErrorHandler interface ErrorHandler
{ {

View File

@ -1,8 +1,8 @@
/* /*
* 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. * Distributable under LGPL license. See terms of license at gnu.org.
* See terms of license at gnu.org.
*/ */
package org.ice4j.stack; package org.ice4j.stack;

View File

@ -1,8 +1,8 @@
/* /*
* 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. * Distributable under LGPL license. See terms of license at gnu.org.
* See terms of license at gnu.org.
*/ */
package org.ice4j.stack; package org.ice4j.stack;
@ -14,11 +14,7 @@ import java.util.logging.Logger;
* access is synchronized and message delivery ( remove() ) is blocking in the * access is synchronized and message delivery ( remove() ) is blocking in the
* case of an empty queue. * case of an empty queue.
* *
* <p>Organization: Louis Pasteur University, Strasbourg, France</p>
* <p>Network Research Team (http://www-r2.u-strasbg.fr)</p>
*
* @author Emil Ivov * @author Emil Ivov
* @version 0.1
*/ */
class MessageQueue class MessageQueue
{ {

View File

@ -76,11 +76,9 @@ import org.ice4j.stack.*;
* local address and port for subsequent tests resolves this problem. * local address and port for subsequent tests resolves this problem.
* An alternative is to wait sufficiently long to be confident that the * An alternative is to wait sufficiently long to be confident that the
* old bindings have expired (half an hour should more than suffice). * old bindings have expired (half an hour should more than suffice).
* </p><p> * </p>
* <p>Organisation: <p> Louis Pasteur University, Strasbourg, France</p> *
* <p>Network Research Team (http://www-r2.u-strasbg.fr)</p></p>
* @author Emil Ivov * @author Emil Ivov
* @version 0.1
*/ */
public class NetworkConfigurationDiscoveryProcess public class NetworkConfigurationDiscoveryProcess

View File

@ -1,8 +1,8 @@
/* /*
* 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. * Distributable under LGPL license. See terms of license at gnu.org.
* See terms of license at gnu.org.
*/ */
package org.ice4j.stunclient; package org.ice4j.stunclient;
@ -13,11 +13,7 @@ import org.ice4j.*;
* contains information about the NAT Server (or firewall )this client is behind, * contains information about the NAT Server (or firewall )this client is behind,
* and a mapped address value (if discovered) * and a mapped address value (if discovered)
* *
*
* <p>Organisation: <p> Louis Pasteur University, Strasbourg, France</p>
* <p>Network Research Team (http://www-r2.u-strasbg.fr)</p></p>
* @author Emil Ivov * @author Emil Ivov
* @version 0.1
*/ */
public class StunDiscoveryReport public class StunDiscoveryReport
@ -25,12 +21,12 @@ public class StunDiscoveryReport
/** /**
* Indicates that NAT detection has failed or not yet initiated. * Indicates that NAT detection has failed or not yet initiated.
*/ */
public static final String UNKNOWN = "Unknown Network Configuration"; public static final String UNKNOWN = "Unknown Network Configuration";
/** /**
* Means, there's no NAT or firewall. * Means, there's no NAT or firewall.
*/ */
public static final String OPEN_INTERNET = "Open Internet Configuration"; public static final String OPEN_INTERNET = "Open Internet Configuration";
/** /**
* Indicates that UDP communication is not possible. * Indicates that UDP communication is not possible.
@ -45,22 +41,23 @@ public class StunDiscoveryReport
/** /**
* NAT type is full cone. * NAT type is full cone.
*/ */
public static final String FULL_CONE_NAT = "Full Cone NAT"; public static final String FULL_CONE_NAT = "Full Cone NAT";
/** /**
* We are behind a symmetric nat. * We are behind a symmetric nat.
*/ */
public static final String SYMMETRIC_NAT = "Symmetric NAT"; public static final String SYMMETRIC_NAT = "Symmetric NAT";
/** /**
* NAT type is Restricted Cone. * NAT type is Restricted Cone.
*/ */
public static final String RESTRICTED_CONE_NAT = "Restricted Cone NAT"; public static final String RESTRICTED_CONE_NAT = "Restricted Cone NAT";
/** /**
* NAT type is port restricted cone. * NAT type is port restricted cone.
*/ */
public static final String PORT_RESTRICTED_CONE_NAT= "Port Restricted Cone NAT"; public static final String PORT_RESTRICTED_CONE_NAT
= "Port Restricted Cone NAT";
private String natType = UNKNOWN; private String natType = UNKNOWN;