You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

91 lines
2.8 KiB

  1. /*
  2. +----------------------------------------------------------------------+
  3. | PHP Version 5 |
  4. +----------------------------------------------------------------------+
  5. | Copyright (c) 1997-2011 The PHP Group |
  6. +----------------------------------------------------------------------+
  7. | This source file is subject to version 3.01 of the PHP license, |
  8. | that is bundled with this package in the file LICENSE, and is |
  9. | available through the world-wide-web at the following url: |
  10. | http://www.php.net/license/3_01.txt |
  11. | If you did not receive a copy of the PHP license and are unable to |
  12. | obtain it through the world-wide-web, please send a note to |
  13. | license@php.net so we can mail you a copy immediately. |
  14. +----------------------------------------------------------------------+
  15. | Authors: Gustavo Lopes <cataphract@php.net> |
  16. +----------------------------------------------------------------------+
  17. */
  18. /* $Id$ */
  19. #if defined(MCAST_JOIN_GROUP) && \
  20. (!defined(PHP_WIN32) || (_WIN32_WINNT >= 0x600 && SOCKETS_ENABLE_VISTA_API))
  21. #define RFC3678_API 1
  22. /* has block/unblock and source membership, in this case for both IPv4 and IPv6 */
  23. #define HAS_MCAST_EXT 1
  24. #elif defined(IP_ADD_SOURCE_MEMBERSHIP)
  25. /* has block/unblock and source membership, but only for IPv4 */
  26. #define HAS_MCAST_EXT 1
  27. #endif
  28. int php_if_index_to_addr4(
  29. unsigned if_index,
  30. php_socket *php_sock,
  31. struct in_addr *out_addr TSRMLS_DC);
  32. int php_add4_to_if_index(
  33. struct in_addr *addr,
  34. php_socket *php_sock,
  35. unsigned *if_index TSRMLS_DC);
  36. int php_mcast_join(
  37. php_socket *sock,
  38. int level,
  39. struct sockaddr *group,
  40. socklen_t group_len,
  41. unsigned int if_index TSRMLS_DC);
  42. int php_mcast_leave(
  43. php_socket *sock,
  44. int level,
  45. struct sockaddr *group,
  46. socklen_t group_len,
  47. unsigned int if_index TSRMLS_DC);
  48. #ifdef HAS_MCAST_EXT
  49. int php_mcast_join_source(
  50. php_socket *sock,
  51. int level,
  52. struct sockaddr *group,
  53. socklen_t group_len,
  54. struct sockaddr *source,
  55. socklen_t source_len,
  56. unsigned int if_index TSRMLS_DC);
  57. int php_mcast_leave_source(
  58. php_socket *sock,
  59. int level,
  60. struct sockaddr *group,
  61. socklen_t group_len,
  62. struct sockaddr *source,
  63. socklen_t source_len,
  64. unsigned int if_index TSRMLS_DC);
  65. int php_mcast_block_source(
  66. php_socket *sock,
  67. int level,
  68. struct sockaddr *group,
  69. socklen_t group_len,
  70. struct sockaddr *source,
  71. socklen_t source_len,
  72. unsigned int if_index TSRMLS_DC);
  73. int php_mcast_unblock_source(
  74. php_socket *sock,
  75. int level,
  76. struct sockaddr *group,
  77. socklen_t group_len,
  78. struct sockaddr *source,
  79. socklen_t source_len,
  80. unsigned int if_index TSRMLS_DC);
  81. #endif