Lines Matching defs:size
42 coap_pdu_clear(coap_pdu_t *pdu, size_t size) {
46 if (pdu->alloc_size > size)
47 pdu->alloc_size = size;
56 pdu->max_size = size;
98 size_t size) {
120 assert(size <= COAP_DEFAULT_MAX_PDU_RX_SIZE);
121 if (size > COAP_DEFAULT_MAX_PDU_RX_SIZE)
129 pdu->pbuf = pbuf_alloc(PBUF_TRANSPORT, size + pdu->max_hdr_size, PBUF_RAM);
137 pdu->alloc_size = min(size, 256);
145 coap_pdu_clear(pdu, size);
190 * that indicates BERT size (TCP/TLS only) as this may be called early
242 * The new size does not include the coap header (max_hdr_size)
287 coap_pdu_check_resize(coap_pdu_t *pdu, size_t size) {
288 if (size > pdu->alloc_size) {
290 while (size > new_size)
294 if (new_size < size)
323 coap_log_warn("coap_add_token: Token size too large. Token ignored\n");
378 coap_log_warn("coap_add_token: Token size too large. Token ignored\n");
463 /* next option delta size increase */
471 /* next option delta size increase */
476 /* Possible a re-size took place with a realloc() */
500 /* next option delta size increase */
589 /* size of option inc header to insert */
592 /* size of next option (header may shrink in size as delta changes */
605 /* Possible a re-size took place with a realloc() */
681 /* Possible a re-size took place with a realloc() */
955 * return +ve PDU size including token
967 size_t size = 0;
975 size = len;
979 size = (size_t)data[1] + COAP_MESSAGE_SIZE_OFFSET_TCP8;
983 size = ((size_t)data[1] << 8) + data[2] + COAP_MESSAGE_SIZE_OFFSET_TCP16;
986 size = ((size_t)data[1] << 24) + ((size_t)data[2] << 16)
995 size += tkl;
997 size += token_start[0] + COAP_TOKEN_EXT_1B_BIAS + 1;
999 size += ((uint16_t)token_start[0] << 8) + token_start[1] +
1007 return size;
1056 coap_log_debug("coap_pdu_parse: PDU header token size broken\n");
1433 coap_log_warn("coap_add_token: Token size too large. PDU ignored\n");