I'm using the following Python code to fetch ipv4 and ipv6 addresses information (according to millions of tutorials i went through including https://docs.python.org/3.5/library/socket.html), but i receive only the ipv4 info. My ipv6 connection is ok, i can see my addresses via "ipconfig /all", the host i'm trying to connect to is "akamai.com" (also tried www.python.org and example.org). I have also tried the 0 argument (full range of results) instead of limiting it to socket.AF_INET6 or socket.AF_INET and yet i receive only the ipv4 address
import sys, socket
x = socket.getaddrinfo("akamai.com", 80, socket.AF_INET6, 0, socket.IPPROTO_IP, socket.AI_CANONNAME)
#Expected format (as i found in some examples in this site):
socket.getaddrinfo("www.python.org", 80, 0, 0, socket.SOL_TCP)
[(2, 1, 6, '', ('82.94.164.162', 80)),
(10, 1, 6, '', ('2001:888:2000:d::a2', 80, 0, 0))]
I receive only the first tulip (plus the canonical name)
Thanks for your help in advance