STUN module (rfc5389)

STUN module (rfc5389)

The stun module contains a STUN (rfc5389) implementation.

The stun module contains a STUN (rfc5389) implementation.

Namespaces

NameDescription
stunSTUN messages, attributes, and transaction helpers defined by RFC 5389.

Macros


STUN_API

#define STUN_API ICY_IMPORT

Defined in src/stun/include/icy/stun/stun.h:27


DECLARE_FIXLEN_STUN_ATTRIBUTE

#define DECLARE_FIXLEN_STUN_ATTRIBUTE(Name, Type, Derives) \
    class Name : public Derives                            \
    {                                                      \
    public:                                                \
        static constexpr uint16_t TypeID = Type;           \
        Name()                                             \
            : Derives(TypeID) {};                          \
        std::unique_ptr<Attribute> clone() override        \
        {                                                  \
            return std::make_unique<Name>(*this);          \
        }                                                  \
        virtual ~Name() {};                                \
    };

Defined in src/stun/include/icy/stun/attributes.h:570

Attribute macros.


DECLARE_STUN_ATTRIBUTE

#define DECLARE_STUN_ATTRIBUTE(Name, Type, Derives, Length) \
    class Name : public Derives                             \
    {                                                       \
    public:                                                 \
        static constexpr uint16_t TypeID = Type;            \
        Name(uint16_t size = Length)                        \
            : Derives(TypeID, size) {};                     \
        std::unique_ptr<Attribute> clone() override         \
        {                                                   \
            return std::make_unique<Name>(*this);           \
        }                                                   \
        virtual ~Name() {};                                 \
    };

Defined in src/stun/include/icy/stun/attributes.h:585

Edit this page