|
Zephyr API Documentation 4.5.99
A Scalable Open Source RTOS
|
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. | |
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.
| uint16_t stun_msg::error_code |
Error code: class * 100 + number, 300 to 699.
The reason phrase is not kept.
| bool stun_msg::has_error_code |
ERROR-CODE is present.
| bool stun_msg::has_fingerprint |
FINGERPRINT is present.
| bool stun_msg::has_ice_controlled |
ICE-CONTROLLED is present.
| bool stun_msg::has_ice_controlling |
ICE-CONTROLLING is present.
| bool stun_msg::has_integrity |
MESSAGE-INTEGRITY is present.
| bool stun_msg::has_integrity_sha256 |
MESSAGE-INTEGRITY-SHA256 is present.
| bool stun_msg::has_priority |
PRIORITY is present.
| bool stun_msg::has_use_candidate |
USE-CANDIDATE is present.
| uint64_t stun_msg::ice_tiebreaker |
Tie-breaker of whichever role attribute is present.
| uint16_t stun_msg::length |
Header Length field: the size of the attributes.
| uint32_t stun_msg::priority |
PRIORITY value.
| uint8_t stun_msg::txid[12U] |
Transaction id.
| uint16_t stun_msg::type |
Message type: method and class.
| 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.
| uint16_t stun_msg::username_len |
Length of the USERNAME value.