php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #40510 Add multicast support in sockets.c
Submitted: 2007-02-16 17:46 UTC Modified: 2011-07-04 04:33 UTC
Votes:45
Avg. Score:4.7 ± 0.7
Reproduced:33 of 33 (100.0%)
Same Version:8 (24.2%)
Same OS:3 (9.1%)
From: lew dot payne at gmail dot com Assigned: cataphract (profile)
Status: Closed Package: Sockets related
PHP Version: 5.2.1 OS: FreeBSD 6.2-REL
Private report: No CVE-ID: None
 [2007-02-16 17:46 UTC] lew dot payne at gmail dot com
Description:
------------
To date, PHP does not offer multicast support, mainly due to some constants and structures missing in sockets.c.  I'd like to propose that the following patch be incorporated into the code, to fully support multicast:

http://diary.rozsnyo.com/2006/06/16/php5-ext-sockets-multicast.patch

A full explanation of the patch can be found here:

http://diary.rozsnyo.com/2006/06/16/multicast-support-in-php.pdf

Reproduce code:
---------------
http://diary.rozsnyo.com/2006/06/16/php5-ext-sockets-multicast.patch\


Expected result:
----------------
Multicast constants and the necessary structures to support them exist and are now recognized by the socket_set_option and socket_get_option language constructs.

Actual result:
--------------
- none needed -

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-03-07 13:41 UTC] daniel at rozsnyo dot com
Hello, 
  I've changed the patch to support the php-5.2.1 too. (this version appeared in my gentoo in these days..). It was just some & and * shifted at arg4.  

Download from http://diary.rozsnyo.com/2006/06/16/php-multicast/ .
 [2009-12-29 15:30 UTC] pcdinh at gmail dot com
Hi,

Could someone take a look into this issue?

Thanks

Dinh
 [2011-02-27 09:48 UTC] pajoye@php.net
-Status: Open +Status: Feedback -Package: Feature/Change Request +Package: *General Issues
 [2011-02-27 09:48 UTC] pajoye@php.net
Please provide an updated patch and phpt against trunk
 [2011-02-27 17:15 UTC] cataphract@php.net
I think IPv6 support should be seriously considered before committing a multicast patch.
 [2011-03-02 00:44 UTC] cataphract@php.net
-Status: Feedback +Status: Assigned -Assigned To: +Assigned To: cataphract
 [2011-03-02 05:01 UTC] lew dot payne at gmail dot com
This ticket was opened four years ago, at which time I supplied source code that 
I had modified to work on FreeBSD (the original only worked on Linux).  If you 
want to "seriously consider" IPV6 support, please seriously consider finally 
integrating this patch, and then waiting another four years before considering 
IPV6.  Yes, I'm being sarcastic... but with good reason.  I was basically given 
the runaround, via email with whomever looks at these bug reports, to the point 
where I simply decided it's easier to *not* contribute anything.  I find it both 
irritating and ironic that, four years later, there is yet another suggestion on 
delaying the commitment of this patch (e.g., IPV6).  And you think government is 
discouraging and bureaucratic?
 [2011-03-02 10:43 UTC] cataphract@php.net
I understand you're frustrated with the lack of progress in this issue, but I assigned this to myself because I intend to implement this feature soon (read: in a matter of weeks, not years).
 [2011-03-02 11:08 UTC] chrisw at networkm dot co dot uk
Judging by the amount of Google space taken up by people trying to do this (including myself) I am very much in favour of moving this issue forward ASAP. I also agree with the IPv6 support (to a point), but if this is to be added to PHP 5.2.x I would suggest it may not be necessary to implement at this stage.

Moving forward, shouldn't we be encouraging the use of 5.3.x for new/upgrading users? In which case, I would suggest that adding full IPv6 support against 5.2 might be a waste of time - I would imagine there would be a lot of work involved in adding full IPv6 multicast/anycast support, whereas the existing supplied patch would presumably only require minor modifications to bring it into line with the current 5.2 releases.

I am all in favour of fully supporting IPv6 in 5.3, but I also believe that in the interests of speed it would be useful to have this, simpler, IPv4 multicast support in 5.2.

Maybe this would be considered an un-productive approach, but it's just a thought...
 [2011-03-03 01:02 UTC] cataphract@php.net
Chris, PHP 5.2 is dead, adding this feature to it is out of question. Adding it to PHP 5.3 depends on the release master, but probably won't be possible due to the need to keep binary compatibility.
 [2011-03-14 01:08 UTC] cataphract@php.net
Automatic comment from SVN on behalf of cataphract
Revision: http://svn.php.net/viewvc/?view=revision&revision=309198
Log: - Added multicast support to the sockets extension (bug #40510).
 [2011-03-14 01:12 UTC] cataphract@php.net
-Status: Assigned +Status: To be documented -Assigned To: cataphract +Assigned To:
 [2011-03-14 01:12 UTC] cataphract@php.net
Implemented for trunk; to be considered to 5.3 after 5.3.6 release.
 [2011-03-14 15:54 UTC] cataphract@php.net
-Status: To be documented +Status: Suspended -Package: *General Issues +Package: Sockets related -Assigned To: +Assigned To: cataphract
 [2011-03-14 15:54 UTC] cataphract@php.net
Changed package, re-assigned and more accurately classified as suspended.
 [2011-04-06 12:08 UTC] cataphract@php.net
-Status: Suspended +Status: Closed
 [2011-04-06 12:08 UTC] cataphract@php.net
Closing. Trunk only.
 [2011-06-06 00:23 UTC] lstrojny@php.net
-Status: Closed +Status: Re-Opened
 [2011-06-06 00:23 UTC] lstrojny@php.net
This patch seems to break compilation on Mac OS X (r311824):

/bin/sh /usr/src/PHP_5_4/libtool --silent --preserve-dup-deps --mode=compile cc  
-Iext/sockets/ -I/usr/src/PHP_5_4/ext/sockets/ -DPHP_ATOM_INC -
I/usr/src/PHP_5_4/include -I/usr/src/PHP_5_4/main -I/usr/src/PHP_5_4 -
I/usr/src/PHP_5_4/ext/date/lib -I/usr/src/PHP_5_4/ext/ereg/regex -
I/usr/include/libxml2 -I/usr/src/PHP_5_4/ext/mbstring/oniguruma -
I/usr/src/PHP_5_4/ext/mbstring/libmbfl -
I/usr/src/PHP_5_4/ext/mbstring/libmbfl/mbfl -
I/usr/src/PHP_5_4/ext/sqlite3/libsqlite -I/usr/src/PHP_5_4/TSRM -
I/usr/src/PHP_5_4/Zend  -no-cpp-precomp  -I/usr/include -g -O2 -
fvisibility=hidden  -c /usr/src/PHP_5_4/ext/sockets/sockets.c -o 
ext/sockets/sockets.lo 
/usr/src/PHP_5_4/ext/sockets/sockets.c: In function ‘zm_startup_sockets’:
/usr/src/PHP_5_4/ext/sockets/sockets.c:820: error: ‘IP_BLOCK_SOURCE’ undeclared 
(first use in this function)
/usr/src/PHP_5_4/ext/sockets/sockets.c:820: error: (Each undeclared identifier 
is reported only once
/usr/src/PHP_5_4/ext/sockets/sockets.c:820: error: for each function it appears 
in.)
/usr/src/PHP_5_4/ext/sockets/sockets.c:821: error: ‘IP_UNBLOCK_SOURCE’ 
undeclared (first use in this function)
/usr/src/PHP_5_4/ext/sockets/sockets.c:822: error: ‘IP_ADD_SOURCE_MEMBERSHIP’ 
undeclared (first use in this function)
/usr/src/PHP_5_4/ext/sockets/sockets.c:823: error: ‘IP_DROP_SOURCE_MEMBERSHIP’ 
undeclared (first use in this function)
/usr/src/PHP_5_4/ext/sockets/sockets.c: In function ‘zif_socket_connect’:
/usr/src/PHP_5_4/ext/sockets/sockets.c:1552: warning: cast from pointer to 
integer of different size
/usr/src/PHP_5_4/ext/sockets/sockets.c: In function ‘php_do_mcast_opt’:
/usr/src/PHP_5_4/ext/sockets/sockets.c:2068: error: ‘IP_BLOCK_SOURCE’ undeclared 
(first use in this function)
/usr/src/PHP_5_4/ext/sockets/sockets.c:2071: error: ‘IP_UNBLOCK_SOURCE’ 
undeclared (first use in this function)
/usr/src/PHP_5_4/ext/sockets/sockets.c:2074: error: ‘IP_ADD_SOURCE_MEMBERSHIP’ 
undeclared (first use in this function)
/usr/src/PHP_5_4/ext/sockets/sockets.c:2077: error: ‘IP_DROP_SOURCE_MEMBERSHIP’ 
undeclared (first use in this function)
/usr/src/PHP_5_4/ext/sockets/sockets.c: In function ‘zif_socket_set_option’:
/usr/src/PHP_5_4/ext/sockets/sockets.c:2158: error: ‘IP_BLOCK_SOURCE’ undeclared 
(first use in this function)
/usr/src/PHP_5_4/ext/sockets/sockets.c:2159: error: ‘IP_UNBLOCK_SOURCE’ 
undeclared (first use in this function)
/usr/src/PHP_5_4/ext/sockets/sockets.c:2160: error: ‘IP_ADD_SOURCE_MEMBERSHIP’ 
undeclared (first use in this function)
/usr/src/PHP_5_4/ext/sockets/sockets.c:2161: error: ‘IP_DROP_SOURCE_MEMBERSHIP’ 
undeclared (first use in this function)
make: *** [ext/sockets/sockets.lo] Error 1
 [2011-07-04 04:33 UTC] cataphract@php.net
-Status: Re-Opened +Status: Closed
 [2011-07-04 04:33 UTC] cataphract@php.net
Closing; current compilation problems in Mac OSX should be followed on bug #55111.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 17:01:30 2024 UTC