Skip to content

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

mykh
Copy link

@mykh mykh commented Dec 10, 2016

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.

@facchinm facchinm added the Library: Ethernet The Ethernet Arduino library label Dec 12, 2016
@@ -31,6 +32,7 @@ class EthernetClass {
IPAddress subnetMask();
IPAddress gatewayIP();
IPAddress dnsServerIP();
char* hostname();
Copy link
Contributor

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() ?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

@dab0bby
Copy link

dab0bby commented Mar 6, 2018

Can we expect this to be merged anytime?

@Misiu
Copy link

Misiu commented May 20, 2020

any updates?

Copy link

@Jozo132 Jozo132 left a 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!

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Library: Ethernet The Ethernet Arduino library
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants