-
Notifications
You must be signed in to change notification settings - Fork 426
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
WebRTC IPv6 support for TURN (along with REQUESTED-ADDRESS-FAMILY) (#…
…1133) * requested-address-family RFC6156, address family constant values RFC5389 * ipv6 support for xor-addresses * create base class for address attributes * obsolescence * transactionid usage for ipv6 * more transactionid usage * requested-address-family for refresh turn
- Loading branch information
Showing
6 changed files
with
179 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Net; | ||
using System.Text; | ||
|
||
namespace SIPSorcery.Net | ||
{ | ||
public abstract class STUNAddressAttributeBase : STUNAttribute | ||
{ | ||
/// <summary> | ||
/// Obsolete. | ||
/// <br/> Please use <see cref="ADDRESS_ATTRIBUTE_IPV4_LENGTH"/> or <see cref="ADDRESS_ATTRIBUTE_IPV6_LENGTH"/> instead. | ||
/// <br/> <br/> | ||
/// </summary> | ||
[Obsolete("Default attribute length for IPv4 only.")] | ||
public const UInt16 ADDRESS_ATTRIBUTE_LENGTH = 8; | ||
|
||
public const UInt16 ADDRESS_ATTRIBUTE_IPV4_LENGTH = 8; | ||
public const UInt16 ADDRESS_ATTRIBUTE_IPV6_LENGTH = 20; | ||
|
||
protected UInt16 AddressAttributeLength = ADDRESS_ATTRIBUTE_IPV4_LENGTH; | ||
protected byte[] TransactionId; | ||
|
||
/// <summary> | ||
/// Defaults to IPv4 (0x01 // 1) | ||
/// </summary> | ||
public int Family = 1; // Ipv4 = 1, IPv6 = 2. | ||
public int Port; | ||
public IPAddress Address; | ||
|
||
public override UInt16 PaddedLength | ||
{ | ||
get => AddressAttributeLength; | ||
} | ||
|
||
public STUNAddressAttributeBase(STUNAttributeTypesEnum attributeType, byte[] value) | ||
: base(attributeType, value) | ||
{ | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.