public class XorMappedAddressAttribute extends AddressAttribute
| Modifier and Type | Field and Description |
|---|---|
static String |
NAME |
ADDRESS_FAMILY_IPV4, ADDRESS_FAMILY_IPV6, transportAddressALTERNATE_SERVER, attributeType, CHANGE_REQUEST, CHANGED_ADDRESS, CHANNEL_NUMBER, DATA, DESTINATION_ADDRESS, DONT_FRAGMENT, ERROR_CODE, EVEN_PORT, FINGERPRINT, HEADER_LENGTH, ICE_CONTROLLED, ICE_CONTROLLING, LIFETIME, MAGIC_COOKIE, MAPPED_ADDRESS, MESSAGE_INTEGRITY, NONCE, PASSWORD, PRIORITY, REALM, REFLECTED_FROM, REMOTE_ADDRESS, REQUESTED_TRANSPORT, RESERVATION_TOKEN, RESPONSE_ADDRESS, SOFTWARE, SOURCE_ADDRESS, UNKNOWN_ATTRIBUTES, UNKNOWN_OPTIONAL_ATTRIBUTE, USE_CANDIDATE, USERNAME, XOR_MAPPED_ADDRESS, XOR_ONLY, XOR_PEER_ADDRESS, XOR_RELAYED_ADDRESS| Modifier | Constructor and Description |
|---|---|
|
XorMappedAddressAttribute() |
protected |
XorMappedAddressAttribute(char type) |
| Modifier and Type | Method and Description |
|---|---|
TransportAddress |
applyXor(byte[] xorMask)
Returns the result of applying XOR on this attribute's address, using the
specified XOR mask.
|
static TransportAddress |
applyXor(TransportAddress address,
byte[] transactionID)
Returns the result of applying XOR on the specified attribute's address.
|
TransportAddress |
getAddress(byte[] transactionID)
Returns the result of applying XOR on this attribute's address, using the
specified transaction ID when converting IPv6 addresses.
|
String |
getName()
Returns the human readable name of this attribute.
|
void |
setAddress(TransportAddress address,
byte[] transactionID)
Applies a XOR mask to the specified address and then sets it as the value
transported by this attribute.
|
decodeAttributeBody, encode, equals, getAddress, getAddressBytes, getDataLength, getFamily, getPort, setAddress, setAttributeTypegetAttributeType, getLocationInMessage, setLocationInMessagepublic static final String NAME
public XorMappedAddressAttribute()
protected XorMappedAddressAttribute(char type)
public static TransportAddress applyXor(TransportAddress address, byte[] transactionID)
address - the address on which XOR should be appliedtransactionID - the transaction id to use for the XORpublic TransportAddress getAddress(byte[] transactionID)
transactionID - the transaction ID to use in case this attribute is
encapsulating an IPv6 address.public TransportAddress applyXor(byte[] xorMask)
xorMask - the XOR mask to use when obtaining the original address.public void setAddress(TransportAddress address, byte[] transactionID)
address - the address that we should xor and then record in this
attribute.transactionID - the transaction identifier that we should use when creating
the XOR mask.public String getName()
StunAttributegetName in class StunAttributeCopyright © 2017 TeleStax, Inc.. All Rights Reserved.