1 // Copyright 2015-2019 Espressif Systems (Shanghai) PTE LTD 2 // 3 // Licensed under the Apache License, Version 2.0 (the "License"); 4 // you may not use this file except in compliance with the License. 5 // You may obtain a copy of the License at 6 7 // http://www.apache.org/licenses/LICENSE-2.0 8 // 9 // Unless required by applicable law or agreed to in writing, software 10 // distributed under the License is distributed on an "AS IS" BASIS, 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 // See the License for the specific language governing permissions and 13 // limitations under the License. 14 15 #include "esp_netif.h" 16 #include "esp_wifi_default.h" 17 #if CONFIG_ETH_ENABLED 18 #include "esp_eth.h" 19 #endif 20 21 // 22 // Purpose of this module is to provide 23 // - general esp-netif definitions of default objects for STA, AP, ETH 24 // - default init / create functions for basic default interfaces 25 // 26 27 28 29 // 30 // Default configuration of common interfaces, such as STA, AP, ETH 31 // 32 const esp_netif_inherent_config_t _g_esp_netif_inherent_sta_config = ESP_NETIF_INHERENT_DEFAULT_WIFI_STA(); 33 34 const esp_netif_inherent_config_t _g_esp_netif_inherent_ap_config = ESP_NETIF_INHERENT_DEFAULT_WIFI_AP(); 35 36 const esp_netif_inherent_config_t _g_esp_netif_inherent_eth_config = ESP_NETIF_INHERENT_DEFAULT_ETH(); 37 38 const esp_netif_inherent_config_t _g_esp_netif_inherent_ppp_config = ESP_NETIF_INHERENT_DEFAULT_PPP(); 39 40 const esp_netif_inherent_config_t _g_esp_netif_inherent_slip_config = ESP_NETIF_INHERENT_DEFAULT_SLIP(); 41 42 const esp_netif_ip_info_t _g_esp_netif_soft_ap_ip = { 43 .ip = { .addr = ESP_IP4TOADDR( 192, 168, 4, 1) }, 44 .gw = { .addr = ESP_IP4TOADDR( 192, 168, 4, 1) }, 45 .netmask = { .addr = ESP_IP4TOADDR( 255, 255, 255, 0) }, 46 }; 47