46 uint32_t ipvalidate = 0;
80 ChkIfA(0 != ::strncmp(
"FOOBAR", (
const char*)(spBufferReader->GetData() + attrib.
offset), attrib.
size),
E_FAIL);
113 const char* ip6addr =
"ABCDEFGHIJKLMNOP";
114 sockaddr_in6 addr6 = {};
120 addr6.sin6_family = AF_INET6;
121 addr6.sin6_port = htons(9999);
122 memcpy(addr6.sin6_addr.s6_addr, ip6addr, 16);
HRESULT AddStringAttribute(uint16_t attribType, const char *pstr)
uint16_t GetMessageType()
HRESULT AddRandomTransactionId(StunTransactionId *pTransId)
HRESULT GetAttributeByType(uint16_t attributeType, StunAttribute *pAttribute)
uint16_t GetIPLength() const
bool IsSameIP_and_Port(const CSocketAddress &other) const
HRESULT AddXorMappedAddress(const CSocketAddress &addr)
HRESULT GetBuffer(CRefCountedBuffer *pRefBuffer)
HRESULT AddBindingRequestHeader()
bool HasFingerprintAttribute()
HRESULT GetMappedAddress(CSocketAddress *pAddress)
#define ChkIf(expr, hrerror)
ReaderParseState AddBytes(const uint8_t *pData, uint32_t size)
HRESULT AddMappedAddress(const CSocketAddress &addr)
HRESULT GetOtherAddress(CSocketAddress *pAddress)
HRESULT AddHeader(StunMessageType msgType, StunMessageClass msgClass)
HRESULT AddResponseOriginAddress(const CSocketAddress &other)
HRESULT AddFingerprintAttribute()
const uint16_t STUN_ATTRIBUTE_SOFTWARE
HRESULT GetResult(CRefCountedBuffer *pspBuffer)
bool IsFingerprintAttributeValid()
StunMessageClass GetMessageClass()
boost::shared_ptr< CBuffer > CRefCountedBuffer
#define ChkIfA(expr, hrerror)
HRESULT GetXorMappedAddress(CSocketAddress *pAddress)
HRESULT AddOtherAddress(const CSocketAddress &other)