Lines Matching refs:php_sock
139 static zend_result php_do_mcast_opt(php_socket *php_sock, int level, int optname, zval *arg4) in php_do_mcast_opt() argument
165 if (php_get_address_from_array(opt_ht, "group", php_sock, &group, in php_do_mcast_opt()
169 if (php_get_if_index_from_array(opt_ht, "interface", php_sock, in php_do_mcast_opt()
174 retval = mcast_req_fun(php_sock, level, (struct sockaddr*)&group, in php_do_mcast_opt()
201 if (php_get_address_from_array(opt_ht, "group", php_sock, &group, in php_do_mcast_opt()
205 if (php_get_address_from_array(opt_ht, "source", php_sock, &source, in php_do_mcast_opt()
209 if (php_get_if_index_from_array(opt_ht, "interface", php_sock, in php_do_mcast_opt()
214 retval = mcast_sreq_fun(php_sock, level, (struct sockaddr*)&group, in php_do_mcast_opt()
228 PHP_SOCKET_ERROR(php_sock, "Unable to set socket option", errno); in php_do_mcast_opt()
235 int php_do_setsockopt_ip_mcast(php_socket *php_sock, in php_do_setsockopt_ip_mcast() argument
256 if (php_do_mcast_opt(php_sock, level, optname, arg4) == FAILURE) { in php_do_setsockopt_ip_mcast()
267 if (php_if_index_to_addr4(if_index, php_sock, &if_addr) == FAILURE) { in php_do_setsockopt_ip_mcast()
295 retval = setsockopt(php_sock->bsd_socket, level, optname, opt_ptr, optlen); in php_do_setsockopt_ip_mcast()
297 PHP_SOCKET_ERROR(php_sock, "Unable to set socket option", errno); in php_do_setsockopt_ip_mcast()
304 int php_do_setsockopt_ipv6_mcast(php_socket *php_sock, in php_do_setsockopt_ipv6_mcast() argument
324 if (php_do_mcast_opt(php_sock, level, optname, arg4) == FAILURE) { in php_do_setsockopt_ipv6_mcast()
359 retval = setsockopt(php_sock->bsd_socket, level, optname, opt_ptr, optlen); in php_do_setsockopt_ipv6_mcast()
361 PHP_SOCKET_ERROR(php_sock, "Unable to set socket option", errno); in php_do_setsockopt_ipv6_mcast()
619 zend_result php_if_index_to_addr4(unsigned if_index, php_socket *php_sock, struct in_addr *out_addr) in php_if_index_to_addr4() argument
626 (void) php_sock; /* not necessary */ in php_if_index_to_addr4()
661 zend_result php_add4_to_if_index(struct in_addr *addr, php_socket *php_sock, unsigned *if_index) in php_add4_to_if_index() argument
668 (void) php_sock; /* not necessary */ in php_add4_to_if_index()
710 zend_result php_if_index_to_addr4(unsigned if_index, php_socket *php_sock, struct in_addr *out_addr) argument
725 if (ioctl(php_sock->bsd_socket, SIOCGIFNAME, &if_req) == -1) {
736 if (ioctl(php_sock->bsd_socket, SIOCGIFADDR, &if_req) == -1) {
747 zend_result php_add4_to_if_index(struct in_addr *addr, php_socket *php_sock, unsigned *if_index) argument
767 if (ioctl(php_sock->bsd_socket, SIOCGIFCONF, (char*)&if_conf) == -1 &&
803 if (ioctl(php_sock->bsd_socket, SIOCGIFINDEX, (char*)&cur_req)