There was a patch provided, but I don’t know IPv6 well enough to know if it
was correct or complete, and had no way of testing it:
https://bugzilla.libsdl.org/show_bug.cgi?id=283
Comments from Robert Anderson:
My first glance at the source-code gave me these thoughts:
- Cosmetic: Do not use code like
fprintf(stderr,
“Cant resolve %s:%i\n”,
hostname, port);
Which would return output like 2001:2::1:2500 which is an illegal IPv6
address (which I can gruntingly understand)
but 2001:2::1:22 is ambiguous and I can’t get if 22 is a port or part
of the address.
Please use the style [2001:2::1]:22 which is not mentioned (or
forbidden) in the RFC, but used in
URI’shttps://en.wikipedia.org/wiki/IPv6_address#Literal_IPv6_addresses_in_network_resource_identifiers-------------------------------------
- Stability: +int SDLNet_ResolveHost_new(SDLNet_AddrType type,
IPaddress *address,
Since you can DNS resolve IPv6 addresses over IPv4; getting a DNS
answer does not necessarily mean that you have IPv6-connectivity
(Sadly, most PC today have an IPv6-address and can resolve
AAAA-records, but does not have IPv6-internet-connectivity
[the developers of Minecraft still does not get this ( ] )
Both my windows PC and my Lubuntu laptop has an icon showing if you
have (IPv6?) connectivity. This should be checked
before choosing to return the IPv4 or IPv6 address. (I think machine
local check is better then doing an internet IPv6 connectivity test)
Thirdly you have the odd setup of a local LAN game, including a
local DNS-server; all running native IPv6 (no IPv4) with no
internet IPv6-internet-connectivity. Then my suggestion would not
work. (dual-stack would work, but it would always return the
fallback IPv4 address - even if IPv6 is preferred)
Local LAN games would work if IPv6 numerical addresses are use, no DNS
lookups there (
Summary: Don’t return an IPv6 address if you don’t have access to the
IPv6-internet
On Sun, Sep 22, 2013 at 3:42 PM, powertomato wrote:
Hi,
I’m not sure if this belongs here, if not I apologize for it.
I picked somewhere up (can’t find it anymore) that the next major
version of SDL_net would support IPv6. I know that an ancient patch
exsists [1, 2] which isn’t official.
As I see there’s no API change regarding this. Since the jump from
SDL1.2 to SDL2.0 introduced API changes I hoped SDL_net would do the
same and enable IPv6 support. Sadly this doesn’t seem to be the case.
Does anyone know the status on this? Are there even (official) plans on
IPv6 support?
Best regards,
-powertomato
–
[1] https://soulsphere.org/hacks/ipv6/newapi.html
[2] https://soulsphere.org/hacks/ipv6/
SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org