mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
Merge branch 'feature/netif_custom_name' into 'master'
Allow setting netif hostname via lw/ip component config menu item (IDFGH-1342) See merge request idf/esp-idf!5262
This commit is contained in:
commit
c2a9785fa9
@ -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
|
||||
|
@ -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
|
||||
|
@ -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.
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user