Explorar o código

examples: protocol examples which use common connection component
updated to use esp_netif_init instead of tcpip_adapter in initialization code

David Cermak %!s(int64=6) %!d(string=hai) anos
pai
achega
a49b934ef8
Modificáronse 32 ficheiros con 59 adicións e 59 borrados
  1. 1 1
      examples/protocols/coap_client/main/coap_client_example_main.c
  2. 1 1
      examples/protocols/coap_server/main/coap_server_example_main.c
  3. 2 2
      examples/protocols/esp_http_client/main/esp_http_client_example.c
  4. 2 2
      examples/protocols/http2_request/main/http2_request_example_main.c
  5. 1 1
      examples/protocols/http_request/main/http_request_example_main.c
  6. 2 2
      examples/protocols/http_server/advanced_tests/main/main.c
  7. 2 2
      examples/protocols/http_server/file_serving/main/main.c
  8. 2 2
      examples/protocols/http_server/persistent_sockets/main/main.c
  9. 2 2
      examples/protocols/http_server/restful_server/main/esp_rest_main.c
  10. 2 2
      examples/protocols/http_server/simple/main/main.c
  11. 2 2
      examples/protocols/https_mbedtls/main/https_mbedtls_example_main.c
  12. 2 2
      examples/protocols/https_request/main/https_request_example_main.c
  13. 2 2
      examples/protocols/https_server/main/main.c
  14. 1 1
      examples/protocols/mdns/main/mdns_example_main.c
  15. 2 2
      examples/protocols/mqtt/publish_test/main/publish_test.c
  16. 2 2
      examples/protocols/mqtt/ssl/main/app_main.c
  17. 2 2
      examples/protocols/mqtt/ssl_mutual_auth/main/app_main.c
  18. 2 2
      examples/protocols/mqtt/tcp/main/app_main.c
  19. 2 2
      examples/protocols/mqtt/ws/main/app_main.c
  20. 2 2
      examples/protocols/mqtt/wss/main/app_main.c
  21. 2 2
      examples/protocols/openssl_client/main/openssl_client_example_main.c
  22. 2 2
      examples/protocols/openssl_server/main/openssl_server_example_main.c
  23. 1 1
      examples/protocols/sntp/main/sntp_example_main.c
  24. 2 2
      examples/protocols/sockets/tcp_client/main/tcp_client.c
  25. 2 2
      examples/protocols/sockets/tcp_server/main/tcp_server.c
  26. 2 2
      examples/protocols/sockets/udp_client/main/udp_client.c
  27. 6 6
      examples/protocols/sockets/udp_multicast/main/udp_multicast_example_main.c
  28. 2 2
      examples/protocols/sockets/udp_server/main/udp_server.c
  29. 1 1
      examples/protocols/websocket/main/websocket_example.c
  30. 1 1
      examples/system/ota/advanced_https_ota/main/advanced_https_ota_example.c
  31. 1 1
      examples/system/ota/native_ota_example/main/native_ota_example.c
  32. 1 1
      examples/system/ota/simple_ota_example/main/simple_ota_example.c

+ 1 - 1
examples/protocols/coap_client/main/coap_client_example_main.c

@@ -440,7 +440,7 @@ clean_up:
 void app_main(void)
 {
     ESP_ERROR_CHECK( nvs_flash_init() );
-    tcpip_adapter_init();
+    esp_netif_init();
     ESP_ERROR_CHECK(esp_event_loop_create_default());
 
     /* This helper function configures Wi-Fi or Ethernet, as selected in menuconfig.

+ 1 - 1
examples/protocols/coap_server/main/coap_server_example_main.c

@@ -306,7 +306,7 @@ clean_up:
 void app_main(void)
 {
     ESP_ERROR_CHECK( nvs_flash_init() );
-    tcpip_adapter_init();
+    esp_netif_init();
     ESP_ERROR_CHECK(esp_event_loop_create_default());
 
     /* This helper function configures Wi-Fi or Ethernet, as selected in menuconfig.

+ 2 - 2
examples/protocols/esp_http_client/main/esp_http_client_example.c

@@ -15,7 +15,7 @@
 #include "esp_system.h"
 #include "nvs_flash.h"
 #include "esp_event.h"
-#include "tcpip_adapter.h"
+#include "esp_netif.h"
 #include "protocol_examples_common.h"
 #include "esp_tls.h"
 
@@ -541,7 +541,7 @@ void app_main(void)
       ret = nvs_flash_init();
     }
     ESP_ERROR_CHECK(ret);
-    tcpip_adapter_init();
+    esp_netif_init();
     ESP_ERROR_CHECK(esp_event_loop_create_default());
 
     /* This helper function configures Wi-Fi or Ethernet, as selected in menuconfig.

+ 2 - 2
examples/protocols/http2_request/main/http2_request_example_main.c

@@ -21,7 +21,7 @@
 #include "esp_system.h"
 #include "nvs_flash.h"
 #include "protocol_examples_common.h"
-#include "tcpip_adapter.h"
+#include "esp_netif.h"
 
 #include "sh2lib.h"
 
@@ -131,7 +131,7 @@ static void http2_task(void *args)
 void app_main(void)
 {
     ESP_ERROR_CHECK( nvs_flash_init() );
-    tcpip_adapter_init();
+    esp_netif_init();
     ESP_ERROR_CHECK(esp_event_loop_create_default());
 
     /* This helper function configures Wi-Fi or Ethernet, as selected in menuconfig.

+ 1 - 1
examples/protocols/http_request/main/http_request_example_main.c

@@ -122,7 +122,7 @@ static void http_get_task(void *pvParameters)
 void app_main(void)
 {
     ESP_ERROR_CHECK( nvs_flash_init() );
-    tcpip_adapter_init();
+    esp_netif_init();
     ESP_ERROR_CHECK(esp_event_loop_create_default());
 
     /* This helper function configures Wi-Fi or Ethernet, as selected in menuconfig.

+ 2 - 2
examples/protocols/http_server/advanced_tests/main/main.c

@@ -12,7 +12,7 @@
 #include "esp_log.h"
 #include "esp_system.h"
 #include "nvs_flash.h"
-#include "tcpip_adapter.h"
+#include "esp_netif.h"
 #include "esp_eth.h"
 #include "protocol_examples_common.h"
 
@@ -46,7 +46,7 @@ void app_main(void)
     static httpd_handle_t server = NULL;
 
     ESP_ERROR_CHECK(nvs_flash_init());
-    tcpip_adapter_init();
+    esp_netif_init();
     ESP_ERROR_CHECK(esp_event_loop_create_default());
 
     /* This helper function configures Wi-Fi or Ethernet, as selected in menuconfig.

+ 2 - 2
examples/protocols/http_server/file_serving/main/main.c

@@ -15,7 +15,7 @@
 #include "esp_system.h"
 #include "esp_spiffs.h"
 #include "nvs_flash.h"
-#include "tcpip_adapter.h"
+#include "esp_netif.h"
 #include "protocol_examples_common.h"
 
 /* This example demonstrates how to create file server
@@ -67,7 +67,7 @@ esp_err_t start_file_server(const char *base_path);
 void app_main(void)
 {
     ESP_ERROR_CHECK(nvs_flash_init());
-    tcpip_adapter_init();
+    esp_netif_init();
     ESP_ERROR_CHECK(esp_event_loop_create_default());
 
     /* This helper function configures Wi-Fi or Ethernet, as selected in menuconfig.

+ 2 - 2
examples/protocols/http_server/persistent_sockets/main/main.c

@@ -12,7 +12,7 @@
 #include <esp_log.h>
 #include <esp_system.h>
 #include <nvs_flash.h>
-#include "tcpip_adapter.h"
+#include "esp_netif.h"
 #include "esp_eth.h"
 #include "protocol_examples_common.h"
 
@@ -216,7 +216,7 @@ void app_main(void)
     static httpd_handle_t server = NULL;
 
     ESP_ERROR_CHECK(nvs_flash_init());
-    tcpip_adapter_init();
+    esp_netif_init();
     ESP_ERROR_CHECK(esp_event_loop_create_default());
 
     /* This helper function configures Wi-Fi or Ethernet, as selected in menuconfig.

+ 2 - 2
examples/protocols/http_server/restful_server/main/esp_rest_main.c

@@ -13,7 +13,7 @@
 #include "esp_spiffs.h"
 #include "sdmmc_cmd.h"
 #include "nvs_flash.h"
-#include "tcpip_adapter.h"
+#include "esp_netif.h"
 #include "esp_event.h"
 #include "esp_log.h"
 #include "mdns.h"
@@ -126,7 +126,7 @@ esp_err_t init_fs(void)
 void app_main(void)
 {
     ESP_ERROR_CHECK(nvs_flash_init());
-    tcpip_adapter_init();
+    esp_netif_init();
     ESP_ERROR_CHECK(esp_event_loop_create_default());
     initialise_mdns();
     netbiosns_init();

+ 2 - 2
examples/protocols/http_server/simple/main/main.c

@@ -14,7 +14,7 @@
 #include <nvs_flash.h>
 #include <sys/param.h>
 #include "nvs_flash.h"
-#include "tcpip_adapter.h"
+#include "esp_netif.h"
 #include "esp_eth.h"
 #include "protocol_examples_common.h"
 
@@ -272,7 +272,7 @@ void app_main(void)
     static httpd_handle_t server = NULL;
 
     ESP_ERROR_CHECK(nvs_flash_init());
-    tcpip_adapter_init();
+    esp_netif_init();
     ESP_ERROR_CHECK(esp_event_loop_create_default());
 
     /* This helper function configures Wi-Fi or Ethernet, as selected in menuconfig.

+ 2 - 2
examples/protocols/https_mbedtls/main/https_mbedtls_example_main.c

@@ -31,7 +31,7 @@
 #include "esp_system.h"
 #include "nvs_flash.h"
 #include "protocol_examples_common.h"
-#include "tcpip_adapter.h"
+#include "esp_netif.h"
 
 #include "lwip/err.h"
 #include "lwip/sockets.h"
@@ -274,7 +274,7 @@ static void https_get_task(void *pvParameters)
 void app_main(void)
 {
     ESP_ERROR_CHECK( nvs_flash_init() );
-    tcpip_adapter_init();
+    esp_netif_init();
     ESP_ERROR_CHECK(esp_event_loop_create_default());
 
     /* This helper function configures Wi-Fi or Ethernet, as selected in menuconfig.

+ 2 - 2
examples/protocols/https_request/main/https_request_example_main.c

@@ -32,7 +32,7 @@
 #include "esp_system.h"
 #include "nvs_flash.h"
 #include "protocol_examples_common.h"
-#include "tcpip_adapter.h"
+#include "esp_netif.h"
 
 #include "lwip/err.h"
 #include "lwip/sockets.h"
@@ -151,7 +151,7 @@ static void https_get_task(void *pvParameters)
 void app_main(void)
 {
     ESP_ERROR_CHECK( nvs_flash_init() );
-    tcpip_adapter_init();
+    esp_netif_init();
     ESP_ERROR_CHECK(esp_event_loop_create_default());
 
     /* This helper function configures Wi-Fi or Ethernet, as selected in menuconfig.

+ 2 - 2
examples/protocols/https_server/main/main.c

@@ -13,7 +13,7 @@
 #include <esp_system.h>
 #include <nvs_flash.h>
 #include <sys/param.h>
-#include "tcpip_adapter.h"
+#include "esp_netif.h"
 #include "esp_eth.h"
 #include "protocol_examples_common.h"
 
@@ -103,7 +103,7 @@ void app_main(void)
     static httpd_handle_t server = NULL;
 
     ESP_ERROR_CHECK(nvs_flash_init());
-    tcpip_adapter_init();
+    esp_netif_init();
     ESP_ERROR_CHECK(esp_event_loop_create_default());
 
     /* Register event handlers to start server when Wi-Fi or Ethernet is connected,

+ 1 - 1
examples/protocols/mdns/main/mdns_example_main.c

@@ -186,7 +186,7 @@ static void mdns_example_task(void *pvParameters)
 void app_main(void)
 {
     ESP_ERROR_CHECK(nvs_flash_init());
-    tcpip_adapter_init();
+    ESP_ERROR_CHECK(esp_netif_init());
     ESP_ERROR_CHECK(esp_event_loop_create_default());
 
     initialise_mdns();

+ 2 - 2
examples/protocols/mqtt/publish_test/main/publish_test.c

@@ -14,7 +14,7 @@
 #include "esp_system.h"
 #include "nvs_flash.h"
 #include "esp_event.h"
-#include "tcpip_adapter.h"
+#include "esp_netif.h"
 #include "protocol_examples_common.h"
 
 #include "freertos/FreeRTOS.h"
@@ -169,7 +169,7 @@ void app_main(void)
     esp_log_level_set("OUTBOX", ESP_LOG_VERBOSE);
 
     ESP_ERROR_CHECK(nvs_flash_init());
-    tcpip_adapter_init();
+    esp_netif_init();
     ESP_ERROR_CHECK(esp_event_loop_create_default());
 
     /* This helper function configures Wi-Fi or Ethernet, as selected in menuconfig.

+ 2 - 2
examples/protocols/mqtt/ssl/main/app_main.c

@@ -14,7 +14,7 @@
 #include "esp_system.h"
 #include "nvs_flash.h"
 #include "esp_event.h"
-#include "tcpip_adapter.h"
+#include "esp_netif.h"
 #include "protocol_examples_common.h"
 
 #include "esp_log.h"
@@ -139,7 +139,7 @@ void app_main(void)
     esp_log_level_set("OUTBOX", ESP_LOG_VERBOSE);
 
     ESP_ERROR_CHECK(nvs_flash_init());
-    tcpip_adapter_init();
+    esp_netif_init();
     ESP_ERROR_CHECK(esp_event_loop_create_default());
 
     /* This helper function configures Wi-Fi or Ethernet, as selected in menuconfig.

+ 2 - 2
examples/protocols/mqtt/ssl_mutual_auth/main/app_main.c

@@ -14,7 +14,7 @@
 #include "esp_system.h"
 #include "nvs_flash.h"
 #include "esp_event.h"
-#include "tcpip_adapter.h"
+#include "esp_netif.h"
 #include "protocol_examples_common.h"
 
 #include "freertos/FreeRTOS.h"
@@ -111,7 +111,7 @@ void app_main(void)
     esp_log_level_set("OUTBOX", ESP_LOG_VERBOSE);
 
     ESP_ERROR_CHECK(nvs_flash_init());
-    tcpip_adapter_init();
+    esp_netif_init();
     ESP_ERROR_CHECK(esp_event_loop_create_default());
 
     /* This helper function configures Wi-Fi or Ethernet, as selected in menuconfig.

+ 2 - 2
examples/protocols/mqtt/tcp/main/app_main.c

@@ -15,7 +15,7 @@
 #include "esp_system.h"
 #include "nvs_flash.h"
 #include "esp_event.h"
-#include "tcpip_adapter.h"
+#include "esp_netif.h"
 #include "protocol_examples_common.h"
 
 #include "freertos/FreeRTOS.h"
@@ -138,7 +138,7 @@ void app_main(void)
     esp_log_level_set("OUTBOX", ESP_LOG_VERBOSE);
 
     ESP_ERROR_CHECK(nvs_flash_init());
-    tcpip_adapter_init();
+    esp_netif_init();
     ESP_ERROR_CHECK(esp_event_loop_create_default());
 
     /* This helper function configures Wi-Fi or Ethernet, as selected in menuconfig.

+ 2 - 2
examples/protocols/mqtt/ws/main/app_main.c

@@ -14,7 +14,7 @@
 #include "esp_system.h"
 #include "nvs_flash.h"
 #include "esp_event.h"
-#include "tcpip_adapter.h"
+#include "esp_netif.h"
 #include "protocol_examples_common.h"
 
 #include "freertos/FreeRTOS.h"
@@ -111,7 +111,7 @@ void app_main(void)
     esp_log_level_set("OUTBOX", ESP_LOG_VERBOSE);
 
     ESP_ERROR_CHECK(nvs_flash_init());
-    tcpip_adapter_init();
+    esp_netif_init();
     ESP_ERROR_CHECK(esp_event_loop_create_default());
 
     /* This helper function configures Wi-Fi or Ethernet, as selected in menuconfig.

+ 2 - 2
examples/protocols/mqtt/wss/main/app_main.c

@@ -14,7 +14,7 @@
 #include "esp_system.h"
 #include "nvs_flash.h"
 #include "esp_event.h"
-#include "tcpip_adapter.h"
+#include "esp_netif.h"
 #include "protocol_examples_common.h"
 
 #include "freertos/FreeRTOS.h"
@@ -120,7 +120,7 @@ void app_main(void)
     esp_log_level_set("OUTBOX", ESP_LOG_VERBOSE);
 
     ESP_ERROR_CHECK(nvs_flash_init());
-    tcpip_adapter_init();
+    esp_netif_init();
     ESP_ERROR_CHECK(esp_event_loop_create_default());
 
     /* This helper function configures Wi-Fi or Ethernet, as selected in menuconfig.

+ 2 - 2
examples/protocols/openssl_client/main/openssl_client_example_main.c

@@ -20,7 +20,7 @@
 #include "esp_wifi.h"
 #include "esp_event.h"
 #include "nvs_flash.h"
-#include "tcpip_adapter.h"
+#include "esp_netif.h"
 #include "protocol_examples_common.h"
 
 #include "lwip/sockets.h"
@@ -174,7 +174,7 @@ void app_main(void)
 {
     ESP_ERROR_CHECK( nvs_flash_init() );
     ESP_ERROR_CHECK(nvs_flash_init());
-    tcpip_adapter_init();
+    esp_netif_init();
     ESP_ERROR_CHECK(esp_event_loop_create_default());
 
     /* This helper function configures Wi-Fi or Ethernet, as selected in menuconfig.

+ 2 - 2
examples/protocols/openssl_server/main/openssl_server_example_main.c

@@ -19,7 +19,7 @@
 #include "esp_log.h"
 #include "esp_wifi.h"
 #include "esp_event.h"
-#include "tcpip_adapter.h"
+#include "esp_netif.h"
 #include "nvs_flash.h"
 #include "protocol_examples_common.h"
 
@@ -208,7 +208,7 @@ static void openssl_server_init(void)
 void app_main(void)
 {
     ESP_ERROR_CHECK(nvs_flash_init());
-    tcpip_adapter_init();
+    esp_netif_init();
     ESP_ERROR_CHECK(esp_event_loop_create_default());
 
     /* This helper function configures Wi-Fi or Ethernet, as selected in menuconfig.

+ 1 - 1
examples/protocols/sntp/main/sntp_example_main.c

@@ -119,7 +119,7 @@ void app_main(void)
 static void obtain_time(void)
 {
     ESP_ERROR_CHECK( nvs_flash_init() );
-    tcpip_adapter_init();
+    esp_netif_init();
     ESP_ERROR_CHECK( esp_event_loop_create_default() );
 
     /* This helper function configures Wi-Fi or Ethernet, as selected in menuconfig.

+ 2 - 2
examples/protocols/sockets/tcp_client/main/tcp_client.c

@@ -16,7 +16,7 @@
 #include "esp_event.h"
 #include "esp_log.h"
 #include "nvs_flash.h"
-#include "tcpip_adapter.h"
+#include "esp_netif.h"
 #include "protocol_examples_common.h"
 
 #include "lwip/err.h"
@@ -112,7 +112,7 @@ static void tcp_client_task(void *pvParameters)
 void app_main(void)
 {
     ESP_ERROR_CHECK(nvs_flash_init());
-    tcpip_adapter_init();
+    esp_netif_init();
     ESP_ERROR_CHECK(esp_event_loop_create_default());
 
     /* This helper function configures Wi-Fi or Ethernet, as selected in menuconfig.

+ 2 - 2
examples/protocols/sockets/tcp_server/main/tcp_server.c

@@ -15,7 +15,7 @@
 #include "esp_event.h"
 #include "esp_log.h"
 #include "nvs_flash.h"
-#include "tcpip_adapter.h"
+#include "esp_netif.h"
 #include "protocol_examples_common.h"
 
 #include "lwip/err.h"
@@ -137,7 +137,7 @@ CLEAN_UP:
 void app_main(void)
 {
     ESP_ERROR_CHECK(nvs_flash_init());
-    tcpip_adapter_init();
+    esp_netif_init();
     ESP_ERROR_CHECK(esp_event_loop_create_default());
 
     /* This helper function configures Wi-Fi or Ethernet, as selected in menuconfig.

+ 2 - 2
examples/protocols/sockets/udp_client/main/udp_client.c

@@ -16,7 +16,7 @@
 #include "esp_event.h"
 #include "esp_log.h"
 #include "nvs_flash.h"
-#include "tcpip_adapter.h"
+#include "esp_netif.h"
 #include "protocol_examples_common.h"
 
 #include "lwip/err.h"
@@ -111,7 +111,7 @@ static void udp_client_task(void *pvParameters)
 void app_main(void)
 {
     ESP_ERROR_CHECK(nvs_flash_init());
-    tcpip_adapter_init();
+    esp_netif_init();
     ESP_ERROR_CHECK(esp_event_loop_create_default());
 
     /* This helper function configures Wi-Fi or Ethernet, as selected in menuconfig.

+ 6 - 6
examples/protocols/sockets/udp_multicast/main/udp_multicast_example_main.c

@@ -16,7 +16,7 @@
 #include "esp_event.h"
 #include "esp_log.h"
 #include "nvs_flash.h"
-#include "tcpip_adapter.h"
+#include "esp_netif.h"
 #include "protocol_examples_common.h"
 
 #include "lwip/err.h"
@@ -62,8 +62,8 @@ static int socket_add_ipv4_multicast_group(int sock, bool assign_source_if)
 #if LISTEN_ALL_IF
     imreq.imr_interface.s_addr = IPADDR_ANY;
 #else
-    tcpip_adapter_ip_info_t ip_info = { 0 };
-    err = tcpip_adapter_get_ip_info(EXAMPLE_INTERFACE, &ip_info);
+    esp_netif_ip_info_t ip_info = { 0 };
+    err = esp_netif_get_ip_info(get_example_netif(), &ip_info);
     if (err != ESP_OK) {
         ESP_LOGE(V4TAG, "Failed to get IP address info. Error 0x%x", err);
         goto err;
@@ -203,7 +203,7 @@ static int create_multicast_ipv6_socket(void)
     // (Note the interface may have other non-LL IPV6 addresses as well,
     // but it doesn't matter in this context as the address is only
     // used to identify the interface.)
-    err = tcpip_adapter_get_ip6_linklocal(EXAMPLE_INTERFACE, &if_ipaddr);
+    err = esp_netif_get_ip6_linklocal(EXAMPLE_INTERFACE, (esp_ip6_addr_t*)&if_ipaddr);
     inet6_addr_from_ip6addr(&if_inaddr, &if_ipaddr);
     if (err != ESP_OK) {
         ESP_LOGE(V6TAG, "Failed to get IPV6 LL address. Error 0x%x", err);
@@ -212,7 +212,7 @@ static int create_multicast_ipv6_socket(void)
 #endif // LISTEN_ALL_IF
 
     // search for netif index
-    netif_index = tcpip_adapter_get_netif_index(EXAMPLE_INTERFACE);
+    netif_index = esp_netif_get_netif_index(EXAMPLE_INTERFACE);
     if(netif_index < 0) {
         ESP_LOGE(V6TAG, "Failed to get netif index");
         goto err;
@@ -484,7 +484,7 @@ static void mcast_example_task(void *pvParameters)
 void app_main(void)
 {
     ESP_ERROR_CHECK(nvs_flash_init());
-    tcpip_adapter_init();
+    esp_netif_init();
     ESP_ERROR_CHECK(esp_event_loop_create_default());
 
     /* This helper function configures Wi-Fi or Ethernet, as selected in menuconfig.

+ 2 - 2
examples/protocols/sockets/udp_server/main/udp_server.c

@@ -15,7 +15,7 @@
 #include "esp_event.h"
 #include "esp_log.h"
 #include "nvs_flash.h"
-#include "tcpip_adapter.h"
+#include "esp_netif.h"
 #include "protocol_examples_common.h"
 
 #include "lwip/err.h"
@@ -112,7 +112,7 @@ static void udp_server_task(void *pvParameters)
 void app_main(void)
 {
     ESP_ERROR_CHECK(nvs_flash_init());
-    tcpip_adapter_init();
+    esp_netif_init();
     ESP_ERROR_CHECK(esp_event_loop_create_default());
 
     /* This helper function configures Wi-Fi or Ethernet, as selected in menuconfig.

+ 1 - 1
examples/protocols/websocket/main/websocket_example.c

@@ -90,7 +90,7 @@ void app_main(void)
     esp_log_level_set("TRANS_TCP", ESP_LOG_DEBUG);
 
     ESP_ERROR_CHECK(nvs_flash_init());
-    tcpip_adapter_init();
+    esp_netif_init();
     ESP_ERROR_CHECK(esp_event_loop_create_default());
 
     /* This helper function configures Wi-Fi or Ethernet, as selected in menuconfig.

+ 1 - 1
examples/system/ota/advanced_https_ota/main/advanced_https_ota_example.c

@@ -125,7 +125,7 @@ void app_main(void)
     }
     ESP_ERROR_CHECK( err );
 
-    tcpip_adapter_init();
+    esp_netif_init();
     ESP_ERROR_CHECK(esp_event_loop_create_default());
 
     /* This helper function configures Wi-Fi or Ethernet, as selected in menuconfig.

+ 1 - 1
examples/system/ota/native_ota_example/main/native_ota_example.c

@@ -278,7 +278,7 @@ void app_main(void)
     }
     ESP_ERROR_CHECK( err );
 
-    tcpip_adapter_init();
+    esp_netif_init();
     ESP_ERROR_CHECK(esp_event_loop_create_default());
 
     /* This helper function configures Wi-Fi or Ethernet, as selected in menuconfig.

+ 1 - 1
examples/system/ota/simple_ota_example/main/simple_ota_example.c

@@ -112,7 +112,7 @@ void app_main(void)
     }
     ESP_ERROR_CHECK(err);
 
-    tcpip_adapter_init();
+    esp_netif_init();
     ESP_ERROR_CHECK(esp_event_loop_create_default());
 
     /* This helper function configures Wi-Fi or Ethernet, as selected in menuconfig.