Show / Hide Table of Contents

Class STUNXORAddressAttribute

This attribute is the same as the mapped address attribute except the address details are XOR'ed with the STUN magic cookie. THe reason for this is to stop NAT application layer gateways from doing string replacements of private IP addresses and ports.

Inheritance
System.Object
STUNAttribute
STUNAddressAttributeBase
STUNXORAddressAttribute
Inherited Members
STUNAddressAttributeBase.ADDRESS_ATTRIBUTE_LENGTH
STUNAddressAttributeBase.ADDRESS_ATTRIBUTE_IPV4_LENGTH
STUNAddressAttributeBase.ADDRESS_ATTRIBUTE_IPV6_LENGTH
STUNAddressAttributeBase.AddressAttributeLength
STUNAddressAttributeBase.TransactionId
STUNAddressAttributeBase.Family
STUNAddressAttributeBase.Port
STUNAddressAttributeBase.Address
STUNAddressAttributeBase.PaddedLength
STUNAttribute.STUNATTRIBUTE_HEADER_LENGTH
STUNAttribute.AttributeType
STUNAttribute.Value
STUNAttribute.ParseMessageAttributes(Byte[], Int32, Int32)
STUNAttribute.ParseMessageAttributes(Byte[], Int32, Int32, STUNHeader)
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace: SIPSorcery.Net
Assembly: SIPSorcery.dll
Syntax
public class STUNXORAddressAttribute : STUNAddressAttributeBase

Constructors

| Improve this Doc View Source

STUNXORAddressAttribute(STUNAttributeTypesEnum, Byte[])

Obsolete.
For IPv6 support, please parse using
STUNXORAddressAttribute(STUNAttributeTypesEnum, Byte[], Byte[])

Parses an XOR-d (encoded) IPv4 Address attribute.

Declaration
[Obsolete("Provided for backward compatibility with RFC3489 clients.")]
public STUNXORAddressAttribute(STUNAttributeTypesEnum attributeType, byte[] attributeValue)
Parameters
Type Name Description
STUNAttributeTypesEnum attributeType
System.Byte[] attributeValue
| Improve this Doc View Source

STUNXORAddressAttribute(STUNAttributeTypesEnum, Byte[], Byte[])

Parses an XOR-d (encoded) Address attribute with IPv4/IPv6 support.

Declaration
public STUNXORAddressAttribute(STUNAttributeTypesEnum attributeType, byte[] attributeValue, byte[] transactionId)
Parameters
Type Name Description
STUNAttributeTypesEnum attributeType

of XORMappedAddress or XORPeerAddress or XORRelayedAddress

System.Byte[] attributeValue

the raw bytes

System.Byte[] transactionId

the TransactionId

| Improve this Doc View Source

STUNXORAddressAttribute(STUNAttributeTypesEnum, Int32, IPAddress)

Obsolete.
For IPv6 support, please create using STUNXORAddressAttribute(STUNAttributeTypesEnum, Int32, IPAddress, Byte[])

Creates an XOR-d (encoded) IPv4 Address attribute.

Declaration
[Obsolete("Provided for backward compatibility with RFC3489 clients.")]
public STUNXORAddressAttribute(STUNAttributeTypesEnum attributeType, int port, IPAddress address)
Parameters
Type Name Description
STUNAttributeTypesEnum attributeType
System.Int32 port
System.Net.IPAddress address
| Improve this Doc View Source

STUNXORAddressAttribute(STUNAttributeTypesEnum, Int32, IPAddress, Byte[])

Creates an XOR-d (encoded) Address attribute with IPv4/IPv6 support.

Declaration
public STUNXORAddressAttribute(STUNAttributeTypesEnum attributeType, int port, IPAddress address, byte[] transactionId)
Parameters
Type Name Description
STUNAttributeTypesEnum attributeType

of XORMappedAddress or XORPeerAddress or XORRelayedAddress

System.Int32 port

Allocated Port

System.Net.IPAddress address

Allocated IPAddress

System.Byte[] transactionId

the TransactionId

Methods

| Improve this Doc View Source

GetIPEndPoint()

Declaration
public IPEndPoint GetIPEndPoint()
Returns
Type Description
System.Net.IPEndPoint
| Improve this Doc View Source

ToByteBuffer(Byte[], Int32)

Declaration
public override int ToByteBuffer(byte[] buffer, int startIndex)
Parameters
Type Name Description
System.Byte[] buffer
System.Int32 startIndex
Returns
Type Description
System.Int32
Overrides
STUNAttribute.ToByteBuffer(Byte[], Int32)
| Improve this Doc View Source

ToString()

Declaration
public override string ToString()
Returns
Type Description
System.String
Overrides
STUNAttribute.ToString()

Extension Methods

JSONWriter.ToJson(Object)
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX