Lines Matching refs:response
30 static int recv_response(struct coap_client *client, struct coap_packet *response, bool *truncated);
31 static int handle_response(struct coap_client *client, const struct coap_packet *response,
607 struct coap_packet response; in handle_poll() local
610 ret = recv_response(client, &response, &response_truncated); in handle_poll()
621 ret = handle_response(client, &response, response_truncated); in handle_poll()
645 static int recv_response(struct coap_client *client, struct coap_packet *response, bool *truncated) in recv_response() argument
673 ret = coap_packet_parse(response, client->recv_buf, available_len, NULL, 0); in recv_response()
764 static bool find_echo_option(const struct coap_packet *response, struct coap_option *option) in find_echo_option() argument
766 return coap_find_options(response, COAP_OPTION_ECHO, option, 1); in find_echo_option()
769 static int handle_response(struct coap_client *client, const struct coap_packet *response, in handle_response() argument
788 uint8_t response_type = coap_header_get_type(response); in handle_response()
789 uint8_t response_code = coap_header_get_code(response); in handle_response()
790 uint16_t response_id = coap_header_get_id(response); in handle_response()
791 const uint8_t *payload = coap_packet_get_payload(response, &payload_len); in handle_response()
818 internal_req = get_request_with_token(client, response); in handle_response()
821 (void) send_rst(client, response); /* Ignore errors, unrelated to our queries */ in handle_response()
826 if (find_echo_option(response, &client->echo_option)) { in handle_response()
877 ret = send_ack(client, response, COAP_CODE_EMPTY); in handle_response()
893 (void) send_rst(client, response); in handle_response()
905 block_option = coap_get_option_int(response, COAP_OPTION_BLOCK2); in handle_response()
918 ret = coap_update_from_block(response, &internal_req->recv_blk_ctx); in handle_response()
922 coap_next_block(response, &internal_req->recv_blk_ctx); in handle_response()