Tizen Native API
9.0
|
The EAP API provides functions for managing the EAP information.
Required Header
#include <wifi.h>
Overview
The EAP API provides functions for managing the EAP information. You can manage the EAP information using the functions.
Related Features
This API is related with the following features:
- http://tizen.org/feature/network.wifi
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.
Functions | |
int | wifi_manager_ap_set_eap_passphrase (wifi_manager_ap_h ap, const char *user_name, const char *password) |
Sets the passphrase of EAP. | |
int | wifi_manager_ap_get_eap_passphrase (wifi_manager_ap_h ap, char **user_name, bool *is_password_set) |
Gets the passphrase of EAP. | |
int | wifi_manager_ap_set_eap_anonymous_identity (wifi_manager_ap_h ap, const char *anonymous_identity) |
Sets access point anonymous identity. | |
int | wifi_manager_ap_get_eap_anonymous_identity (wifi_manager_ap_h ap, char **anonymous_identity) |
Gets access point anonymous identity. | |
int | wifi_manager_ap_get_eap_ca_cert_file (wifi_manager_ap_h ap, char **file) |
Gets the CA Certificate of EAP. | |
int | wifi_manager_ap_set_eap_ca_cert_file (wifi_manager_ap_h ap, const char *file) |
Sets the CA Certificate of EAP. | |
int | wifi_manager_ap_get_eap_client_cert_file (wifi_manager_ap_h ap, char **file) |
Gets the Client Certificate of EAP. | |
int | wifi_manager_ap_set_eap_client_cert_file (wifi_manager_ap_h ap, const char *file) |
Sets the Client Certificate of EAP. | |
int | wifi_manager_ap_get_eap_private_key_file (wifi_manager_ap_h ap, char **file) |
Gets the private key file of EAP. | |
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. | |
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. | |
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. | |
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. | |
int | wifi_manager_ap_set_eap_auth_type (wifi_manager_ap_h ap, wifi_manager_eap_auth_type_e type) |
Sets the type of EAP phase2 authentication of Wi-Fi. |
Enumeration Type Documentation
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).
- Since :
- 5.0
- Enumerator:
Enumeration for Wi-Fi disconnect reason, provided by the supplicant.
- Since :
- 4.0
- Enumerator:
Enumeration for EAP phase2 authentication type.
- Since :
- 3.0
- Enumerator:
Enumeration for EAP type.
- Since :
- 3.0
- Enumerator:
Function Documentation
int wifi_manager_ap_get_eap_anonymous_identity | ( | wifi_manager_ap_h | ap, |
char ** | anonymous_identity | ||
) |
Gets access point anonymous identity.
- Since :
- 5.5
- Remarks:
- You must release anonymous_identity using free().
- Parameters:
-
[in] ap The access point handle [out] anonymous_identity The anonymous identity of access point
- Returns:
- 0 on success, otherwise negative error value
- Return values:
-
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_auth_type | ( | wifi_manager_ap_h | ap, |
wifi_manager_eap_auth_type_e * | type | ||
) |
Gets the type of EAP phase2 authentication of Wi-Fi.
- Since :
- 3.0
- Parameters:
-
[in] ap The access point handle [out] type The type of EAP phase2 authentication
- Returns:
- 0 on success, otherwise negative error value
- Return values:
-
WIFI_MANAGER_ERROR_NONE Successful WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized 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.
- Since :
- 3.0
- Remarks:
- This function is valid only if the EAP type is WIFI_MANAGER_EAP_TYPE_TLS. You must release file using free().
- Parameters:
-
[in] ap The access point handle [out] file The file path of CA Certificate
- Returns:
- 0 on success, otherwise negative error value
- Return values:
-
WIFI_MANAGER_ERROR_NONE Successful WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized 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.
- Since :
- 3.0
- Remarks:
- This function is valid only if the EAP type is WIFI_MANAGER_EAP_TYPE_TLS. You must release file using free().
- Parameters:
-
[in] ap The access point handle [out] file The file path of Client Certificate
- Returns:
- 0 on success, otherwise negative error value
- Return values:
-
WIFI_MANAGER_ERROR_NONE Successful WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized 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.
- Since :
- 3.0
- Remarks:
- This function is valid only if the EAP type is WIFI_MANAGER_EAP_TYPE_PEAP or WIFI_MANAGER_EAP_TYPE_TTLS. You must release user_name using free().
- Parameters:
-
[in] ap The access point handle [out] user_name The user name [out] is_password_set true
if password is set, otherwisefalse
if password is not set.
- Returns:
- 0 on success, otherwise negative error value
- Return values:
-
WIFI_MANAGER_ERROR_NONE Successful WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized 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.
- Since :
- 3.0
- Remarks:
- This function is valid only if the EAP type is WIFI_MANAGER_EAP_TYPE_TLS. You must release file using free().
- Parameters:
-
[in] ap The access point handle [out] file The file path of private key
- Returns:
- 0 on success, otherwise negative error value
- Return values:
-
WIFI_MANAGER_ERROR_NONE Successful WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized 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.
- Since :
- 3.0
- Parameters:
-
[in] ap The access point handle [out] type The type of EAP
- Returns:
- 0 on success, otherwise negative error value
- Return values:
-
WIFI_MANAGER_ERROR_NONE Successful WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized 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_set_eap_anonymous_identity | ( | wifi_manager_ap_h | ap, |
const char * | anonymous_identity | ||
) |
Sets access point anonymous identity.
- Since :
- 5.5
- Parameters:
-
[in] ap The access point handle [in] anonymous_identity The anonymous identity
- Returns:
- 0 on success, otherwise negative error value
- Return values:
-
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
Sets the type of EAP phase2 authentication of Wi-Fi.
- Since :
- 3.0
- Parameters:
-
[in] ap The access point handle [in] type The type of EAP phase2 authentication
- Returns:
- 0 on success, otherwise negative error value
- Return values:
-
WIFI_MANAGER_ERROR_NONE Successful WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized 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.
- Since :
- 3.0
- Remarks:
- This function is valid only if the EAP type is WIFI_MANAGER_EAP_TYPE_TLS.
- Parameters:
-
[in] ap The access point handle [in] file The file path of CA Certificate
- Returns:
- 0 on success, otherwise negative error value
- Return values:
-
WIFI_MANAGER_ERROR_NONE Successful WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized 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 Client Certificate of EAP.
- Since :
- 3.0
- Remarks:
- This function is valid only if the EAP type is WIFI_MANAGER_EAP_TYPE_TLS.
- Parameters:
-
[in] ap The access point handle [in] file The file path of Client Certificate
- Returns:
- 0 on success, otherwise negative error value
- Return values:
-
WIFI_MANAGER_ERROR_NONE Successful WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized 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
.
- Since :
- 3.0
- Remarks:
- This function is valid only if the EAP type is WIFI_MANAGER_EAP_TYPE_PEAP or WIFI_MANAGER_EAP_TYPE_TTLS.
- Parameters:
-
[in] ap The access point handle [in] user_name The user name
This value can beNULL
.[in] password The password
This value can beNULL
.
- Returns:
- 0 on success, otherwise negative error value
- Return values:
-
WIFI_MANAGER_ERROR_NONE Successful WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized 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.
- Since :
- 3.0
- Remarks:
- This function is valid only if the EAP type is WIFI_MANAGER_EAP_TYPE_TLS.
- Parameters:
-
[in] ap The access point handle [in] file The file path of private key [in] password The password
- Returns:
- 0 on success, otherwise negative error value
- Return values:
-
WIFI_MANAGER_ERROR_NONE Successful WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized 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.
- Since :
- 3.0
- Parameters:
-
[in] ap The access point handle [in] type The type of EAP
- Returns:
- 0 on success, otherwise negative error value
- Return values:
-
WIFI_MANAGER_ERROR_NONE Successful WIFI_MANAGER_ERROR_NOT_INITIALIZED Not initialized WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter WIFI_MANAGER_ERROR_INVALID_OPERATION Invalid operation WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported