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_P2P_REMOVE_CLIENT "P2P_REMOVE_CLIENT "
127 #define WS_CMD_WPS_PBC "WPS_PBC "
128 #define WS_CMD_WPS_PIN "WPS_PIN "
129 #define WS_CMD_WPS_ENROLLEE "WPS_ENROLLEE "
130 #define WS_CMD_WPS_CANCEL "WPS_CANCEL"
131 #define WS_CMD_SET "SET "
132 #define WS_CMD_GET "GET "
133 #define WS_CMD_P2P_SET "P2P_SET "
134 #define WS_CMD_STATUS "STATUS"
135 #define WS_CMD_STATUS_P2P "STATUS P2P"
136 #define WS_CMD_LOG_LEVEL "LOG_LEVEL"
137 #define WS_CMD_QUIT "QUIT"
138 #define WS_CMD_TERMINATE "TERMINATE"
139 #define WS_CMD_LIST_NETWORKS "LIST_NETWORKS"
140 #define WS_CMD_REMOVE_NETWORK "REMOVE_NETWORK"
142 #ifdef TIZEN_FEATURE_SERVICE_DISCOVERY
143 #define WS_CMD_SERVICE_ADD "P2P_SERVICE_ADD"
144 #define WS_CMD_SERVICE_DEL "P2P_SERVICE_DEL"
145 #define WS_CMD_SERV_DISC_REQ "P2P_SERV_DISC_REQ"
146 #define WS_CMD_SERV_DISC_CANCEL "P2P_SERV_DISC_CANCEL_REQ"
147 #endif /* TIZEN_FEATURE_SERVICE_DISCOVERY */
149 #define WS_CMD_SUBELEM_SET "WFD_SUBELEM_SET "
151 #define WS_STR_PBC " pbc"
152 #define WS_STR_DISPLAY " display"
153 #define WS_STR_KEYPAD " keypad"
154 #define WS_STR_JOIN " join"
155 #define WS_STR_AUTH " auth"
156 #define WS_STR_PERSISTENT " persistent"
157 #define WS_STR_PASSPHRASE " passphrase="
158 #define WS_STR_FREQ " freq="
159 #define WS_STR_FREQ_2G " freq=2"
161 #define WS_STR_ATTR_LISTEN_CLASS "p2p_listen_reg_class"
162 #define WS_STR_ATTR_OPER_CLASS "p2p_oper_reg_class"
164 #ifdef TIZEN_FEATURE_WIFI_DISPLAY
165 #define WS_WFD_INFO_PRIMARY_SINK 0x01
166 #define WS_WFD_INFO_SECONDARY_SINK 0x02
167 #define WS_WFD_INFO_AVAILABILITY 0x10
168 #define WS_WFD_INFO_WSD_SUPPORT 0x40
169 #define WS_WFD_INFO_TDLS_SUPPORT 0x80
170 #define WS_WFD_INFO_HDCP_SUPPORT 0x100
171 #define WS_WFD_INFO_SYNC_SUPPORT 0x200
172 #endif /* TIZEN_FEATURE_WIFI_DISPLAY */
181 WS_PRI_DEV_TYPE_NONE,
182 WS_PRI_DEV_TYPE_COMPUTER = 1,
183 WS_PRI_DEV_TYPE_INPUT_DEVICE = 2,
184 WS_PRI_DEV_TYPE_PRINTER = 3,
185 WS_PRI_DEV_TYPE_CAMERA = 4,
186 WS_PRI_DEV_TYPE_STORAGE = 5,
187 WS_PRI_DEV_TYPE_NETWORK_INFRA = 6,
188 WS_PRI_DEV_TYPE_DISPLAY = 7,
189 WS_PRI_DEV_TYPE_MULTIMEDIA_DEVICE = 8,
190 WS_PRI_DEV_TYPE_GAME_DEVICE = 9,
191 WS_PRI_DEV_TYPE_TELEPHONE = 10,
192 WS_PRI_DEV_TYPE_AUDIO = 11,
193 WS_PRI_DEV_TYPE_OTHER = 255,
199 WS_EVENT_DEVICE_FOUND,
200 WS_EVENT_DEVICE_LOST,
201 WS_EVENT_FIND_STOPED,
202 WS_EVENT_PROV_DISC_PBC_REQ,
203 WS_EVENT_PROV_DISC_SHOW_PIN,
204 WS_EVENT_PROV_DISC_ENTER_PIN, /* 5 */
205 WS_EVENT_PROV_DISC_PBC_RESP,
206 WS_EVENT_PROV_DISC_FAILURE,
208 WS_EVENT_GO_NEG_REQUEST,
209 WS_EVENT_GO_NEG_FAILURE,
210 WS_EVENT_GO_NEG_SUCCESS, /* 10*/
213 WS_EVENT_GROUP_FORMATION_FAILURE,
214 WS_EVENT_WPS_SUCCESS,
215 WS_EVENT_WPS_REG_SUCCESS,
216 WS_EVENT_GROUP_FORMATION_SUCCESS, /* 15*/
218 WS_EVENT_STA_CONNECTED,
220 WS_EVENT_INVITATION_RECEIVED,
221 WS_EVENT_INVITATION_RESULT,
223 WS_EVENT_STA_DISCONNECTED,
225 WS_EVENT_GROUP_STARTED, /* 20 */
226 WS_EVENT_GROUP_REMOVED,
228 WS_EVENT_TERMINATING,
230 #ifdef TIZEN_FEATURE_SERVICE_DISCOVERY
231 WS_EVENT_SERV_DISC_RESP,
232 #endif /* TIZEN_FEATURE_SERVICE_DISCOVERY */
238 WS_DEV_INFO_NONE = -1,
240 WS_DEV_INFO_P2P_DEV_ADDR, /* p2p_dev_addr= */
241 WS_DEV_INFO_DEV_NAME, /* name= */
242 WS_DEV_INFO_DEV_TYPE, /* pri_dev_type= */
243 WS_DEV_INFO_CONFIG_METHODS, /* config_methods= */
244 WS_DEV_INFO_DEV_CAP, /* dev_capab= */
245 WS_DEV_INFO_GROUP_CAP, /* group_capab= */
246 WS_DEV_INFO_P2P_GO_ADDR, /* p2p_go_addr= */
247 #ifdef TIZEN_FEATURE_WIFI_DISPLAY
248 WS_DEV_INFO_WFD_DEV_INFO, /* wfd_dev_info= */
254 WS_CONN_INFO_NONE = -1,
256 WS_CONN_INFO_DEV_PWD_ID, /* dev_passwd_id= */
257 WS_CONN_INFO_STATUS, /* status= */
258 WS_CONN_INFO_ERROR, /* config_error= */
264 WS_INVITE_INFO_NONE = -1,
266 WS_INVITE_INFO_SRC_ADDR, /* sa= */
267 WS_INVITE_INFO_GO_DEV_ADDR, /* go_dev_addr= */
268 WS_INVITE_INFO_BSSID, /* bssid= */
269 WS_INVITE_INFO_LISTEN, /* listen= */
270 WS_INVITE_INFO_FREQ, /* op_freq= */
271 WS_INVITE_INFO_PERSISTENT_ID, /* persistent_id= */
272 WS_INVITE_INFO_STATUS, /* status= */
274 WS_INVITE_INFO_LIMIT,
275 } ws_invite_info_id_e;
278 WS_GROUP_INFO_NONE = -1,
280 WS_GROUP_INFO_SSID, /* ssid= */
281 WS_GROUP_INFO_FREQ, /* freq= */
282 WS_GROUP_INFO_PASS, /* passphrase= */
283 WS_GROUP_INFO_GO_DEV_ADDR, /* go_dev_addr= */
284 WS_GROUP_INFO_STATUS, /* status= */
285 WS_GROUP_INFO_PERSISTENT, /* [PERSISTENT] */
286 #ifdef TIZEN_FEATURE_IP_OVER_EAPOL
287 WS_GROUP_INFO_IP_ADDR, /* ip_addr= */
288 WS_GROUP_INFO_IP_MASK, /* ip_mask= */
289 WS_GROUP_INFO_GO_IP_ADDR, /* go_ip_addr= */
290 #endif /* TIZEN_FEATURE_IP_OVER_EAPOL */
292 } ws_group_info_id_e;
295 WS_PEER_INFO_NONE = -1,
298 WS_PEER_INFO_LISTEN_FREQ,
300 WS_PEER_INFO_WPS_METHOD,
301 WS_PEER_INFO_INTERFACE_ADDR,
302 WS_PEER_INFO_MEMBER_IN_GO_DEV,
303 WS_PEER_INFO_MEMBER_IN_GO_IFACE,
304 WS_PEER_INFO_PRI_DEV_TYPE,
305 WS_PEER_INFO_DEVICE_NAME,
306 WS_PEER_INFO_MANUFACTURER,
307 WS_PEER_INFO_MODEL_NAME,
308 WS_PEER_INFO_MODEL_NUMBER,
309 WS_PEER_INFO_SERIAL_NUMBER,
310 WS_PEER_INFO_CONFIG_METHODS,
311 WS_PEER_INFO_DEV_CAPAB,
312 WS_PEER_INFO_GROUP_CAPAB,
313 WS_PEER_INFO_GO_NEG_REQ_SENT,
314 WS_PEER_INFO_GO_STATE,
315 WS_PEER_INFO_DIALOG_TOKEN,
316 WS_PEER_INFO_INTENDED_ADDR,
317 WS_PEER_INFO_COUNTRY,
318 WS_PEER_INFO_OPER_FREQ,
319 WS_PEER_INFO_REQ_CONFIG_METHODS,
322 WS_PEER_INFO_WAIT_COUNT,
323 WS_PEER_INFO_INVITATION_REQS,
324 #ifdef TIZEN_FEATURE_WIFI_DISPLAY
325 WS_PEER_INFO_WFD_SUBELEMS,
326 #endif /* TIZEN_FEATURE_WIFI_DISPLAY */
332 /* The Service Discovery field shall be set to 1
333 * if the P2P Device supports Service Discovery,
334 * and is set to 0 otherwise. */
335 WS_DEVICE_CAP_SERVICE_DISCOVERY = 0x01,
337 /* Within a P2P Group Info attribute and a (Re)association
338 * request frame the P2P Client Discoverability field shall be set to 1
339 * when the P2P Device supports P2P Client Discoverability,
340 * and is set to 0 otherwise.
341 * This field shall be reserved and set to 0 in all other frames or uses. */
342 WS_DEVICE_CAP_CLIENT_DISCOVERABILITY = 0x02,
344 /* The Concurrent Operation field shall be set to 1
345 * when the P2P Device supports Concurrent Operation with WLAN,
346 * and is set to 0 otherwise. */
347 WS_DEVICE_CAP_CONCURRENT_OPERATION = 0x04,
349 /* The P2P Infrastructure Managed field shall be set to 1
350 * when the P2P interface of the P2P Device is capable of being
351 * managed by the WLAN (infrastructure network) based on
352 * P2P Coexistence Parameters, and set to 0 otherwise. */
353 WS_DEVICE_CAP_INFRASTRUCTURE_MANAGED = 0x08,
355 /* The P2P Device Limit field shall be set to 1
356 * when the P2P Device is unable to participate in additional P2P Groups,
357 * and set to 0 otherwise. */
358 WS_DEVICE_CAP_DEVICE_LIMIT = 0x10,
360 /* The P2P Invitation Procedure field shall be set to 1
361 * if the P2P Device is capable of processing P2P Invitation Procedure
362 * signaling, and set to 0 otherwise. */
363 WS_DEVICE_CAP_INVITATION_PROCEDURE = 0x20,
364 } ws_device_cap_flag_e;
367 /* The P2P Group Owner field shall be set to 1
368 * when the P2P Device is operating as a Group Owner,
369 * and set to 0 otherwise. */
370 WS_GROUP_CAP_GROUP_OWNER = 0x01,
372 /* The Persistent P2P Group field shall be set to 1
373 * when the P2P Device is hosting, or intends to host,
374 * a persistent P2P Group, and set to 0 otherwise. */
375 WS_GROUP_CAP_PERSISTENT_GROUP = 0x02,
377 /* The P2P Group Limit field shall be set to 1
378 * when the P2P Group Owner is unable to add additional Clients
379 * to its P2P Group, and set to 0 otherwise. */
380 WS_GROUP_CAP_GROUP_LIMIT = 0x04,
382 /* The Intra-BSS Distribution field shall be set to 1
383 * if the P2P Device is hosting, or intends to host,
384 * a P2P Group that provides a data distribution service
385 * between Clients in the P2P Group.
386 * The Intra-BSS Distribution field shall be set to 0,
387 * if the P2P Device is not a P2P Group Owner,
388 * or is not providing such a data distribution service. */
389 WS_GROUP_CAP_INTRA_BSS_DISTRIB = 0x08,
391 /* The Cross Connection field shall be set to 1
392 * if the P2P Device is hosting, or intends to host,
393 * a P2P Group that provides cross connection
394 * between the P2P Group and a WLAN.
395 * The Cross Connection field shall be set to 0
396 * if the P2P Device is not a P2P Group Owner,
397 * or is not providing a cross connection service. */
398 WS_GROUP_CAP_CROSS_CONNECTION = 0x10,
400 /* The Persistent Reconnect field shall be set to 1
401 * when the P2P Device is hosting, or intends to host,
402 * a persistent P2P Group that allows reconnection
403 * without user intervention, and set to 0 otherwise. */
404 WS_GROUP_CAP_PERSISTENT_RECONN = 0x20,
406 /* The Group Formation field shall be set to 1
407 * when the P2P Device is operating as a Group Owner
408 * in the Provisioning phase of Group Formation,
409 * and set to 0 otherwise. */
410 WS_GROUP_CAP_GROUP_FORMATION = 0x40,
411 } ws_group_cap_flag_e;
414 /* If the Device Password ID is Default, the Enrollee should use
415 * its PIN password (from the label or display). This password may
416 * correspond to the label, display, or a user-defined password
417 * that has been configured to replace the original device password. */
418 WS_DEV_PASSWD_ID_DEFAULT = 0x0000,
420 /* User-specified indicates that the user has overridden the password
421 * with a manually selected value. */
422 WS_DEV_PASSWD_ID_USER_SPECIFIED = 0x0001,
424 /* Machine-specified indicates that the original PIN password has been
425 * overridden by a strong, machine-generated device password value. */
426 WS_DEV_PASSWD_ID_MACHINE_SPECIFIED = 0x0002,
428 /* The Rekey value indicates that the device's 256-bit rekeying
429 * password will be used. */
430 WS_DEV_PASSWD_ID_REKEY = 0x0003,
432 /* The PushButton value indicates that the PIN is the all-zero value
433 * reserved for the Push Button Configuration method. */
434 WS_DEV_PASSWD_ID_PUSH_BUTTON = 0x0004,
436 /* The Registrar-specified value indicates a PIN that has been
437 * obtained from the Registrar (via a display or other out-of-band
438 * method). This value may be further augmented with the optional
439 * "Identity" attribute in M1. */
440 WS_DEV_PASSWD_ID_REGISTRAR_SPECIFIED = 0x0005, /* ENTER-PIN */
441 } ws_dev_passwd_id_e;
446 WPS_ERROR_OOBINFO_READ_FAIL,
447 WPS_ERROR_DECRYPTION_FAIL,
448 WPS_ERROR_2G_NOT_SUPPORTED,
449 WPS_ERROR_5G_NOT_SUPPORTED,
450 WPS_ERROR_WEAK_SIGNAL,
451 WPS_ERROR_NET_AUTH_FAIL,
452 WPS_ERROR_NET_ASSOC_FAIL,
453 WPS_ERROR_NO_DHCP_RESPONSE,
454 WPS_ERROR_DHCP_CONFIG_FAIL,
455 WPS_ERROR_IP_CONFLICT,
457 WPS_ERROR_REGISTRAT_CONN_FAIL,
458 WPS_ERROR_PBC_SESSION_OVERLAP,
459 WPS_ERROR_ROGUE_ACTIVITY,
460 WPS_ERROR_DEVICE_BUSY,
461 WPS_ERROR_SETUP_LOCKED,
462 WPS_ERROR_MESSAGE_TIMEOUT,
463 WPS_ERROR_SESSION_TIMEOUT,
464 WPS_ERROR_PASSWORD_MISMATCH,
467 #ifdef TIZEN_FEATURE_WIFI_DISPLAY
469 WFD_SUBELM_ID_DEV_INFO,
470 WFD_SUBELM_ID_ASSOC_BSSID,
471 WFD_SUBELM_ID_AUDIO_FORMAT,
472 WFD_SUBELM_ID_VIDEO_FORMAT,
473 WFD_SUBELM_ID_3D_FORMAT,
474 WFD_SUBELM_ID_CONTENT_PROTECTION,
476 WFD_SUBELM_ID_CUPLED_SYNC_INFO,
477 WFD_SUBELM_ID_EXT_CAPAB,
478 WFD_SUBELM_ID_LOCAL_IP,
479 WFD_SUBELM_ID_SESSION_INFO,
480 WFD_SUBELM_ID_ALT_MAC,
481 } ws_wfd_subelm_id_e;
482 #define WFD_SUBELEM_LEN_DEV_INFO 6
483 #define WFD_SUBELM_LEN_ASSOC_BSSID 6
484 #define WFD_SUBELM_LEN_CUPLED_SYNC_INFO 7
485 #endif /* TIZEN_FEATURE_WIFI_DISPLAY */
493 WFD_OEM_NETFLAG_CURRENT,
494 WFD_OEM_NETFLAG_DISABLED,
495 WFD_OEM_NETFLAG_TEMP_DISABLED,
496 WFD_OEM_NETFLAG_P2P_PERSISTENT,
501 char ssid[OEM_DEV_NAME_LEN+1];
502 unsigned char bssid[OEM_MACADDR_LEN];
516 int initialized; /* check whether plugin is initialized or not. block init function if initialized */
520 ws_sock_data_s *common;
521 ws_sock_data_s *group;
522 unsigned char local_dev_addr[WS_MACADDR_LEN];
523 wfd_oem_event_cb callback;
527 int ws_init(wfd_oem_event_cb callback, void *user_data);
529 int ws_activate(int concurrent);
530 int ws_deactivate(int concurrent);
531 int ws_start_scan(wfd_oem_scan_param_s *param);
532 int ws_restart_scan(int freq);
534 int ws_get_visibility(int *visibility);
535 int ws_set_visibility(int visibility);
536 int ws_get_scan_result(GList **peers, int *peer_count);
537 int ws_get_peer_info(unsigned char *peer_addr, wfd_oem_device_s **peer);
538 int ws_prov_disc_req(unsigned char *peer_addr, wfd_oem_wps_mode_e wps_mode, int join);
539 int ws_connect(unsigned char *peer_addr, wfd_oem_conn_param_s *param);
540 int ws_disconnect(unsigned char *peer_addr, int is_iface_addr);
541 int ws_reject_connection(unsigned char *peer_addr);
542 int ws_cancel_connection(unsigned char *peer_addr);
543 int ws_get_connected_peers(GList **peers, int *peer_count);
544 int ws_get_pin(char *pin);
545 int ws_set_pin(char *pin);
546 int ws_generate_pin(char **pin);
547 int ws_get_supported_wps_mode();
548 int ws_create_group(wfd_oem_group_param_s *param);
549 int ws_destroy_group(const char *ifname);
550 int ws_invite(unsigned char *peer_addr, wfd_oem_invite_param_s *param);
551 int ws_wps_start(unsigned char *peer_addr, int wps_mode, const char *pin);
552 int ws_enrollee_start(unsigned char *peer_addr, int wps_mode, const char *pin);
554 int ws_get_dev_name(char *dev_name);
555 int ws_set_dev_name(char *dev_name);
556 int ws_get_dev_mac(char *dev_mac);
557 int ws_get_dev_type(int *pri_dev_type, int *sec_dev_type);
558 int ws_set_dev_type(int pri_dev_type, int sec_dev_type);
559 int ws_get_go_intent(int *go_intent);
560 int ws_set_go_intent(int go_intent);
561 int ws_set_country(char *ccode);
563 int ws_get_persistent_groups(wfd_oem_persistent_group_s **groups, int *group_count);
564 int ws_remove_persistent_group(char *ssid, unsigned char *bssid);
565 int ws_set_persistent_reconnect(unsigned char *bssid, int reconnect);
567 #ifdef TIZEN_FEATURE_SERVICE_DISCOVERY
568 int ws_start_service_discovery(unsigned char *mac_addr, int service_type);
569 int ws_cancel_service_discovery(unsigned char *mac_addr, int service_type);
571 int ws_serv_add(wfd_oem_new_service_s *service);
572 int ws_serv_del(wfd_oem_new_service_s *service);
573 #endif /* TIZEN_FEATURE_SERVICE_DISCOVERY */
575 #ifdef TIZEN_FEATURE_WIFI_DISPLAY
576 int ws_miracast_init(int enable);
577 int ws_set_display(wfd_oem_display_s *wifi_display);
578 #endif /* TIZEN_FEATURE_WIFI_DISPLAY */
581 int ws_save_config(void);
582 int ws_set_operating_channel(int channel);
583 int ws_remove_all_network(void);
584 int ws_get_wpa_status(int *wpa_status);
586 #if defined(TIZEN_FEATURE_ASP)
587 int ws_advertise_service(wfd_oem_asp_service_s *service, int replace);
588 int ws_cancel_advertise_service(wfd_oem_asp_service_s *service);
589 int ws_seek_service(wfd_oem_asp_service_s *service);
590 int ws_cancel_seek_service(wfd_oem_asp_service_s *service);
591 int ws_asp_prov_disc_req(wfd_oem_asp_prov_s *asp_params);
592 #endif /* TIZEN_FEATURE_ASP */
593 #endif /* __WFD_PLUGIN_WPASUPPLICANT_H__ */