On Tue, Apr 17, 2001 at 09:43:06PM +0100, Wez Furlong wrote:
> Hi Stig (the other one), 
> 
> I would like to end up with a "definitive" hostconnect call - something like a blend 
>between the fsockopen code in fsock.c and php_hostconnect in network.c
> 
> If you could make me aware of any gotchas I should look out for while coming up with 
>the code, I would appreciate it!

The main idea anyway is to pass a hostname to connect to, and have the
function sort out what addresses are available and try them in turn with
IPv6-addresses first. As you can see in hostconnect I have a high level
routine php_network_getaddresses() abstracting the lookup so that it's
the same whether getaddrinfo() is available or not. I think the current
hostconnect can be re-used in fsockopen when the timeout has been
implemented, I've been planning to do that for a while, but wanted to get
thorough testing of the current hostconnect() before I made it more complex.
As you see hostconnect() already takes a time-out argument, but it's
ignored at the moment. BTW if you look in fsock.c there is some socket
structure there and functions with php_sockcreate(), php_sockdestroy()
etc. It might be that can add room for address family in there. We need
something that can also be used in socket.c.

> 
> > with some input regarding how important you think IPv6 support is, and how
> > much breakage we can allow and ideas for how to cope with it.
> 
> Since I don't know of or have access to a network running IPv6 (or I'm too isolated 
>from the real world to have realized how to do it ;-), I'm not sure just how 
>important it is.

If you want to, I could tell you how, and you could be up and running
pretty quickly. You don't really need it to do any work though.

> 
> The perfectionist in me would like to see it in PHP; I have no problems running PHP 
>without having IPv6 configured, and if the people that ARE having problems are using 
>bad implementations/configurations, it should really be down to them to fix them.

Yes, and it is I think. The problem though is that some people may be put
off and don't use PHP because of our change.

> What kind of problems are showing up in the bug DB?

Some of the problems with fopen() are because of this, it's often hard to
know if this is the problem or other things. But there are a couple of
cases where it's been tracked down to getaddrinfo() bugs or broken
installations.

> Any idea how many people are using IPv6?

Not really, it's going to increase quicker and quicker though. Actually
RedHat 7.1, Solaris 8, recent BSD's etc. got IPv6 out of the box.

> Are the problems apparent on systems with IPv6 support (in the libs and headers), 
>but not yet configured?

The problem is that we use getaddrinfo() if it exists, but on some systems
the getaddrinfo() implementation is broken. getaddrinfo() is a bit complex
and changed a bit before it stabilized.

> We might be able to get away with a note in the installation instructions about 
>using IPv6 and how to resolve simple issues, or advise to upgrade, as appropriate?

Actually that's a good and simple idea. I'll add a note there.

BTW, for some reason I've used the same IPv6 code other places without
that many bug reports, but PHP has got quite a lot of users...

Your OpenSSL extension work looks good,

Stig

-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to