Searched refs:szx (Results 1 – 7 of 7) sorted by relevance
/net-tools-3.7.0/libcoap/src/ |
D | block.c | 53 block->szx = COAP_OPT_BLOCK_SZX(option); in coap_get_block() 71 start = block->num << (block->szx + 4); in coap_write_block_opt() 78 want = 1 << (block->szx + 4); in coap_write_block_opt() 94 unsigned char szx; in coap_write_block_opt() local 102 szx = block->szx; in coap_write_block_opt() 103 block->szx = coap_fls(avail) - 5; in coap_write_block_opt() 105 block->num <<= szx - block->szx; in coap_write_block_opt() 112 block->szx)), in coap_write_block_opt()
|
D | net.c | 1188 offset = block.num << (block.szx + 4); in coap_wellknown_response() 1189 if (block.szx > 6) { /* invalid, MUST lead to 4.00 Bad Request */ in coap_wellknown_response() 1192 } else if (block.szx > COAP_MAX_BLOCK_SZX) { in coap_wellknown_response() 1193 block.szx = COAP_MAX_BLOCK_SZX; in coap_wellknown_response() 1194 block.num = offset >> (block.szx + 4); in coap_wellknown_response() 1224 block.szx = COAP_MAX_BLOCK_SZX; in coap_wellknown_response() 1225 while (payloadlen < SZX_TO_BYTES(block.szx)) { in coap_wellknown_response() 1226 if (block.szx == 0) { in coap_wellknown_response() 1230 block.szx--; in coap_wellknown_response() 1252 len = need_block2 ? SZX_TO_BYTES(block.szx) : resp->max_size - resp->length; in coap_wellknown_response()
|
/net-tools-3.7.0/libcoap/include/coap/ |
D | block.h | 36 unsigned int szx:3; /**< block size */ member 65 coap_more_blocks(size_t data_len, unsigned int num, unsigned short szx) { in coap_more_blocks() argument 66 return ((num+1) << (szx + 4)) < data_len; in coap_more_blocks()
|
/net-tools-3.7.0/libcoap/tests/ |
D | test_wellknown.c | 173 CU_ASSERT(1 << (block.szx + 4) in t_wellknown4() 185 coap_block_t inblock = { .num = 1, .m = 0, .szx = 1 }; in t_wellknown5() 192 inblock.szx)), buf)) { in t_wellknown5() 205 CU_ASSERT(1 << (block.szx + 4) in t_wellknown5() 214 coap_block_t block = { .num = 0, .szx = 6 }; in t_wellknown6() 229 ((block.num << 4) | block.szx)), buf)) { in t_wellknown6()
|
/net-tools-3.7.0/libcoap/examples/ |
D | client.c | 56 coap_block_t block = { .num = 0, .m = 0, .szx = 6 }; 171 coap_add_block(pdu, length, data, block.num, block.szx); in coap_new_request() 429 block.szx = COAP_OPT_BLOCK_SZX(block_opt); in message_handler() 433 block.szx, block.num); in message_handler() 435 if (payload.length <= (block.num+1) * (1 << (block.szx + 4))) { in message_handler() 467 block.m = ((block.num+1) * (1 << (block.szx + 4)) < payload.length); in message_handler() 473 (block.num << 4) | (block.m << 3) | block.szx), buf); in message_handler() 479 block.szx); in message_handler() 745 block.szx = (coap_fls(size >> 4) - 1) & 0x07; in cmdline_blocksize() 763 ((1u << (block.szx + 4)) < payload.length); in set_blocksize() [all …]
|
D | etsi_iot_01.c | 196 block.num, block.szx); in hnd_get_resource() 201 block.szx = 6; in hnd_get_resource() 206 block.num, block.szx); in hnd_get_resource()
|
/net-tools-3.7.0/ |
D | coap-client.c | 150 .szx = 6 1198 block.num, block.szx); in coap_new_request() 1393 block.szx = COAP_OPT_BLOCK_SZX(block_opt); in coap_message_handler() 1398 block.szx, block.num); in coap_message_handler() 1401 (1 << (block.szx + 4))) { in coap_message_handler() 1416 (1 << (block.szx + 4)) < in coap_message_handler() 1425 block.szx), buf); in coap_message_handler() 1431 block.szx); in coap_message_handler() 1496 ((1u << (block.szx + 4)) < payload.length); in set_blocksize() 1499 (block.num << 4 | block.m << 3 | block.szx)); in set_blocksize()
|