Lines Matching refs:block
1154 coap_block_t block; in coap_wellknown_response() local
1186 if (coap_get_block(request, COAP_OPTION_BLOCK2, &block)) { in coap_wellknown_response()
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()
1222 block.num = 0; in coap_wellknown_response()
1223 block.m = 0; /* the M bit is set by coap_write_block_opt() */ 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()
1239 if (coap_write_block_opt(&block, COAP_OPTION_BLOCK2, resp, wkc_len) < 0) { in coap_wellknown_response()
1252 len = need_block2 ? SZX_TO_BYTES(block.szx) : resp->max_size - resp->length; in coap_wellknown_response()