[opensuse-programming] writing code for ipv6
Situation - I'm writing a few daemons which will use tcp and/or udp. Currently it's all ipv4, but eventually we will also want to do ipv6. Simple question: for development purposes, is it okay to treat everything as ipv6? I.e. always expect ipv6, even if it's really an ipv4 address represented as ipv6? I guess there are certain situations where I have to expect both kind of addresses - dns lookup for instance. Or does get{addr|host}info() have an ipv6 variation? /Per Jessen, Zürich -- To unsubscribe, e-mail: opensuse-programming+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-programming+help@opensuse.org
Per Jessen wrote:
where I have to expect both kind of addresses - dns lookup for instance. Or does get{addr|host}info() have an ipv6 variation?
I get to answer that one myself - yes, getaddrinfo() works with both ipv4 and ipv6. /Per Jessen, Zürich -- To unsubscribe, e-mail: opensuse-programming+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-programming+help@opensuse.org
participants (1)
-
Per Jessen