Allow configuration of local netif hostname via new LWIP component configuration menu item

Signed-off-by: Sagar Bijwe <sagar@espressif.com>

Merges https://github.com/espressif/esp-idf/pull/3627
pull/7874/head
grumpy-dude 2019-06-12 17:05:41 -07:00 zatwierdzone przez Sagar Bijwe
rodzic 58df1d93bc
commit 8a3cf8ca77
4 zmienionych plików z 9 dodań i 3 usunięć

Wyświetl plik

@ -1,5 +1,11 @@
menu "LWIP"
config LWIP_LOCAL_HOSTNAME
string "Local netif hostname"
default 'espressif'
help
The name this device will report to other devices on the network
config LWIP_L2_TO_L3_COPY
bool "Enable copy between Layer2 and Layer3 packets"
default n

Wyświetl plik

@ -222,7 +222,7 @@ ethernetif_init(struct netif *netif)
/* Initialize interface hostname */
#if ESP_LWIP
netif->hostname = "espressif";
netif->hostname = CONFIG_LWIP_LOCAL_HOSTNAME;
#else
netif->hostname = "lwip";
#endif

Wyświetl plik

@ -39,7 +39,7 @@ err_t nettestif_init(struct netif *netif)
g_last_netif = netif;
netif->hostname = "espressif";
netif->hostname = CONFIG_LWIP_LOCAL_HOSTNAME;
/*
* Initialize the snmp variables and counters inside the struct netif.

Wyświetl plik

@ -202,7 +202,7 @@ wlanif_init(struct netif *netif)
/* Initialize interface hostname */
#if ESP_LWIP
netif->hostname = "espressif";
netif->hostname = CONFIG_LWIP_LOCAL_HOSTNAME;
#else
netif->hostname = "lwip";
#endif