Lines Matching refs:php_sock
148 static int php_do_mcast_opt(php_socket *php_sock, int level, int optname, zval **arg4 TSRMLS_DC) in php_do_mcast_opt() argument
174 if (php_get_address_from_array(opt_ht, "group", php_sock, &group, in php_do_mcast_opt()
178 if (php_get_if_index_from_array(opt_ht, "interface", php_sock, in php_do_mcast_opt()
183 retval = mcast_req_fun(php_sock, level, (struct sockaddr*)&group, in php_do_mcast_opt()
210 if (php_get_address_from_array(opt_ht, "group", php_sock, &group, in php_do_mcast_opt()
214 if (php_get_address_from_array(opt_ht, "source", php_sock, &source, in php_do_mcast_opt()
218 if (php_get_if_index_from_array(opt_ht, "interface", php_sock, in php_do_mcast_opt()
223 retval = mcast_sreq_fun(php_sock, level, (struct sockaddr*)&group, in php_do_mcast_opt()
237 PHP_SOCKET_ERROR(php_sock, "unable to set socket option", errno); in php_do_mcast_opt()
244 int php_do_setsockopt_ip_mcast(php_socket *php_sock, in php_do_setsockopt_ip_mcast() argument
265 if (php_do_mcast_opt(php_sock, level, optname, arg4 TSRMLS_CC) == FAILURE) { in php_do_setsockopt_ip_mcast()
276 if (php_if_index_to_addr4(if_index, php_sock, &if_addr TSRMLS_CC) == FAILURE) { in php_do_setsockopt_ip_mcast()
304 retval = setsockopt(php_sock->bsd_socket, level, optname, opt_ptr, optlen); in php_do_setsockopt_ip_mcast()
306 PHP_SOCKET_ERROR(php_sock, "unable to set socket option", errno); in php_do_setsockopt_ip_mcast()
313 int php_do_setsockopt_ipv6_mcast(php_socket *php_sock, in php_do_setsockopt_ipv6_mcast() argument
333 if (php_do_mcast_opt(php_sock, level, optname, arg4 TSRMLS_CC) == FAILURE) { in php_do_setsockopt_ipv6_mcast()
368 retval = setsockopt(php_sock->bsd_socket, level, optname, opt_ptr, optlen); in php_do_setsockopt_ipv6_mcast()
370 PHP_SOCKET_ERROR(php_sock, "unable to set socket option", errno); in php_do_setsockopt_ipv6_mcast()
627 int php_if_index_to_addr4(unsigned if_index, php_socket *php_sock, struct in_addr *out_addr TSRMLS_… in php_if_index_to_addr4() argument
634 (void) php_sock; /* not necessary */ in php_if_index_to_addr4()
667 int php_add4_to_if_index(struct in_addr *addr, php_socket *php_sock, unsigned *if_index TSRMLS_DC) in php_add4_to_if_index() argument
674 (void) php_sock; /* not necessary */ in php_add4_to_if_index()
714 int php_if_index_to_addr4(unsigned if_index, php_socket *php_sock, struct in_addr *out_addr TSRMLS_… argument
729 if (ioctl(php_sock->bsd_socket, SIOCGIFNAME, &if_req) == -1) {
740 if (ioctl(php_sock->bsd_socket, SIOCGIFADDR, &if_req) == -1) {
751 int php_add4_to_if_index(struct in_addr *addr, php_socket *php_sock, unsigned *if_index TSRMLS_DC) argument
771 if (ioctl(php_sock->bsd_socket, SIOCGIFCONF, (char*)&if_conf) == -1 &&
808 if (ioctl(php_sock->bsd_socket, SIOCGIFINDEX, (char*)cur_req)