Tizen Native API
|
The EAP API provides functions for managing the EAP information.
#include <wifi.h>
The EAP API provides functions for managing the EAP information. You can manage the EAP information using the functions.
This API is related with the following features:
It is recommended to design applications with regard to features, for reliability.
You can check if a device supports the related features for this API by using System Information, and control your application's actions accordingly.
To ensure your application is only running on the device with specific features, please define the features in your manifest file using the manifest editor in the SDK.
More details on featuring your application can be found from Feature Element.
Enumeration for Wi-Fi Association Status code, provided by the supplicant.
The Wi-Fi Standard Reference : Status codes (IEEE 802.11-2007, 7.3.1.9, Table 7-23).
Enumeration for Wi-Fi disconnect reason, provided by the supplicant.
Enumeration for EAP phase2 authentication type.
int wifi_manager_ap_get_assoc_status_code | ( | wifi_manager_ap_h | ap, |
wifi_manager_assoc_status_code_e * | status_code | ||
) |
Gets the Wi-Fi Association Status Code from the supplicant.
[in] | ap | The access point handle |
[out] | status_code | The supplicant Wi-Fi association status code |
WIFI_MANAGER_ERROR_NONE | Successful |
WIFI_MANAGER_ERROR_INVALID_OPERATION | Invalid operation |
WIFI_MANAGER_ERROR_INVALID_PARAMETER | Invalid parameter |
WIFI_MANAGER_ERROR_NOT_SUPPORTED | Not supported |
int wifi_manager_ap_get_disconnect_reason | ( | wifi_manager_ap_h | ap, |
wifi_manager_disconnect_reason_e * | disconnect_reason | ||
) |
Gets the Wi-Fi disconnect reason from the supplicant.
[in] | ap | The access point handle |
[out] | disconnect_reason | The supplicant disconnect reason |
WIFI_MANAGER_ERROR_NONE | Successful |
WIFI_MANAGER_ERROR_INVALID_PARAMETER | Invalid parameter |
WIFI_MANAGER_ERROR_OPERATION_FAILED | Operation failed |
WIFI_MANAGER_ERROR_NOT_SUPPORTED | Not supported |
int wifi_manager_ap_get_dns_config_type | ( | wifi_manager_ap_h | ap, |
wifi_manager_address_family_e | address_family, | ||
wifi_manager_dns_config_type_e * | type | ||
) |
Gets the DNS config type.
[in] | ap | The access point handle |
[in] | address_family | The address family |
[out] | type | The DNS config type |
WIFI_MANAGER_ERROR_NONE | Successful |
WIFI_MANAGER_ERROR_INVALID_PARAMETER | Invalid parameter |
WIFI_MANAGER_ERROR_OPERATION_FAILED | Operation failed |
WIFI_MANAGER_ERROR_NOT_SUPPORTED | Not supported |
int wifi_manager_ap_get_eap_auth_type | ( | wifi_manager_ap_h | ap, |
wifi_manager_eap_auth_type_e * | type | ||
) |
Gets the type of EAP phase2 authentication of Wi-Fi.
[in] | ap | The access point handle |
[out] | type | The type of EAP phase2 authentication |
WIFI_MANAGER_ERROR_NONE | Successful |
WIFI_MANAGER_ERROR_INVALID_PARAMETER | Invalid parameter |
WIFI_MANAGER_ERROR_INVALID_OPERATION | Invalid operation |
WIFI_MANAGER_ERROR_OPERATION_FAILED | Operation failed |
WIFI_MANAGER_ERROR_NOT_SUPPORTED | Not supported |
int wifi_manager_ap_get_eap_ca_cert_file | ( | wifi_manager_ap_h | ap, |
char ** | file | ||
) |
Gets the CA Certificate of EAP.
[in] | ap | The access point handle |
[out] | file | The file path of CA Certificate |
WIFI_MANAGER_ERROR_NONE | Successful |
WIFI_MANAGER_ERROR_INVALID_PARAMETER | Invalid parameter |
WIFI_MANAGER_ERROR_OUT_OF_MEMORY | Out of memory |
WIFI_MANAGER_ERROR_INVALID_OPERATION | Invalid operation |
WIFI_MANAGER_ERROR_NOT_SUPPORTED | Not supported |
int wifi_manager_ap_get_eap_client_cert_file | ( | wifi_manager_ap_h | ap, |
char ** | file | ||
) |
Gets the Client Certificate of EAP.
[in] | ap | The access point handle |
[out] | file | The file path of Client Certificate |
WIFI_MANAGER_ERROR_NONE | Successful |
WIFI_MANAGER_ERROR_INVALID_PARAMETER | Invalid parameter |
WIFI_MANAGER_ERROR_OUT_OF_MEMORY | Out of memory |
WIFI_MANAGER_ERROR_INVALID_OPERATION | Invalid operation |
WIFI_MANAGER_ERROR_NOT_SUPPORTED | Not supported |
int wifi_manager_ap_get_eap_passphrase | ( | wifi_manager_ap_h | ap, |
char ** | user_name, | ||
bool * | is_password_set | ||
) |
Gets the passphrase of EAP.
[in] | ap | The access point handle |
[out] | user_name | The user name |
[out] | is_password_set | true if password is set, otherwise false if password is not set. |
WIFI_MANAGER_ERROR_NONE | Successful |
WIFI_MANAGER_ERROR_INVALID_PARAMETER | Invalid parameter |
WIFI_MANAGER_ERROR_OUT_OF_MEMORY | Out of memory |
WIFI_MANAGER_ERROR_INVALID_OPERATION | Invalid operation |
WIFI_MANAGER_ERROR_NOT_SUPPORTED | Not supported |
int wifi_manager_ap_get_eap_private_key_file | ( | wifi_manager_ap_h | ap, |
char ** | file | ||
) |
Gets the private key file of EAP.
[in] | ap | The access point handle |
[out] | file | The file path of private key |
WIFI_MANAGER_ERROR_NONE | Successful |
WIFI_MANAGER_ERROR_INVALID_PARAMETER | Invalid parameter |
WIFI_MANAGER_ERROR_OUT_OF_MEMORY | Out of memory |
WIFI_MANAGER_ERROR_INVALID_OPERATION | Invalid operation |
WIFI_MANAGER_ERROR_NOT_SUPPORTED | Not supported |
int wifi_manager_ap_get_eap_type | ( | wifi_manager_ap_h | ap, |
wifi_manager_eap_type_e * | type | ||
) |
Gets the EAP type of Wi-Fi.
[in] | ap | The access point handle |
[out] | type | The type of EAP |
WIFI_MANAGER_ERROR_NONE | Successful |
WIFI_MANAGER_ERROR_INVALID_PARAMETER | Invalid parameter |
WIFI_MANAGER_ERROR_INVALID_OPERATION | Invalid operation |
WIFI_MANAGER_ERROR_OPERATION_FAILED | Operation failed |
WIFI_MANAGER_ERROR_NOT_SUPPORTED | Not supported |
int wifi_manager_ap_get_error_state | ( | wifi_manager_ap_h | ap, |
wifi_manager_error_e * | error_state | ||
) |
Gets the error state.
[in] | ap | The access point handle |
[out] | error_state | The Wi-Fi connection error state |
WIFI_MANAGER_ERROR_NONE | Successful |
WIFI_MANAGER_ERROR_INVALID_OPERATION | Invalid operation |
WIFI_MANAGER_ERROR_INVALID_PARAMETER | Invalid parameter |
WIFI_MANAGER_ERROR_NOT_SUPPORTED | Not supported |
int wifi_manager_ap_get_prefix_length | ( | wifi_manager_ap_h | ap, |
wifi_manager_address_family_e | address_family, | ||
int * | prefix_len | ||
) |
Gets the network prefix length.
[in] | ap | The access point handle |
[in] | address_family | The address family |
[out] | prefix_len | The network prefix length. In case of IPv4, it means netmask length (also called a prefix, e.g. 8, 16, 24, 32) |
WIFI_MANAGER_ERROR_NONE | Successful |
WIFI_MANAGER_ERROR_INVALID_PARAMETER | Invalid parameter |
WIFI_MANAGER_ERROR_NOT_SUPPORTED | Not supported |
int wifi_manager_ap_get_vsie | ( | wifi_manager_ap_h | ap, |
char ** | vsie, | ||
int * | length | ||
) |
Gets the VSIE result of the AP.
[in] | ap | The access point handle |
[out] | vsie | The vendor specific information element |
[out] | length | The VSIE length |
WIFI_MANAGER_ERROR_NONE | Successful |
WIFI_MANAGER_ERROR_INVALID_PARAMETER | Invalid parameter |
WIFI_MANAGER_ERROR_OUT_OF_MEMORY | Out of memory |
WIFI_MANAGER_ERROR_NOT_SUPPORTED | Not supported |
int wifi_manager_ap_set_dns_config_type | ( | wifi_manager_ap_h | ap, |
wifi_manager_address_family_e | address_family, | ||
wifi_manager_dns_config_type_e | type | ||
) |
Sets the DNS config type.
[in] | ap | The access point handle |
[in] | address_family | The address family |
[in] | type | The DNS config type |
WIFI_MANAGER_ERROR_NONE | Successful |
WIFI_MANAGER_ERROR_INVALID_PARAMETER | Invalid parameter |
WIFI_MANAGER_ERROR_OPERATION_FAILED | Operation failed |
WIFI_MANAGER_ERROR_NOT_SUPPORTED | Not supported |
Sets the type of EAP phase2 authentication of Wi-Fi.
[in] | ap | The access point handle |
[in] | type | The type of EAP phase2 authentication |
WIFI_MANAGER_ERROR_NONE | Successful |
WIFI_MANAGER_ERROR_INVALID_PARAMETER | Invalid parameter |
WIFI_MANAGER_ERROR_INVALID_OPERATION | Invalid operation |
WIFI_MANAGER_ERROR_NOT_SUPPORTED | Not supported |
int wifi_manager_ap_set_eap_ca_cert_file | ( | wifi_manager_ap_h | ap, |
const char * | file | ||
) |
Sets the CA Certificate of EAP.
[in] | ap | The access point handle |
[in] | file | The file path of CA Certificate |
WIFI_MANAGER_ERROR_NONE | Successful |
WIFI_MANAGER_ERROR_INVALID_PARAMETER | Invalid parameter |
WIFI_MANAGER_ERROR_INVALID_OPERATION | Invalid operation |
WIFI_MANAGER_ERROR_NOT_SUPPORTED | Not supported |
int wifi_manager_ap_set_eap_client_cert_file | ( | wifi_manager_ap_h | ap, |
const char * | file | ||
) |
Sets the CA Certificate of EAP.
[in] | ap | The access point handle |
[in] | file | The file path of Client Certificate |
WIFI_MANAGER_ERROR_NONE | Successful |
WIFI_MANAGER_ERROR_INVALID_PARAMETER | Invalid parameter |
WIFI_MANAGER_ERROR_INVALID_OPERATION | Invalid operation |
WIFI_MANAGER_ERROR_NOT_SUPPORTED | Not supported |
int wifi_manager_ap_set_eap_passphrase | ( | wifi_manager_ap_h | ap, |
const char * | user_name, | ||
const char * | password | ||
) |
Sets the passphrase of EAP.
You can set one of user_name and password as NULL
. In this case, the value of a parameter which is set as NULL
will be the previous value. But it is not allowed that both user_name and password are set as NULL
.
[in] | ap | The access point handle |
[in] | user_name | The user name This value can be NULL . |
[in] | password | The password This value can be NULL . |
WIFI_MANAGER_ERROR_NONE | Successful |
WIFI_MANAGER_ERROR_INVALID_PARAMETER | Invalid parameter |
WIFI_MANAGER_ERROR_INVALID_OPERATION | Invalid operation |
WIFI_MANAGER_ERROR_NOT_SUPPORTED | Not supported |
int wifi_manager_ap_set_eap_private_key_info | ( | wifi_manager_ap_h | ap, |
const char * | file, | ||
const char * | password | ||
) |
Sets the private key information of EAP.
[in] | ap | The access point handle |
[in] | file | The file path of private key |
[in] | password | The password |
WIFI_MANAGER_ERROR_NONE | Successful |
WIFI_MANAGER_ERROR_INVALID_PARAMETER | Invalid parameter |
WIFI_MANAGER_ERROR_INVALID_OPERATION | Invalid operation |
WIFI_MANAGER_ERROR_NOT_SUPPORTED | Not supported |
int wifi_manager_ap_set_eap_type | ( | wifi_manager_ap_h | ap, |
wifi_manager_eap_type_e | type | ||
) |
Sets the EAP type of Wi-Fi.
[in] | ap | The access point handle |
[in] | type | The type of EAP |
WIFI_MANAGER_ERROR_NONE | Successful |
WIFI_MANAGER_ERROR_INVALID_PARAMETER | Invalid parameter |
WIFI_MANAGER_ERROR_INVALID_OPERATION | Invalid operation |
WIFI_MANAGER_ERROR_NOT_SUPPORTED | Not supported |
int wifi_manager_ap_set_prefix_length | ( | wifi_manager_ap_h | ap, |
wifi_manager_address_family_e | address_family, | ||
int | prefix_len | ||
) |
Sets the network prefix length.
[in] | ap | The access point handle |
[in] | address_family | The address family |
[in] | prefix_len | The network prefix length. In case of IPv4, it means netmask length (also called a prefix, e.g. 8, 16, 24, 32) |
WIFI_MANAGER_ERROR_NONE | Successful |
WIFI_MANAGER_ERROR_INVALID_PARAMETER | Invalid parameter |
WIFI_MANAGER_ERROR_NOT_SUPPORTED | Not supported |