Home
last modified time | relevance | path

Searched refs:szx (Results 1 – 7 of 7) sorted by relevance

/third_party/libcoap/src/
Dblock.c48 block->szx = COAP_OPT_BLOCK_SZX(option); in coap_get_block()
73 start = block->num << (block->szx + 4); in coap_write_block_opt()
81 want = (size_t)1 << (block->szx + 4); in coap_write_block_opt()
97 unsigned int szx; in coap_write_block_opt() local
109 szx = block->szx; in coap_write_block_opt()
110 block->szx = newBlockSize; in coap_write_block_opt()
112 block->num <<= szx - block->szx; in coap_write_block_opt()
120 block->szx)), in coap_write_block_opt()
163 if (block2.num != 0 && length <= (block2.num << (block2.szx + 4))) { in coap_add_data_blocked_response()
166 length >> (block2.szx + 4)); in coap_add_data_blocked_response()
[all …]
Dnet.c2230 offset = block.num << (block.szx + 4); in coap_wellknown_response()
2231 if (block.szx > 6) { /* invalid, MUST lead to 4.00 Bad Request */ in coap_wellknown_response()
2234 } else if (block.szx > COAP_MAX_BLOCK_SZX) { in coap_wellknown_response()
2235 block.szx = COAP_MAX_BLOCK_SZX; in coap_wellknown_response()
2236 block.num = (unsigned int)(offset >> (block.szx + 4)); in coap_wellknown_response()
2258 block.szx = COAP_MAX_BLOCK_SZX; in coap_wellknown_response()
2259 while (payloadlen < SZX_TO_BYTES(block.szx) + 6) { in coap_wellknown_response()
2260 if (block.szx == 0) { in coap_wellknown_response()
2265 block.szx--; in coap_wellknown_response()
2305 min(SZX_TO_BYTES(block.szx), wkc_len - (block.num << (block.szx + 4))) : in coap_wellknown_response()
Dresource.c938 block.szx)),
/third_party/libcoap/tests/
Dtest_wellknown.c178 CU_ASSERT(1 << (block.szx + 4) in t_wellknown4()
190 coap_block_t inblock = { .num = 1, .m = 0, .szx = 1 }; in t_wellknown5()
198 inblock.szx)), buf)) { in t_wellknown5()
211 CU_ASSERT(1 << (block.szx + 4) in t_wellknown5()
220 coap_block_t block = { .num = 0, .szx = 6 }; in t_wellknown6()
235 ((block.num << 4) | block.szx)), buf)) { in t_wellknown6()
/third_party/libcoap/include/coap3/
Dblock.h38 unsigned int szx:3; /**< block size */ member
70 coap_more_blocks(size_t data_len, unsigned int num, uint16_t szx) { in coap_more_blocks() argument
71 return ((num+1) << (szx + 4)) < data_len; in coap_more_blocks()
Dcoap_block_internal.h110 uint8_t szx; /**< size of individual blocks */ member
137 uint8_t szx; /**< size of individual blocks */ member
/third_party/libcoap/examples/
Dcoap-client.c119 coap_block_t block = { .num = 0, .m = 0, .szx = 6 };
742 block.szx = (coap_fls(size >> 4) - 1) & 0x07; in cmdline_blocksize()
765 ((1ull << (block.szx + 4)) < payload.length); in set_blocksize()
768 (block.num << 4 | block.m << 3 | block.szx)); in set_blocksize()