Function esp_idf_svc::hal::sys::esp_netif_set_old_ip_info
source · pub unsafe extern "C" fn esp_netif_set_old_ip_info(
esp_netif: *mut esp_netif_obj,
ip_info: *const esp_netif_ip_info_t,
) -> i32
Expand description
@brief Set interface old IP information
This function is called from the DHCP client (if enabled), before a new IP is set. It is also called from the default handlers for the SYSTEM_EVENT_STA_CONNECTED and SYSTEM_EVENT_ETH_CONNECTED events.
Calling this function stores the previously configured IP, which can be used to determine if the IP changes in the future.
If the interface is disconnected or down for too long, the “IP lost timer” will expire (after the configured interval) and set the old IP information to zero.
@param[in] esp_netif Handle to esp-netif instance @param[in] ip_info Store the old IP information for the specified interface
@return - ESP_OK - ESP_ERR_ESP_NETIF_INVALID_PARAMS