Lines Matching refs:optsize
718 size_t optsize; in coap_add_option_internal() local
749 optsize = coap_opt_encode_size(number - pdu->max_opt, len); in coap_add_option_internal()
751 pdu->used_size + optsize)) in coap_add_option_internal()
756 memmove(&pdu->data[optsize-1], &pdu->data[-1], in coap_add_option_internal()
759 pdu->data += optsize; in coap_add_option_internal()
765 optsize = coap_opt_encode(opt, pdu->alloc_size - pdu->used_size, in coap_add_option_internal()
768 if (!optsize) { in coap_add_option_internal()
774 pdu->used_size += optsize; in coap_add_option_internal()
777 return optsize; in coap_add_option_internal()
905 size_t optsize; in next_option_safe() local
911 optsize = coap_opt_parse(*optp, *length, &option); in next_option_safe()
912 if (optsize) { in next_option_safe()
913 assert(optsize <= *length); in next_option_safe()
921 *optp += optsize; in next_option_safe()
922 *length -= optsize; in next_option_safe()
925 return optsize; in next_option_safe()
1303 size_t optsize = next_option_safe(&opt, &length, &pdu->max_opt); in coap_pdu_parse_opt() local
1305 optsize ? coap_opt_length((const uint8_t *)opt - optsize) : 0; in coap_pdu_parse_opt()
1306 if (optsize == 0) { in coap_pdu_parse_opt()
1347 size_t optsize = next_option_safe(&opt, &length, &pdu->max_opt); in coap_pdu_parse_opt() local
1349 optsize ? coap_opt_length((const uint8_t *)opt - optsize) : 0; in coap_pdu_parse_opt()
1350 if (!optsize || (COAP_PDU_IS_SIGNALING(pdu) ? in coap_pdu_parse_opt()
1354 if (!optsize) { in coap_pdu_parse_opt()