• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright (C) 2022 Beken Corporation
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 //     http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14 
15 #pragma once
16 
17 #include <components/netif.h>
18 
19 // TODO
20 // Wrappers to hide internal details of WiFi stack, such as WiFi Driver etc.
21 // We should finally remove this wrapper and use the event instead.
22 
23 int wifi_netif_mac_to_vifid(uint8_t *mac);
24 void* wifi_netif_vifid_to_vif(int vifid);
25 void* wifi_netif_mac_to_vif(uint8_t *mac);
26 netif_if_t wifi_netif_vif_to_netif_type(void *vif);
27 netif_if_t wifi_netif_mac_to_netif_type(uint8_t *mac);
28 void wifi_netif_set_vif_private_data(void *vif, void *data);
29 void* wifi_netif_get_vif_private_data(void *vif);
30 void wifi_netif_notify_sta_got_ip(void);
31 void wifi_netif_notify_sta_dhcp_timeout(void);
32 void wifi_netif_call_status_cb_when_sta_got_ip(void);
33 void wifi_netif_call_status_cb_when_sta_dhcp_timeout(void);
34 bool wifi_netif_sta_is_connected(void);
35 bool wifi_netif_sta_is_got_ip(void);
36 void wifi_netif_notify_sta_disconnect(void);
37 
38 uint8_t* wifi_netif_vif_to_mac(void *vif);
39 int wifi_netif_vif_to_vifid(void *vif);
40