WS63 SDK 文档 7021f4f@fbb_ws63
ws63 和 ws63e 解决方案的 SDK 文档
载入中...
搜索中...
未找到
soc_wifi_p2p_api.h
浏览该文件的文档.
1
15#ifndef EXT_WIFI_P2P_API_H
16#define EXT_WIFI_P2P_API_H
17
18#ifdef __cplusplus
19#if __cplusplus
20extern "C" {
21#endif
22#endif
23
29#define WPS_DEV_NAME_MAX_LEN 32
30
36#define WPS_SERIAL_NUMBER_MAX_LEN 32
37
43#define WPS_MANUFACTURER_MAX_LEN 64
44
50#define WPS_MODEL_NAME_MAX_LEN 32
51
57#define WPS_MODEL_NUMBER_MAX_LEN 32
58
64#define WPS_MODE_MAX_LEN 15
65
71#define WPS_STATE_MAX_LEN 19
72
78#define WPS_IP_MAX_LEN 15
79
85#define WPS_PINCODE_MAX_LEN 9
86
92#define P2P_INVALID_VAL (-1)
93
99#define P2P_MAC_LEN 6
100
106#define P2P_MAX_SSID_LEN 32
107
113#define WIFI_DEFAULT_P2P_MAX_NUM_CLIENT 4
114
120#define WPS_DEV_TYPE_LEN 8
121
127#define MAX_METHOND_CONFIG_LEN 44
128
134#define PSK_LEN 32
135
141#define MAX_CLINET_SAVE_ADDR_LEN 48
142
148#define PREFIX_NAME_LEN 32
149
155#define P2P_MAX_PERSISTENT_CNT 10
156
162#define P2P_SCAN_DEVICE_LIMIT 32
163
174
186
198
205typedef struct {
206 unsigned char device_addr[P2P_MAC_LEN];
207 char device_name[WPS_DEV_NAME_MAX_LEN + 1];
208 unsigned short config_methods;
209 unsigned char group_capab;
213
220typedef struct {
221 char device_name[WPS_DEV_NAME_MAX_LEN + 1];
222 char manufacturer[WPS_MANUFACTURER_MAX_LEN + 1];
223 char serial_number[WPS_SERIAL_NUMBER_MAX_LEN + 1];
224 char model_name[WPS_MODEL_NAME_MAX_LEN + 1];
225 char model_number[WPS_MODEL_NUMBER_MAX_LEN + 1];
231
245
252typedef struct {
253 char wpa_p2p_dhcps_ip[WPS_IP_MAX_LEN + 1];
254 char wpa_p2p_dhcps_netmask[WPS_IP_MAX_LEN + 1];
255 char wpa_p2p_dhcps_gateway[WPS_IP_MAX_LEN + 1];
257
264typedef struct {
265 unsigned char mac[P2P_MAC_LEN];
266 unsigned char dev_addr[P2P_MAC_LEN];
267 char device_name[WPS_DEV_NAME_MAX_LEN + 1];
269
289
296typedef struct {
297 unsigned char peer_addr[P2P_MAC_LEN];
304
310typedef struct {
312 unsigned char ssid[EXT_WIFI_MAX_SSID_LEN + 1];
314 unsigned int ssid_len;
316 unsigned int bssid_set;
318 unsigned char bssid[EXT_WIFI_MAC_LEN];
322 unsigned char go_p2p_dev_addr[EXT_WIFI_MAC_LEN];
324 unsigned char psk[PSK_LEN];
330 unsigned char p2p_client_list[MAX_CLINET_SAVE_ADDR_LEN];
332 unsigned int num_p2p_clients;
338
344typedef struct {
345 char device_name[WPS_DEV_NAME_MAX_LEN + 1];
346 char manufacturer[WPS_MANUFACTURER_MAX_LEN + 1];
347 char serial_number[WPS_SERIAL_NUMBER_MAX_LEN + 1];
348 char model_name[WPS_MODEL_NAME_MAX_LEN + 1];
349 char model_number[WPS_MODEL_NUMBER_MAX_LEN + 1];
351
361
367typedef struct {
369 unsigned char network_name[EXT_WIFI_MAX_SSID_LEN + 1];
370 unsigned char go_bssid[EXT_WIFI_MAC_LEN];
373
400int uapi_wifi_p2p_start(char *ifname, int *len);
401
420
440
465int uapi_wifi_p2p_listen(int period, int interval);
466
485
503int uapi_wifi_p2p_log_level(char *log_level);
504
524
542int uapi_wifi_p2p_reject(const unsigned char *peer_addr, unsigned char addr_len);
543
567int uapi_wifi_p2p_invite(int persistent_id, const unsigned char *peer_addr, unsigned char addr_len);
568
594int uapi_wifi_p2p_peers(ext_wifi_p2p_peer_info *p2pList, unsigned int *peer_num);
595
614
642int uapi_wifi_p2p_get_connected_client(ext_wifi_p2p_client_info *client_list, unsigned int *client_num);
643
662int uapi_wifi_p2p_remove_client(const unsigned char *peer_dev_addr, unsigned char addr_len);
663
683
701
720
739
759
780
800
825
846
864
883
901#ifdef __cplusplus
902#if __cplusplus
903 }
904#endif
905#endif
906
907#endif /* end of soc_wifi_p2p_api.h */
908
#define P2P_MAC_LEN
Definition soc_wifi_p2p_api.h:99
#define P2P_MAX_SSID_LEN
Definition soc_wifi_p2p_api.h:106
#define PSK_LEN
Definition soc_wifi_p2p_api.h:134
#define EXT_WIFI_MAC_LEN
Definition soc_wifi_api.h:195
#define P2P_MAX_PERSISTENT_CNT
Definition soc_wifi_p2p_api.h:155
#define EXT_WIFI_MAX_SSID_LEN
Definition soc_wifi_api.h:188
#define MAX_CLINET_SAVE_ADDR_LEN
Definition soc_wifi_p2p_api.h:141
#define WPS_SERIAL_NUMBER_MAX_LEN
Definition soc_wifi_p2p_api.h:36
int uapi_wifi_p2p_cancel(void)
Cancel an ongoing P2P group formation and joining-a-group related operation. CNcomment:取消正在进行的P2P群组组建...
ext_wifi_p2p_peer_connect_choose uapi_wifi_get_peer_connect_choose(void)
Get the status that P2P automatically accepts connections or manually receives connections....
int uapi_wifi_p2p_get_user_config(ext_wifi_p2p_user_conf *GetConfig)
Get p2p configuration.CNcomment:获取p2p的参数。CNend
int uapi_wifi_p2p_log_level(char *log_level)
Set p2p log level.CNcomment:设置P2P的日志级别。CNend
int uapi_wifi_set_peer_connect_choose(ext_wifi_p2p_peer_connect_choose flag)
Set the status that P2P automatically accepts connections or manually receives connections....
int uapi_wifi_p2p_stop_find(void)
Stop p2p find.CNcomment:停止p2p查找。CNend
int uapi_wifi_p2p_connect(ext_wifi_p2p_connect con)
Connect to specific p2p device.CNcomment:连接指定的p2p设备。CNend
int uapi_wifi_p2p_get_connected_client(ext_wifi_p2p_client_info *client_list, unsigned int *client_num)
Get all client's information of p2p go.CNcomment:p2p go获取已连接的client的信息.CNend
#define WPS_MODEL_NAME_MAX_LEN
Definition soc_wifi_p2p_api.h:50
int uapi_wifi_p2p_start(char *ifname, int *len)
Start Start wifi p2p.CNcomment:开启P2P.CNend
ext_wifi_p2p_peer_connect_choose
Definition soc_wifi_p2p_api.h:169
int uapi_wifi_p2p_get_persistent_conf(p2p_user_persistent *conf)
Get the configuration information of P2P persistent network.CNcomment:获取p2p永久网络配置信息。CNend
#define WPS_MODEL_NUMBER_MAX_LEN
Definition soc_wifi_p2p_api.h:57
int uapi_wifi_p2p_listen(int period, int interval)
Start p2p listen.CNcomment:开始p2p监听。CNend
#define WPS_PINCODE_MAX_LEN
Definition soc_wifi_p2p_api.h:85
int uapi_wifi_p2p_stop(void)
Close wifi p2p.CNcomment:关闭P2P.CNend
#define WPS_IP_MAX_LEN
Definition soc_wifi_p2p_api.h:78
int uapi_wifi_p2p_set_persistent_conf(p2p_user_persistent conf)
Get the configuration information of P2P persistent network.CNcomment:设置p2p永久网络配置信息。CNend
wifi_mode
Definition soc_wifi_p2p_api.h:275
ext_wifi_p2p_state
Definition soc_wifi_p2p_api.h:192
int uapi_wifi_p2p_user_accept(ext_wifi_p2p_connect con, int assoc)
user accept p2p .CNcomment:p2p是否接受连接。CNend
int uapi_wifi_p2p_peers(ext_wifi_p2p_peer_info *p2pList, unsigned int *peer_num)
show information of peer.CNcomment:显示对端信息.CNend
int uapi_wifi_p2p_remove_client(const unsigned char *peer_dev_addr, unsigned char addr_len)
go deauth user by peer device address.CNcomment:go指定断开连接的client网络.CNend
int uapi_wifi_p2p_reject(const unsigned char *peer_addr, unsigned char addr_len)
reject to specific p2p device.CNcomment:拒绝指定的p2p设备。CNend
#define WPS_MANUFACTURER_MAX_LEN
Definition soc_wifi_p2p_api.h:43
int uapi_wifi_p2p_remove_group(void)
disconncet for p2p network.CNcomment:断开p2p连接。CNend
int uapi_wifi_p2p_find(int sec)
Start p2p scan.CNcomment:开始p2p查找 。CNend
int uapi_wifi_p2p_status(ext_wifi_p2p_status_info *status)
Show connect status of p2p.CNcomment:显示p2p的连接状态信息。CNend
int uapi_wifi_p2p_user_config(ext_wifi_p2p_user_conf updateConfig)
Update p2p configuration.CNcomment:p2p可修改的参数。CNend
int uapi_wifi_p2p_del_persistent_info(int id)
Get the configuration information of P2P persistent network.CNcomment: 删除永久网络信息。CNend
int uapi_wifi_p2p_wps_pbc(void)
Starting WPS PBC.CNcomment: 启动wps pbc。CNend
int uapi_wifi_p2p_invite(int persistent_id, const unsigned char *peer_addr, unsigned char addr_len)
1.Enabling a fixed p2p device network.CNcomment:启用永久网络。CNend 2.Invite other devices to join the group...
#define WPS_DEV_NAME_MAX_LEN
Definition soc_wifi_p2p_api.h:29
int uapi_wifi_p2p_get_persistent_info(ext_p2p_persistent_group *info, int *info_num)
Get the nformation of P2P persistent network.CNcomment:获取永久网络信息给用户。CNend
ext_wifi_p2p_mode
Definition soc_wifi_p2p_api.h:180
@ EXT_WIFI_P2P_PEER_CONNECT_MANUAL
Definition soc_wifi_p2p_api.h:171
@ EXT_WIFI_P2P_PEER_CONNECT_AUTO
Definition soc_wifi_p2p_api.h:170
@ EXT_WIFI_P2P_PEER_CONNECT_BUTT
Definition soc_wifi_p2p_api.h:172
@ WIFI_MODE_AP
Definition soc_wifi_p2p_api.h:281
@ WIFI_MODE_IBSS
Definition soc_wifi_p2p_api.h:279
@ WIFI_MODE_P2P_GO
Definition soc_wifi_p2p_api.h:283
@ WIFI_MODE_P2P_GROUP_FORMATION
Definition soc_wifi_p2p_api.h:285
@ WIFI_MODE_INFRA
Definition soc_wifi_p2p_api.h:277
@ WIFI_MODE_MESH
Definition soc_wifi_p2p_api.h:287
@ EXT_WIFI_P2P_CONNECTING
Definition soc_wifi_p2p_api.h:195
@ EXT_WIFI_P2P_DISCONNECTED
Definition soc_wifi_p2p_api.h:193
@ EXT_WIFI_P2P_CONNECTED
Definition soc_wifi_p2p_api.h:194
@ EXT_WIFI_P2P_CONN_STATUS_BUTT
Definition soc_wifi_p2p_api.h:196
@ EXT_WIFI_P2P_DEVICE_ONLY
Definition soc_wifi_p2p_api.h:183
@ EXT_WIFI_P2P_MODE_GO
Definition soc_wifi_p2p_api.h:182
@ EXT_WIFI_P2P_MODE_BUTT
Definition soc_wifi_p2p_api.h:184
@ EXT_WIFI_P2P_MODE_GC
Definition soc_wifi_p2p_api.h:181
Definition soc_wifi_p2p_api.h:367
char reserved
Definition soc_wifi_p2p_api.h:371
int network_id
Definition soc_wifi_p2p_api.h:368
Definition soc_wifi_p2p_api.h:264
Definition soc_wifi_p2p_api.h:296
int go_intent
Definition soc_wifi_p2p_api.h:301
int persistent
Definition soc_wifi_p2p_api.h:300
int wps_method
Definition soc_wifi_p2p_api.h:302
int join_group
Definition soc_wifi_p2p_api.h:299
Definition soc_wifi_p2p_api.h:252
Definition soc_wifi_p2p_api.h:205
unsigned short config_methods
Definition soc_wifi_p2p_api.h:208
int persistent_id
Definition soc_wifi_p2p_api.h:210
unsigned char group_capab
Definition soc_wifi_p2p_api.h:209
Definition soc_wifi_p2p_api.h:238
ext_wifi_p2p_state p2p_state
Definition soc_wifi_p2p_api.h:243
int op_freq
Definition soc_wifi_p2p_api.h:241
ext_wifi_p2p_mode mode
Definition soc_wifi_p2p_api.h:242
Definition soc_wifi_p2p_api.h:220
int wps_method
Definition soc_wifi_p2p_api.h:229
int listen_channel
Definition soc_wifi_p2p_api.h:228
int go_intent
Definition soc_wifi_p2p_api.h:226
int oper_channel
Definition soc_wifi_p2p_api.h:227
Definition soc_wifi_p2p_api.h:344
Definition soc_wifi_p2p_api.h:310
int wps_disabled
Definition soc_wifi_p2p_api.h:336
int p2p_persistent_group
Definition soc_wifi_p2p_api.h:334
unsigned int num_p2p_clients
Definition soc_wifi_p2p_api.h:332
int psk_set
Definition soc_wifi_p2p_api.h:326
int disabled
Definition soc_wifi_p2p_api.h:328
unsigned int ssid_len
Definition soc_wifi_p2p_api.h:314
unsigned int bssid_set
Definition soc_wifi_p2p_api.h:316
enum wifi_mode mode
Definition soc_wifi_p2p_api.h:320
Definition soc_wifi_p2p_api.h:357
p2p_persistent_config conf
Definition soc_wifi_p2p_api.h:358