-
-
Notifications
You must be signed in to change notification settings - Fork 7k
Ethernet library: added ability to set/get hostname #5701
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
base: master
Are you sure you want to change the base?
Conversation
@@ -31,6 +32,7 @@ class EthernetClass { | |||
IPAddress subnetMask(); | |||
IPAddress gatewayIP(); | |||
IPAddress dnsServerIP(); | |||
char* hostname(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't it be const char* hostname()
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
…& Dhcp.getHostname()
Can we expect this to be merged anytime? |
any updates? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I want to see this implemented!
|
I've created overloaded Ethernet.begin() function that supports a host name parameter which is used by the DHCP request.
I've also added Ethernet.hostname() function which returns a hostname or an empty string if board was configured with static IP.
A simple example is located in the ./examples/DhcpHostname directory.