Class STUNMessage
Inheritance
System.Object
STUNMessage
Inherited Members
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)
Assembly: SIPSorcery.dll
Syntax
Constructors
|
Improve this Doc
View Source
STUNMessage()
Declaration
|
Improve this Doc
View Source
STUNMessage(STUNMessageTypesEnum)
Declaration
public STUNMessage(STUNMessageTypesEnum stunMessageType)
Parameters
Fields
|
Improve this Doc
View Source
Attributes
Declaration
public List<STUNAttribute> Attributes
Field Value
|
Improve this Doc
View Source
Declaration
Field Value
Properties
|
Improve this Doc
View Source
isFingerprintValid
For parsed STUN messages this indicates whether a valid fingerprint
as attached to the message.
Declaration
public bool isFingerprintValid { get; }
Property Value
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
PaddedSize
Declaration
public ushort PaddedSize { get; }
Property Value
Type |
Description |
System.UInt16 |
|
Methods
|
Improve this Doc
View Source
AddNonceAttribute(String)
Declaration
public void AddNonceAttribute(string nonce)
Parameters
Type |
Name |
Description |
System.String |
nonce |
|
|
Improve this Doc
View Source
AddUsernameAttribute(String)
Declaration
public void AddUsernameAttribute(string username)
Parameters
Type |
Name |
Description |
System.String |
username |
|
|
Improve this Doc
View Source
AddXORAddressAttribute(STUNAttributeTypesEnum, IPAddress, Int32)
Declaration
public void AddXORAddressAttribute(STUNAttributeTypesEnum addressType, IPAddress remoteAddress, int remotePort)
Parameters
Type |
Name |
Description |
STUNAttributeTypesEnum |
addressType |
|
System.Net.IPAddress |
remoteAddress |
|
System.Int32 |
remotePort |
|
|
Improve this Doc
View Source
AddXORMappedAddressAttribute(IPAddress, Int32)
Declaration
public void AddXORMappedAddressAttribute(IPAddress remoteAddress, int remotePort)
Parameters
Type |
Name |
Description |
System.Net.IPAddress |
remoteAddress |
|
System.Int32 |
remotePort |
|
|
Improve this Doc
View Source
AddXORPeerAddressAttribute(IPAddress, Int32)
Declaration
public void AddXORPeerAddressAttribute(IPAddress remoteAddress, int remotePort)
Parameters
Type |
Name |
Description |
System.Net.IPAddress |
remoteAddress |
|
System.Int32 |
remotePort |
|
|
Improve this Doc
View Source
CheckIntegrity(Byte[])
Check that the message integrity attribute is correct.
Declaration
public bool CheckIntegrity(byte[] messageIntegrityKey)
Parameters
Type |
Name |
Description |
System.Byte[] |
messageIntegrityKey |
The message integrity key that was used to generate
the HMAC for the original message.
|
Returns
Type |
Description |
System.Boolean |
True if the fingerprint and HMAC of the STUN message are valid. False if not.
|
|
Improve this Doc
View Source
ParseSTUNMessage(Byte[], Int32)
Declaration
public static STUNMessage ParseSTUNMessage(byte[] buffer, int bufferLength)
Parameters
Type |
Name |
Description |
System.Byte[] |
buffer |
|
System.Int32 |
bufferLength |
|
Returns
|
Improve this Doc
View Source
ToByteBuffer(Byte[], Boolean)
Declaration
public byte[] ToByteBuffer(byte[] messageIntegrityKey, bool addFingerprint)
Parameters
Type |
Name |
Description |
System.Byte[] |
messageIntegrityKey |
|
System.Boolean |
addFingerprint |
|
Returns
Type |
Description |
System.Byte[] |
|
|
Improve this Doc
View Source
ToByteBufferStringKey(String, Boolean)
Declaration
public byte[] ToByteBufferStringKey(string messageIntegrityKey, bool addFingerprint)
Parameters
Type |
Name |
Description |
System.String |
messageIntegrityKey |
|
System.Boolean |
addFingerprint |
|
Returns
Type |
Description |
System.Byte[] |
|
|
Improve this Doc
View Source
ToString()
Declaration
Returns
Type |
Description |
System.String |
|
Extension Methods