FMLiveSwitchStunAttribute Class Reference

A STUN attribute. More...

Instance Methods

(int) - getLength
 Gets the length of the attribute, including header and padding. More...
 
(int) - getPaddingLengthWithValueLength:
 Gets the length of the padding. More...
 
(int) - getValueLength
 Gets the length of the attribute value. More...
 
(instancetype) - init
 
(int) - typeValue
 Gets the type value. More...
 
(void) - writeIPAddressWithBuffer:offset:addressType:ipAddress:
 Writes an IP address. More...
 
(void) - writePortWithBuffer:offset:port:
 Writes a port. More...
 
(void) - writeToWithBuffer:offset:
 Writes the attribute to a data buffer. More...
 
(void) - writeToWithBuffer:offset:offsetPlus:
 Writes the attribute to a data buffer. More...
 
(void) - writeValueToWithBuffer:offset:
 Writes the attribute value to a data buffer. More...
 
(void) - writeXorIPAddressWithBuffer:offset:addressType:ipAddress:transactionId:
 Writes an XOR'd IP address. More...
 
(void) - writeXorPortWithBuffer:offset:port:transactionId:
 Writes an XOR'd port. More...
 

Class Methods

(int) + alternateServerType
 Gets the ALTERNATE-SERVER type. More...
 
(FMLiveSwitchStunAttribute *) + attribute
 
(int) + channelNumberType
 Gets the CHANNEL-NUMBER type. More...
 
(int) + connectionIdType
 Gets the CONNECTION-ID type. More...
 
(int) + controlledType
 Gets the CONTROLLED type. More...
 
(int) + controllingType
 Gets the CONTROLLING type. More...
 
(int) + dataType
 Gets the DATA type. More...
 
(int) + dontFragmentType
 Gets the DONT-FRAGMENT type. More...
 
(int) + errorCodeType
 Gets the ERROR-CODE type. More...
 
(int) + evenPortType
 Gets the EVEN-PORT type. More...
 
(int) + fingerprintType
 Gets the FINGERPRINT type. More...
 
(int) + lifetimeType
 Gets the LIFETIME type. More...
 
(int) + mappedAddressType
 Gets the MAPPED-ADDRESS type. More...
 
(int) + messageIntegrityType
 Gets the MESSAGE-INTEGRITY type. More...
 
(int) + nextLengthWithBuffer:offset:
 Reads the length of the next attribute from a data buffer, including header and padding. More...
 
(int) + nonceType
 Gets the NONCE type. More...
 
(int) + priorityType
 Gets the PRIORITY type. More...
 
(FMLiveSwitchAddressType) + readAddressTypeWithBuffer:offset:
 Reads an address type. More...
 
(FMLiveSwitchStunAttribute *) + readFromWithBuffer:offset:offsetPlus:transactionId:messageBuffer:
 Reads an FMLiveSwitchStunAttribute from a data buffer. More...
 
(FMLiveSwitchStunAttribute *) + readFromWithBuffer:offset:transactionId:messageBuffer:
 Reads an FMLiveSwitchStunAttribute from a data buffer. More...
 
(NSString *) + readIPAddressWithBuffer:offset:addressType:
 Reads an IP address. More...
 
(int) + readPortWithBuffer:offset:
 Reads a port. More...
 
(NSString *) + readXorIPAddressWithBuffer:offset:addressType:transactionId:
 Reads an XOR'd IP address. More...
 
(int) + readXorPortWithBuffer:offset:transactionId:
 Reads an XOR'd port. More...
 
(int) + realmType
 Gets the REALM type. More...
 
(int) + requestedAddressFamilyType
 Gets the REQUESTED-ADDRESS-FAMILY type. More...
 
(int) + requestedTransportType
 Gets the REQUESTED-TRANSPORT type. More...
 
(int) + reservationTokenType
 Gets the RESERVATION-TOKEN type. More...
 
(int) + softwareType
 Gets the SOFTWARE type. More...
 
(int) + transactionTransmitCounterType
 Gets the comprehension-optional TRANSACTION_TRANSMIT_COUNTER type defined in RFC 7982. More...
 
(int) + unknownAttributesType
 Gets the UNKNOWN-ATTRIBUTES type. More...
 
(int) + useCandidateType
 Gets the USE-CANDIDATE type. More...
 
(int) + usernameType
 Gets the USERNAME type. More...
 
(void) + writeAddressTypeWithBuffer:offset:addressType:
 Writes an address type. More...
 
(int) + xorMappedAddressType
 Gets the XOR-MAPPED-ADDRESS type. More...
 
(int) + xorPeerAddressType
 Gets the XOR-PEER-ADDRESS type. More...
 
(int) + xorRelayedAddressType
 Gets the XOR-RELAYED-ADDRESS type. More...
 

Detailed Description

A STUN attribute.

Method Documentation

◆ alternateServerType

+ (int) alternateServerType

Gets the ALTERNATE-SERVER type.

◆ attribute

+ (FMLiveSwitchStunAttribute*) attribute

◆ channelNumberType

+ (int) channelNumberType

Gets the CHANNEL-NUMBER type.

◆ connectionIdType

+ (int) connectionIdType

Gets the CONNECTION-ID type.

◆ controlledType

+ (int) controlledType

Gets the CONTROLLED type.

◆ controllingType

+ (int) controllingType

Gets the CONTROLLING type.

◆ dataType

+ (int) dataType

Gets the DATA type.

◆ dontFragmentType

+ (int) dontFragmentType

Gets the DONT-FRAGMENT type.

◆ errorCodeType

+ (int) errorCodeType

Gets the ERROR-CODE type.

◆ evenPortType

+ (int) evenPortType

Gets the EVEN-PORT type.

◆ fingerprintType

+ (int) fingerprintType

Gets the FINGERPRINT type.

◆ getLength

- (int) getLength

Gets the length of the attribute, including header and padding.

◆ getPaddingLengthWithValueLength:

- (int) getPaddingLengthWithValueLength: (int)  valueLength

Gets the length of the padding.

◆ getValueLength

◆ init

◆ lifetimeType

+ (int) lifetimeType

Gets the LIFETIME type.

◆ mappedAddressType

+ (int) mappedAddressType

Gets the MAPPED-ADDRESS type.

◆ messageIntegrityType

+ (int) messageIntegrityType

Gets the MESSAGE-INTEGRITY type.

◆ nextLengthWithBuffer:offset:

+ (int) nextLengthWithBuffer: (FMLiveSwitchDataBuffer *)  buffer
offset: (int)  offset 

Reads the length of the next attribute from a data buffer, including header and padding.

Parameters
bufferThe buffer.
offsetThe offset.

◆ nonceType

+ (int) nonceType

Gets the NONCE type.

◆ priorityType

+ (int) priorityType

Gets the PRIORITY type.

◆ readAddressTypeWithBuffer:offset:

+ (FMLiveSwitchAddressType) readAddressTypeWithBuffer: (FMLiveSwitchDataBuffer *)  buffer
offset: (int)  offset 

Reads an address type.

Parameters
bufferThe buffer.
offsetThe offset.

◆ readFromWithBuffer:offset:offsetPlus:transactionId:messageBuffer:

+ (FMLiveSwitchStunAttribute*) readFromWithBuffer: (FMLiveSwitchDataBuffer *)  buffer
offset: (int)  offset
offsetPlus: (int *)  offsetPlus
transactionId: (FMLiveSwitchDataBuffer *)  transactionId
messageBuffer: (FMLiveSwitchDataBuffer *)  messageBuffer 

Reads an FMLiveSwitchStunAttribute from a data buffer.

Parameters
bufferThe buffer.
offsetThe offset.
offsetPlusThe offset plus the attribute length.
transactionIdThe STUN message transaction ID.
messageBufferThe STUN message thus far as a byte array.

◆ readFromWithBuffer:offset:transactionId:messageBuffer:

+ (FMLiveSwitchStunAttribute*) readFromWithBuffer: (FMLiveSwitchDataBuffer *)  buffer
offset: (int)  offset
transactionId: (FMLiveSwitchDataBuffer *)  transactionId
messageBuffer: (FMLiveSwitchDataBuffer *)  messageBuffer 

Reads an FMLiveSwitchStunAttribute from a data buffer.

Parameters
bufferThe buffer.
offsetThe offset.
transactionIdThe STUN message transaction ID.
messageBufferThe STUN message thus far as a byte array.

◆ readIPAddressWithBuffer:offset:addressType:

+ (NSString*) readIPAddressWithBuffer: (FMLiveSwitchDataBuffer *)  buffer
offset: (int)  offset
addressType: (FMLiveSwitchAddressType)  addressType 

Reads an IP address.

Parameters
bufferThe buffer.
offsetThe offset.
addressTypeThe address type.

◆ readPortWithBuffer:offset:

+ (int) readPortWithBuffer: (FMLiveSwitchDataBuffer *)  buffer
offset: (int)  offset 

Reads a port.

Parameters
bufferThe buffer.
offsetThe offset.

◆ readXorIPAddressWithBuffer:offset:addressType:transactionId:

+ (NSString*) readXorIPAddressWithBuffer: (FMLiveSwitchDataBuffer *)  buffer
offset: (int)  offset
addressType: (FMLiveSwitchAddressType)  addressType
transactionId: (FMLiveSwitchDataBuffer *)  transactionId 

Reads an XOR'd IP address.

Parameters
bufferThe buffer.
offsetThe offset.
addressTypeThe address type.
transactionIdThe transaction identifier.

◆ readXorPortWithBuffer:offset:transactionId:

+ (int) readXorPortWithBuffer: (FMLiveSwitchDataBuffer *)  buffer
offset: (int)  offset
transactionId: (FMLiveSwitchDataBuffer *)  transactionId 

Reads an XOR'd port.

Parameters
bufferThe buffer.
offsetThe offset.
transactionIdThe transaction identifier.

◆ realmType

+ (int) realmType

Gets the REALM type.

◆ requestedAddressFamilyType

+ (int) requestedAddressFamilyType

Gets the REQUESTED-ADDRESS-FAMILY type.

◆ requestedTransportType

+ (int) requestedTransportType

Gets the REQUESTED-TRANSPORT type.

◆ reservationTokenType

+ (int) reservationTokenType

Gets the RESERVATION-TOKEN type.

◆ softwareType

+ (int) softwareType

Gets the SOFTWARE type.

◆ transactionTransmitCounterType

+ (int) transactionTransmitCounterType

Gets the comprehension-optional TRANSACTION_TRANSMIT_COUNTER type defined in RFC 7982.

◆ typeValue

◆ unknownAttributesType

+ (int) unknownAttributesType

Gets the UNKNOWN-ATTRIBUTES type.

◆ useCandidateType

+ (int) useCandidateType

Gets the USE-CANDIDATE type.

◆ usernameType

+ (int) usernameType

Gets the USERNAME type.

◆ writeAddressTypeWithBuffer:offset:addressType:

+ (void) writeAddressTypeWithBuffer: (FMLiveSwitchDataBuffer *)  buffer
offset: (int)  offset
addressType: (FMLiveSwitchAddressType)  addressType 

Writes an address type.

Parameters
bufferThe buffer.
offsetThe offset.
addressTypeThe address type.

◆ writeIPAddressWithBuffer:offset:addressType:ipAddress:

- (void) writeIPAddressWithBuffer: (FMLiveSwitchDataBuffer *)  buffer
offset: (int)  offset
addressType: (FMLiveSwitchAddressType)  addressType
ipAddress: (NSString *)  ipAddress 

Writes an IP address.

Parameters
bufferThe buffer.
offsetThe offset.
addressTypeThe address type.
ipAddressThe IP address.

◆ writePortWithBuffer:offset:port:

- (void) writePortWithBuffer: (FMLiveSwitchDataBuffer *)  buffer
offset: (int)  offset
port: (int)  port 

Writes a port.

Parameters
bufferThe buffer.
offsetThe offset.
portThe port.

◆ writeToWithBuffer:offset:

- (void) writeToWithBuffer: (FMLiveSwitchDataBuffer *)  buffer
offset: (int)  offset 

Writes the attribute to a data buffer.

Parameters
bufferThe buffer.
offsetThe offset.

◆ writeToWithBuffer:offset:offsetPlus:

- (void) writeToWithBuffer: (FMLiveSwitchDataBuffer *)  buffer
offset: (int)  offset
offsetPlus: (int *)  offsetPlus 

Writes the attribute to a data buffer.

Parameters
bufferThe buffer.
offsetThe offset.
offsetPlusThe offset plus the value length.

◆ writeValueToWithBuffer:offset:

◆ writeXorIPAddressWithBuffer:offset:addressType:ipAddress:transactionId:

- (void) writeXorIPAddressWithBuffer: (FMLiveSwitchDataBuffer *)  buffer
offset: (int)  offset
addressType: (FMLiveSwitchAddressType)  addressType
ipAddress: (NSString *)  ipAddress
transactionId: (FMLiveSwitchDataBuffer *)  transactionId 

Writes an XOR'd IP address.

Parameters
bufferThe buffer.
offsetThe offset.
addressTypeThe address type.
ipAddressThe IP address.
transactionIdThe transaction identifier.

◆ writeXorPortWithBuffer:offset:port:transactionId:

- (void) writeXorPortWithBuffer: (FMLiveSwitchDataBuffer *)  buffer
offset: (int)  offset
port: (int)  port
transactionId: (FMLiveSwitchDataBuffer *)  transactionId 

Writes an XOR'd port.

Parameters
bufferThe buffer.
offsetThe offset.
portThe port.
transactionIdThe transaction identifier.

◆ xorMappedAddressType

+ (int) xorMappedAddressType

Gets the XOR-MAPPED-ADDRESS type.

◆ xorPeerAddressType

+ (int) xorPeerAddressType

Gets the XOR-PEER-ADDRESS type.

◆ xorRelayedAddressType

+ (int) xorRelayedAddressType

Gets the XOR-RELAYED-ADDRESS type.