• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2020 HiSilicon (Shanghai) Technologies CO., LIMITED.
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 
16 #ifndef __HI_WIFI_NAN_API_H__
17 #define __HI_WIFI_NAN_API_H__
18 
19 #ifdef __cplusplus
20 #if __cplusplus
21 extern "C" {
22 #endif
23 #endif
24 
25 typedef enum {
26     WIFI_SDP_PUBLISH            = 0x01,
27     WIFI_SDP_SUBSCRIBE          = 0x02,
28     WIFI_SDP_BUTT
29 }wifi_sdp_type_enum;
30 
31 typedef enum {
32     WIFI_SDP_SYNC_MODE_PRIVATE,
33     WIFI_SDP_SYNC_MODE_STANDARD,
34     WIFI_SDP_SYNC_MODE_BOTH,
35     WIFI_SDP_SYNC_MODE_BUTT
36 }wifi_sdp_sync_enum;
37 
38 typedef int (*hi_wifi_sdp_recv_cb)(unsigned char* mac, unsigned char peer_handle, unsigned char local_handle,
39     unsigned char* msg, unsigned char len);
40 int hi_wifi_sdp_init(const char* ifname);
41 int hi_wifi_sdp_deinit(void);
42 int hi_wifi_sdp_start_service(const char* service_name, unsigned char local_handle,
43     hi_wifi_sdp_recv_cb recv_cb, unsigned char role);
44 int hi_wifi_sdp_stop_service(unsigned char local_handle, unsigned char role);
45 int hi_wifi_sdp_send(unsigned char* mac_addr, unsigned char peer_handle, unsigned char local_handle,
46     unsigned char* msg, int len);
47 int hi_wifi_sdp_adjust_tx_power(const char *ifname, signed char power);
48 int hi_wifi_sdp_restore_tx_power(const char *ifname);
49 int hi_wifi_sdp_adjust_rx_param(const char *ifname, signed char rssi);
50 int hi_wifi_sdp_restore_rx_param(const char *ifname);
51 int hi_wifi_sdp_beacon_switch(const char *ifname, unsigned char enable);
52 int hi_wifi_sdp_set_retry_times(hi_u32 retries);
53 int hi_wifi_sdp_get_sync_mode(void);
54 #ifdef __cplusplus
55 #if __cplusplus
56     }
57 #endif
58 #endif
59 
60 #endif /* end __HI_WIFI_VLWIP_API_H__ */
61 
62