try to auto choose STA vs ETH and also choose IPv4 or IPv6 depending on config

change printf to ESP_LOGI in net_functions
add missing components to network interface

Signed-off-by: Karl Osterseher <karli_o@gmx.at>
This commit is contained in:
Karl Osterseher
2025-01-26 23:35:11 +01:00
Unverified
parent 1d7dc2dc00
commit 6bec0e9469
9 changed files with 245 additions and 35 deletions

View File

@@ -13,8 +13,15 @@
#include "esp_netif.h"
#define NETWORK_INTERFACE_DESC_STA "sta"
#define NETWORK_INTERFACE_DESC_ETH "eth"
#define NETWORK_INTERFACE_DESC_ETH \
"eth" // this is the default value created by ESP_NETIF_DEFAULT_ETH();
// if more than 1 Ethernet interface is configured, they are appended
// with numbers starting from 0, e.g.: eth0, eth1, ...
extern char *ipv6_addr_types_to_str[6];
esp_netif_t *network_get_netif_from_desc(const char *desc);
bool network_is_netif_up(esp_netif_t *esp_netif);
bool network_is_our_netif(const char *prefix, esp_netif_t *netif);
void network_init(void);