Lines Matching refs:block_num

106 STATIC int build_msg_block_for_send(struct lwm2m_message *msg, uint16_t block_num,
283 STATIC int build_msg_block_for_send(struct lwm2m_message *msg, uint16_t block_num, in build_msg_block_for_send() argument
298 if (block_num * block_size_bytes >= complete_payload_len) { in build_msg_block_for_send()
302 if (block_num == 0) { in build_msg_block_for_send()
351 if (block_num == 0) { in build_msg_block_for_send()
368 msg->out.block_ctx->current = block_num * block_size_bytes; in build_msg_block_for_send()
382 payload_size = MIN(complete_payload_len - block_num * block_size_bytes, block_size_bytes); in build_msg_block_for_send()
384 complete_payload + (block_num * block_size_bytes), payload_size); in build_msg_block_for_send()
2077 int block_opt, block_num; in parse_write_op() local
2105 block_num = GET_BLOCK_NUM(block_opt); in parse_write_op()
2112 if (block_num == 0) { in parse_write_op()
2130 if (block_num < block_ctx->expected) { in parse_write_op()
2131 LOG_WRN("Block already handled %d, expected %d", block_num, in parse_write_op()
2142 if (block_num > block_ctx->expected) { in parse_write_op()
2143 LOG_WRN("Block out of order %d, expected %d", block_num, in parse_write_op()
2745 uint32_t block_num; in lwm2m_udp_receive() local
2803 r = coap_get_block1_option(&response, &more_blocks, &block_num); in lwm2m_udp_receive()
2823 if (last_block_num > block_num) { in lwm2m_udp_receive()
2826 } else if (last_block_num < block_num) { in lwm2m_udp_receive()
2831 r = build_msg_block_for_send(msg, block_num + 1, block_size); in lwm2m_udp_receive()
2846 LOG_DBG("Block # %d sent", block_num + 1); in lwm2m_udp_receive()