Stun Server
Compliant with the latest RFCs including 5389, 5769, and 5780
discover the local host's own external IP address
|
#include <stunbuilder.h>
Private Member Functions | |
HRESULT | AddMappedAddressImpl (uint16_t attribute, const CSocketAddress &addr) |
HRESULT | AddMessageIntegrityImpl (uint8_t *key, size_t keysize) |
Private Attributes | |
CDataStream | _stream |
StunTransactionId | _transactionid |
bool | _fLegacyMode |
Definition at line 29 of file stunbuilder.h.
CStunMessageBuilder::CStunMessageBuilder | ( | ) |
Definition at line 42 of file stunbuilder.cpp.
HRESULT CStunMessageBuilder::AddAttribute | ( | uint16_t | attribType, |
const void * | data, | ||
uint16_t | size | ||
) |
Definition at line 165 of file stunbuilder.cpp.
HRESULT CStunMessageBuilder::AddAttributeHeader | ( | uint16_t | attribType, |
uint16_t | size | ||
) |
Definition at line 154 of file stunbuilder.cpp.
HRESULT CStunMessageBuilder::AddBindingRequestHeader | ( | ) |
Definition at line 76 of file stunbuilder.cpp.
HRESULT CStunMessageBuilder::AddBindingResponseHeader | ( | bool | fSuccess | ) |
Definition at line 81 of file stunbuilder.cpp.
HRESULT CStunMessageBuilder::AddChangeRequest | ( | const StunChangeRequestAttribute & | changeAttrib | ) |
Definition at line 400 of file stunbuilder.cpp.
HRESULT CStunMessageBuilder::AddErrorCode | ( | uint16_t | errorNumber, |
const char * | pszReason | ||
) |
Definition at line 219 of file stunbuilder.cpp.
HRESULT CStunMessageBuilder::AddFingerprintAttribute | ( | ) |
Definition at line 420 of file stunbuilder.cpp.
HRESULT CStunMessageBuilder::AddHeader | ( | StunMessageType | msgType, |
StunMessageClass | msgClass | ||
) |
Definition at line 55 of file stunbuilder.cpp.
HRESULT CStunMessageBuilder::AddMappedAddress | ( | const CSocketAddress & | addr | ) |
Definition at line 319 of file stunbuilder.cpp.
|
private |
Definition at line 373 of file stunbuilder.cpp.
|
private |
Definition at line 476 of file stunbuilder.cpp.
HRESULT CStunMessageBuilder::AddMessageIntegrityLongTerm | ( | const char * | pszUserName, |
const char * | pszRealm, | ||
const char * | pszPassword | ||
) |
Definition at line 527 of file stunbuilder.cpp.
HRESULT CStunMessageBuilder::AddMessageIntegrityShortTerm | ( | const char * | pszPassword | ) |
Definition at line 522 of file stunbuilder.cpp.
HRESULT CStunMessageBuilder::AddNonce | ( | const char * | pszNonce | ) |
Definition at line 465 of file stunbuilder.cpp.
HRESULT CStunMessageBuilder::AddOtherAddress | ( | const CSocketAddress & | other | ) |
Definition at line 331 of file stunbuilder.cpp.
HRESULT CStunMessageBuilder::AddPaddingAttribute | ( | uint16_t | paddingSize | ) |
Definition at line 345 of file stunbuilder.cpp.
HRESULT CStunMessageBuilder::AddRandomTransactionId | ( | StunTransactionId * | pTransId | ) |
Definition at line 93 of file stunbuilder.cpp.
HRESULT CStunMessageBuilder::AddRealm | ( | const char * | pszRealm | ) |
Definition at line 470 of file stunbuilder.cpp.
HRESULT CStunMessageBuilder::AddResponseOriginAddress | ( | const CSocketAddress & | other | ) |
Definition at line 324 of file stunbuilder.cpp.
HRESULT CStunMessageBuilder::AddResponsePort | ( | uint16_t | port | ) |
Definition at line 337 of file stunbuilder.cpp.
HRESULT CStunMessageBuilder::AddStringAttribute | ( | uint16_t | attribType, |
const char * | pstr | ||
) |
Definition at line 205 of file stunbuilder.cpp.
HRESULT CStunMessageBuilder::AddTransactionId | ( | const StunTransactionId & | transid | ) |
Definition at line 86 of file stunbuilder.cpp.
HRESULT CStunMessageBuilder::AddUnknownAttributes | ( | const uint16_t * | arrAttributeIds, |
size_t | count | ||
) |
Definition at line 272 of file stunbuilder.cpp.
HRESULT CStunMessageBuilder::AddUserName | ( | const char * | pszUserName | ) |
Definition at line 460 of file stunbuilder.cpp.
HRESULT CStunMessageBuilder::AddXorMappedAddress | ( | const CSocketAddress & | addr | ) |
Definition at line 309 of file stunbuilder.cpp.
HRESULT CStunMessageBuilder::FixLengthField | ( | ) |
Definition at line 588 of file stunbuilder.cpp.
HRESULT CStunMessageBuilder::GetResult | ( | CRefCountedBuffer * | pspBuffer | ) |
Definition at line 613 of file stunbuilder.cpp.
CDataStream & CStunMessageBuilder::GetStream | ( | ) |
Definition at line 625 of file stunbuilder.cpp.
void CStunMessageBuilder::SetLegacyMode | ( | bool | fLegacyMode | ) |
Definition at line 49 of file stunbuilder.cpp.
|
private |
Definition at line 36 of file stunbuilder.h.
|
private |
Definition at line 34 of file stunbuilder.h.
|
private |
Definition at line 35 of file stunbuilder.h.