esp_netif_defaults.c 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. /*
  2. * SPDX-FileCopyrightText: 2015-2023 Espressif Systems (Shanghai) CO LTD
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. */
  6. #include "esp_netif.h"
  7. //
  8. // Purpose of this module is to provide
  9. // - general esp-netif definitions of default objects for STA, AP, ETH
  10. // - default init / create functions for basic default interfaces
  11. //
  12. //
  13. // Default configuration of common interfaces, such as STA, AP, ETH
  14. //
  15. const esp_netif_inherent_config_t _g_esp_netif_inherent_sta_config = ESP_NETIF_INHERENT_DEFAULT_WIFI_STA();
  16. #ifdef CONFIG_ESP_WIFI_SOFTAP_SUPPORT
  17. const esp_netif_ip_info_t _g_esp_netif_soft_ap_ip = {
  18. .ip = { .addr = ESP_IP4TOADDR( 192, 168, 4, 1) },
  19. .gw = { .addr = ESP_IP4TOADDR( 192, 168, 4, 1) },
  20. .netmask = { .addr = ESP_IP4TOADDR( 255, 255, 255, 0) },
  21. };
  22. const esp_netif_inherent_config_t _g_esp_netif_inherent_ap_config = ESP_NETIF_INHERENT_DEFAULT_WIFI_AP();
  23. #endif
  24. #ifdef CONFIG_ESP_WIFI_NAN_ENABLE
  25. const esp_netif_inherent_config_t _g_esp_netif_inherent_nan_config = ESP_NETIF_INHERENT_DEFAULT_WIFI_NAN();
  26. #endif
  27. const esp_netif_inherent_config_t _g_esp_netif_inherent_eth_config = ESP_NETIF_INHERENT_DEFAULT_ETH();
  28. #ifdef CONFIG_PPP_SUPPORT
  29. const esp_netif_inherent_config_t _g_esp_netif_inherent_ppp_config = ESP_NETIF_INHERENT_DEFAULT_PPP();
  30. #endif