ddnet/src/engine/shared/stun.h
heinrich5991 ec45a7338a Add bare-bones STUN protocol support
Implemented according to RFC 5389.
2022-05-18 09:20:54 +02:00

16 lines
404 B
C++

#ifndef ENGINE_SHARED_STUN_H
#define ENGINE_SHARED_STUN_H
#include <cstddef>
struct NETADDR;
class CStunData
{
public:
unsigned char m_aSecret[12];
};
size_t StunMessagePrepare(unsigned char *pBuffer, size_t BufferSize, CStunData *pData);
bool StunMessageParse(const unsigned char *pMessage, size_t MessageSize, const CStunData *pData, bool *pSuccess, NETADDR *pAddr);
#endif // ENGINE_SHARED_STUN_H