Lines Matching refs:php_sock
150 static int php_do_mcast_opt(php_socket *php_sock, int level, int optname, zval *arg4) in php_do_mcast_opt() argument
176 if (php_get_address_from_array(opt_ht, "group", php_sock, &group, in php_do_mcast_opt()
180 if (php_get_if_index_from_array(opt_ht, "interface", php_sock, in php_do_mcast_opt()
185 retval = mcast_req_fun(php_sock, level, (struct sockaddr*)&group, in php_do_mcast_opt()
212 if (php_get_address_from_array(opt_ht, "group", php_sock, &group, in php_do_mcast_opt()
216 if (php_get_address_from_array(opt_ht, "source", php_sock, &source, in php_do_mcast_opt()
220 if (php_get_if_index_from_array(opt_ht, "interface", php_sock, in php_do_mcast_opt()
225 retval = mcast_sreq_fun(php_sock, level, (struct sockaddr*)&group, in php_do_mcast_opt()
239 PHP_SOCKET_ERROR(php_sock, "unable to set socket option", errno); in php_do_mcast_opt()
246 int php_do_setsockopt_ip_mcast(php_socket *php_sock, in php_do_setsockopt_ip_mcast() argument
267 if (php_do_mcast_opt(php_sock, level, optname, arg4) == FAILURE) { in php_do_setsockopt_ip_mcast()
278 if (php_if_index_to_addr4(if_index, php_sock, &if_addr) == FAILURE) { in php_do_setsockopt_ip_mcast()
307 retval = setsockopt(php_sock->bsd_socket, level, optname, opt_ptr, optlen); in php_do_setsockopt_ip_mcast()
309 PHP_SOCKET_ERROR(php_sock, "unable to set socket option", errno); in php_do_setsockopt_ip_mcast()
316 int php_do_setsockopt_ipv6_mcast(php_socket *php_sock, in php_do_setsockopt_ipv6_mcast() argument
336 if (php_do_mcast_opt(php_sock, level, optname, arg4) == FAILURE) { in php_do_setsockopt_ipv6_mcast()
372 retval = setsockopt(php_sock->bsd_socket, level, optname, opt_ptr, optlen); in php_do_setsockopt_ipv6_mcast()
374 PHP_SOCKET_ERROR(php_sock, "unable to set socket option", errno); in php_do_setsockopt_ipv6_mcast()
631 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
638 (void) php_sock; /* not necessary */ in php_if_index_to_addr4()
671 int php_add4_to_if_index(struct in_addr *addr, php_socket *php_sock, unsigned *if_index) in php_add4_to_if_index() argument
678 (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)