Home
last modified time | relevance | path

Searched refs:block_opt (Results 1 – 3 of 3) sorted by relevance

/third_party/libcoap/include/coap3/
Dcoap_block.h98 unsigned int coap_opt_block_num(const coap_opt_t *block_opt);
112 coap_opt_block_set_m(coap_opt_t *block_opt, int m) {
114 *(coap_opt_value(block_opt) + (coap_opt_length(block_opt) - 1)) |= 0x08;
116 *(coap_opt_value(block_opt) + (coap_opt_length(block_opt) - 1)) &= ~0x08;
/third_party/libcoap/src/
Dcoap_block.c39 coap_opt_block_num(const coap_opt_t *block_opt) { in coap_opt_block_num() argument
43 len = coap_opt_length(block_opt); in coap_opt_block_num()
50 num = coap_decode_var_bytes(coap_opt_value(block_opt), in coap_opt_block_num()
51 coap_opt_length(block_opt) - 1); in coap_opt_block_num()
54 return (num << 4) | ((COAP_OPT_BLOCK_END_BYTE(block_opt) & 0xF0) >> 4); in coap_opt_block_num()
1034 uint16_t block_opt = (session->block_mode & COAP_BLOCK_HAS_Q_BLOCK) ? in coap_add_data_large_response() local
1037 uint16_t block_opt = COAP_OPTION_BLOCK2; in coap_add_data_large_response() local
1068 block_opt = COAP_OPTION_Q_BLOCK2; in coap_add_data_large_response()
1090 res = coap_write_block_b_opt(session, &block, block_opt, response, in coap_add_data_large_response()
2221 uint16_t block_opt = 0; in coap_handle_request_send_block() local
[all …]
/third_party/libcoap/examples/
Dcoap-client.c385 coap_opt_t *block_opt; in message_handler() local
436 block_opt = coap_check_option(received, COAP_OPTION_BLOCK2, &opt_iter); in message_handler()
437 if (!single_block_requested && block_opt) { /* handle Block2 */ in message_handler()
440 if (coap_opt_block_num(block_opt) == 0) { in message_handler()
445 if (COAP_OPT_BLOCK_MORE(block_opt)) { in message_handler()