Tizen Native API  10.0
Network Information

The Connection Information API provides functions for managing the network information.

Required Header

#include <wifi-manager.h>

Overview

The Connection Information API offers functionalities for managing network information. You can manage the network 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_get_essid (wifi_manager_ap_h ap, char **essid)
 Gets ESSID (Extended Service Set Identifier).
int wifi_manager_ap_get_raw_ssid (wifi_manager_ap_h ap, char **ssid, int *ssid_len)
 Gets raw SSID (Service Set Identifier).
int wifi_manager_ap_get_bssid (wifi_manager_ap_h ap, char **bssid)
 Gets BSSID (Basic Service Set Identifier).
int wifi_manager_ap_get_rssi (wifi_manager_ap_h ap, int *rssi)
 Gets the RSSI.
int wifi_manager_ap_get_rssi_level (wifi_manager_ap_h ap, wifi_manager_rssi_level_e *rssi_level)
 Gets the RSSI level.
int wifi_manager_ap_get_frequency (wifi_manager_ap_h ap, int *frequency)
 Gets the frequency band (MHz).
int wifi_manager_ap_get_max_speed (wifi_manager_ap_h ap, int *max_speed)
 Gets the max speed (Mbps).
int wifi_manager_ap_is_favorite (wifi_manager_ap_h ap, bool *favorite)
 Checks whether the access point is favorite or not.
int wifi_manager_ap_is_passpoint (wifi_manager_ap_h ap, bool *passpoint)
 Checks whether the access point is passpoint or not.
int wifi_manager_ap_is_hidden (wifi_manager_ap_h ap, bool *is_hidden)
 Checks whether the access point is hidden or not.
int wifi_manager_ap_get_connection_state (wifi_manager_ap_h ap, wifi_manager_connection_state_e *state)
 Gets the connection state.
int wifi_manager_ap_get_ip_config_type (wifi_manager_ap_h ap, wifi_manager_address_family_e address_family, wifi_manager_ip_config_type_e *type)
 Gets the config type of IP.
int wifi_manager_ap_set_ip_config_type (wifi_manager_ap_h ap, wifi_manager_address_family_e address_family, wifi_manager_ip_config_type_e type)
 Sets the config type of IP.
int wifi_manager_ap_get_ip_address (wifi_manager_ap_h ap, wifi_manager_address_family_e address_family, char **ip_address)
 Gets the IP address.
int wifi_manager_ap_set_ip_address (wifi_manager_ap_h ap, wifi_manager_address_family_e address_family, const char *ip_address)
 Sets the IP address.
int wifi_manager_ap_foreach_ipv6_address (wifi_manager_ap_h ap, wifi_manager_ap_ipv6_address_cb callback, void *user_data)
 Gets all IPv6 addresses assigned to the Wi-Fi interface.
int wifi_manager_ap_get_subnet_mask (wifi_manager_ap_h ap, wifi_manager_address_family_e address_family, char **subnet_mask)
 Gets the subnet mask.
int wifi_manager_ap_set_subnet_mask (wifi_manager_ap_h ap, wifi_manager_address_family_e address_family, const char *subnet_mask)
 Sets the subnet mask.
int wifi_manager_ap_get_gateway_address (wifi_manager_ap_h ap, wifi_manager_address_family_e address_family, char **gateway_address)
 Gets the gateway address.
int wifi_manager_ap_set_gateway_address (wifi_manager_ap_h ap, wifi_manager_address_family_e address_family, const char *gateway_address)
 Sets the gateway address.
int wifi_manager_ap_get_dhcp_server_address (wifi_manager_ap_h ap, wifi_manager_address_family_e address_family, char **dhcp_server)
 Gets the DHCP Server address.
int wifi_manager_ap_get_dhcp_lease_duration (wifi_manager_ap_h ap, wifi_manager_address_family_e address_family, int *dhcp_lease_duration)
 Gets the DHCP lease duration.
int wifi_manager_ap_get_proxy_address (wifi_manager_ap_h ap, wifi_manager_address_family_e address_family, char **proxy_address)
 Gets the proxy address.
int wifi_manager_ap_set_proxy_address (wifi_manager_ap_h ap, wifi_manager_address_family_e address_family, const char *proxy_address)
 Sets the proxy address.
int wifi_manager_ap_get_proxy_type (wifi_manager_ap_h ap, wifi_manager_proxy_type_e *proxy_type)
 Gets the Proxy type.
int wifi_manager_ap_set_proxy_type (wifi_manager_ap_h ap, wifi_manager_proxy_type_e proxy_type)
 Sets the Proxy address.
int wifi_manager_ap_get_dns_address (wifi_manager_ap_h ap, int order, wifi_manager_address_family_e address_family, char **dns_address)
 Gets the DNS address.
int wifi_manager_ap_set_dns_address (wifi_manager_ap_h ap, int order, wifi_manager_address_family_e address_family, const char *dns_address)
 Sets the DNS address.
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.
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.
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.
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.
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.
int wifi_manager_ap_get_error_state (wifi_manager_ap_h ap, wifi_manager_error_e *error_state)
 Gets the error state.
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.
int wifi_manager_ap_foreach_vsie (wifi_manager_ap_h ap, wifi_manager_ap_vsie_cb callback, void *user_data)
 Gets all VSIE of AP.
int wifi_manager_ap_get_countrycode (wifi_manager_ap_h ap, char **country_code)
 Gets the raw country code.
int wifi_manager_foreach_found_bssid (wifi_manager_ap_h ap, wifi_manager_found_bssid_cb callback, void *user_data)
 Gets the BSSID list.

Typedefs

typedef bool(* wifi_manager_ap_ipv6_address_cb )(char *ipv6_address, void *user_data)
 Called with an IPv6 address.
typedef bool(* wifi_manager_ap_vsie_cb )(unsigned char *vsie, int length, void *user_data)
 Called with VSIE data and length of VSIE.
typedef bool(* wifi_manager_found_bssid_cb )(const char *bssid, int rssi, int freq, void *user_data)
 Called for each found BSSID.

Typedef Documentation

typedef bool(* wifi_manager_ap_ipv6_address_cb)(char *ipv6_address, void *user_data)

Called with an IPv6 address.

This callback function type is used by the `wifi_manager_ap_foreach_ipv6_address()` function to iterate over each IPv6 address assigned to the Wi-Fi interface for the specified access point. The callback function receives the IPv6 address as a parameter and returns a boolean value indicating whether to continue iterating or to stop.

Since :
4.0
Remarks:
If ipv6_address is needed outside the callback, a copy should be made. ipv6_address will be freed automatically after the execution of this callback.
Parameters:
[in]ipv6_addressThe IPv6 address
[in]user_dataThe 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:
wifi_manager_ap_foreach_ipv6_address() will invoke this callback.
See also:
wifi_manager_ap_foreach_ipv6_address()
typedef bool(* wifi_manager_ap_vsie_cb)(unsigned char *vsie, int length, void *user_data)

Called with VSIE data and length of VSIE.

This callback function type is used to iterate through the Vendor-Specific Information Element (VSIE) list. It is called once for each VSIE found, providing the VSIE data and its length.

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]vsieThe vendor specific data
[in]lengthThe length of vendor specific data
[in]user_dataThe 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:
wifi_manager_ap_foreach_vsie() will invoke this callback.
See also:
wifi_manager_ap_foreach_vsie().
typedef bool(* wifi_manager_found_bssid_cb)(const char *bssid, int rssi, int freq, void *user_data)

Called for each found BSSID.

This callback function type is used to iterate through the found BSSID list. It is called once for each BSSID found, providing information about the BSSID, its signal strength (RSSI), and its operating frequency.

Since :
5.0
Remarks:
The bssid can be used only in the callback. To use it outside, make a copy. bssid is managed by the platform and will be released after the execution of this callback.
Parameters:
[in]bssidThe BSSID
[in]rssiThe RSSI
[in]freqThe frequency
[in]user_dataThe user data passed from the foreach function
Returns:
true to continue with the next iteration of the loop, otherwise false to break out of the loop
Precondition:
wifi_manager_foreach_found_bssid() will invoke this callback.

Enumeration Type Documentation

Enumeration for the address type.

Since :
3.0
Enumerator:
WIFI_MANAGER_ADDRESS_FAMILY_IPV4 

IPV4 Address family

WIFI_MANAGER_ADDRESS_FAMILY_IPV6 

IPV6 Address family

Enumeration for DNS Configuration type.

Since :
4.0
Enumerator:
WIFI_MANAGER_DNS_CONFIG_TYPE_NONE 

Not defined

WIFI_MANAGER_DNS_CONFIG_TYPE_STATIC 

Manual DNS configuration

WIFI_MANAGER_DNS_CONFIG_TYPE_DYNAMIC 

Config DNS using DHCP client

Enumeration for the Net IP configuration type.

Since :
3.0
Enumerator:
WIFI_MANAGER_IP_CONFIG_TYPE_NONE 

Not defined

WIFI_MANAGER_IP_CONFIG_TYPE_STATIC 

Manual IP configuration

WIFI_MANAGER_IP_CONFIG_TYPE_DYNAMIC 

Config IP using DHCP client (IPv4 Only)

WIFI_MANAGER_IP_CONFIG_TYPE_AUTO 

Config IP from Auto IP pool (169.254/16). Later with DHCP client, if available

WIFI_MANAGER_IP_CONFIG_TYPE_FIXED 

Indicates an IP address that can not be modified (IPv4 Only)

Enumeration for the proxy method type.

Since :
3.0
Enumerator:
WIFI_MANAGER_PROXY_TYPE_DIRECT 

Direct connection

WIFI_MANAGER_PROXY_TYPE_AUTO 

Auto configuration(Use PAC file). If URL property is not set, DHCP/WPAD auto-discover will be tried

WIFI_MANAGER_PROXY_TYPE_MANUAL 

Manual configuration


Function Documentation

Gets all IPv6 addresses assigned to the Wi-Fi interface.

This function retrieves all IPv6 addresses assigned to the Wi-Fi interface for the specified access point. It uses a callback function to iterate over each IPv6 address and provide it to the caller.

Since :
4.0
Parameters:
[in]apThe access point handle
[in]callbackThe callback to be called for each IPv6 address
[in]user_dataThe user data passed to the callback function
Returns:
0 on success, otherwise negative error value.
Return values:
WIFI_MANAGER_ERROR_NONESuccessful
WIFI_MANAGER_ERROR_NOT_INITIALIZEDNot initialized
WIFI_MANAGER_ERROR_INVALID_PARAMETERInvalid parameter
WIFI_MANAGER_ERROR_OPERATION_FAILEDOperation failed
WIFI_MANAGER_ERROR_NOT_SUPPORTEDNot supported
int wifi_manager_ap_foreach_vsie ( wifi_manager_ap_h  ap,
wifi_manager_ap_vsie_cb  callback,
void *  user_data 
)

Gets all VSIE of AP.

This function retrieves all Vendor-Specific Information Elements (VSIE) associated with the access point. VSIE are custom elements added by vendors to provide additional information about the access point.

Since :
5.0
Parameters:
[in]apThe access point handle
[in]callbackThe callback to be called for each VSIE of AP
[in]user_dataThe user data passed to the callback function
Returns:
0 on success, otherwise negative error value.
Return values:
WIFI_MANAGER_ERROR_NONESuccessful
WIFI_MANAGER_ERROR_NOT_INITIALIZEDNot initialized
WIFI_MANAGER_ERROR_INVALID_PARAMETERInvalid parameter
WIFI_MANAGER_ERROR_NOT_SUPPORTEDNot supported

Gets the Wi-Fi Association Status Code from the supplicant.

This function retrieves the Wi-Fi Association Status Code from the supplicant. The status code provides detailed information about the result of the association process between the device and the access point.

Since :
5.0
Parameters:
[in]apThe access point handle
[out]status_codeThe supplicant Wi-Fi association status code
Returns:
0 on success, otherwise negative error value
Return values:
WIFI_MANAGER_ERROR_NONESuccessful
WIFI_MANAGER_ERROR_NOT_INITIALIZEDNot initialized
WIFI_MANAGER_ERROR_INVALID_OPERATIONInvalid operation
WIFI_MANAGER_ERROR_INVALID_PARAMETERInvalid parameter
WIFI_MANAGER_ERROR_NOT_SUPPORTEDNot supported
int wifi_manager_ap_get_bssid ( wifi_manager_ap_h  ap,
char **  bssid 
)

Gets BSSID (Basic Service Set Identifier).

This function retrieves the Basic Service Set Identifier (BSSID) for the access point. The BSSID is a unique identifier assigned to each wireless access point, consisting of a MAC address formatted as a string (e.g., "00:1A:2B:3C:4D:5E").

Since :
3.0
Remarks:
You must release bssid using free().
Parameters:
[in]apThe access point handle
[out]bssidThe BSSID
Returns:
0 on success, otherwise negative error value
Return values:
WIFI_MANAGER_ERROR_NONESuccessful
WIFI_MANAGER_ERROR_NOT_INITIALIZEDNot initialized
WIFI_MANAGER_ERROR_INVALID_PARAMETERInvalid parameter
WIFI_MANAGER_ERROR_OUT_OF_MEMORYOut of memory
WIFI_MANAGER_ERROR_NOT_SUPPORTEDNot supported

Gets the connection state.

This function retrieves the current connection state of the access point. The connection state indicates whether the access point is currently connected, connecting, or disconnected.

Since :
3.0
Parameters:
[in]apThe access point handle
[out]stateThe connection state
Returns:
0 on success, otherwise negative error value
Return values:
WIFI_MANAGER_ERROR_NONESuccessful
WIFI_MANAGER_ERROR_NOT_INITIALIZEDNot initialized
WIFI_MANAGER_ERROR_INVALID_PARAMETERInvalid parameter
WIFI_MANAGER_ERROR_OPERATION_FAILEDOperation failed
WIFI_MANAGER_ERROR_NOT_SUPPORTEDNot supported
int wifi_manager_ap_get_countrycode ( wifi_manager_ap_h  ap,
char **  country_code 
)

Gets the raw country code.

This function retrieves the raw country code associated with the access point. The country code is a two-letter ISO 3166-1 alpha-2 country code that identifies the country where the access point is located.

Since :
5.0
Remarks:
You must release country_code using free().
Parameters:
[in]apThe access point handle
[out]country_codeThe country code, NULL if M/W does not have the country code
Returns:
0 on success, otherwise negative error value
Return values:
WIFI_MANAGER_ERROR_NONESuccessful
WIFI_MANAGER_ERROR_NOT_INITIALIZEDNot initialized
WIFI_MANAGER_ERROR_INVALID_PARAMETERInvalid parameter
WIFI_MANAGER_ERROR_OUT_OF_MEMORYOut of memory
WIFI_MANAGER_ERROR_NOT_SUPPORTEDNot supported
int wifi_manager_ap_get_dhcp_lease_duration ( wifi_manager_ap_h  ap,
wifi_manager_address_family_e  address_family,
int *  dhcp_lease_duration 
)

Gets the DHCP lease duration.

This function retrieves the DHCP lease duration for the specified address family. The DHCP lease duration indicates the time period for which the IP address assigned to the device through DHCP will remain valid.

Since :
4.0
Parameters:
[in]apThe access point handle
[in]address_familyThe address family
[out]dhcp_lease_durationThe DHCP lease duration in seconds
Returns:
0 on success, otherwise negative error value
Return values:
WIFI_MANAGER_ERROR_NONESuccessful
WIFI_MANAGER_ERROR_NOT_INITIALIZEDNot initialized
WIFI_MANAGER_ERROR_INVALID_PARAMETERInvalid parameter
WIFI_MANAGER_ERROR_NOT_SUPPORTEDNot supported
int wifi_manager_ap_get_dhcp_server_address ( wifi_manager_ap_h  ap,
wifi_manager_address_family_e  address_family,
char **  dhcp_server 
)

Gets the DHCP Server address.

This function retrieves the DHCP server address for the specified address family. The DHCP server address is the IP address of the server that provides dynamic IP addresses to devices on the network.

Since :
4.0
Remarks:
You must release dhcp_server using g_free(). This function is supported only for IPv4 address family.
Parameters:
[in]apThe access point handle
[in]address_familyThe address family
[out]dhcp_serverThe DHCP server address
Returns:
0 on success, otherwise negative error value
Return values:
WIFI_MANAGER_ERROR_NONESuccessful
WIFI_MANAGER_ERROR_NOT_INITIALIZEDNot initialized
WIFI_MANAGER_ERROR_INVALID_PARAMETERInvalid parameter
WIFI_MANAGER_ERROR_OUT_OF_MEMORYOut of memory
WIFI_MANAGER_ERROR_NOT_SUPPORTEDNot supported

Gets the Wi-Fi disconnect reason from the supplicant.

This function retrieves the Wi-Fi disconnect reason from the supplicant. The disconnect reason provides detailed information about the cause of the disconnection between the device and the access point.

Since :
3.0
Parameters:
[in]apThe access point handle
[out]disconnect_reasonThe supplicant disconnect reason
Returns:
0 on success, otherwise negative error value
Return values:
WIFI_MANAGER_ERROR_NONESuccessful
WIFI_MANAGER_ERROR_NOT_INITIALIZEDNot initialized
WIFI_MANAGER_ERROR_INVALID_PARAMETERInvalid parameter
WIFI_MANAGER_ERROR_OPERATION_FAILEDOperation failed
WIFI_MANAGER_ERROR_NOT_SUPPORTEDNot supported
int wifi_manager_ap_get_dns_address ( wifi_manager_ap_h  ap,
int  order,
wifi_manager_address_family_e  address_family,
char **  dns_address 
)

Gets the DNS address.

This function retrieves the DNS address for the specified order and address family. Up to two DNS addresses can be retrieved for each address family.

Since :
3.0
Remarks:
The allowance of DNS address is 2.You must release dns_address using free().
Parameters:
[in]apThe access point handle
[in]orderThe order of DNS address; it starts from 1, which means first DNS address
[in]address_familyThe address family
[out]dns_addressThe DNS address
Returns:
0 on success, otherwise negative error value
Return values:
WIFI_MANAGER_ERROR_NONESuccessful
WIFI_MANAGER_ERROR_NOT_INITIALIZEDNot initialized
WIFI_MANAGER_ERROR_INVALID_PARAMETERInvalid parameter
WIFI_MANAGER_ERROR_OUT_OF_MEMORYOut of memory
WIFI_MANAGER_ERROR_ADDRESS_FAMILY_NOT_SUPPORTEDAddress family not supported
WIFI_MANAGER_ERROR_NOT_SUPPORTEDNot supported

Gets the DNS config type.

This function retrieves the DNS configuration type for the specified address family. The DNS configuration type indicates how the DNS server addresses are configured for the network interface.

Since :
4.0
Parameters:
[in]apThe access point handle
[in]address_familyThe address family
[out]typeThe DNS config type
Returns:
0 on success, otherwise negative error value.
Return values:
WIFI_MANAGER_ERROR_NONESuccessful
WIFI_MANAGER_ERROR_NOT_INITIALIZEDNot initialized
WIFI_MANAGER_ERROR_INVALID_PARAMETERInvalid parameter
WIFI_MANAGER_ERROR_OPERATION_FAILEDOperation failed
WIFI_MANAGER_ERROR_NOT_SUPPORTEDNot supported

Gets the error state.

This function retrieves the Wi-Fi connection error state for the access point. The error state indicates any issues encountered during the connection process to the access point.

Since :
4.0
Parameters:
[in]apThe access point handle
[out]error_stateThe Wi-Fi connection error state
Returns:
0 on success, otherwise negative error value
Return values:
WIFI_MANAGER_ERROR_NONESuccessful
WIFI_MANAGER_ERROR_NOT_INITIALIZEDNot initialized
WIFI_MANAGER_ERROR_INVALID_OPERATIONInvalid operation
WIFI_MANAGER_ERROR_INVALID_PARAMETERInvalid parameter
WIFI_MANAGER_ERROR_NOT_SUPPORTEDNot supported
int wifi_manager_ap_get_essid ( wifi_manager_ap_h  ap,
char **  essid 
)

Gets ESSID (Extended Service Set Identifier).

This function retrieves the Extended Service Set Identifier (ESSID) for the access point. The ESSID is a unique identifier assigned to a group of wireless access points that form an extended service set, typically represented as a sequence of characters (e.g., "MyHomeNetwork"). In most cases, the ESSID is identical to the SSID of the primary access point within the extended service set.

Since :
3.0
Remarks:
You must release essid using free().
Parameters:
[in]apThe access point handle
[out]essidThe ESSID
Returns:
0 on success, otherwise negative error value
Return values:
WIFI_MANAGER_ERROR_NONESuccessful
WIFI_MANAGER_ERROR_NOT_INITIALIZEDNot initialized
WIFI_MANAGER_ERROR_INVALID_PARAMETERInvalid parameter
WIFI_MANAGER_ERROR_OUT_OF_MEMORYOut of memory
WIFI_MANAGER_ERROR_NOT_SUPPORTEDNot supported
int wifi_manager_ap_get_frequency ( wifi_manager_ap_h  ap,
int *  frequency 
)

Gets the frequency band (MHz).

This function retrieves the frequency band (in megahertz, MHz) for the access point. The frequency band indicates the specific radio frequency range used by the access point to transmit and receive wireless signals.

Since :
3.0
Parameters:
[in]apThe access point handle
[out]frequencyThe frequency
Returns:
0 on success, otherwise negative error value
Return values:
WIFI_MANAGER_ERROR_NONESuccessful
WIFI_MANAGER_ERROR_NOT_INITIALIZEDNot initialized
WIFI_MANAGER_ERROR_INVALID_PARAMETERInvalid parameter
WIFI_MANAGER_ERROR_OPERATION_FAILEDOperation failed
WIFI_MANAGER_ERROR_NOT_SUPPORTEDNot supported
int wifi_manager_ap_get_gateway_address ( wifi_manager_ap_h  ap,
wifi_manager_address_family_e  address_family,
char **  gateway_address 
)

Gets the gateway address.

This function retrieves the gateway address for the specified address family. The gateway address is the IP address of the router or gateway that acts as the entry point to the wider internet or network.

Since :
3.0
Remarks:
You must release gateway_address using free().
Parameters:
[in]apThe access point handle
[in]address_familyThe address family
[out]gateway_addressThe gateway address
Returns:
0 on success, otherwise negative error value
Return values:
WIFI_MANAGER_ERROR_NONESuccessful
WIFI_MANAGER_ERROR_NOT_INITIALIZEDNot initialized
WIFI_MANAGER_ERROR_INVALID_PARAMETERInvalid parameter
WIFI_MANAGER_ERROR_OUT_OF_MEMORYOut of memory
WIFI_MANAGER_ERROR_ADDRESS_FAMILY_NOT_SUPPORTEDAddress family not supported
WIFI_MANAGER_ERROR_NOT_SUPPORTEDNot supported
int wifi_manager_ap_get_ip_address ( wifi_manager_ap_h  ap,
wifi_manager_address_family_e  address_family,
char **  ip_address 
)

Gets the IP address.

This function retrieves the IP address for the specified address family. The IP address is the unique identifier assigned to a device on a network, allowing it to communicate with other devices on the same network or across different networks.

Since :
3.0
Remarks:
You must release ip_address using free().
Parameters:
[in]apThe access point handle
[in]address_familyThe address family
[out]ip_addressThe IP address; this value is for default address
e.g, IPv6 can have multiple addresses. but you can only obtain a representative address
if you want to get all IPv6 address, you can use the wifi_manager_ap_foreach_ipv6_address().
Returns:
0 on success, otherwise negative error value
Return values:
WIFI_MANAGER_ERROR_NONESuccessful
WIFI_MANAGER_ERROR_NOT_INITIALIZEDNot initialized
WIFI_MANAGER_ERROR_INVALID_PARAMETERInvalid parameter
WIFI_MANAGER_ERROR_OUT_OF_MEMORYOut of memory
WIFI_MANAGER_ERROR_ADDRESS_FAMILY_NOT_SUPPORTEDAddress family not supported
WIFI_MANAGER_ERROR_NO_CONNECTIONThere is no connected AP
WIFI_MANAGER_ERROR_NOT_SUPPORTEDNot supported
See also:
wifi_manager_ap_foreach_ipv6_address()

Gets the config type of IP.

This function retrieves the configuration type of the IP for the specified address family. The IP configuration type indicates whether the IP address is statically configured or dynamically assigned via DHCP.

Since :
3.0
Parameters:
[in]apThe access point handle
[in]address_familyThe address family
[out]typeThe type of IP config
Returns:
0 on success, otherwise negative error value
Return values:
WIFI_MANAGER_ERROR_NONESuccessful
WIFI_MANAGER_ERROR_NOT_INITIALIZEDNot initialized
WIFI_MANAGER_ERROR_INVALID_PARAMETERInvalid parameter
WIFI_MANAGER_ERROR_OPERATION_FAILEDOperation failed
WIFI_MANAGER_ERROR_ADDRESS_FAMILY_NOT_SUPPORTEDAddress family not supported
WIFI_MANAGER_ERROR_NOT_SUPPORTEDNot supported
int wifi_manager_ap_get_max_speed ( wifi_manager_ap_h  ap,
int *  max_speed 
)

Gets the max speed (Mbps).

This function retrieves the maximum achievable speed (in megabits per second, Mbps) for the access point. The maximum speed indicates the highest possible data transfer rate that can be achieved when connected to the access point.

Since :
3.0
Parameters:
[in]apThe access point handle
[out]max_speedThe max speed
Returns:
0 on success, otherwise negative error value
Return values:
WIFI_MANAGER_ERROR_NONESuccessful
WIFI_MANAGER_ERROR_NOT_INITIALIZEDNot initialized
WIFI_MANAGER_ERROR_INVALID_PARAMETERInvalid parameter
WIFI_MANAGER_ERROR_OPERATION_FAILEDOperation failed
WIFI_MANAGER_ERROR_NOT_SUPPORTEDNot 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.

This function retrieves the network prefix length for the specified address family. The network prefix length defines the subnet mask for the network interface, determining the range of IP addresses available for devices connected to the network.

Since :
4.0
Parameters:
[in]apThe access point handle
[in]address_familyThe address family
[out]prefix_lenThe network prefix length.
In case of IPv4, it means netmask length
(also called a prefix, e.g. 8, 16, 24, 32)
Returns:
0 on success, otherwise negative error value.
Return values:
WIFI_MANAGER_ERROR_NONESuccessful
WIFI_MANAGER_ERROR_NOT_INITIALIZEDNot initialized
WIFI_MANAGER_ERROR_INVALID_PARAMETERInvalid parameter
WIFI_MANAGER_ERROR_NOT_SUPPORTEDNot supported
int wifi_manager_ap_get_proxy_address ( wifi_manager_ap_h  ap,
wifi_manager_address_family_e  address_family,
char **  proxy_address 
)

Gets the proxy address.

This function retrieves the proxy address for the specified address family. The retrieved proxy address can be used to configure the proxy settings for the network interface.

Since :
3.0
Remarks:
You must release proxy_address using free().
Parameters:
[in]apThe access point handle
[in]address_familyThe address family
[out]proxy_addressThe proxy address
Returns:
0 on success, otherwise negative error value
Return values:
WIFI_MANAGER_ERROR_NONESuccessful
WIFI_MANAGER_ERROR_NOT_INITIALIZEDNot initialized
WIFI_MANAGER_ERROR_INVALID_PARAMETERInvalid parameter
WIFI_MANAGER_ERROR_OUT_OF_MEMORYOut of memory
WIFI_MANAGER_ERROR_ADDRESS_FAMILY_NOT_SUPPORTEDAddress family not supported
WIFI_MANAGER_ERROR_NOT_SUPPORTEDNot supported

Gets the Proxy type.

This function retrieves the proxy address type for the access point. The proxy type indicates whether the proxy settings are disabled, set to automatic, or set to manual.

Since :
3.0
Parameters:
[in]apThe access point handle
[out]proxy_typeThe type of proxy
Returns:
0 on success, otherwise negative error value
Return values:
WIFI_MANAGER_ERROR_NONESuccessful
WIFI_MANAGER_ERROR_NOT_INITIALIZEDNot initialized
WIFI_MANAGER_ERROR_INVALID_PARAMETERInvalid parameter
WIFI_MANAGER_ERROR_OPERATION_FAILEDOperation failed
WIFI_MANAGER_ERROR_NOT_SUPPORTEDNot supported
int wifi_manager_ap_get_raw_ssid ( wifi_manager_ap_h  ap,
char **  ssid,
int *  ssid_len 
)

Gets raw SSID (Service Set Identifier).

This function retrieves the raw Service Set Identifier (SSID) for the access point. The SSID is a unique identifier assigned to a wireless network, typically represented as a sequence of characters (e.g., "MyHomeNetwork"). This function returns the raw SSID as a byte array, allowing direct access to the underlying data without any character encoding considerations.

Since :
4.0
Remarks:
You must release ssid using free().
Parameters:
[in]apThe access point handle
[out]ssidThe raw SSID bytes
[out]ssid_lenThe raw SSID length
Returns:
0 on success, otherwise negative error value
Return values:
WIFI_MANAGER_ERROR_NONESuccessful
WIFI_MANAGER_ERROR_NOT_INITIALIZEDNot initialized
WIFI_MANAGER_ERROR_INVALID_PARAMETERInvalid parameter
WIFI_MANAGER_ERROR_OUT_OF_MEMORYOut of memory
WIFI_MANAGER_ERROR_NOT_SUPPORTEDNot supported
int wifi_manager_ap_get_rssi ( wifi_manager_ap_h  ap,
int *  rssi 
)

Gets the RSSI.

This function retrieves the Received Signal Strength Indication (RSSI) value for the access point. The RSSI value indicates the strength of the received signal from the access point, measured in decibels relative to milliwatts (dBm). A higher RSSI value generally indicates a stronger signal and better connection quality.

Since :
3.0
Parameters:
[in]apThe access point handle
[out]rssiThe RSSI value (in dBm)
Returns:
0 on success, otherwise negative error value
Return values:
WIFI_MANAGER_ERROR_NONESuccessful
WIFI_MANAGER_ERROR_NOT_INITIALIZEDNot initialized
WIFI_MANAGER_ERROR_INVALID_PARAMETERInvalid parameter
WIFI_MANAGER_ERROR_OPERATION_FAILEDOperation failed
WIFI_MANAGER_ERROR_NOT_SUPPORTEDNot supported

Gets the RSSI level.

This function retrieves the Received Signal Strength Indication (RSSI) level for the access point. The RSSI level indicates the strength of the received signal from the access point, which can be used to determine the quality of the wireless connection.

Since :
4.0
Parameters:
[in]apThe access point handle
[out]rssi_levelThe RSSI level
Returns:
0 on success, otherwise negative error value
Return values:
WIFI_MANAGER_ERROR_NONESuccessful
WIFI_MANAGER_ERROR_NOT_INITIALIZEDNot initialized
WIFI_MANAGER_ERROR_INVALID_PARAMETERInvalid parameter
WIFI_MANAGER_ERROR_OPERATION_FAILEDOperation failed
WIFI_MANAGER_ERROR_NOT_SUPPORTEDNot supported
int wifi_manager_ap_get_subnet_mask ( wifi_manager_ap_h  ap,
wifi_manager_address_family_e  address_family,
char **  subnet_mask 
)

Gets the subnet mask.

This function retrieves the subnet mask for the specified address family. The subnet mask is used to determine which part of an IP address represents the network portion and which part represents the host portion.

Since :
3.0
Remarks:
You must release subnet_mask using free().
Parameters:
[in]apThe access point handle
[in]address_familyThe address family
[out]subnet_maskThe subnet mask
Returns:
0 on success, otherwise negative error value
Return values:
WIFI_MANAGER_ERROR_NONESuccessful
WIFI_MANAGER_ERROR_NOT_INITIALIZEDNot initialized
WIFI_MANAGER_ERROR_INVALID_PARAMETERInvalid parameter
WIFI_MANAGER_ERROR_OUT_OF_MEMORYOut of memory
WIFI_MANAGER_ERROR_ADDRESS_FAMILY_NOT_SUPPORTEDAddress family not supported
WIFI_MANAGER_ERROR_NOT_SUPPORTEDNot supported
int wifi_manager_ap_is_favorite ( wifi_manager_ap_h  ap,
bool *  favorite 
)

Checks whether the access point is favorite or not.

This function determines whether the access point is marked as a favorite or not. A favorite access point is one that the user has explicitly chosen to connect to frequently or has saved for future use.

Since :
3.0
Parameters:
[in]apThe access point handle
[out]favoritetrue if access point is favorite, otherwise false if access point is not favorite
Returns:
0 on success, otherwise negative error value
Return values:
WIFI_MANAGER_ERROR_NONESuccessful
WIFI_MANAGER_ERROR_NOT_INITIALIZEDNot initialized
WIFI_MANAGER_ERROR_INVALID_PARAMETERInvalid parameter
WIFI_MANAGER_ERROR_OPERATION_FAILEDOperation failed
WIFI_MANAGER_ERROR_NOT_SUPPORTEDNot supported
int wifi_manager_ap_is_hidden ( wifi_manager_ap_h  ap,
bool *  is_hidden 
)

Checks whether the access point is hidden or not.

This function determines whether the access point is hidden or not. A hidden access point does not broadcast its SSID (Service Set Identifier), making it less visible to potential clients.

Since :
5.5
Parameters:
[in]apThe access point handle
[out]is_hiddentrue if the access point is hidden, false if the access point is not hidden.
Returns:
0 on success, otherwise negative error value
Return values:
WIFI_MANAGER_ERROR_NONESuccessful
WIFI_MANAGER_ERROR_NOT_INITIALIZEDNot initialized
WIFI_MANAGER_ERROR_INVALID_PARAMETERInvalid parameter
WIFI_MANAGER_ERROR_OPERATION_FAILEDOperation failed
WIFI_MANAGER_ERROR_NOT_SUPPORTEDNot supported
int wifi_manager_ap_is_passpoint ( wifi_manager_ap_h  ap,
bool *  passpoint 
)

Checks whether the access point is passpoint or not.

This function determines whether the access point is a Passpoint or not. A Passpoint access point is a type of Wi-Fi hotspot that supports the Hotspot 2.0 standard, providing seamless and secure connectivity across various networks.

Since :
3.0
Parameters:
[in]apThe access point handle
[out]passpointtrue if access point is passpoint, otherwise false if access point is not passpoint.
Returns:
0 on success, otherwise negative error value
Return values:
WIFI_MANAGER_ERROR_NONESuccessful
WIFI_MANAGER_ERROR_NOT_INITIALIZEDNot initialized
WIFI_MANAGER_ERROR_INVALID_PARAMETERInvalid parameter
WIFI_MANAGER_ERROR_OPERATION_FAILEDOperation failed
WIFI_MANAGER_ERROR_NOT_SUPPORTEDNot supported
int wifi_manager_ap_set_dns_address ( wifi_manager_ap_h  ap,
int  order,
wifi_manager_address_family_e  address_family,
const char *  dns_address 
)

Sets the DNS address.

This function sets the DNS address for the specified order and address family. Up to two DNS addresses can be set for each address family. If the DNS address is set to NULL, the existing DNS address for that order and address family will be deleted.

Since :
3.0
Remarks:
The allowance of DNS address is 2
Parameters:
[in]apThe access point handle
[in]orderThe order of DNS address
It starts from 1, which means first DNS address.
[in]address_familyThe address family
[in]dns_addressThe DNS address
If you set this value to NULL, then the existing value will be deleted.
Returns:
0 on success, otherwise negative error value
Return values:
WIFI_MANAGER_ERROR_NONESuccessful
WIFI_MANAGER_ERROR_NOT_INITIALIZEDNot initialized
WIFI_MANAGER_ERROR_INVALID_PARAMETERInvalid parameter
WIFI_MANAGER_ERROR_OPERATION_FAILEDOperation failed
WIFI_MANAGER_ERROR_ADDRESS_FAMILY_NOT_SUPPORTEDAddress family not supported
WIFI_MANAGER_ERROR_PERMISSION_DENIEDPermission Denied
WIFI_MANAGER_ERROR_NOT_SUPPORTEDNot supported
See also:
wifi_manager_update_ap()

Sets the DNS config type.

This function sets the DNS configuration type for the specified address family. The DNS configuration type determines how the DNS server addresses are configured for the network interface.

Since :
4.0
Parameters:
[in]apThe access point handle
[in]address_familyThe address family
[in]typeThe DNS config type
Returns:
0 on success, otherwise negative error value.
Return values:
WIFI_MANAGER_ERROR_NONESuccessful
WIFI_MANAGER_ERROR_NOT_INITIALIZEDNot initialized
WIFI_MANAGER_ERROR_INVALID_PARAMETERInvalid parameter
WIFI_MANAGER_ERROR_OPERATION_FAILEDOperation failed
WIFI_MANAGER_ERROR_NOT_SUPPORTEDNot supported
See also:
wifi_manager_update_ap()
int wifi_manager_ap_set_gateway_address ( wifi_manager_ap_h  ap,
wifi_manager_address_family_e  address_family,
const char *  gateway_address 
)

Sets the gateway address.

This function sets the gateway address for the specified address family. If the gateway address is set to NULL, the existing gateway address for that address family will be deleted.

Since :
3.0
Parameters:
[in]apThe access point handle
[in]address_familyThe address family
[in]gateway_addressThe gateway address
If you set this value to NULL, then the existing value will be deleted.
Returns:
0 on success, otherwise negative error value
Return values:
WIFI_MANAGER_ERROR_NONESuccessful
WIFI_MANAGER_ERROR_NOT_INITIALIZEDNot initialized
WIFI_MANAGER_ERROR_INVALID_PARAMETERInvalid parameter
WIFI_MANAGER_ERROR_OPERATION_FAILEDOperation failed
WIFI_MANAGER_ERROR_ADDRESS_FAMILY_NOT_SUPPORTEDAddress family not supported
WIFI_MANAGER_ERROR_PERMISSION_DENIEDPermission Denied
WIFI_MANAGER_ERROR_NOT_SUPPORTEDNot supported
See also:
wifi_manager_update_ap()
int wifi_manager_ap_set_ip_address ( wifi_manager_ap_h  ap,
wifi_manager_address_family_e  address_family,
const char *  ip_address 
)

Sets the IP address.

This function sets the IP address for the specified address family. If the IP address is set to NULL, the existing IP address for that address family will be deleted.

Since :
3.0
Parameters:
[in]apThe access point handle
[in]address_familyThe address family
[in]ip_addressThe IP address; if you set this value to NULL, then the existing value will be deleted
Returns:
0 on success, otherwise negative error value
Return values:
WIFI_MANAGER_ERROR_NONESuccessful
WIFI_MANAGER_ERROR_NOT_INITIALIZEDNot initialized
WIFI_MANAGER_ERROR_INVALID_PARAMETERInvalid parameter
WIFI_MANAGER_ERROR_OPERATION_FAILEDOperation failed
WIFI_MANAGER_ERROR_ADDRESS_FAMILY_NOT_SUPPORTEDAddress family not supported
WIFI_MANAGER_ERROR_PERMISSION_DENIEDPermission Denied
WIFI_MANAGER_ERROR_NOT_SUPPORTEDNot supported
See also:
wifi_manager_update_ap()

Sets the config type of IP.

If you set IP config type to WIFI_MANAGER_IP_CONFIG_TYPE_STATIC, then IP address, Gateway and Subnet mask will be set to the initial value "0.0.0.0".

Since :
3.0
Parameters:
[in]apThe access point handle
[in]address_familyThe address family
[in]typeThe type of IP config
Returns:
0 on success, otherwise negative error value
Return values:
WIFI_MANAGER_ERROR_NONESuccessful
WIFI_MANAGER_ERROR_NOT_INITIALIZEDNot initialized
WIFI_MANAGER_ERROR_INVALID_PARAMETERInvalid parameter
WIFI_MANAGER_ERROR_OPERATION_FAILEDOperation failed
WIFI_MANAGER_ERROR_ADDRESS_FAMILY_NOT_SUPPORTEDAddress family not supported
WIFI_MANAGER_ERROR_PERMISSION_DENIEDPermission Denied
WIFI_MANAGER_ERROR_NOT_SUPPORTEDNot supported
See also:
wifi_manager_update_ap()
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.

This function sets the network prefix length for the specified address family. The network prefix length is used to define the subnet mask for the network interface, which determines the range of IP addresses available for devices connected to the network.

Since :
4.0
Parameters:
[in]apThe access point handle
[in]address_familyThe address family
[in]prefix_lenThe network prefix length.
In case of IPv4, it means netmask length
(also called a prefix, e.g. 8, 16, 24, 32)
Returns:
0 on success, otherwise negative error value.
Return values:
WIFI_MANAGER_ERROR_NONESuccessful
WIFI_MANAGER_ERROR_NOT_INITIALIZEDNot initialized
WIFI_MANAGER_ERROR_INVALID_PARAMETERInvalid parameter
WIFI_MANAGER_ERROR_NOT_SUPPORTEDNot supported
See also:
wifi_manager_update_ap()
int wifi_manager_ap_set_proxy_address ( wifi_manager_ap_h  ap,
wifi_manager_address_family_e  address_family,
const char *  proxy_address 
)

Sets the proxy address.

This function sets the proxy address for the specified address family. If the proxy address is set to NULL, the existing proxy address for that address family will be deleted.

Since :
3.0
Parameters:
[in]apThe access point handle
[in]address_familyThe address family
[in]proxy_addressThe proxy address
If you set this value to NULL, then the existing value will be deleted.
Returns:
0 on success, otherwise negative error value
Return values:
WIFI_MANAGER_ERROR_NONESuccessful
WIFI_MANAGER_ERROR_NOT_INITIALIZEDNot initialized
WIFI_MANAGER_ERROR_INVALID_PARAMETERInvalid parameter
WIFI_MANAGER_ERROR_OPERATION_FAILEDOperation failed
WIFI_MANAGER_ERROR_ADDRESS_FAMILY_NOT_SUPPORTEDAddress family not supported
WIFI_MANAGER_ERROR_PERMISSION_DENIEDPermission Denied
WIFI_MANAGER_ERROR_NOT_SUPPORTEDNot supported
See also:
wifi_manager_update_ap()

Sets the Proxy address.

If you set Proxy type to WIFI_MANAGER_PROXY_TYPE_AUTO or WIFI_MANAGER_PROXY_TYPE_MANUAL, then Proxy will be restored.

Since :
3.0
Parameters:
[in]apThe access point handle
[in]proxy_typeThe type of proxy
Returns:
0 on success, otherwise negative error value
Return values:
WIFI_MANAGER_ERROR_NONESuccessful
WIFI_MANAGER_ERROR_NOT_INITIALIZEDNot initialized
WIFI_MANAGER_ERROR_INVALID_PARAMETERInvalid parameter
WIFI_MANAGER_ERROR_OPERATION_FAILEDOperation failed
WIFI_MANAGER_ERROR_PERMISSION_DENIEDPermission Denied
WIFI_MANAGER_ERROR_NOT_SUPPORTEDNot supported
See also:
wifi_manager_update_ap()
int wifi_manager_ap_set_subnet_mask ( wifi_manager_ap_h  ap,
wifi_manager_address_family_e  address_family,
const char *  subnet_mask 
)

Sets the subnet mask.

This function sets the subnet mask for the specified address family. If the subnet mask is set to NULL, the existing subnet mask for that address family will be deleted.

Since :
3.0
Parameters:
[in]apThe access point handle
[in]address_familyThe address family
[in]subnet_maskThe subnet mask; if you set this value to NULL, then the existing value will be deleted
Returns:
0 on success, otherwise negative error value
Return values:
WIFI_MANAGER_ERROR_NONESuccessful
WIFI_MANAGER_ERROR_NOT_INITIALIZEDNot initialized
WIFI_MANAGER_ERROR_INVALID_PARAMETERInvalid parameter
WIFI_MANAGER_ERROR_OPERATION_FAILEDOperation failed
WIFI_MANAGER_ERROR_ADDRESS_FAMILY_NOT_SUPPORTEDAddress family not supported
WIFI_MANAGER_ERROR_PERMISSION_DENIEDPermission Denied
WIFI_MANAGER_ERROR_NOT_SUPPORTEDNot supported
See also:
wifi_manager_update_ap()
int wifi_manager_foreach_found_bssid ( wifi_manager_ap_h  ap,
wifi_manager_found_bssid_cb  callback,
void *  user_data 
)

Gets the BSSID list.

This function retrieves the BSSID list associated with the access point. Each BSSID represents a unique identifier for a wireless network interface, typically corresponding to a specific access point or router.

Since :
5.0
Parameters:
[in]apThe access point handle
[in]callbackThe callback to be called
[in]user_dataThe user data passed to the callback function
Returns:
0 on success, otherwise negative error value
Return values:
WIFI_MANAGER_ERROR_NONESuccessful
WIFI_MANAGER_ERROR_NOT_INITIALIZEDNot initialized
WIFI_MANAGER_ERROR_INVALID_PARAMETERInvalid parameter
WIFI_MANAGER_ERROR_OPERATION_FAILEDOperation failed
WIFI_MANAGER_ERROR_NOT_SUPPORTEDNot supported
Postcondition:
This function invokes wifi_manager_found_bssid_cb().