Lines Matching refs:hostname
246 int getaddrinfo_numeric(const char* hostname, const char* servname, addrinfo hints, in getaddrinfo_numeric() argument
258 return android_getaddrinfofornetcontext(hostname, servname, &hints, &netcontext, result, in getaddrinfo_numeric()
307 int android_getaddrinfofornetcontext(const char* hostname, const char* servname, in android_getaddrinfofornetcontext() argument
322 if (hostname == nullptr && servname == nullptr) { in android_getaddrinfofornetcontext()
358 if (hostname == nullptr) in android_getaddrinfofornetcontext()
361 error = explore_numeric_scope(&tmp, hostname, servname, &cur->ai_next); in android_getaddrinfofornetcontext()
373 if (hostname == nullptr) { in android_getaddrinfofornetcontext()
382 return resolv_getaddrinfo(hostname, servname, hints, netcontext, res, event); in android_getaddrinfofornetcontext()
394 int resolv_getaddrinfo(const char* _Nonnull hostname, const char* servname, const addrinfo* hints, in resolv_getaddrinfo() argument
397 if (hostname == nullptr && servname == nullptr) return EAI_NONAME; in resolv_getaddrinfo()
398 if (hostname == nullptr) return EAI_NODATA; in resolv_getaddrinfo()
431 error = explore_fqdn(&tmp, hostname, servname, &cur->ai_next, netcontext, event); in resolv_getaddrinfo()
446 static int explore_fqdn(const addrinfo* pai, const char* hostname, const char* servname, in explore_fqdn() argument
460 if (!files_getaddrinfo(netcontext->dns_netid, hostname, pai, &result)) { in explore_fqdn()
461 error = dns_getaddrinfo(hostname, pai, netcontext, &result, event); in explore_fqdn()
539 static int explore_numeric(const struct addrinfo* pai, const char* hostname, const char* servname, in explore_numeric() argument
564 if (inet_pton(afd->a_af, hostname, pton) == 1) { in explore_numeric()
596 static int explore_numeric_scope(const struct addrinfo* pai, const char* hostname, in explore_numeric_scope() argument
619 if (!afd->a_scoped) return explore_numeric(pai, hostname, servname, res, hostname); in explore_numeric_scope()
621 cp = strchr(hostname, SCOPE_DELIMITER); in explore_numeric_scope()
622 if (cp == NULL) return explore_numeric(pai, hostname, servname, res, hostname); in explore_numeric_scope()
627 char* hostname2 = strdup(hostname); in explore_numeric_scope()
630 hostname2[cp - hostname] = '\0'; in explore_numeric_scope()
634 error = explore_numeric(pai, addr, servname, res, hostname); in explore_numeric_scope()