libcoap 4.3.2rc2

Data Fields
coap_optlist_t Struct Reference
Application API » Option Filters

Representation of chained list of CoAP options to install. More...

`#include <coap_option.h>`

## Data Fields
struct coap_optlist_t * | next
| next entry in the optlist chain More...
uint16_t | number
| the option number (no delta coding) More...
size_t | length
| the option value length More...
uint8_t * | data
| the option data More...

## Detailed Description

Representation of chained list of CoAP options to install.

coap_optlist_t *optlist_chain = NULL;
coap_pdu_t *pdu = coap_new_pdu(session);
... other set up code ...
coap_insert_optlist(&optlist_chain, coap_new_optlist(COAP_OPTION_OBSERVE,
COAP_OBSERVE_ESTABLISH, NULL));
coap_add_optlist_pdu(pdu, &optlist_chain);
... other code ...
coap_delete_optlist(optlist_chain);
COAP_OBSERVE_ESTABLISH
#define COAP_OBSERVE_ESTABLISH
The value COAP_OBSERVE_ESTABLISH in a GET/FETCH request option COAP_OPTION_OBSERVE indicates a new ob...
Definition: coap_subscribe.h:33
coap_new_optlist
coap_optlist_t * coap_new_optlist(uint16_t number, size_t length, const uint8_t *data)
Create a new optlist entry.
Definition: coap_option.c:511
coap_add_optlist_pdu
int coap_add_optlist_pdu(coap_pdu_t *pdu, coap_optlist_t **options)
The current optlist of optlist_chain is first sorted (as per RFC7272 ordering requirements) and then ...
Definition: coap_option.c:551
coap_new_pdu
coap_pdu_t * coap_new_pdu(coap_pdu_type_t type, coap_pdu_code_t code, coap_session_t *session)
Creates a new CoAP PDU.
Definition: coap_pdu.c:153
COAP_OPTION_OBSERVE
#define COAP_OPTION_OBSERVE
Definition: coap_pdu.h:119
coap_optlist_t
Representation of chained list of CoAP options to install.
Definition: coap_option.h:325
coap_pdu_t
structure for CoAP PDUs
Definition: coap_pdu_internal.h:119

Definition at line 325 of file coap_option.h.

## Field Documentation

## ◆ data

uint8_t* coap_optlist_t::data

the option data

Definition at line 329 of file coap_option.h.

## ◆ length

size_t coap_optlist_t::length

the option value length

Definition at line 328 of file coap_option.h.

## ◆ next

struct coap_optlist_t* coap_optlist_t::next

next entry in the optlist chain

Definition at line 326 of file coap_option.h.

## ◆ number

uint16_t coap_optlist_t::number

the option number (no delta coding)

Definition at line 327 of file coap_option.h.

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

- coap_option.h