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

new method to get hostnames #15

Open
roccomuso opened this issue Jan 17, 2017 · 4 comments
Open

new method to get hostnames #15

roccomuso opened this issue Jan 17, 2017 · 4 comments

Comments

@roccomuso
Copy link

It would be worth having a method like network.get_hostnames(cb), that returns a map Hostname <--> IP for the current active interface? (parsing the output of arp -a on unix).

@tomas
Copy link
Owner

tomas commented Jan 17, 2017

You mean like parsing /etc/hosts?

@roccomuso
Copy link
Author

Not really. For current machine hostname you have os.hostname(), arp -a provides LAN devices hostnames

@tomas
Copy link
Owner

tomas commented Sep 11, 2017

Hey @roccomuso. It's been a while, but I was wondering if you're up for submitting a PR for this.

@roccomuso
Copy link
Author

Yep, I'm wondering if it's worth creating a new module using ip n as fallback for arp -a.
Moreover the hostname is not guaranteed in the arp table. Most of the times you'll have a simply IP <-> Mac address bind.

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

No branches or pull requests

2 participants