A STUN attribute. More...
Public Member Functions | |
| int | getLength () |
| Gets the length of the attribute, including header and padding. More... | |
| int | getPaddingLength (int valueLength) |
| Gets the length of the padding. More... | |
| abstract int | getTypeValue () |
| Gets the type value. More... | |
| void | writeTo (fm.liveswitch.DataBuffer buffer, int offset) |
| Writes the attribute to a data buffer. More... | |
| void | writeTo (fm.liveswitch.DataBuffer buffer, int offset, fm.liveswitch.IntegerHolder offsetPlus) |
| Writes the attribute to a data buffer. More... | |
Static Public Member Functions | |
| static int | getAlternateServerType () |
| Gets the ALTERNATE-SERVER type. More... | |
| static int | getChannelNumberType () |
| Gets the CHANNEL-NUMBER type. More... | |
| static int | getConnectionIdType () |
| Gets the CONNECTION-ID type. More... | |
| static int | getControlledType () |
| Gets the CONTROLLED type. More... | |
| static int | getControllingType () |
| Gets the CONTROLLING type. More... | |
| static int | getDataType () |
| Gets the DATA type. More... | |
| static int | getDontFragmentType () |
| Gets the DONT-FRAGMENT type. More... | |
| static int | getErrorCodeType () |
| Gets the ERROR-CODE type. More... | |
| static int | getEvenPortType () |
| Gets the EVEN-PORT type. More... | |
| static int | getFingerprintType () |
| Gets the FINGERPRINT type. More... | |
| static int | getLifetimeType () |
| Gets the LIFETIME type. More... | |
| static int | getMappedAddressType () |
| Gets the MAPPED-ADDRESS type. More... | |
| static int | getMessageIntegrityType () |
| Gets the MESSAGE-INTEGRITY type. More... | |
| static int | getNonceType () |
| Gets the NONCE type. More... | |
| static int | getPriorityType () |
| Gets the PRIORITY type. More... | |
| static int | getRealmType () |
| Gets the REALM type. More... | |
| static int | getRequestedAddressFamilyType () |
| Gets the REQUESTED-ADDRESS-FAMILY type. More... | |
| static int | getRequestedTransportType () |
| Gets the REQUESTED-TRANSPORT type. More... | |
| static int | getReservationTokenType () |
| Gets the RESERVATION-TOKEN type. More... | |
| static int | getSoftwareType () |
| Gets the SOFTWARE type. More... | |
| static int | getTransactionTransmitCounterType () |
| Gets the comprehension-optional TRANSACTION_TRANSMIT_COUNTER type defined in RFC 7982. More... | |
| static int | getUnknownAttributesType () |
| Gets the UNKNOWN-ATTRIBUTES type. More... | |
| static int | getUseCandidateType () |
| Gets the USE-CANDIDATE type. More... | |
| static int | getUsernameType () |
| Gets the USERNAME type. More... | |
| static int | getXorMappedAddressType () |
| Gets the XOR-MAPPED-ADDRESS type. More... | |
| static int | getXorPeerAddressType () |
| Gets the XOR-PEER-ADDRESS type. More... | |
| static int | getXorRelayedAddressType () |
| Gets the XOR-RELAYED-ADDRESS type. More... | |
| static int | nextLength (fm.liveswitch.DataBuffer buffer, int offset) |
| Reads the length of the next attribute from a data buffer, including header and padding. More... | |
| static fm.liveswitch.stun.Attribute | readFrom (fm.liveswitch.DataBuffer buffer, int offset, fm.liveswitch.IntegerHolder offsetPlus, fm.liveswitch.DataBuffer transactionId, fm.liveswitch.DataBuffer messageBuffer) |
| Reads an fm.liveswitch.stun.Attribute from a data buffer. More... | |
| static fm.liveswitch.stun.Attribute | readFrom (fm.liveswitch.DataBuffer buffer, int offset, fm.liveswitch.DataBuffer transactionId, fm.liveswitch.DataBuffer messageBuffer) |
| Reads an fm.liveswitch.stun.Attribute from a data buffer. More... | |
Protected Member Functions | |
| Attribute () | |
| abstract int | getValueLength () |
| Gets the length of the attribute value. More... | |
| void | writeIPAddress (fm.liveswitch.DataBuffer buffer, int offset, fm.liveswitch.AddressType addressType, String ipAddress) |
| Writes an IP address. More... | |
| void | writePort (fm.liveswitch.DataBuffer buffer, int offset, int port) |
| Writes a port. More... | |
| abstract void | writeValueTo (fm.liveswitch.DataBuffer buffer, int offset) |
| Writes the attribute value to a data buffer. More... | |
| void | writeXorIPAddress (fm.liveswitch.DataBuffer buffer, int offset, fm.liveswitch.AddressType addressType, String ipAddress, fm.liveswitch.DataBuffer transactionId) |
| Writes an XOR'd IP address. More... | |
| void | writeXorPort (fm.liveswitch.DataBuffer buffer, int offset, int port, fm.liveswitch.DataBuffer transactionId) |
| Writes an XOR'd port. More... | |
Static Protected Member Functions | |
| static fm.liveswitch.AddressType | readAddressType (fm.liveswitch.DataBuffer buffer, int offset) |
| Reads an address type. More... | |
| static String | readIPAddress (fm.liveswitch.DataBuffer buffer, int offset, fm.liveswitch.AddressType addressType) |
| Reads an IP address. More... | |
| static int | readPort (fm.liveswitch.DataBuffer buffer, int offset) |
| Reads a port. More... | |
| static String | readXorIPAddress (fm.liveswitch.DataBuffer buffer, int offset, fm.liveswitch.AddressType addressType, fm.liveswitch.DataBuffer transactionId) |
| Reads an XOR'd IP address. More... | |
| static int | readXorPort (fm.liveswitch.DataBuffer buffer, int offset, fm.liveswitch.DataBuffer transactionId) |
| Reads an XOR'd port. More... | |
| static void | writeAddressType (fm.liveswitch.DataBuffer buffer, int offset, fm.liveswitch.AddressType addressType) |
| Writes an address type. More... | |
A STUN attribute.
|
protected |
|
static |
Gets the ALTERNATE-SERVER type.
|
static |
Gets the CHANNEL-NUMBER type.
|
static |
Gets the CONNECTION-ID type.
|
static |
Gets the CONTROLLED type.
|
static |
Gets the CONTROLLING type.
|
static |
Gets the DATA type.
|
static |
Gets the DONT-FRAGMENT type.
|
static |
Gets the ERROR-CODE type.
|
static |
Gets the EVEN-PORT type.
|
static |
Gets the FINGERPRINT type.
| int fm.liveswitch.stun.Attribute.getLength | ( | ) |
Gets the length of the attribute, including header and padding.
|
static |
Gets the LIFETIME type.
|
static |
Gets the MAPPED-ADDRESS type.
|
static |
Gets the MESSAGE-INTEGRITY type.
|
static |
Gets the NONCE type.
| int fm.liveswitch.stun.Attribute.getPaddingLength | ( | int | valueLength | ) |
Gets the length of the padding.
|
static |
Gets the PRIORITY type.
|
static |
Gets the REALM type.
|
static |
Gets the REQUESTED-ADDRESS-FAMILY type.
|
static |
Gets the REQUESTED-TRANSPORT type.
|
static |
Gets the RESERVATION-TOKEN type.
|
static |
Gets the SOFTWARE type.
|
static |
Gets the comprehension-optional TRANSACTION_TRANSMIT_COUNTER type defined in RFC 7982.
|
abstract |
Gets the type value.
Reimplemented in fm.liveswitch.stun.XorMappedAddressAttribute, fm.liveswitch.stun.UsernameAttribute, fm.liveswitch.stun.UnknownAttributesAttribute, fm.liveswitch.stun.turn.XorRelayedAddressAttribute, fm.liveswitch.stun.turn.XorPeerAddressAttribute, fm.liveswitch.stun.turn.ReservationTokenAttribute, fm.liveswitch.stun.turn.RequestedTransportAttribute, fm.liveswitch.stun.turn.RequestedAddressFamilyAttribute, fm.liveswitch.stun.turn.LifetimeAttribute, fm.liveswitch.stun.turn.EvenPortAttribute, fm.liveswitch.stun.turn.DontFragmentAttribute, fm.liveswitch.stun.turn.DataAttribute, fm.liveswitch.stun.turn.ConnectionIdAttribute, fm.liveswitch.stun.turn.ChannelNumberAttribute, fm.liveswitch.stun.TransactionTransmitCounterAttribute, fm.liveswitch.stun.SoftwareAttribute, fm.liveswitch.stun.RealmAttribute, fm.liveswitch.stun.NonceAttribute, fm.liveswitch.stun.MessageIntegrityAttribute, fm.liveswitch.stun.MappedAddressAttribute, fm.liveswitch.stun.ice.UseCandidateAttribute, fm.liveswitch.stun.ice.PriorityAttribute, fm.liveswitch.stun.ice.ControllingAttribute, fm.liveswitch.stun.ice.ControlledAttribute, fm.liveswitch.stun.FingerprintAttribute, fm.liveswitch.stun.ErrorCodeAttribute, and fm.liveswitch.stun.AlternateServerAttribute.
|
static |
Gets the UNKNOWN-ATTRIBUTES type.
|
static |
Gets the USE-CANDIDATE type.
|
static |
Gets the USERNAME type.
|
abstractprotected |
Gets the length of the attribute value.
Reimplemented in fm.liveswitch.stun.XorMappedAddressAttribute, fm.liveswitch.stun.UsernameAttribute, fm.liveswitch.stun.UnknownAttributesAttribute, fm.liveswitch.stun.turn.XorRelayedAddressAttribute, fm.liveswitch.stun.turn.XorPeerAddressAttribute, fm.liveswitch.stun.turn.ReservationTokenAttribute, fm.liveswitch.stun.turn.RequestedTransportAttribute, fm.liveswitch.stun.turn.RequestedAddressFamilyAttribute, fm.liveswitch.stun.turn.LifetimeAttribute, fm.liveswitch.stun.turn.EvenPortAttribute, fm.liveswitch.stun.turn.DontFragmentAttribute, fm.liveswitch.stun.turn.DataAttribute, fm.liveswitch.stun.turn.ConnectionIdAttribute, fm.liveswitch.stun.turn.ChannelNumberAttribute, fm.liveswitch.stun.TransactionTransmitCounterAttribute, fm.liveswitch.stun.SoftwareAttribute, fm.liveswitch.stun.RealmAttribute, fm.liveswitch.stun.NonceAttribute, fm.liveswitch.stun.MessageIntegrityAttribute, fm.liveswitch.stun.MappedAddressAttribute, fm.liveswitch.stun.ice.UseCandidateAttribute, fm.liveswitch.stun.ice.PriorityAttribute, fm.liveswitch.stun.ice.ControllingAttribute, fm.liveswitch.stun.ice.ControlledAttribute, fm.liveswitch.stun.FingerprintAttribute, fm.liveswitch.stun.ErrorCodeAttribute, and fm.liveswitch.stun.AlternateServerAttribute.
|
static |
Gets the XOR-MAPPED-ADDRESS type.
|
static |
Gets the XOR-PEER-ADDRESS type.
|
static |
Gets the XOR-RELAYED-ADDRESS type.
|
static |
Reads the length of the next attribute from a data buffer, including header and padding.
| buffer | The buffer. |
| offset | The offset. |
|
staticprotected |
Reads an address type.
| buffer | The buffer. |
| offset | The offset. |
|
static |
Reads an fm.liveswitch.stun.Attribute from a data buffer.
| buffer | The buffer. |
| offset | The offset. |
| transactionId | The STUN message transaction ID. |
| messageBuffer | The STUN message thus far as a byte array. |
|
static |
Reads an fm.liveswitch.stun.Attribute from a data buffer.
| buffer | The buffer. |
| offset | The offset. |
| offsetPlus | The offset plus the attribute length. |
| transactionId | The STUN message transaction ID. |
| messageBuffer | The STUN message thus far as a byte array. |
|
staticprotected |
Reads an IP address.
| buffer | The buffer. |
| offset | The offset. |
| addressType | The address type. |
|
staticprotected |
Reads a port.
| buffer | The buffer. |
| offset | The offset. |
|
staticprotected |
Reads an XOR'd IP address.
| buffer | The buffer. |
| offset | The offset. |
| addressType | The address type. |
| transactionId | The transaction identifier. |
|
staticprotected |
Reads an XOR'd port.
| buffer | The buffer. |
| offset | The offset. |
| transactionId | The transaction identifier. |
|
staticprotected |
Writes an address type.
| buffer | The buffer. |
| offset | The offset. |
| addressType | The address type. |
|
protected |
Writes an IP address.
| buffer | The buffer. |
| offset | The offset. |
| addressType | The address type. |
| ipAddress | The IP address. |
|
protected |
Writes a port.
| buffer | The buffer. |
| offset | The offset. |
| port | The port. |
| void fm.liveswitch.stun.Attribute.writeTo | ( | fm.liveswitch.DataBuffer | buffer, |
| int | offset | ||
| ) |
Writes the attribute to a data buffer.
| buffer | The buffer. |
| offset | The offset. |
| void fm.liveswitch.stun.Attribute.writeTo | ( | fm.liveswitch.DataBuffer | buffer, |
| int | offset, | ||
| fm.liveswitch.IntegerHolder | offsetPlus | ||
| ) |
Writes the attribute to a data buffer.
| buffer | The buffer. |
| offset | The offset. |
| offsetPlus | The offset plus the value length. |
|
abstractprotected |
Writes the attribute value to a data buffer.
| buffer | The buffer. |
| offset | The offset. |
Reimplemented in fm.liveswitch.stun.XorMappedAddressAttribute, fm.liveswitch.stun.UsernameAttribute, fm.liveswitch.stun.UnknownAttributesAttribute, fm.liveswitch.stun.turn.XorRelayedAddressAttribute, fm.liveswitch.stun.turn.XorPeerAddressAttribute, fm.liveswitch.stun.turn.ReservationTokenAttribute, fm.liveswitch.stun.turn.RequestedTransportAttribute, fm.liveswitch.stun.turn.RequestedAddressFamilyAttribute, fm.liveswitch.stun.turn.LifetimeAttribute, fm.liveswitch.stun.turn.EvenPortAttribute, fm.liveswitch.stun.turn.DontFragmentAttribute, fm.liveswitch.stun.turn.DataAttribute, fm.liveswitch.stun.turn.ConnectionIdAttribute, fm.liveswitch.stun.turn.ChannelNumberAttribute, fm.liveswitch.stun.TransactionTransmitCounterAttribute, fm.liveswitch.stun.SoftwareAttribute, fm.liveswitch.stun.RealmAttribute, fm.liveswitch.stun.NonceAttribute, fm.liveswitch.stun.MessageIntegrityAttribute, fm.liveswitch.stun.MappedAddressAttribute, fm.liveswitch.stun.ice.UseCandidateAttribute, fm.liveswitch.stun.ice.PriorityAttribute, fm.liveswitch.stun.ice.ControllingAttribute, fm.liveswitch.stun.ice.ControlledAttribute, fm.liveswitch.stun.FingerprintAttribute, fm.liveswitch.stun.ErrorCodeAttribute, and fm.liveswitch.stun.AlternateServerAttribute.
|
protected |
Writes an XOR'd IP address.
| buffer | The buffer. |
| offset | The offset. |
| addressType | The address type. |
| ipAddress | The IP address. |
| transactionId | The transaction identifier. |
|
protected |
Writes an XOR'd port.
| buffer | The buffer. |
| offset | The offset. |
| port | The port. |
| transactionId | The transaction identifier. |