Exemplo n.º 1
0
Arquivo: ntpdc.c Projeto: pexip/os-ntp
/*
 * nntohost - convert network number to host name.  This routine enforces
 *	       the showhostnames setting.
 */
char *
nntohost(
	sockaddr_u *netnum
	)
{
	if (!showhostnames)
		return stoa(netnum);

	if (ISREFCLOCKADR(netnum))
		return refnumtoa(netnum);
	return socktohost(netnum);
}
Exemplo n.º 2
0
/*
 * nntohost - convert network number to host name.  This routine enforces
 *	       the showhostnames setting.
 */
const char *
nntohost(
	sockaddr_u *netnum
	)
{
	if (!showhostnames || SOCK_UNSPEC(netnum))
		return stoa(netnum);
	else if (ISREFCLOCKADR(netnum))
		return refnumtoa(netnum);
	else
		return socktohost(netnum);
}