libcoap  4.2.1
coap_opt_iterator_t Struct Reference

Iterator to run through PDU options. More...

#include <option.h>

Data Fields

size_t length
 remaining length of PDU More...
 
uint16_t type
 decoded option type More...
 
unsigned int bad:1
 iterator object is ok if not set More...
 
unsigned int filtered:1
 denotes whether or not filter is used More...
 
coap_opt_tnext_option
 pointer to the unparsed next option More...
 
coap_opt_filter_t filter
 option filter More...
 

Detailed Description

Iterator to run through PDU options.

This object must be initialized with coap_option_iterator_init(). Call coap_option_next() to walk through the list of options until coap_option_next() returns NULL.

coap_opt_t *option;
while ((option = coap_option_next(&opt_iter))) {
... do something with option ...
}

Definition at line 237 of file option.h.

Field Documentation

◆ bad

unsigned int coap_opt_iterator_t::bad

iterator object is ok if not set

Definition at line 240 of file option.h.

◆ filter

coap_opt_filter_t coap_opt_iterator_t::filter

option filter

Definition at line 243 of file option.h.

◆ filtered

unsigned int coap_opt_iterator_t::filtered

denotes whether or not filter is used

Definition at line 241 of file option.h.

◆ length

size_t coap_opt_iterator_t::length

remaining length of PDU

Definition at line 238 of file option.h.

◆ next_option

coap_opt_t* coap_opt_iterator_t::next_option

pointer to the unparsed next option

Definition at line 242 of file option.h.

◆ type

uint16_t coap_opt_iterator_t::type

decoded option type

Definition at line 239 of file option.h.


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