Tizen Native API
7.0
|
The Network Monitoring API provides functions for getting Wi-Fi AP information.
Required Header
#include <inm.h>
Overview
This set of functions is used to get Wi-Fi AP related information. To use This kind of APIs, You should create a inm handle using inm_initialize(). After that, you need to get connection handle using inm_wifi_get_connected_ap(), inm_wifi_foreach_found_ap(). You should destroy the created ap handle if you do not need it anymore. You should destroy the created inm handle if you do not need it anymore.
Related Features
This API is related with the following features:
- http://tizen.org/feature/network.wifi
- http://tizen.org/feature/network.inm
It is recommended to design feature related codes in your application for reliability.
You can check if a device supports the related features for this API by using System Information, thereby controlling the procedure of your application.
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 | inm_wifi_ap_get_essid (inm_connection_h ap, char **essid) |
Gets ESSID (Extended Service Set Identifier). | |
int | inm_wifi_ap_get_raw_ssid (inm_connection_h ap, char **ssid, int *ssid_len) |
Gets raw SSID (Service Set Identifier). | |
int | inm_wifi_ap_get_bssid (inm_connection_h ap, char **bssid) |
Gets BSSID (Basic Service Set Identifier). | |
int | inm_wifi_ap_get_rssi (inm_connection_h ap, int *rssi) |
Gets the RSSI. | |
int | inm_wifi_ap_get_rssi_level (inm_connection_h ap, inm_wifi_rssi_level_e *rssi_level) |
Gets the RSSI level. | |
int | inm_wifi_ap_get_frequency (inm_connection_h ap, int *frequency) |
Gets the frequency band (MHz). | |
int | inm_wifi_ap_get_max_speed (inm_connection_h ap, int *max_speed) |
Gets the max speed (Mbps). | |
int | inm_wifi_ap_is_favorite (inm_connection_h ap, bool *favorite) |
Checks whether the access point is favorite or not. | |
int | inm_wifi_ap_is_passpoint (inm_connection_h ap, bool *passpoint) |
Checks whether the access point is a Passpoint or not. | |
int | inm_wifi_ap_get_security_type (inm_connection_h ap, inm_wifi_security_type_e *type) |
Gets the Wi-Fi security mode. | |
int | inm_wifi_ap_get_encryption_type (inm_connection_h ap, inm_wifi_encryption_type_e *type) |
Gets the Wi-Fi encryption type. | |
int | inm_wifi_ap_is_passphrase_required (inm_connection_h ap, bool *required) |
Checks whether the passphrase is required or not. | |
int | inm_wifi_ap_is_wps_supported (inm_connection_h ap, bool *supported) |
Checks whether the WPS (Wi-Fi Protected Setup) is supported or not. | |
int | inm_wifi_ap_get_disconnect_reason (inm_connection_h ap, inm_wifi_disconnect_reason_e *disconnect_reason) |
Gets the Wi-Fi disconnect reason from the supplicant. | |
int | inm_wifi_ap_get_assoc_status_code (inm_connection_h ap, inm_wifi_assoc_status_code_e *status_code) |
Gets the Wi-Fi Association Status Code from the supplicant. | |
int | inm_wifi_ap_foreach_vsie (inm_connection_h ap, inm_wifi_ap_vsie_cb callback, void *user_data) |
Gets all VSIE of AP. | |
Typedefs | |
typedef bool(* | inm_wifi_ap_vsie_cb )(unsigned char *vsie, int length, void *user_data) |
Called with VSIE data and length of VSIE. |
Typedef Documentation
typedef bool(* inm_wifi_ap_vsie_cb)(unsigned char *vsie, int length, void *user_data) |
Called with VSIE data and length of VSIE.
- Since :
- 5.0
- Remarks:
- If vsie is needed outside the callback, a copy should be made. vsie will be freed automatically after the execution of this callback.
- Parameters:
-
[in] vsie The vendor specific data [in] length The length of vendor specific data [in] user_data The user data passed from the foreach function
- Returns:
true
to continue with the next iteration of the loop,
false
to break out of the loop
- Precondition:
- inm_wifi_ap_foreach_vsie() will invoke this callback.
- See also:
- inm_wifi_ap_foreach_vsie().
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 :
- 5.0
- Enumerator:
Enumeration for Wi-Fi encryption type.
The following encryption modes are used in infrastructure and ad-hoc mode.
- Since :
- 5.0
Enumeration for Wi-Fi security type.
The following security modes are used in infrastructure and ad-hoc mode. For now all EAP security mechanisms are provided only in infrastructure mode.
- Since :
- 5.0
Function Documentation
int inm_wifi_ap_foreach_vsie | ( | inm_connection_h | ap, |
inm_wifi_ap_vsie_cb | callback, | ||
void * | user_data | ||
) |
Gets all VSIE of AP.
- Since :
- 5.0
- Parameters:
-
[in] ap The access point handle [in] callback The callback to be called for each VSIE of AP [in] user_data The user data passed to the callback function
- Returns:
- 0 on success, otherwise negative error value.
- Return values:
-
INM_ERROR_NONE Successful INM_ERROR_OUT_OF_MEMORY Out of memory INM_ERROR_INVALID_PARAMETER Invalid parameter INM_ERROR_NOT_SUPPORTED Not supported INM_ERROR_OPERATION_FAILED Operation failed
int inm_wifi_ap_get_assoc_status_code | ( | inm_connection_h | ap, |
inm_wifi_assoc_status_code_e * | status_code | ||
) |
Gets the Wi-Fi Association Status Code from the supplicant.
- Since :
- 5.0
- Parameters:
-
[in] ap The access point handle [out] status_code The supplicant Wi-Fi association status code
- Returns:
- 0 on success, otherwise negative error value
- Return values:
-
INM_ERROR_NONE Successful INM_ERROR_INVALID_PARAMETER Invalid parameter INM_ERROR_NOT_SUPPORTED Not supported INM_ERROR_OPERATION_FAILED Operation failed
int inm_wifi_ap_get_bssid | ( | inm_connection_h | ap, |
char ** | bssid | ||
) |
Gets BSSID (Basic Service Set Identifier).
- Since :
- 5.0
- Remarks:
- You must release bssid using free().
- Parameters:
-
[in] ap The access point handle [out] bssid The BSSID
- Returns:
- 0 on success, otherwise negative error value
- Return values:
-
INM_ERROR_NONE Successful INM_ERROR_OUT_OF_MEMORY Out of memory INM_ERROR_INVALID_PARAMETER Invalid parameter INM_ERROR_NOT_SUPPORTED Not supported INM_ERROR_OPERATION_FAILED Operation failed
int inm_wifi_ap_get_disconnect_reason | ( | inm_connection_h | ap, |
inm_wifi_disconnect_reason_e * | disconnect_reason | ||
) |
Gets the Wi-Fi disconnect reason from the supplicant.
- Since :
- 5.0
- Parameters:
-
[in] ap The access point handle [out] disconnect_reason The supplicant disconnect reason
- Returns:
- 0 on success, otherwise negative error value
- Return values:
-
INM_ERROR_NONE Successful INM_ERROR_INVALID_PARAMETER Invalid parameter INM_ERROR_NOT_SUPPORTED Not supported INM_ERROR_OPERATION_FAILED Operation failed
int inm_wifi_ap_get_encryption_type | ( | inm_connection_h | ap, |
inm_wifi_encryption_type_e * | type | ||
) |
Gets the Wi-Fi encryption type.
- Since :
- 5.0
- Parameters:
-
[in] ap The access point handle [out] type The type of Wi-Fi encryption
- Returns:
- 0 on success, otherwise negative error value
- Return values:
-
INM_ERROR_NONE Successful INM_ERROR_INVALID_PARAMETER Invalid parameter INM_ERROR_NOT_SUPPORTED Not supported INM_ERROR_OPERATION_FAILED Operation failed
int inm_wifi_ap_get_essid | ( | inm_connection_h | ap, |
char ** | essid | ||
) |
Gets ESSID (Extended Service Set Identifier).
- Since :
- 5.0
- Remarks:
- You must release essid using free().
- Parameters:
-
[in] ap The access point handle [out] essid The ESSID
- Returns:
- 0 on success, otherwise negative error value
- Return values:
-
INM_ERROR_NONE Successful INM_ERROR_OUT_OF_MEMORY Out of memory INM_ERROR_INVALID_PARAMETER Invalid parameter INM_ERROR_NOT_SUPPORTED Not supported INM_ERROR_OPERATION_FAILED Operation failed
int inm_wifi_ap_get_frequency | ( | inm_connection_h | ap, |
int * | frequency | ||
) |
Gets the frequency band (MHz).
- Since :
- 5.0
- Parameters:
-
[in] ap The access point handle [out] frequency The frequency
- Returns:
- 0 on success, otherwise negative error value
- Return values:
-
INM_ERROR_NONE Successful INM_ERROR_INVALID_PARAMETER Invalid parameter INM_ERROR_NOT_SUPPORTED Not supported INM_ERROR_OPERATION_FAILED Operation failed
int inm_wifi_ap_get_max_speed | ( | inm_connection_h | ap, |
int * | max_speed | ||
) |
Gets the max speed (Mbps).
- Since :
- 5.0
- Parameters:
-
[in] ap The access point handle [out] max_speed The max speed
- Returns:
- 0 on success, otherwise negative error value
- Return values:
-
INM_ERROR_NONE Successful INM_ERROR_INVALID_PARAMETER Invalid parameter INM_ERROR_NOT_SUPPORTED Not supported INM_ERROR_OPERATION_FAILED Operation failed
int inm_wifi_ap_get_raw_ssid | ( | inm_connection_h | ap, |
char ** | ssid, | ||
int * | ssid_len | ||
) |
Gets raw SSID (Service Set Identifier).
- Since :
- 5.0
- Remarks:
- You must release ssid using free().
- Parameters:
-
[in] ap The access point handle [out] ssid The raw SSID bytes [out] ssid_len The raw SSID length
- Returns:
- 0 on success, otherwise negative error value
- Return values:
-
INM_ERROR_NONE Successful INM_ERROR_OUT_OF_MEMORY Out of memory INM_ERROR_INVALID_PARAMETER Invalid parameter INM_ERROR_NOT_SUPPORTED Not supported INM_ERROR_OPERATION_FAILED Operation failed
int inm_wifi_ap_get_rssi | ( | inm_connection_h | ap, |
int * | rssi | ||
) |
Gets the RSSI.
- Since :
- 5.0
- Parameters:
-
[in] ap The access point handle [out] rssi The RSSI value (in dBm)
- Returns:
- 0 on success, otherwise negative error value
- Return values:
-
INM_ERROR_NONE Successful INM_ERROR_INVALID_PARAMETER Invalid parameter INM_ERROR_NOT_SUPPORTED Not supported INM_ERROR_OPERATION_FAILED Operation failed
int inm_wifi_ap_get_rssi_level | ( | inm_connection_h | ap, |
inm_wifi_rssi_level_e * | rssi_level | ||
) |
Gets the RSSI level.
- Since :
- 5.0
- Parameters:
-
[in] ap The access point handle [out] rssi_level The RSSI level
- Returns:
- 0 on success, otherwise negative error value
- Return values:
-
INM_ERROR_NONE Successful INM_ERROR_INVALID_PARAMETER Invalid parameter INM_ERROR_NOT_SUPPORTED Not supported INM_ERROR_OPERATION_FAILED Operation failed
int inm_wifi_ap_get_security_type | ( | inm_connection_h | ap, |
inm_wifi_security_type_e * | type | ||
) |
Gets the Wi-Fi security mode.
- Since :
- 5.0
- Parameters:
-
[in] ap The access point handle [out] type The type of Wi-Fi security
- Returns:
- 0 on success, otherwise negative error value
- Return values:
-
INM_ERROR_NONE Successful INM_ERROR_INVALID_PARAMETER Invalid parameter INM_ERROR_NOT_SUPPORTED Not supported INM_ERROR_OPERATION_FAILED Operation failed
int inm_wifi_ap_is_favorite | ( | inm_connection_h | ap, |
bool * | favorite | ||
) |
Checks whether the access point is favorite or not.
- Since :
- 5.0
- Parameters:
-
[in] ap The access point handle [out] favorite true
if access point is favorite, otherwisefalse
if access point is not favorite
- Returns:
- 0 on success, otherwise negative error value
- Return values:
-
INM_ERROR_NONE Successful INM_ERROR_INVALID_PARAMETER Invalid parameter INM_ERROR_NOT_SUPPORTED Not supported INM_ERROR_OPERATION_FAILED Operation failed
int inm_wifi_ap_is_passphrase_required | ( | inm_connection_h | ap, |
bool * | required | ||
) |
Checks whether the passphrase is required or not.
- Since :
- 5.0
- Remarks:
- This function is not valid if security type is INM_WIFI_SECURITY_TYPE_EAP.
- Parameters:
-
[in] ap The access point handle [out] required true
if passphrase is required,false
if passphrase is not required.
- Returns:
- 0 on success, otherwise negative error value
- Return values:
-
INM_ERROR_NONE Successful INM_ERROR_INVALID_PARAMETER Invalid parameter INM_ERROR_NOT_SUPPORTED Not supported INM_ERROR_OPERATION_FAILED Operation failed
int inm_wifi_ap_is_passpoint | ( | inm_connection_h | ap, |
bool * | passpoint | ||
) |
Checks whether the access point is a Passpoint or not.
- Since :
- 5.0
- Parameters:
-
[in] ap The access point handle [out] passpoint true
if access point is a Passpoint,false
if access point is not a Passpoint.
- Returns:
- 0 on success, otherwise negative error value
- Return values:
-
INM_ERROR_NONE Successful INM_ERROR_INVALID_PARAMETER Invalid parameter INM_ERROR_NOT_SUPPORTED Not supported INM_ERROR_OPERATION_FAILED Operation failed
int inm_wifi_ap_is_wps_supported | ( | inm_connection_h | ap, |
bool * | supported | ||
) |
Checks whether the WPS (Wi-Fi Protected Setup) is supported or not.
- Since :
- 5.0
- Parameters:
-
[in] ap The access point handle [out] supported true
if WPS is supported, otherwisefalse
is WPS is not supported.
- Returns:
- 0 on success, otherwise negative error value
- Return values:
-
INM_ERROR_NONE Successful INM_ERROR_INVALID_PARAMETER Invalid parameter INM_ERROR_NOT_SUPPORTED Not supported INM_ERROR_OPERATION_FAILED Operation failed