esp_netif_defaults.c 1.1 KB

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