Lines Matching refs:opt
173 coap_opt_t *opt; in coap_add_option() local
183 opt = (unsigned char *)pdu->hdr + pdu->length; in coap_add_option()
186 optsize = coap_opt_encode(opt, pdu->max_size - pdu->length, in coap_add_option()
205 coap_opt_t *opt; in coap_add_option_later() local
215 opt = (unsigned char *)pdu->hdr + pdu->length; in coap_add_option_later()
218 optsize = coap_opt_encode(opt, pdu->max_size - pdu->length, in coap_add_option_later()
230 return ((unsigned char*)opt) + optsize - len; in coap_add_option_later()
342 coap_opt_t *opt; in coap_pdu_parse() local
397 opt = (unsigned char *)(pdu->hdr + 1) + pdu->hdr->token_length; in coap_pdu_parse()
399 while (length && *opt != COAP_PAYLOAD_START) { in coap_pdu_parse()
400 if (!next_option_safe(&opt, (size_t *)&length)) { in coap_pdu_parse()
408 assert(*opt == COAP_PAYLOAD_START); in coap_pdu_parse()
409 opt++; length--; in coap_pdu_parse()
416 debug("set data to %p (pdu ends at %p)\n", (unsigned char *)opt, in coap_pdu_parse()
418 pdu->data = (unsigned char *)opt; in coap_pdu_parse()