1 /***************************************************************************/ /**
2  * @file
3  * @brief
4  *******************************************************************************
5  * # License
6  * <b>Copyright 2019 Silicon Laboratories Inc. www.silabs.com</b>
7  *******************************************************************************
8  *
9  * SPDX-License-Identifier: Zlib
10  *
11  * The licensor of this software is Silicon Laboratories Inc.
12  *
13  * This software is provided 'as-is', without any express or implied
14  * warranty. In no event will the authors be held liable for any damages
15  * arising from the use of this software.
16  *
17  * Permission is granted to anyone to use this software for any purpose,
18  * including commercial applications, and to alter it and redistribute it
19  * freely, subject to the following restrictions:
20  *
21  * 1. The origin of this software must not be misrepresented; you must not
22  *    claim that you wrote the original software. If you use this software
23  *    in a product, an acknowledgment in the product documentation would be
24  *    appreciated but is not required.
25  * 2. Altered source versions must be plainly marked as such, and must not be
26  *    misrepresented as being the original software.
27  * 3. This notice may not be removed or altered from any source distribution.
28  *
29  ******************************************************************************/
30 #pragma once
31 
32 #include <stdint.h>
33 #include <string.h>
34 #include <stdbool.h>
35 #include "sl_status.h"
36 #include "sl_si91x_host_interface.h"
37 #include "sl_si91x_protocol_types.h"
38 #include "sl_net_constants.h"
39 #include "sl_net_ip_types.h"
40 #ifdef SLI_SI91X_INTERNAL_HTTP_CLIENT
41 #include "sl_http_client.h"
42 #endif
43 
44 sl_status_t convert_rsi_ipv4_address_to_sl_ip_address(sl_ip_address_t *ip_address_buffer,
45                                                       const sl_si91x_rsp_ipv4_params_t *ip_params);
46 sl_status_t convert_si91x_dns_response(sl_ip_address_t *ip_address, const sl_si91x_dns_response_t *si91x_dns_response);
47 sl_status_t convert_si91x_event_to_sl_net_event(const uint16_t *event, sl_net_event_t *sl_net_event);
48 #ifdef SLI_SI91X_INTERNAL_HTTP_CLIENT
49 void convert_itoa(uint32_t val, uint8_t *str);
50 sl_status_t convert_si91x_event_to_sl_http_client_event(const uint16_t *event,
51                                                         sl_http_client_event_t *sl_http_client_event);
52 #endif
53 sl_status_t sli_si91x_configure_ip_address(sl_net_ip_configuration_t *address,
54                                            uint8_t virtual_ap_id,
55                                            const uint32_t timeout);
56