* @remarks You must release @a ip_address using free().
* @param[in] ap The access point handle
* @param[in] address_family The address family
- * @param[out] ip_address The IP address
+ * @param[out] ip_address The IP address; this value is for default address \n
+ * e.g, IPv6 can have multiple addresses. but you can only obtain a representative address \n
+ * if you want to get all IPv6 address, you can use the wifi_manager_ap_foreach_ipv6_address().
* @return 0 on success, otherwise negative error value
* @retval #WIFI_MANAGER_ERROR_NONE Successful
* @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #WIFI_MANAGER_ERROR_OUT_OF_MEMORY Out of memory
* @retval #WIFI_MANAGER_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED Address family not supported
* @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED Not supported
+ * @see wifi_manager_ap_foreach_ipv6_address()
*/
int wifi_manager_ap_get_ip_address(wifi_manager_ap_h ap,
wifi_manager_address_family_e address_family, char **ip_address);
} else if (address_family == WIFI_MANAGER_ADDRESS_FAMILY_IPV6) {
if (net_get_preferred_ipv6_address(profile_info->ProfileName, ip_address) != NET_ERR_NONE) {
WIFI_LOG(WIFI_ERROR, "Failed to get preferred ipv6 address");
- *ip_address = NULL;
- return WIFI_MANAGER_ERROR_OPERATION_FAILED;
+ *ip_address = __ap_convert_ip_to_string(
+ &profile_info->net_info.IpAddr6,
+ address_family);
}
}