Home
last modified time | relevance | path

Searched refs:oi (Results 1 – 3 of 3) sorted by relevance

/net-tools-3.7.0/libcoap/tests/
Dtest_options.c438 coap_opt_iterator_t oi, *result; in t_iterate_option1() local
441 result = coap_option_iterator_init(&pdu, &oi, COAP_OPT_ALL); in t_iterate_option1()
444 CU_ASSERT(oi.bad == 1); in t_iterate_option1()
446 option = coap_option_next(&oi); in t_iterate_option1()
447 CU_ASSERT(oi.bad == 1); in t_iterate_option1()
463 coap_opt_iterator_t oi, *result; in t_iterate_option2() local
466 result = coap_option_iterator_init(&pdu, &oi, COAP_OPT_ALL); in t_iterate_option2()
469 CU_ASSERT(oi.bad == 1); in t_iterate_option2()
471 option = coap_option_next(&oi); in t_iterate_option2()
472 CU_ASSERT(oi.bad == 1); in t_iterate_option2()
[all …]
/net-tools-3.7.0/libcoap/src/
Doption.c120 coap_option_iterator_init(coap_pdu_t *pdu, coap_opt_iterator_t *oi, in coap_option_iterator_init() argument
124 assert(oi); in coap_option_iterator_init()
126 memset(oi, 0, sizeof(coap_opt_iterator_t)); in coap_option_iterator_init()
128 oi->next_option = (unsigned char *)pdu->hdr + sizeof(coap_hdr_t) in coap_option_iterator_init()
130 if ((unsigned char *)pdu->hdr + pdu->length <= oi->next_option) { in coap_option_iterator_init()
131 oi->bad = 1; in coap_option_iterator_init()
137 oi->length = pdu->length - (sizeof(coap_hdr_t) + pdu->hdr->token_length); in coap_option_iterator_init()
140 memcpy(oi->filter, filter, sizeof(coap_opt_filter_t)); in coap_option_iterator_init()
141 oi->filtered = 1; in coap_option_iterator_init()
143 return oi; in coap_option_iterator_init()
[all …]
/net-tools-3.7.0/libcoap/include/coap/
Doption.h279 coap_opt_iterator_t *oi,
298 coap_opt_t *coap_option_next(coap_opt_iterator_t *oi);
315 coap_opt_iterator_t *oi);