Lines Matching refs:ai
2641 struct addrinfo *ai; local
2648 …if ((ai = (struct addrinfo *) zend_fetch_resource(Z_RES_P(arg1), le_addrinfo_name, le_addrinfo)) =…
2653 php_sock->bsd_socket = socket(ai->ai_family, ai->ai_socktype, ai->ai_protocol);
2654 php_sock->type = ai->ai_family;
2680 retval = bind(php_sock->bsd_socket, ai->ai_addr, ai->ai_addrlen);
2707 struct addrinfo *ai; local
2714 …if ((ai = (struct addrinfo *) zend_fetch_resource(Z_RES_P(arg1), le_addrinfo_name, le_addrinfo)) =…
2719 php_sock->bsd_socket = socket(ai->ai_family, ai->ai_socktype, ai->ai_protocol);
2720 php_sock->type = ai->ai_family;
2746 retval = connect(php_sock->bsd_socket, ai->ai_addr, ai->ai_addrlen);
2772 struct addrinfo *ai; local
2778 …if ((ai = (struct addrinfo *) zend_fetch_resource(Z_RES_P(arg1), le_addrinfo_name, le_addrinfo)) =…
2784 add_assoc_long(return_value, "ai_flags", ai->ai_flags);
2785 add_assoc_long(return_value, "ai_family", ai->ai_family);
2786 add_assoc_long(return_value, "ai_socktype", ai->ai_socktype);
2787 add_assoc_long(return_value, "ai_protocol", ai->ai_protocol);
2788 if (ai->ai_canonname != NULL) {
2789 add_assoc_string(return_value, "ai_canonname", ai->ai_canonname);
2793 switch(ai->ai_family) {
2796 struct sockaddr_in *sa = (struct sockaddr_in *) ai->ai_addr;
2800 inet_ntop(ai->ai_family, &sa->sin_addr, addr, sizeof(addr));
2807 struct sockaddr_in6 *sa = (struct sockaddr_in6 *) ai->ai_addr;
2811 inet_ntop(ai->ai_family, &sa->sin6_addr, addr, sizeof(addr));