2 * Network Configuration Module
4 * Copyright (c) 2012 Samsung Electronics Co., Ltd. All rights reserved.
6 * Licensed under the Apache License, Version 2.0 (the "License");
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
10 * http://www.apache.org/licenses/LICENSE-2.0
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
21 * This file declares wifi direct wpasupplicant plugin functions and structures.
23 * @file wfd-plugin-wpasupplicant.h
24 * @author Gibyoung Kim (lastkgb.kim@samsung.com)
28 #ifndef __WFD_PLUGIN_WPASUPPLICANT_H__
29 #define __WFD_PLUGIN_WPASUPPLICANT_H__
32 #define MAC2STR(a) (a)[0], (a)[1], (a)[2], (a)[3], (a)[4], (a)[5]
33 #define MACSTR "%02x:%02x:%02x:%02x:%02x:%02x"
34 #define IP2STR(a) (a)[0], (a)[1], (a)[2], (a)[3]
35 #define IPSTR "%d.%d.%d.%d"
36 #define MAC2SECSTR(a) (a)[0], (a)[4], (a)[5]
37 #define MACSECSTR "%02x:%02x:%02x"
38 #define ISZEROMACADDR(a) !(a[0] | a[1] | a[2] | a[3] | a[4] | a[5])
39 #define IP2SECSTR(a) (a)[0], (a)[3]
40 #define IPSECSTR "%d..%d"
43 #define GLOBAL_INTF_PATH "/tmp/wpa_ctrl_global"
45 #if defined TIZEN_MOBILE
46 #define COMMON_IFACE_NAME "wlan0"
47 #define GROUP_IFACE_NAME "p2p-wlan0-0"
48 #define GROUP_IFACE_PREFIX "p2p-wlan0-"
51 #if defined TIZEN_WIFI_MODULE_BUNDLE
52 #define COMMON_IFACE_NAME "wlan0"
53 #define GROUP_IFACE_NAME "wlan0"
54 #define GROUP_IFACE_PREFIX "wlan"
57 #ifndef COMMON_IFACE_NAME
58 #define COMMON_IFACE_NAME "p2p0"
61 #ifndef GROUP_IFACE_NAME
62 #define GROUP_IFACE_NAME "p2p0"
65 #ifndef GROUP_IFACE_PREFIX
66 #define GROUP_IFACE_PREFIX "p2p"
69 #ifdef TIZEN_FEATURE_IP_OVER_EAPOL
70 #define DEFAULT_IP_GO "192.168.49.1"
71 #define DEFAULT_IP_MASK "255.255.255.0"
72 #define DEFAULT_IP_START "192.168.49.51"
73 #define DEFAULT_IP_END "192.168.49.100"
74 #endif /* TIZEN_FEATURE_IP_OVER_EAPOL */
76 #define WS_POLL_TIMEOUT 5000
77 #define WS_CONN_RETRY_COUNT 10
78 #define WS_PINSTR_LEN 8
79 #define WS_DEVTYPESTR_LEN 14
80 #define WS_REPLY_LEN 1024
81 #define WS_SSID_LEN 32
82 #define WS_MACSTR_LEN 18
83 #define WS_MACADDR_LEN 6
84 #define WS_NETFLAG_LEN 32
85 #define WS_MAX_PERSISTENT_COUNT 20
86 #define WS_SCAN_RETRY_COUNT 10
89 #ifdef TIZEN_FEATURE_SERVICE_DISCOVERY
91 #define SERV_DISC_REQ_ALL "02000001"
92 #define SERV_DISC_REQ_BONJOUR "02000101"
93 #define SERV_DISC_REQ_UPNP "02000201"
95 #define SAMSUNG_SERVICE_ALL "0c"
97 #define SERVICE_TYPE_LEN 8
98 #define SERV_BROADCAST_ADDRESS "00:00:00:00:00:00"
99 #endif /* TIZEN_FEATURE_SERVICE_DISCOVERY */
101 /* Config Method bitmap */
102 #define WS_CONFIG_METHOD_DISPLAY 0x0008
103 #define WS_CONFIG_METHOD_PUSHBUTTON 0x0080
104 #define WS_CONFIG_METHOD_KEYPAD 0x0100
106 /* wpa_supplicant command */
107 #define WS_CMD_INTERFACES "INTERFACES"
108 #define WS_CMD_INTERFACE_ADD "INTERFACE_ADD "
109 #define WS_CMD_INTERFACE_REMOVE "INTERFACE_REMOVE"
110 #define WS_CMD_ATTACH "ATTACH"
111 #define WS_CMD_DETACH "DETACH"
112 #define WS_CMD_P2P_FIND "P2P_FIND"
113 #define WS_CMD_P2P_LISTEN "P2P_LISTEN"
114 #define WS_CMD_P2P_STOP_FIND "P2P_STOP_FIND"
115 #define WS_CMD_P2P_FLUSH "P2P_FLUSH"
116 #define WS_CMD_P2P_CANCEL "P2P_CANCEL"
117 #define WS_CMD_P2P_PEER "P2P_PEER "
118 #define WS_CMD_P2P_PEER_FIRST "P2P_PEER FIRST"
119 #define WS_CMD_P2P_PEER_NEXT "P2P_PEER NEXT-"
120 #define WS_CMD_P2P_PROV_DISC "P2P_PROV_DISC "
121 #define WS_CMD_P2P_INVITE "P2P_INVITE "
122 #define WS_CMD_P2P_GROUP_ADD "P2P_GROUP_ADD"
123 #define WS_CMD_P2P_GROUP_REMOVE "P2P_GROUP_REMOVE "
124 #define WS_CMD_P2P_CONNECT "P2P_CONNECT "
125 #define WS_CMD_P2P_REJECT "P2P_REJECT_CONNECTION "
126 #define WS_CMD_WPS_PBC "WPS_PBC "
127 #define WS_CMD_WPS_PIN "WPS_PIN "
128 #define WS_CMD_WPS_ENROLLEE "WPS_ENROLLEE "
129 #define WS_CMD_WPS_CANCEL "WPS_CANCEL"
130 #define WS_CMD_SET "SET "
131 #define WS_CMD_GET "GET "
132 #define WS_CMD_P2P_SET "P2P_SET "
133 #define WS_CMD_STATUS "STATUS"
134 #define WS_CMD_STATUS_P2P "STATUS P2P"
135 #define WS_CMD_LOG_LEVEL "LOG_LEVEL"
136 #define WS_CMD_QUIT "QUIT"
137 #define WS_CMD_TERMINATE "TERMINATE"
138 #define WS_CMD_LIST_NETWORKS "LIST_NETWORKS"
139 #define WS_CMD_REMOVE_NETWORK "REMOVE_NETWORK"
141 #define WS_CMD_DISCONNECT "P2P_DISCONNECT "
143 #ifdef TIZEN_FEATURE_SERVICE_DISCOVERY
144 #define WS_CMD_SERVICE_ADD "P2P_SERVICE_ADD"
145 #define WS_CMD_SERVICE_DEL "P2P_SERVICE_DEL"
146 #define WS_CMD_SERV_DISC_REQ "P2P_SERV_DISC_REQ"
147 #define WS_CMD_SERV_DISC_CANCEL "P2P_SERV_DISC_CANCEL_REQ"
148 #endif /* TIZEN_FEATURE_SERVICE_DISCOVERY */
150 #define WS_CMD_SUBELEM_SET "WFD_SUBELEM_SET "
152 #define WS_STR_PBC " pbc"
153 #define WS_STR_DISPLAY " display"
154 #define WS_STR_KEYPAD " keypad"
155 #define WS_STR_JOIN " join"
156 #define WS_STR_AUTH " auth"
157 #define WS_STR_PERSISTENT " persistent"
158 #define WS_STR_PASSPHRASE " passphrase="
159 #define WS_STR_FREQ " freq="
160 #define WS_STR_FREQ_2G " freq=2"
162 #define WS_STR_ATTR_LISTEN_CLASS "p2p_listen_reg_class"
163 #define WS_STR_ATTR_OPER_CLASS "p2p_oper_reg_class"
165 #ifdef TIZEN_FEATURE_WIFI_DISPLAY
166 #define WS_WFD_INFO_PRIMARY_SINK 0x01
167 #define WS_WFD_INFO_SECONDARY_SINK 0x02
168 #define WS_WFD_INFO_AVAILABILITY 0x10
169 #define WS_WFD_INFO_WSD_SUPPORT 0x40
170 #define WS_WFD_INFO_TDLS_SUPPORT 0x80
171 #define WS_WFD_INFO_HDCP_SUPPORT 0x100
172 #define WS_WFD_INFO_SYNC_SUPPORT 0x200
173 #endif /* TIZEN_FEATURE_WIFI_DISPLAY */
182 WS_PRI_DEV_TYPE_NONE,
183 WS_PRI_DEV_TYPE_COMPUTER = 1,
184 WS_PRI_DEV_TYPE_INPUT_DEVICE = 2,
185 WS_PRI_DEV_TYPE_PRINTER = 3,
186 WS_PRI_DEV_TYPE_CAMERA = 4,
187 WS_PRI_DEV_TYPE_STORAGE = 5,
188 WS_PRI_DEV_TYPE_NETWORK_INFRA = 6,
189 WS_PRI_DEV_TYPE_DISPLAY = 7,
190 WS_PRI_DEV_TYPE_MULTIMEDIA_DEVICE = 8,
191 WS_PRI_DEV_TYPE_GAME_DEVICE = 9,
192 WS_PRI_DEV_TYPE_TELEPHONE = 10,
193 WS_PRI_DEV_TYPE_AUDIO = 11,
194 WS_PRI_DEV_TYPE_OTHER = 255,
200 WS_EVENT_DEVICE_FOUND,
201 WS_EVENT_DEVICE_LOST,
202 WS_EVENT_FIND_STOPED,
203 WS_EVENT_PROV_DISC_PBC_REQ,
204 WS_EVENT_PROV_DISC_SHOW_PIN,
205 WS_EVENT_PROV_DISC_ENTER_PIN, /* 5 */
206 WS_EVENT_PROV_DISC_PBC_RESP,
207 WS_EVENT_PROV_DISC_FAILURE,
209 WS_EVENT_GO_NEG_REQUEST,
210 WS_EVENT_GO_NEG_FAILURE,
211 WS_EVENT_GO_NEG_SUCCESS, /* 10*/
214 WS_EVENT_GROUP_FORMATION_FAILURE,
215 WS_EVENT_WPS_SUCCESS,
216 WS_EVENT_WPS_REG_SUCCESS,
217 WS_EVENT_GROUP_FORMATION_SUCCESS, /* 15*/
219 WS_EVENT_STA_CONNECTED,
221 WS_EVENT_INVITATION_RECEIVED,
222 WS_EVENT_INVITATION_RESULT,
224 WS_EVENT_STA_DISCONNECTED,
226 WS_EVENT_GROUP_STARTED, /* 20 */
227 WS_EVENT_GROUP_REMOVED,
229 WS_EVENT_TERMINATING,
231 #ifdef TIZEN_FEATURE_SERVICE_DISCOVERY
232 WS_EVENT_SERV_DISC_RESP,
233 #endif /* TIZEN_FEATURE_SERVICE_DISCOVERY */
239 WS_DEV_INFO_NONE = -1,
241 WS_DEV_INFO_P2P_DEV_ADDR, /* p2p_dev_addr= */
242 WS_DEV_INFO_DEV_NAME, /* name= */
243 WS_DEV_INFO_DEV_TYPE, /* pri_dev_type= */
244 WS_DEV_INFO_CONFIG_METHODS, /* config_methods= */
245 WS_DEV_INFO_DEV_CAP, /* dev_capab= */
246 WS_DEV_INFO_GROUP_CAP, /* group_capab= */
247 WS_DEV_INFO_P2P_GO_ADDR, /* p2p_go_addr= */
248 #ifdef TIZEN_FEATURE_WIFI_DISPLAY
249 WS_DEV_INFO_WFD_DEV_INFO, /* wfd_dev_info= */
255 WS_CONN_INFO_NONE = -1,
257 WS_CONN_INFO_DEV_PWD_ID, /* dev_passwd_id= */
258 WS_CONN_INFO_STATUS, /* status= */
259 WS_CONN_INFO_ERROR, /* config_error= */
265 WS_INVITE_INFO_NONE = -1,
267 WS_INVITE_INFO_SRC_ADDR, /* sa= */
268 WS_INVITE_INFO_GO_DEV_ADDR, /* go_dev_addr= */
269 WS_INVITE_INFO_BSSID, /* bssid= */
270 WS_INVITE_INFO_LISTEN, /* listen= */
271 WS_INVITE_INFO_FREQ, /* op_freq= */
272 WS_INVITE_INFO_PERSISTENT_ID, /* persistent_id= */
273 WS_INVITE_INFO_STATUS, /* status= */
275 WS_INVITE_INFO_LIMIT,
276 } ws_invite_info_id_e;
279 WS_GROUP_INFO_NONE = -1,
281 WS_GROUP_INFO_SSID, /* ssid= */
282 WS_GROUP_INFO_FREQ, /* freq= */
283 WS_GROUP_INFO_PASS, /* passphrase= */
284 WS_GROUP_INFO_GO_DEV_ADDR, /* go_dev_addr= */
285 WS_GROUP_INFO_STATUS, /* status= */
286 WS_GROUP_INFO_PERSISTENT, /* [PERSISTENT] */
287 #ifdef TIZEN_FEATURE_IP_OVER_EAPOL
288 WS_GROUP_INFO_IP_ADDR, /* ip_addr= */
289 WS_GROUP_INFO_IP_MASK, /* ip_mask= */
290 WS_GROUP_INFO_GO_IP_ADDR, /* go_ip_addr= */
291 #endif /* TIZEN_FEATURE_IP_OVER_EAPOL */
293 } ws_group_info_id_e;
296 WS_PEER_INFO_NONE = -1,
299 WS_PEER_INFO_LISTEN_FREQ,
301 WS_PEER_INFO_WPS_METHOD,
302 WS_PEER_INFO_INTERFACE_ADDR,
303 WS_PEER_INFO_MEMBER_IN_GO_DEV,
304 WS_PEER_INFO_MEMBER_IN_GO_IFACE,
305 WS_PEER_INFO_PRI_DEV_TYPE,
306 WS_PEER_INFO_DEVICE_NAME,
307 WS_PEER_INFO_MANUFACTURER,
308 WS_PEER_INFO_MODEL_NAME,
309 WS_PEER_INFO_MODEL_NUMBER,
310 WS_PEER_INFO_SERIAL_NUMBER,
311 WS_PEER_INFO_CONFIG_METHODS,
312 WS_PEER_INFO_DEV_CAPAB,
313 WS_PEER_INFO_GROUP_CAPAB,
314 WS_PEER_INFO_GO_NEG_REQ_SENT,
315 WS_PEER_INFO_GO_STATE,
316 WS_PEER_INFO_DIALOG_TOKEN,
317 WS_PEER_INFO_INTENDED_ADDR,
318 WS_PEER_INFO_COUNTRY,
319 WS_PEER_INFO_OPER_FREQ,
320 WS_PEER_INFO_REQ_CONFIG_METHODS,
323 WS_PEER_INFO_WAIT_COUNT,
324 WS_PEER_INFO_INVITATION_REQS,
325 #ifdef TIZEN_FEATURE_WIFI_DISPLAY
326 WS_PEER_INFO_WFD_SUBELEMS,
327 #endif /* TIZEN_FEATURE_WIFI_DISPLAY */
333 /* The Service Discovery field shall be set to 1
334 * if the P2P Device supports Service Discovery,
335 * and is set to 0 otherwise. */
336 WS_DEVICE_CAP_SERVICE_DISCOVERY = 0x01,
338 /* Within a P2P Group Info attribute and a (Re)association
339 * request frame the P2P Client Discoverability field shall be set to 1
340 * when the P2P Device supports P2P Client Discoverability,
341 * and is set to 0 otherwise.
342 * This field shall be reserved and set to 0 in all other frames or uses. */
343 WS_DEVICE_CAP_CLIENT_DISCOVERABILITY = 0x02,
345 /* The Concurrent Operation field shall be set to 1
346 * when the P2P Device supports Concurrent Operation with WLAN,
347 * and is set to 0 otherwise. */
348 WS_DEVICE_CAP_CONCURRENT_OPERATION = 0x04,
350 /* The P2P Infrastructure Managed field shall be set to 1
351 * when the P2P interface of the P2P Device is capable of being
352 * managed by the WLAN (infrastructure network) based on
353 * P2P Coexistence Parameters, and set to 0 otherwise. */
354 WS_DEVICE_CAP_INFRASTRUCTURE_MANAGED = 0x08,
356 /* The P2P Device Limit field shall be set to 1
357 * when the P2P Device is unable to participate in additional P2P Groups,
358 * and set to 0 otherwise. */
359 WS_DEVICE_CAP_DEVICE_LIMIT = 0x10,
361 /* The P2P Invitation Procedure field shall be set to 1
362 * if the P2P Device is capable of processing P2P Invitation Procedure
363 * signaling, and set to 0 otherwise. */
364 WS_DEVICE_CAP_INVITATION_PROCEDURE = 0x20,
365 } ws_device_cap_flag_e;
368 /* The P2P Group Owner field shall be set to 1
369 * when the P2P Device is operating as a Group Owner,
370 * and set to 0 otherwise. */
371 WS_GROUP_CAP_GROUP_OWNER = 0x01,
373 /* The Persistent P2P Group field shall be set to 1
374 * when the P2P Device is hosting, or intends to host,
375 * a persistent P2P Group, and set to 0 otherwise. */
376 WS_GROUP_CAP_PERSISTENT_GROUP = 0x02,
378 /* The P2P Group Limit field shall be set to 1
379 * when the P2P Group Owner is unable to add additional Clients
380 * to its P2P Group, and set to 0 otherwise. */
381 WS_GROUP_CAP_GROUP_LIMIT = 0x04,
383 /* The Intra-BSS Distribution field shall be set to 1
384 * if the P2P Device is hosting, or intends to host,
385 * a P2P Group that provides a data distribution service
386 * between Clients in the P2P Group.
387 * The Intra-BSS Distribution field shall be set to 0,
388 * if the P2P Device is not a P2P Group Owner,
389 * or is not providing such a data distribution service. */
390 WS_GROUP_CAP_INTRA_BSS_DISTRIB = 0x08,
392 /* The Cross Connection field shall be set to 1
393 * if the P2P Device is hosting, or intends to host,
394 * a P2P Group that provides cross connection
395 * between the P2P Group and a WLAN.
396 * The Cross Connection field shall be set to 0
397 * if the P2P Device is not a P2P Group Owner,
398 * or is not providing a cross connection service. */
399 WS_GROUP_CAP_CROSS_CONNECTION = 0x10,
401 /* The Persistent Reconnect field shall be set to 1
402 * when the P2P Device is hosting, or intends to host,
403 * a persistent P2P Group that allows reconnection
404 * without user intervention, and set to 0 otherwise. */
405 WS_GROUP_CAP_PERSISTENT_RECONN = 0x20,
407 /* The Group Formation field shall be set to 1
408 * when the P2P Device is operating as a Group Owner
409 * in the Provisioning phase of Group Formation,
410 * and set to 0 otherwise. */
411 WS_GROUP_CAP_GROUP_FORMATION = 0x40,
412 } ws_group_cap_flag_e;
415 /* If the Device Password ID is Default, the Enrollee should use
416 * its PIN password (from the label or display). This password may
417 * correspond to the label, display, or a user-defined password
418 * that has been configured to replace the original device password. */
419 WS_DEV_PASSWD_ID_DEFAULT = 0x0000,
421 /* User-specified indicates that the user has overridden the password
422 * with a manually selected value. */
423 WS_DEV_PASSWD_ID_USER_SPECIFIED = 0x0001,
425 /* Machine-specified indicates that the original PIN password has been
426 * overridden by a strong, machine-generated device password value. */
427 WS_DEV_PASSWD_ID_MACHINE_SPECIFIED = 0x0002,
429 /* The Rekey value indicates that the device's 256-bit rekeying
430 * password will be used. */
431 WS_DEV_PASSWD_ID_REKEY = 0x0003,
433 /* The PushButton value indicates that the PIN is the all-zero value
434 * reserved for the Push Button Configuration method. */
435 WS_DEV_PASSWD_ID_PUSH_BUTTON = 0x0004,
437 /* The Registrar-specified value indicates a PIN that has been
438 * obtained from the Registrar (via a display or other out-of-band
439 * method). This value may be further augmented with the optional
440 * "Identity" attribute in M1. */
441 WS_DEV_PASSWD_ID_REGISTRAR_SPECIFIED = 0x0005, /* ENTER-PIN */
442 } ws_dev_passwd_id_e;
447 WPS_ERROR_OOBINFO_READ_FAIL,
448 WPS_ERROR_DECRYPTION_FAIL,
449 WPS_ERROR_2G_NOT_SUPPORTED,
450 WPS_ERROR_5G_NOT_SUPPORTED,
451 WPS_ERROR_WEAK_SIGNAL,
452 WPS_ERROR_NET_AUTH_FAIL,
453 WPS_ERROR_NET_ASSOC_FAIL,
454 WPS_ERROR_NO_DHCP_RESPONSE,
455 WPS_ERROR_DHCP_CONFIG_FAIL,
456 WPS_ERROR_IP_CONFLICT,
458 WPS_ERROR_REGISTRAT_CONN_FAIL,
459 WPS_ERROR_PBC_SESSION_OVERLAP,
460 WPS_ERROR_ROGUE_ACTIVITY,
461 WPS_ERROR_DEVICE_BUSY,
462 WPS_ERROR_SETUP_LOCKED,
463 WPS_ERROR_MESSAGE_TIMEOUT,
464 WPS_ERROR_SESSION_TIMEOUT,
465 WPS_ERROR_PASSWORD_MISMATCH,
468 #ifdef TIZEN_FEATURE_WIFI_DISPLAY
470 WFD_SUBELM_ID_DEV_INFO,
471 WFD_SUBELM_ID_ASSOC_BSSID,
472 WFD_SUBELM_ID_AUDIO_FORMAT,
473 WFD_SUBELM_ID_VIDEO_FORMAT,
474 WFD_SUBELM_ID_3D_FORMAT,
475 WFD_SUBELM_ID_CONTENT_PROTECTION,
477 WFD_SUBELM_ID_CUPLED_SYNC_INFO,
478 WFD_SUBELM_ID_EXT_CAPAB,
479 WFD_SUBELM_ID_LOCAL_IP,
480 WFD_SUBELM_ID_SESSION_INFO,
481 WFD_SUBELM_ID_ALT_MAC,
482 } ws_wfd_subelm_id_e;
483 #define WFD_SUBELEM_LEN_DEV_INFO 6
484 #define WFD_SUBELM_LEN_ASSOC_BSSID 6
485 #define WFD_SUBELM_LEN_CUPLED_SYNC_INFO 7
486 #endif /* TIZEN_FEATURE_WIFI_DISPLAY */
494 WFD_OEM_NETFLAG_CURRENT,
495 WFD_OEM_NETFLAG_DISABLED,
496 WFD_OEM_NETFLAG_TEMP_DISABLED,
497 WFD_OEM_NETFLAG_P2P_PERSISTENT,
502 char ssid[OEM_DEV_NAME_LEN+1];
503 unsigned char bssid[OEM_MACADDR_LEN];
517 int initialized; /* check whether plugin is initialized or not. block init function if initialized */
521 ws_sock_data_s *common;
522 ws_sock_data_s *group;
523 unsigned char local_dev_addr[WS_MACADDR_LEN];
524 wfd_oem_event_cb callback;
528 int ws_init(wfd_oem_event_cb callback, void *user_data);
530 int ws_activate(int concurrent);
531 int ws_deactivate(int concurrent);
532 int ws_start_scan(wfd_oem_scan_param_s *param);
533 int ws_restart_scan(int freq);
535 int ws_get_visibility(int *visibility);
536 int ws_set_visibility(int visibility);
537 int ws_get_scan_result(GList **peers, int *peer_count);
538 int ws_get_peer_info(unsigned char *peer_addr, wfd_oem_device_s **peer);
539 int ws_prov_disc_req(unsigned char *peer_addr, wfd_oem_wps_mode_e wps_mode, int join);
540 int ws_connect(unsigned char *peer_addr, wfd_oem_conn_param_s *param);
541 int ws_disconnect(unsigned char *peer_addr);
542 int ws_reject_connection(unsigned char *peer_addr);
543 int ws_cancel_connection(unsigned char *peer_addr);
544 int ws_get_connected_peers(GList **peers, int *peer_count);
545 int ws_get_pin(char *pin);
546 int ws_set_pin(char *pin);
547 int ws_generate_pin(char **pin);
548 int ws_get_supported_wps_mode();
549 int ws_create_group(wfd_oem_group_param_s *param);
550 int ws_destroy_group(const char *ifname);
551 int ws_invite(unsigned char *peer_addr, wfd_oem_invite_param_s *param);
552 int ws_wps_start(unsigned char *peer_addr, int wps_mode, const char *pin);
553 int ws_enrollee_start(unsigned char *peer_addr, int wps_mode, const char *pin);
555 int ws_get_dev_name(char *dev_name);
556 int ws_set_dev_name(char *dev_name);
557 int ws_get_dev_mac(char *dev_mac);
558 int ws_get_dev_type(int *pri_dev_type, int *sec_dev_type);
559 int ws_set_dev_type(int pri_dev_type, int sec_dev_type);
560 int ws_get_go_intent(int *go_intent);
561 int ws_set_go_intent(int go_intent);
562 int ws_set_country(char *ccode);
564 int ws_get_persistent_groups(wfd_oem_persistent_group_s **groups, int *group_count);
565 int ws_remove_persistent_group(char *ssid, unsigned char *bssid);
566 int ws_set_persistent_reconnect(unsigned char *bssid, int reconnect);
568 #ifdef TIZEN_FEATURE_SERVICE_DISCOVERY
569 int ws_start_service_discovery(unsigned char *mac_addr, int service_type);
570 int ws_cancel_service_discovery(unsigned char *mac_addr, int service_type);
572 int ws_serv_add(wfd_oem_new_service_s *service);
573 int ws_serv_del(wfd_oem_new_service_s *service);
574 #endif /* TIZEN_FEATURE_SERVICE_DISCOVERY */
576 #ifdef TIZEN_FEATURE_WIFI_DISPLAY
577 int ws_miracast_init(int enable);
578 int ws_set_display(wfd_oem_display_s *wifi_display);
579 #endif /* TIZEN_FEATURE_WIFI_DISPLAY */
582 int ws_save_config(void);
583 int ws_set_operating_channel(int channel);
584 int ws_remove_all_network(void);
585 int ws_get_wpa_status(int *wpa_status);
587 #if defined(TIZEN_FEATURE_ASP)
588 int ws_advertise_service(wfd_oem_asp_service_s *service, int replace);
589 int ws_cancel_advertise_service(wfd_oem_asp_service_s *service);
590 int ws_seek_service(wfd_oem_asp_service_s *service);
591 int ws_cancel_seek_service(wfd_oem_asp_service_s *service);
592 int ws_asp_prov_disc_req(wfd_oem_asp_prov_s *asp_params);
593 #endif /* TIZEN_FEATURE_ASP */
594 #endif /* __WFD_PLUGIN_WPASUPPLICANT_H__ */