Home
STUN module (rfc5389)

FlagAttribute

Implements a zero-length STUN/TURN flag attribute (presence implies the flag is set).

FlagAttribute

#include <icy/stun/attributes.h>
class FlagAttribute

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

Inherits: Attribute

Implements a zero-length STUN/TURN flag attribute (presence implies the flag is set).

List of all members

NameKindOwner
FlagAttributefunctionDeclared here
clonefunctionDeclared here
readfunctionDeclared here
writefunctionDeclared here
SizevariableDeclared here
~AttributefunctionInherited from Attribute
clonefunctionInherited from Attribute
readfunctionInherited from Attribute
writefunctionInherited from Attribute
typefunctionInherited from Attribute
sizefunctionInherited from Attribute
paddingBytesfunctionInherited from Attribute
paddedBytesfunctionInherited from Attribute
consumePaddingfunctionInherited from Attribute
writePaddingfunctionInherited from Attribute
typeStringfunctionInherited from Attribute
TypeIDvariableInherited from Attribute
createfunctionInherited from Attribute
paddingBytesfunctionInherited from Attribute
paddedBytesfunctionInherited from Attribute
typeStringfunctionInherited from Attribute
_typevariableInherited from Attribute
_sizevariableInherited from Attribute
AttributefunctionInherited from Attribute
setLengthfunctionInherited from Attribute
TypeenumInherited from Attribute

Inherited from Attribute

KindNameDescription
function~Attribute virtual inline
functionclone virtualReturns a deep copy of this attribute.
functionread virtualReads the body (not the type or size) for this type of attribute from the given buffer.
functionwrite virtual constWrites the body (not the type or size) to the given buffer.
functiontype const
functionsize const
functionpaddingBytes const inline
functionpaddedBytes const inline
functionconsumePadding constAdvances the reader past any 4-byte alignment padding that follows this attribute's body.
functionwritePadding constWrites zero-fill padding bytes to align this attribute to a 4-byte boundary.
functiontypeString
variableTypeID static constexpr
functioncreate staticCreates an attribute of the given wire type and body size. Returns nullptr if the type is unknown or the size is invalid.
functionpaddingBytes static inline constexprReturns the 4-byte alignment padding required for a body of size bytes.
functionpaddedBytes static inline constexprReturns the body length including 4-byte alignment padding.
functiontypeString static
variable_type
variable_size
functionAttribute
functionsetLengthUpdates the stored body length.
enumType

Public Methods

ReturnNameDescription
FlagAttribute
std::unique_ptr< Attribute >clone virtual overrideReturns a deep copy of this attribute.
voidread virtual inline overrideNo-op: flag attributes carry no body bytes.
voidwrite virtual const inline overrideNo-op: flag attributes carry no body bytes.

FlagAttribute

FlagAttribute(uint16_t type)

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

Parameters

  • type Wire type code for the concrete attribute.

clone

virtual override

virtual std::unique_ptr< Attribute > clone() override

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

Returns a deep copy of this attribute.

Reimplements

read

virtual inline override

virtual inline void read(BitReader &) override

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

No-op: flag attributes carry no body bytes.

Reimplements

write

virtual const inline override

virtual inline void write(BitWriter &) const override

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

No-op: flag attributes carry no body bytes.

Reimplements

Public Static Attributes

ReturnNameDescription
constexpr uint16_tSize static constexpr

Size

static constexpr

constexpr uint16_t Size = 0

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