- 
                Notifications
    You must be signed in to change notification settings 
- Fork 13.3k
Description
mentioned in #8626
While we have netif hostnames enabled in lwip
Arduino/tools/sdk/lwip2/include/lwipopts.h
Line 1605 in 65d3043
| #define LWIP_NETIF_HOSTNAME 1 // 0 | 
Current approach to working with hostname is to have it set / get through wifi_station_{set,get}_hostname() funcs. Internally, this works with char* wifi_station_hostname;
Then we update every netif to reference it
Arduino/cores/esp8266/LwipIntf.cpp
Lines 151 to 152 in 65d3043
| // unconditionally update all known interfaces | |
| intf->hostname = wifi_station_get_hostname(); | 
Should we have int gethostname(char*, size_t) and void sethostname(const char*, size_t) calls?
Should the symbol be renamed to something more generic so we don't miss that it is actually something global?
Should the wifi_station_...hostname funcs be weakened / removed in favour of our own wrappers? Right now both depend on netif being up, possibly needless.
Should we go back on the global idea and actually implement per-netif hostname? (like esp-idf netif api actually works, also esp32-arduino wifi implementation)