Function esp_idf_svc::hal::sys::esp_netif_set_ip_info
source · pub unsafe extern "C" fn esp_netif_set_ip_info(
esp_netif: *mut esp_netif_obj,
ip_info: *const esp_netif_ip_info_t,
) -> i32
Expand description
@brief Set interface’s IP address information
This function is mainly used to set a static IP on an interface.
If the interface is up, the new IP information is set directly in the TCP/IP stack.
The copy of IP information kept in the ESP-NETIF instance is also updated (this copy is returned if the IP is queried while the interface is still down.)
@note DHCP client/server must be stopped (if enabled for this interface) before setting new IP information.
@note Calling this interface for may generate a SYSTEM_EVENT_STA_GOT_IP or SYSTEM_EVENT_ETH_GOT_IP event.
@param[in] esp_netif Handle to esp-netif instance @param[in] ip_info IP information to set on the specified interface
@return - ESP_OK - ESP_ERR_ESP_NETIF_INVALID_PARAMS - ESP_ERR_ESP_NETIF_DHCP_NOT_STOPPED If DHCP server or client is still running