Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lwip netif->hostname and a global value #8628

Open
mcspr opened this issue Jul 6, 2022 · 0 comments
Open

lwip netif->hostname and a global value #8628

mcspr opened this issue Jul 6, 2022 · 0 comments

Comments

@mcspr
Copy link
Collaborator

mcspr commented Jul 6, 2022

mentioned in #8626

While we have netif hostnames enabled in lwip

#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

// 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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant