Commit Graph

7 Commits

Author SHA1 Message Date
Anatol Belski
bdeb220f48 first shot remove TSRMLS_* things 2014-12-13 23:06:14 +01:00
Xinchen Hui
489da59b08 Refactoring socket (only compilable now) 2014-05-17 10:23:46 +08:00
Gustavo Lopes
bd580db373 Build fixes; accept names for if_index 2013-02-02 16:38:08 +01:00
Gustavo Lopes
4414b33abd Refactoring: move stuff to new conversions.c 2013-02-02 16:38:08 +01:00
Gustavo Lopes
66ea024587 Support sticky IPV6_PKTINFO 2013-02-02 16:38:08 +01:00
Gustavo Lopes
b18bd8904e Rename some functions for consistency 2013-02-02 16:38:07 +01:00
Gustavo Lopes
5e51c85143 Wrap recvmsg() and sendmsg()
This introduces two new functions:

int socket_recvmsg(resource $socket, array &$msghdr, int $flags)
int socket_sendmsg(resource $socket, array $msghdr, int $flags)

The arrays representing struct msghdr follow the native counterpart
closely: structs are mapped to arrays, fields to array elements whose
key is the name of the field without the prefix (e.g. "name" instead
of "msg_name") and array are mapped to sequential numeric PHP arrays.

Right now the only type of ancillary data supported is fot the
level/type pair IPPROTO_IPV6/IPV6_PKTINFO.

I also refactored out the name resolution functions and made
sockets_strerror() a global function.
2013-02-02 16:38:05 +01:00