jpoliv / wakeonlan

Perl script for waking up computers via Wake-On-LAN magic packets
318 stars 31 forks source link

Implemented getaddrinfo to resolve domain names and to support IPv6 #4

Open chrisnew opened 4 years ago

chrisnew commented 4 years ago

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!

telmich commented 4 years ago

@jpoliv what do you think about the approach?

harryqt commented 1 month ago

Why hasn't this merged yet?