mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-12-16 10:03:50 +01:00
net/nanocoap: improve documentation of coap_pkt_t
This commit is contained in:
parent
14b103d66b
commit
c20a1d04c8
@ -194,13 +194,27 @@ typedef struct {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief CoAP PDU parsing context structure
|
* @brief CoAP PDU parsing context structure
|
||||||
|
*
|
||||||
|
* When this struct is used to assemble the header, @p payload is used as the
|
||||||
|
* write pointer and @p payload_len contains the number of free bytes left in
|
||||||
|
* then packet buffer pointed to by @ref coap_pkt_t::hdr
|
||||||
|
*
|
||||||
|
* When the header was written, @p payload must not be changed, it must remain
|
||||||
|
* pointing to the end of the header.
|
||||||
|
* @p payload_len must then be set to the size of the payload that was further
|
||||||
|
* copied into the packet buffer, after the header.
|
||||||
|
*
|
||||||
|
* @ref coap_pkt_t::snips can be used to attach further payload buffers without copying them
|
||||||
|
* into the CoAP packet buffer.
|
||||||
|
* If there are any, they will be attached in order after the last payload byte
|
||||||
|
* (or header byte) in the original CoAP packet buffer.
|
||||||
*/
|
*/
|
||||||
typedef struct {
|
typedef struct {
|
||||||
coap_hdr_t *hdr; /**< pointer to raw packet */
|
coap_hdr_t *hdr; /**< pointer to raw packet */
|
||||||
uint8_t *token; /**< pointer to token
|
uint8_t *token; /**< pointer to token
|
||||||
* @deprecated Use coap_get_token(),
|
* @deprecated Use coap_get_token(),
|
||||||
* Will be removed after 2022.10. */
|
* Will be removed after 2022.10. */
|
||||||
uint8_t *payload; /**< pointer to payload */
|
uint8_t *payload; /**< pointer to end of the header */
|
||||||
iolist_t *snips; /**< payload snips (optional)*/
|
iolist_t *snips; /**< payload snips (optional)*/
|
||||||
uint16_t payload_len; /**< length of payload */
|
uint16_t payload_len; /**< length of payload */
|
||||||
uint16_t options_len; /**< length of options array */
|
uint16_t options_len; /**< length of options array */
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user