Doc #53851 [NEW]: socket_create protocol int (IPv6)
| From: | spandit at stealth dot net | Date: | Wed, 26 Jan 2011 22:36:23 +0000 |
| Subject: | Doc #53851 [NEW]: socket_create protocol int (IPv6) | ||
| Groups: | php.doc.bugs | ||
| Request: | Send a blank email to doc-bugs+get-5870@lists.php.net to get a copy of this message | ||
From:
Operating system: FreeBSD 8.x
PHP version: 5.3.5
Package: Documentation problem
Bug Type: Documentation Problem
Bug description:socket_create protocol int (IPv6)
Description:
------------
---
From manual page: http://www.php.net/function.socket-create#Parameters
---
The protocol section needs to be updated to account for the IPv6 protocol
numbers.
For example, calling getprotobyname('icmp') returns 1; or users would enter
'1'
for ICMP. For IPv6, this would be '58'. To open a raw socket for a ICMPv6,
the
command would be: socket_create(AF_INET6, SOCK_RAW, '58');
Test script:
---------------
<?php
$package = "\x08\x00\x7d\x4b\x00\x00\x00\x00Howdy";
// Write fails in this test
$socket = socket_create(AF_INET6, SOCK_RAW, 1);
socket_write($socket, $package, strlen($package));
// Write successful in this test
$socket = socket_create(AF_INET6, SOCK_RAW, 58);
socket_write($socket, $package, strlen($package));
Expected result:
----------------
See above
Actual result:
--------------
See above
--
Edit bug report at http://bugs.php.net/bug.php?id=53851&edit=1
--
Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=53851&r=trysnapshot52
Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=53851&r=trysnapshot53
Try a snapshot (trunk): http://bugs.php.net/fix.php?id=53851&r=trysnapshottrunk
Fixed in SVN: http://bugs.php.net/fix.php?id=53851&r=fixed
Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=53851&r=needdocs
Fixed in release: http://bugs.php.net/fix.php?id=53851&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=53851&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=53851&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=53851&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=53851&r=support
Expected behavior: http://bugs.php.net/fix.php?id=53851&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=53851&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=53851&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=53851&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=53851&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=53851&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=53851&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=53851&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=53851&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=53851&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=53851&r=mysqlcfg