Skip Report for ext/sockets/tests/mcast_ipv6_recv_limited.phpt
Script
<?php
if (!extension_loaded('sockets')) {
die('skip sockets extension not available.');
}
if (!defined('IPPROTO_IPV6')) {
die('skip IPv6 not available.');
}
$s = socket_create(AF_INET6, SOCK_DGRAM, SOL_UDP);
$br = socket_bind($s, '::', 3000);
/* On Linux, there is no route ff00::/8 by default on lo, which makes it
* troublesome to send multicast traffic from lo, which we must since
* we're dealing with interface-local traffic... */
$so = socket_set_option($s, IPPROTO_IPV6, MCAST_JOIN_GROUP, array(
"group" => 'ff01::114',
"interface" => 0,
));
if ($so === false) {
die('skip unable to join multicast group on any interface.');
}
$r = socket_sendto($s, $m = "testing packet", strlen($m), 0, 'ff01::114', 3000);
if ($r === false) {
die('skip unable to send multicast packet.');
}
$so = socket_set_option($s, IPPROTO_IPV6, MCAST_LEAVE_GROUP, array(
"group" => 'ff01::114',
"interface" => 0,
));
if (defined("MCAST_JOIN_SOURCE_GROUP")) {
$so = socket_set_option($s, IPPROTO_IPV6, MCAST_JOIN_SOURCE_GROUP, array(
"group" => 'ff01::114',
"interface" => 0,
"source" => '2001::dead:beef',
));
if ($so !== false) {
die('skip protocol independent multicast API is available.');
}
}
Reason
protocol independent multicast API is available.
Generated at Thu, 23 May 2013 18:18:24 +0000 (2 days ago)
|