Lines Matching refs:used_size
57 pdu->used_size = 0; in coap_pdu_clear()
208 size_t length = old_pdu->used_size - old_pdu->e_token_length - in coap_pdu_duplicate()
210 old_pdu->used_size - (old_pdu->data - old_pdu->token) +1 : 0); in coap_pdu_duplicate()
216 pdu->used_size += length; in coap_pdu_duplicate()
311 if (pdu->used_size) { in coap_add_token()
353 pdu->used_size = len + bias; in coap_add_token()
368 if (pdu->used_size == 0) { in coap_update_token()
385 pdu->used_size + (len + bias) - pdu->e_token_length)) { in coap_update_token()
390 pdu->token, pdu->used_size); in coap_update_token()
391 pdu->used_size += len + bias - pdu->e_token_length; in coap_update_token()
393 pdu->used_size -= pdu->e_token_length - (len + bias); in coap_update_token()
394 memmove(pdu->token, &pdu->token[pdu->e_token_length - (len + bias)], pdu->used_size); in coap_update_token()
445 if (!coap_opt_parse(option, pdu->used_size - (option - pdu->token), in coap_remove_option()
452 pdu->used_size - (next_option - pdu->token), in coap_remove_option()
471 if (!coap_pdu_check_resize(pdu, pdu->used_size + 1)) in coap_remove_option()
486 pdu->used_size - (next_option - pdu->token)); in coap_remove_option()
487 pdu->used_size++; in coap_remove_option()
511 if (pdu->used_size - (next_option - pdu->token)) in coap_remove_option()
512 memmove(option, next_option, pdu->used_size - (next_option - pdu->token)); in coap_remove_option()
513 pdu->used_size -= next_option - option; in coap_remove_option()
590 if (!coap_opt_parse(option, pdu->used_size - (option - pdu->token), &decode)) in coap_insert_option()
599 pdu->used_size + shift - shrink)) in coap_insert_option()
639 pdu->used_size - (option - pdu->token) - shrink); in coap_insert_option()
640 if (!coap_opt_encode(option, pdu->alloc_size - pdu->used_size, in coap_insert_option()
644 pdu->used_size += shift - shrink; in coap_insert_option()
670 pdu->used_size + new_length - old_length)) in coap_update_option()
678 pdu->used_size - (option - pdu->token) - old_length); in coap_update_option()
684 pdu->used_size += new_length - old_length; in coap_update_option()
736 pdu->used_size + optsize)) in coap_add_option_internal()
742 pdu->used_size - (pdu->data - pdu->token) + 1); in coap_add_option_internal()
746 opt = pdu->token + pdu->used_size; in coap_add_option_internal()
750 optsize = coap_opt_encode(opt, pdu->alloc_size - pdu->used_size, in coap_add_option_internal()
759 pdu->used_size += optsize; in coap_add_option_internal()
788 if (!coap_pdu_resize(pdu, pdu->used_size + len + 1)) in coap_add_data_after()
790 pdu->token[pdu->used_size++] = COAP_PAYLOAD_START; in coap_add_data_after()
791 pdu->data = pdu->token + pdu->used_size; in coap_add_data_after()
792 pdu->used_size += len; in coap_add_data_after()
825 *len = pdu->used_size - (pdu->data - pdu->token); in coap_get_data_large()
1263 if (pdu->used_size != 0 || pdu->e_token_length) { in coap_pdu_parse_opt()
1269 if (pdu->e_token_length > pdu->used_size) { in coap_pdu_parse_opt()
1277 pdu->used_size = 0; in coap_pdu_parse_opt()
1282 size_t length = pdu->used_size - pdu->e_token_length; in coap_pdu_parse_opt()
1324 length = pdu->used_size - pdu->e_token_length; in coap_pdu_parse_opt()
1341 opt = pdu->token + pdu->used_size; in coap_pdu_parse_opt()
1400 pdu->used_size = length - hdr_size; in coap_pdu_parse()
1436 assert(pdu->used_size >= pdu->e_token_length); in coap_pdu_encode_header()
1437 if (pdu->used_size < pdu->e_token_length) { in coap_pdu_encode_header()
1444 len = pdu->used_size - pdu->e_token_length; in coap_pdu_encode_header()