Lines Matching refs:php_sock
144 static int php_do_mcast_opt(php_socket *php_sock, int level, int optname, zval *arg4) in php_do_mcast_opt() argument
170 if (php_get_address_from_array(opt_ht, "group", php_sock, &group, in php_do_mcast_opt()
174 if (php_get_if_index_from_array(opt_ht, "interface", php_sock, in php_do_mcast_opt()
179 retval = mcast_req_fun(php_sock, level, (struct sockaddr*)&group, in php_do_mcast_opt()
206 if (php_get_address_from_array(opt_ht, "group", php_sock, &group, in php_do_mcast_opt()
210 if (php_get_address_from_array(opt_ht, "source", php_sock, &source, in php_do_mcast_opt()
214 if (php_get_if_index_from_array(opt_ht, "interface", php_sock, in php_do_mcast_opt()
219 retval = mcast_sreq_fun(php_sock, level, (struct sockaddr*)&group, in php_do_mcast_opt()
233 PHP_SOCKET_ERROR(php_sock, "unable to set socket option", errno); in php_do_mcast_opt()
240 int php_do_setsockopt_ip_mcast(php_socket *php_sock, in php_do_setsockopt_ip_mcast() argument
261 if (php_do_mcast_opt(php_sock, level, optname, arg4) == FAILURE) { in php_do_setsockopt_ip_mcast()
272 if (php_if_index_to_addr4(if_index, php_sock, &if_addr) == FAILURE) { in php_do_setsockopt_ip_mcast()
301 retval = setsockopt(php_sock->bsd_socket, level, optname, opt_ptr, optlen); in php_do_setsockopt_ip_mcast()
303 PHP_SOCKET_ERROR(php_sock, "unable to set socket option", errno); in php_do_setsockopt_ip_mcast()
310 int php_do_setsockopt_ipv6_mcast(php_socket *php_sock, in php_do_setsockopt_ipv6_mcast() argument
330 if (php_do_mcast_opt(php_sock, level, optname, arg4) == FAILURE) { in php_do_setsockopt_ipv6_mcast()
366 retval = setsockopt(php_sock->bsd_socket, level, optname, opt_ptr, optlen); in php_do_setsockopt_ipv6_mcast()
368 PHP_SOCKET_ERROR(php_sock, "unable to set socket option", errno); in php_do_setsockopt_ipv6_mcast()
625 int php_if_index_to_addr4(unsigned if_index, php_socket *php_sock, struct in_addr *out_addr) in php_if_index_to_addr4() argument
632 (void) php_sock; /* not necessary */ in php_if_index_to_addr4()
668 int php_add4_to_if_index(struct in_addr *addr, php_socket *php_sock, unsigned *if_index) in php_add4_to_if_index() argument
675 (void) php_sock; /* not necessary */ in php_add4_to_if_index()
718 int php_if_index_to_addr4(unsigned if_index, php_socket *php_sock, struct in_addr *out_addr) argument
733 if (ioctl(php_sock->bsd_socket, SIOCGIFNAME, &if_req) == -1) {
744 if (ioctl(php_sock->bsd_socket, SIOCGIFADDR, &if_req) == -1) {
755 int php_add4_to_if_index(struct in_addr *addr, php_socket *php_sock, unsigned *if_index) argument
775 if (ioctl(php_sock->bsd_socket, SIOCGIFCONF, (char*)&if_conf) == -1 &&
812 if (ioctl(php_sock->bsd_socket, SIOCGIFINDEX, (char*)cur_req)