feat(esp_netif): Added code to expose api to add and remove ipv6 address

This commit is contained in:
Abhik Roy
2024-01-09 18:00:47 +08:00
parent 22f2ecc400
commit 325a8d7a6e
5 changed files with 41 additions and 31 deletions

View File

@@ -821,6 +821,35 @@ esp_err_t esp_netif_get_ip6_global(esp_netif_t *esp_netif, esp_ip6_addr_t *if_ip
* number of returned IPv6 addresses
*/
int esp_netif_get_all_ip6(esp_netif_t *esp_netif, esp_ip6_addr_t if_ip6[]);
/**
* @brief Cause the TCP/IP stack to add an IPv6 address to the interface
*
* @param[in] esp_netif Handle to esp-netif instance
* @param[in] addr The address to be added
* @param[in] preferred The preferred status of the address
*
* @return
* - ESP_OK
* - ESP_ERR_ESP_NETIF_INVALID_PARAMS
* - ESP_ERR_ESP_NETIF_IP6_ADDR_FAILED
* - ESP_ERR_NO_MEM
*/
esp_err_t esp_netif_add_ip6_address(esp_netif_t *esp_netif, const esp_ip6_addr_t addr, bool preferred);
/**
* @brief Cause the TCP/IP stack to remove an IPv6 address from the interface
*
* @param[in] esp_netif Handle to esp-netif instance
* @param[in] addr The address to be removed
*
* @return
* - ESP_OK
* - ESP_ERR_ESP_NETIF_INVALID_PARAMS
* - ESP_ERR_ESP_NETIF_IP6_ADDR_FAILED
* - ESP_ERR_NO_MEM
*/
esp_err_t esp_netif_remove_ip6_address(esp_netif_t *esp_netif, const esp_ip6_addr_t *addr);
#endif
/**