From what I see:
sysdeps / posix / getaddrinfo.c: 2206
int
getaddrinfo (const char *name, const char *service,
const struct addrinfo *hints, struct addrinfo **pai)
sysdeps / posix / getaddrinfo.c: 2304
last_i = gaih_inet (name, pservice, hints, end, &naddrs, &tmpbuf);
sysdeps / posix / getaddrinfo.c: 342
static int
gaih_inet (const char *name, const struct gaih_service *service,
const struct addrinfo *req, struct addrinfo **pai,
unsigned int *naddrs, struct scratch_buffer *tmpbuf)
sysdeps / posix / getaddrinfo.c: 595
rc = __gethostbyname2_r (name, AF_INET, &th,
tmpbuf->data, tmpbuf->length,
&h, &h_errno);
nss / getXXbyYY_r.c: 189
int
INTERNAL (REENTRANT_NAME) (ADD_PARAMS, LOOKUP_TYPE *resbuf, char *buffer,
size_t buflen, LOOKUP_TYPE **result H_ERRNO_PARM
EXTRA_PARAMS)
nss / getXXbyYY_r.c: 316
status = DL_CALL_FCT (fct.l, (ADD_VARIABLES, resbuf, buffer, buflen,
&errno H_ERRNO_VAR EXTRA_VARIABLES));
nss / nss_files / files-hosts.c: 385
enum nss_status
_nss_files_gethostbyname2_r (const char *name, int af, struct hostent *result,
char *buffer, size_t buflen, int *errnop,
int *herrnop)
nss/nss_files/files-hosts.c: 389
return _nss_files_gethostbyname3_r (name, af, result, buffer, buflen,
errnop, herrnop, NULL, NULL);
nss/nss_files/files-hosts.c: 334
enum nss_status
_nss_files_gethostbyname3_r (const char *name, int af, struct hostent *result,
char *buffer, size_t buflen, int *errnop,
int *herrnop, int32_t *ttlp, char **canonp)
, -if multi
on
/etc/host.conf
- :
nss/nss_files/files-hosts.c: 352
while ((status = internal_getent (stream, result, buffer, buflen, errnop,
herrnop, af, flags))
== NSS_STATUS_SUCCESS)
{
LOOKUP_NAME_CASE (h_name, h_aliases)
}
if (status == NSS_STATUS_SUCCESS
&& _res_hconf.flags & HCONF_FLAG_MULTI)
status = gethostbyname3_multi
(stream, name, af, result, buffer, buflen, errnop, herrnop, flags);
nss/nss_files/files-hosts.c: 127
static enum nss_status
gethostbyname3_multi (FILE * stream, const char *name, int af,
struct hostent *result, char *buffer, size_t buflen,
int *errnop, int *herrnop, int flags)
nss/nss_files/files-hosts.c: 162
status = internal_getent (stream, &tmp_result_buf, tmp_buffer.data,
tmp_buffer.length, errnop, herrnop, af,
flags);
nss/nss_files/files-XXX.c: 178
static enum nss_status
internal_getent (FILE *stream, struct STRUCTURE *result,
char *buffer, size_t buflen, int *errnop H_ERRNO_PROTO
EXTRA_ARGS_DECL)
nss/nss_files/files-XXX.c: 222
|| ! (parse_result = parse_line (p, result, data, buflen, errnop
EXTRA_ARGS)));
":: 1 localhost.localdomain localhost".
inet_pton
::1
. , af == AF_INET
.
, ::1
IPv6, IPv4
:
nss/nss_files/files-hosts.c: 51
LINE_PARSER
nss/nss_files/files-hosts.c: 59
if (inet_pton (af == AF_UNSPEC ? AF_INET : af, addr, entdata->host_addr)
> 0)
af = af == AF_UNSPEC ? AF_INET : af;
else
{
if (...)
...
else if (af == AF_INET
&& inet_pton (AF_INET6, addr, entdata->host_addr) > 0)
{
if (...)
...
else if (IN6_IS_ADDR_LOOPBACK (entdata->host_addr))
{
in_addr_t localhost = htonl (INADDR_LOOPBACK);
memcpy (entdata->host_addr, &localhost, sizeof (localhost));
}
, - , .