Implemented getaddrinfo to resolve domain names and to support IPv6 #4
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Greetings fellow wakeonlan enthusiasts!
Today I wanted to run
wakeonlan
in one of our IPv6-only networks and I discovered that this is not working.I implemented the getaddrinfo dance to resolve names and numbers according to the playbook. This not only introduces proper IPv6 support, but also support to resolve domain names as a side effect. I took the liberty to rename IP address to target, but without changing the getopt structure to stay backward compatible.
It’s my first time hacking in Perl and I haven’t implement the validation for target yet. I also should update the manuals reflecting IPv6 and domain name support.
Please let me know if this is a good start and if not, what to fix.
Fixes #2.
Cheers!