I am ok with the idea that Programming in Pike should be easier in Pike than in C. But if we look in DNS for ipv4/6 address and there is no DNS server responding, how can Pike should react ?
Like it always has responded, with throwing an "invalid address" exception. If you can't resolv the address, you can't bind/connect to it even if you know what family it is supposed to belong to.
/ Marcus Comstedt (ACROSS) (Hail Ilpalazzo!)
Previous text:
2003-04-24 16:49: Subject: Re: IPv6 diff for Pike 7.5.7 (today's snapshot)
Yep, that's another issue that would have to be dealt with. Actually, IPv6 is differentiated to IPv4 in DNS by using a different type of the address record - AAAA instead of A, respectively. But then, if a DNS resolver returns addresses from all families, you are unable to guess which one the caller really wants - specifying the family is very helpful here.
The resolver should return both ipv4 and ipv6 addresses. The user of a DNS name should not need to know in advance if that name refers to a machine with an IPv4 or IPv6 address. Actually, I think that a well-behaved pike program that uses DNS names to refer to hosts should not even need to know that IPv4 and IPv6 are different, network programming should be easier in Pike than in C.
I am ok with the idea that Programming in Pike should be easier in Pike than in C. But if we look in DNS for ipv4/6 address and there is no DNS server responding, how can Pike should react ?
Also, I think that we should explicitly provide if we want a IPv6 only or IPv4 or both v4/v6 addresses when open a socket. This maybe be "optional", but it should exist an option for the developper to provide explictly what protocol is wanted for his own application....
/Xavier
/ Brevbäraren