Skip to content

lwip netif->hostname and a global value #8628

Open
@mcspr

Description

@mcspr

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)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions