kyan001/ping3

ping3 does not support IPv6

amorozenko-ua opened this issue · 2 comments

According socket function documentation ( used by send_one_ping call) IPv6 support can be simply added by using getaddrinfo.

socket.gethostbyname(hostname)

    Translate a host name to IPv4 address format. The IPv4 address is returned as a string, such as '100.50.200.5'. If the host name is an IPv4 address itself it is returned unchanged. See [gethostbyname_ex()](https://docs.python.org/3/library/socket.html#socket.gethostbyname_ex) for a more complete interface. [gethostbyname()](https://docs.python.org/3/library/socket.html#socket.gethostbyname) does not support IPv6 name resolution, and [getaddrinfo()](https://docs.python.org/3/library/socket.html#socket.getaddrinfo) should be used instead for IPv4/v6 dual stack support.

Checksum calculations could be different for ipV6 packets - but potentially this might be investigated.
Exists probability that IPv6 support can be easily added to ping3 module.

Hi @amorozenko-ua

Thanks for the information, I will look into this and see what I can do.

I am wondering for this !!
tks