Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions cores/esp8266/LwipIntf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,15 @@ String LwipIntf::hostname(void)
return wifi_station_get_hostname();
}

/**
Get ESP8266 station DHCP hostname
@return hostname
*/
const char* LwipIntf::getHostname(void)
{
return wifi_station_get_hostname();
}

/**
Set ESP8266 station DHCP hostname
@param aHostname max length:24
Expand Down
6 changes: 6 additions & 0 deletions cores/esp8266/LwipIntf.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@ class LwipIntf
return hostname(aHostname.c_str());
}
bool hostname(const char* aHostname);
// ESP32 API compatibility
bool setHostname(const char* aHostName)
{
return hostname(aHostName);
}
const char* getHostname();

protected:

Expand Down