ping3 icon indicating copy to clipboard operation
ping3 copied to clipboard

ping3 does not support IPv6

Open amorozenko-ua opened this issue 3 years ago • 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.

amorozenko-ua avatar Sep 26 '22 12:09 amorozenko-ua

Hi @amorozenko-ua

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

kyan001 avatar Sep 26 '22 12:09 kyan001

I am wondering for this !! tks

jason19970210 avatar Apr 12 '23 02:04 jason19970210