FreeBSD/contrib/ntp/ntpd/ntp_io.c
/*
 * findinterface - find local interface corresponding to address
 */
find local interface corresponding to address
find local interface corresponding to address
endpt *
findinterface(
	sockaddr_u *addr
	)
{
	endpt *iface;
	iface = findlocalinterface(addr, INT_WILDCARD, 0);
	if (NULL == iface) {
		DPRINTF(4, ("Found no interface for address %s - returning wildcard\n",
			    stoa(addr)));
		iface = ANY_INTERFACE_CHOOSE(addr);
	} else
		DPRINTF(4, ("Found interface #%d %s for address %s\n",
			    iface->ifnum, iface->name, stoa(addr)));
	return iface;
}
endpt * findinterface ( sockaddr_u * addr ) { endpt * iface ; iface = findlocalinterface ( addr , INT_WILDCARD , 0 ) ; if ( NULL == iface ) { DPRINTF ( 4 , ( " \n " , stoa ( addr ) ) ) ; iface = ANY_INTERFACE_CHOOSE ( addr ) ; } else DPRINTF ( 4 , ( " \n " , iface -> ifnum , iface -> name , stoa ( addr ) ) ) ; return iface ; }
findinterface - find local interface corresponding to address
findinterface - find local interface corresponding to address