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.
Inherited Members
Namespace: SIPSorcery.Net
Assembly: SIPSorcery.dll
Syntax
public class STUNXORAddressAttribute : STUNAddressAttributeBase
Constructors
| Improve this Doc View SourceSTUNXORAddressAttribute(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 |
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 | |
System.Byte[] | attributeValue | the raw bytes |
System.Byte[] | transactionId | the TransactionId |
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 |
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 | |
System.Int32 | port | Allocated Port |
System.Net.IPAddress | address | Allocated IPAddress |
System.Byte[] | transactionId | the TransactionId |
Methods
| Improve this Doc View SourceGetIPEndPoint()
Declaration
public IPEndPoint GetIPEndPoint()
Returns
Type | Description |
---|---|
System.Net.IPEndPoint |
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
| Improve this Doc View SourceToString()
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String |