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()
2443 struct addrinfo hints, *result, *rp;
2488 memcpy(&res->addrinfo, rp, sizeof(struct addrinfo));
2490 res->addrinfo.ai_addr = emalloc(rp->ai_addrlen);
2491 memcpy(res->addrinfo.ai_addr, rp->ai_addr, rp->ai_addrlen);
2494 res->addrinfo.ai_canonname = estrdup(rp->ai_canonname);
2522 …php_sock->bsd_socket = socket(ai->addrinfo.ai_family, ai->addrinfo.ai_socktype, ai->addrinfo.ai_pr…
2523 php_sock->type = ai->addrinfo.ai_family;
2549 retval = bind(php_sock->bsd_socket, ai->addrinfo.ai_addr, ai->addrinfo.ai_addrlen);
2585 …php_sock->bsd_socket = socket(ai->addrinfo.ai_family, ai->addrinfo.ai_socktype, ai->addrinfo.ai_pr…
2586 php_sock->type = ai->addrinfo.ai_family;
2612 retval = connect(php_sock->bsd_socket, ai->addrinfo.ai_addr, ai->addrinfo.ai_addrlen);
2645 add_assoc_long(return_value, "ai_flags", ai->addrinfo.ai_flags);
2646 add_assoc_long(return_value, "ai_family", ai->addrinfo.ai_family);
2647 add_assoc_long(return_value, "ai_socktype", ai->addrinfo.ai_socktype);
2648 add_assoc_long(return_value, "ai_protocol", ai->addrinfo.ai_protocol);
2649 if (ai->addrinfo.ai_canonname != NULL) {
2650 add_assoc_string(return_value, "ai_canonname", ai->addrinfo.ai_canonname);
2654 switch (ai->addrinfo.ai_family) {
2657 struct sockaddr_in *sa = (struct sockaddr_in *) ai->addrinfo.ai_addr;
2661 inet_ntop(ai->addrinfo.ai_family, &sa->sin_addr, addr, sizeof(addr));
2668 struct sockaddr_in6 *sa = (struct sockaddr_in6 *) ai->addrinfo.ai_addr;
2672 inet_ntop(ai->addrinfo.ai_family, &sa->sin6_addr, addr, sizeof(addr));