Stun Server  Compliant with the latest RFCs including 5389, 5769, and 5780
discover the local host's own external IP address
CTestMessageHandler Class Reference

#include <testmessagehandler.h>

Inheritance diagram for CTestMessageHandler:
Collaboration diagram for CTestMessageHandler:

Public Member Functions

 CTestMessageHandler ()
 
HRESULT Test1 ()
 
HRESULT Test2 ()
 
HRESULT Test3 ()
 
HRESULT Test4 ()
 
HRESULT Run ()
 
 UT_DECLARE_TEST_NAME ("CTestMessageHandler")
 
- Public Member Functions inherited from IUnitTest
virtual ~IUnitTest ()
 
virtual const char * GetName ()=0
 

Private Member Functions

void ToAddr (const char *pszIP, uint16_t port, CSocketAddress *pAddr)
 
void InitTransportAddressSet (TransportAddressSet &tas, bool fRolePP, bool fRolePA, bool fRoleAP, bool fRoleAA)
 
HRESULT InitBindingRequest (CStunMessageBuilder &builder)
 
HRESULT ValidateMappedAddress (CStunMessageReader &reader, const CSocketAddress &addrExpected, bool fLegacyOnly)
 
HRESULT ValidateResponseOriginAddress (CStunMessageReader &reader, const CSocketAddress &addrExpected)
 
HRESULT ValidateOtherAddress (CStunMessageReader &reader, const CSocketAddress &addrExpected)
 
HRESULT SendHelper (CStunMessageBuilder &builderRequest, CStunMessageReader *pReaderResponse, IStunAuth *pAuth)
 

Private Attributes

CRefCountedPtr< CMockAuthShort_spAuthShort
 
CRefCountedPtr< CMockAuthLong_spAuthLong
 
CSocketAddress _addrLocal
 
CSocketAddress _addrMapped
 
CSocketAddress _addrServerPP
 
CSocketAddress _addrServerPA
 
CSocketAddress _addrServerAP
 
CSocketAddress _addrServerAA
 
CSocketAddress _addrDestination
 
CSocketAddress _addrMappedExpected
 
CSocketAddress _addrOriginExpected
 

Detailed Description

Definition at line 48 of file testmessagehandler.h.

Constructor & Destructor Documentation

CTestMessageHandler::CTestMessageHandler ( )

Definition at line 92 of file testmessagehandler.cpp.

Member Function Documentation

HRESULT CTestMessageHandler::InitBindingRequest ( CStunMessageBuilder builder)
private

Definition at line 161 of file testmessagehandler.cpp.

void CTestMessageHandler::InitTransportAddressSet ( TransportAddressSet tas,
bool  fRolePP,
bool  fRolePA,
bool  fRoleAP,
bool  fRoleAA 
)
private

Definition at line 222 of file testmessagehandler.cpp.

HRESULT CTestMessageHandler::Run ( )
virtual

Implements IUnitTest.

Definition at line 481 of file testmessagehandler.cpp.

HRESULT CTestMessageHandler::SendHelper ( CStunMessageBuilder builderRequest,
CStunMessageReader pReaderResponse,
IStunAuth pAuth 
)
private

Definition at line 107 of file testmessagehandler.cpp.

HRESULT CTestMessageHandler::Test1 ( )

Definition at line 243 of file testmessagehandler.cpp.

HRESULT CTestMessageHandler::Test2 ( )

Definition at line 302 of file testmessagehandler.cpp.

HRESULT CTestMessageHandler::Test3 ( )

Definition at line 377 of file testmessagehandler.cpp.

HRESULT CTestMessageHandler::Test4 ( )

Definition at line 429 of file testmessagehandler.cpp.

void CTestMessageHandler::ToAddr ( const char *  pszIP,
uint16_t  port,
CSocketAddress pAddr 
)
private

Definition at line 143 of file testmessagehandler.cpp.

CTestMessageHandler::UT_DECLARE_TEST_NAME ( "CTestMessageHandler"  )
HRESULT CTestMessageHandler::ValidateMappedAddress ( CStunMessageReader reader,
const CSocketAddress addrExpected,
bool  fLegacyOnly 
)
private

Definition at line 170 of file testmessagehandler.cpp.

HRESULT CTestMessageHandler::ValidateOtherAddress ( CStunMessageReader reader,
const CSocketAddress addrExpected 
)
private

Definition at line 210 of file testmessagehandler.cpp.

HRESULT CTestMessageHandler::ValidateResponseOriginAddress ( CStunMessageReader reader,
const CSocketAddress addrExpected 
)
private

Definition at line 196 of file testmessagehandler.cpp.

Member Data Documentation

CSocketAddress CTestMessageHandler::_addrDestination
private

Definition at line 63 of file testmessagehandler.h.

CSocketAddress CTestMessageHandler::_addrLocal
private

Definition at line 55 of file testmessagehandler.h.

CSocketAddress CTestMessageHandler::_addrMapped
private

Definition at line 56 of file testmessagehandler.h.

CSocketAddress CTestMessageHandler::_addrMappedExpected
private

Definition at line 64 of file testmessagehandler.h.

CSocketAddress CTestMessageHandler::_addrOriginExpected
private

Definition at line 65 of file testmessagehandler.h.

CSocketAddress CTestMessageHandler::_addrServerAA
private

Definition at line 60 of file testmessagehandler.h.

CSocketAddress CTestMessageHandler::_addrServerAP
private

Definition at line 59 of file testmessagehandler.h.

CSocketAddress CTestMessageHandler::_addrServerPA
private

Definition at line 58 of file testmessagehandler.h.

CSocketAddress CTestMessageHandler::_addrServerPP
private

Definition at line 57 of file testmessagehandler.h.

CRefCountedPtr<CMockAuthLong> CTestMessageHandler::_spAuthLong
private

Definition at line 52 of file testmessagehandler.h.

CRefCountedPtr<CMockAuthShort> CTestMessageHandler::_spAuthShort
private

Definition at line 51 of file testmessagehandler.h.


The documentation for this class was generated from the following files: