Zephyr API Documentation 4.5.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches

A parsed message. More...

#include <zephyr/net/stun.h>

Data Fields

uint16_t type
 Message type: method and class.
uint16_t length
 Header Length field: the size of the attributes.
uint8_t txid [12U]
 Transaction id.
const uint8_t * username
 USERNAME value as received: not terminated and not validated, the parser checks its length, not its encoding; NULL if absent.
uint16_t username_len
 Length of the USERNAME value.
bool has_integrity
 MESSAGE-INTEGRITY is present.
bool has_integrity_sha256
 MESSAGE-INTEGRITY-SHA256 is present.
bool has_fingerprint
 FINGERPRINT is present.
bool has_priority
 PRIORITY is present.
uint32_t priority
 PRIORITY value.
bool has_use_candidate
 USE-CANDIDATE is present.
bool has_error_code
 ERROR-CODE is present.
uint16_t error_code
 Error code: class * 100 + number, 300 to 699.
bool has_ice_controlling
 ICE-CONTROLLING is present.
bool has_ice_controlled
 ICE-CONTROLLED is present.
uint64_t ice_tiebreaker
 Tie-breaker of whichever role attribute is present.

Detailed Description

A parsed message.

The header fields and what the parser found of the attributes it understands. Offsets and pointers refer to the buffer that was parsed, which has to stay as it is for as long as the structure is used: the functions that take the structure read the message from that buffer. After a failed stun_parse() the structure holds no message, and they return -EINVAL.

Field Documentation

◆ error_code

uint16_t stun_msg::error_code

Error code: class * 100 + number, 300 to 699.

The reason phrase is not kept.

◆ has_error_code

bool stun_msg::has_error_code

ERROR-CODE is present.

◆ has_fingerprint

bool stun_msg::has_fingerprint

FINGERPRINT is present.

◆ has_ice_controlled

bool stun_msg::has_ice_controlled

ICE-CONTROLLED is present.

◆ has_ice_controlling

bool stun_msg::has_ice_controlling

ICE-CONTROLLING is present.

◆ has_integrity

bool stun_msg::has_integrity

MESSAGE-INTEGRITY is present.

◆ has_integrity_sha256

bool stun_msg::has_integrity_sha256

MESSAGE-INTEGRITY-SHA256 is present.

◆ has_priority

bool stun_msg::has_priority

PRIORITY is present.

◆ has_use_candidate

bool stun_msg::has_use_candidate

USE-CANDIDATE is present.

◆ ice_tiebreaker

uint64_t stun_msg::ice_tiebreaker

Tie-breaker of whichever role attribute is present.

◆ length

uint16_t stun_msg::length

Header Length field: the size of the attributes.

◆ priority

uint32_t stun_msg::priority

PRIORITY value.

◆ txid

uint8_t stun_msg::txid[12U]

Transaction id.

◆ type

uint16_t stun_msg::type

Message type: method and class.

◆ username

const uint8_t* stun_msg::username

USERNAME value as received: not terminated and not validated, the parser checks its length, not its encoding; NULL if absent.

◆ username_len

uint16_t stun_msg::username_len

Length of the USERNAME value.


The documentation for this struct was generated from the following file: