Lines Matching +full:host +full:- +full:only
79 * for the host with name name.
80 * Due to dns_gethostbyname limitations, only one address is returned.
84 * for the host with name name
99 /* query host IP address */ in lwip_gethostbyname()
132 …LWIP_DEBUGF(DNS_DEBUG, ("hostent.h_addr_list[%i]-> == %s\n", idx, ipaddr_ntoa((ip_addr_t *)s_hoste… in lwip_gethostbyname()
138 /* this function should return the "per-thread" hostent after copy from s_hostent */ in lwip_gethostbyname()
146 * Thread-safe variant of lwip_gethostbyname: instead of using a static
151 * @param ret pre-allocated struct where to store the result
152 * @param buf pre-allocated buffer where to store additional data
158 * @return 0 on success, non-zero on error, additional error information
159 * is stored in *h_errnop instead of h_errno to be thread-safe
179 return -1; in lwip_gethostbyname_r()
186 return -1; in lwip_gethostbyname_r()
193 return -1; in lwip_gethostbyname_r()
199 /* query host IP address */ in lwip_gethostbyname_r()
200 err = netconn_gethostbyname(name, &h->addr); in lwip_gethostbyname_r()
204 return -1; in lwip_gethostbyname_r()
212 h->addr_list[0] = &h->addr; in lwip_gethostbyname_r()
213 h->addr_list[1] = NULL; in lwip_gethostbyname_r()
214 h->aliases = NULL; in lwip_gethostbyname_r()
215 ret->h_name = hostname; in lwip_gethostbyname_r()
216 ret->h_aliases = &h->aliases; in lwip_gethostbyname_r()
217 ret->h_addrtype = AF_INET; in lwip_gethostbyname_r()
218 ret->h_length = sizeof(ip_addr_t); in lwip_gethostbyname_r()
219 ret->h_addr_list = (char **)&h->addr_list; in lwip_gethostbyname_r()
241 next = ai->ai_next; in lwip_freeaddrinfo()
248 * Translates the name of a service location (for example, a host name) and/or
255 * Due to a limitation in dns_gethostbyname, only the first address of a
256 * host is returned.
257 * Also, service names are not supported (only port numbers)!
259 * @param nodename descriptive name or address string of the host
260 * (may be NULL -> local address)
264 * @return 0 on success, non-zero on failure
290 ai_family = hints->ai_family; in lwip_getaddrinfo()
307 * @todo?: currently, only ASCII integers (port numbers) are supported (AI_NUMERICSERV)! */ in lwip_getaddrinfo()
316 if ((hints != NULL) && (hints->ai_flags & AI_NUMERICHOST)) { in lwip_getaddrinfo()
344 if ((hints != NULL) && (hints->ai_flags & AI_PASSIVE)) { in lwip_getaddrinfo()
361 /* If this fails, please report to lwip-devel! :-) */ in lwip_getaddrinfo()
375 inet6_addr_from_ip6addr(&sa6->sin6_addr, ip_2_ip6(&addr)); in lwip_getaddrinfo()
376 sa6->sin6_family = AF_INET6; in lwip_getaddrinfo()
377 sa6->sin6_len = sizeof(struct sockaddr_in6); in lwip_getaddrinfo()
378 sa6->sin6_port = lwip_htons((u16_t)port_nr); in lwip_getaddrinfo()
379 sa6->sin6_scope_id = ip6_addr_zone(ip_2_ip6(&addr)); in lwip_getaddrinfo()
380 ai->ai_family = AF_INET6; in lwip_getaddrinfo()
386 inet_addr_from_ip4addr(&sa4->sin_addr, ip_2_ip4(&addr)); in lwip_getaddrinfo()
387 sa4->sin_family = AF_INET; in lwip_getaddrinfo()
388 sa4->sin_len = sizeof(struct sockaddr_in); in lwip_getaddrinfo()
389 sa4->sin_port = lwip_htons((u16_t)port_nr); in lwip_getaddrinfo()
390 ai->ai_family = AF_INET; in lwip_getaddrinfo()
397 ai->ai_socktype = hints->ai_socktype; in lwip_getaddrinfo()
398 ai->ai_protocol = hints->ai_protocol; in lwip_getaddrinfo()
402 ai->ai_canonname = ((char *)ai + sizeof(struct addrinfo) + sizeof(struct sockaddr_storage)); in lwip_getaddrinfo()
403 MEMCPY(ai->ai_canonname, nodename, namelen); in lwip_getaddrinfo()
404 ai->ai_canonname[namelen] = 0; in lwip_getaddrinfo()
406 ai->ai_addrlen = sizeof(struct sockaddr_storage); in lwip_getaddrinfo()
407 ai->ai_addr = (struct sockaddr *)sa; in lwip_getaddrinfo()