Re: [PHP-DEV] net_get_interfaces()

2017-11-27 Thread Sara Golemon
On Mon, Nov 27, 2017 at 12:23 PM, Matteo Beccati wrote: > I've just tested a NetBSD 7.0 i386 machine and I'm getting a few errors: > > ext/standard/net.c: At top level: > ext/standard/net.c:98:13: warning: ‘iface_append_unicast’ defined but > not used [-Wunused-function] > static void iface_appen

Re: [PHP-DEV] net_get_interfaces()

2017-11-27 Thread Florian Anderiasch
On 27.11.2017 17:56, Sara Golemon wrote: > On Mon, Nov 27, 2017 at 11:38 AM, Florian Anderiasch > wrote: >> Somehow it doesn't match the >> +#if HAVE_NET_IF_H >> in net.c >> >> I had to unconditionally include it (for testing), otherwise >> IFF_BROADCAST and IFF_POINTOPOINT are undefined. (they a

Re: [PHP-DEV] net_get_interfaces()

2017-11-27 Thread Niklas Keller
Hey Sara, I'm not sure about the naming, but I think such a function is a good idea. Why a `net_*` prefix when it's in ext/standard? I'd suggest `get_network_interfaces()` instead. As previously mentioned on Twitter [1], it could be really useful for us in amphp/socket [2]. [1] https://twitter.c

Re: [PHP-DEV] net_get_interfaces()

2017-11-27 Thread Matteo Beccati
Hi everyone, On 27/11/2017 17:56, Sara Golemon wrote: >> Can do a proper bug report if needed, but maybe I get around to test >> NetBSD as well. >> > Thanks! I've just tested a NetBSD 7.0 i386 machine and I'm getting a few errors: ext/standard/net.c: In function ‘php_inet_ntop’: ext/standard/net

Re: [PHP-DEV] net_get_interfaces()

2017-11-27 Thread Sara Golemon
On Mon, Nov 27, 2017 at 11:38 AM, Florian Anderiasch wrote: > Somehow it doesn't match the > +#if HAVE_NET_IF_H > in net.c > > I had to unconditionally include it (for testing), otherwise > IFF_BROADCAST and IFF_POINTOPOINT are undefined. (they are in > sys/net/if.h on OpenBSD, but I only tested 6

Re: [PHP-DEV] net_get_interfaces()

2017-11-27 Thread Florian Anderiasch
On 27.11.2017 16:38, Sara Golemon wrote: > On Mon, Nov 27, 2017 at 10:34 AM, Florian Anderiasch > wrote: >> Also I'm really sorry that I disappointed you by not managing to finish >> testing on OpenBSD (which I actually started just before seeing this >> mail) and I already sent some results for

Re: [PHP-DEV] net_get_interfaces()

2017-11-27 Thread Sara Golemon
On Mon, Nov 27, 2017 at 10:34 AM, Florian Anderiasch wrote: > Also I'm really sorry that I disappointed you by not managing to finish > testing on OpenBSD (which I actually started just before seeing this > mail) and I already sent some results for FreeBSD yesterday, which > showed a tiny issue. >

Re: [PHP-DEV] net_get_interfaces()

2017-11-27 Thread Florian Anderiasch
On 27.11.2017 12:15, Dan Ackroyd wrote: > On 26 November 2017 at 16:28, Florian Anderiasch wrote: > >> if this simply doesn't work on some OSes for >> no good reason.. that's a pretty leaky abstraction. > > Cool. Does that mean that we can drop support for 32bit builds if > leaky abstractions ar

Re: [PHP-DEV] net_get_interfaces()

2017-11-27 Thread Dan Ackroyd
On 26 November 2017 at 16:28, Florian Anderiasch wrote: > if this simply doesn't work on some OSes for > no good reason.. that's a pretty leaky abstraction. Cool. Does that mean that we can drop support for 32bit builds if leaky abstractions are an important thing? > Looks good in theory, but w

Re: [PHP-DEV] net_get_interfaces()

2017-11-26 Thread Florian Anderiasch
On 26.11.2017 17:10, Sara Golemon wrote: > On Sun, Nov 26, 2017 at 10:53 AM, Florian Anderiasch > wrote: >> Looks good in theory, but without a lot of thought, how likely is this >> to break/work on "supported" operating systems? (Which ones are that, >> actually? http://php.net/manual/en/install

Re: [PHP-DEV] net_get_interfaces()

2017-11-26 Thread Sara Golemon
On Sun, Nov 26, 2017 at 10:53 AM, Florian Anderiasch wrote: > Looks good in theory, but without a lot of thought, how likely is this > to break/work on "supported" operating systems? (Which ones are that, > actually? http://php.net/manual/en/install.unix.php lists the BSDs and > Solaris and HP/UX)

Re: [PHP-DEV] net_get_interfaces()

2017-11-26 Thread Florian Anderiasch
On 23.11.2017 23:46, Sara Golemon wrote: > Planning to add net_get_interfaces() > https://github.com/php/php-src/pull/2935/files for enumerating the > adapters on a system and their configured addresses. > Based on a combination of my own implementation and finding out > krakjoe and ab@ had a stall

RE: [PHP-DEV] net_get_interfaces()

2017-11-24 Thread Anatol Belski
> -Original Message- > From: p...@golemon.com [mailto:p...@golemon.com] On Behalf Of Sara > Golemon > Sent: Thursday, November 23, 2017 11:46 PM > To: PHP internals > Subject: [PHP-DEV] net_get_interfaces() > > Planning to add net_get_interfaces() > https://github.com/php/php-src/pull/2