Example #1
0
File: ntpdc.c Project: 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);
}
Example #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);
}