Lines Matching refs:addrinfo
154 struct addrinfo addrinfo; member
185 if (address_info->addrinfo.ai_canonname != NULL) { in address_info_free_obj()
186 efree(address_info->addrinfo.ai_canonname); in address_info_free_obj()
188 efree(address_info->addrinfo.ai_addr); in address_info_free_obj()
2535 struct addrinfo hints, *result, *rp;
2580 memcpy(&res->addrinfo, rp, sizeof(struct addrinfo));
2582 res->addrinfo.ai_addr = emalloc(rp->ai_addrlen);
2583 memcpy(res->addrinfo.ai_addr, rp->ai_addr, rp->ai_addrlen);
2586 res->addrinfo.ai_canonname = estrdup(rp->ai_canonname);
2614 …php_sock->bsd_socket = socket(ai->addrinfo.ai_family, ai->addrinfo.ai_socktype, ai->addrinfo.ai_pr…
2615 php_sock->type = ai->addrinfo.ai_family;
2641 retval = bind(php_sock->bsd_socket, ai->addrinfo.ai_addr, ai->addrinfo.ai_addrlen);
2677 …php_sock->bsd_socket = socket(ai->addrinfo.ai_family, ai->addrinfo.ai_socktype, ai->addrinfo.ai_pr…
2678 php_sock->type = ai->addrinfo.ai_family;
2704 retval = connect(php_sock->bsd_socket, ai->addrinfo.ai_addr, ai->addrinfo.ai_addrlen);
2737 add_assoc_long(return_value, "ai_flags", ai->addrinfo.ai_flags);
2738 add_assoc_long(return_value, "ai_family", ai->addrinfo.ai_family);
2739 add_assoc_long(return_value, "ai_socktype", ai->addrinfo.ai_socktype);
2740 add_assoc_long(return_value, "ai_protocol", ai->addrinfo.ai_protocol);
2741 if (ai->addrinfo.ai_canonname != NULL) {
2742 add_assoc_string(return_value, "ai_canonname", ai->addrinfo.ai_canonname);
2746 switch (ai->addrinfo.ai_family) {
2749 struct sockaddr_in *sa = (struct sockaddr_in *) ai->addrinfo.ai_addr;
2753 inet_ntop(ai->addrinfo.ai_family, &sa->sin_addr, addr, sizeof(addr));
2760 struct sockaddr_in6 *sa = (struct sockaddr_in6 *) ai->addrinfo.ai_addr;
2764 inet_ntop(ai->addrinfo.ai_family, &sa->sin6_addr, addr, sizeof(addr));