FreeBSD/contrib/ntp/ntpd/ntp_io.c
/*
 * Find the given address with the all given flags set in the list
 */
Find the given address with the all given flags set in the list
Find the given address with the all given flags set in the list
static endpt *
find_flagged_addr_in_list(
	sockaddr_u *	addr,
	u_int32		flags
	)
{
	remaddr_t *entry;
	DPRINTF(4, ("Finding addr %s with flags %d in list: ",
		    stoa(addr), flags));
	for (entry = remoteaddr_list;
	     entry != NULL;
	     entry = entry->link)
		if (SOCK_EQ(&entry->addr, addr)
		    && (entry->ep->flags & flags) == flags) {
			DPRINTF(4, ("FOUND\n"));
			return entry->ep;
		}
	DPRINTF(4, ("NOT FOUND\n"));
	return NULL;
}
static endpt * find_flagged_addr_in_list ( sockaddr_u * addr , u_int32 flags ) { remaddr_t * entry ; DPRINTF ( 4 , ( " " , stoa ( addr ) , flags ) ) ; for ( entry = remoteaddr_list ; entry != NULL ; entry = entry -> link ) if ( SOCK_EQ ( & entry -> addr , addr ) && ( entry -> ep -> flags & flags ) == flags ) { DPRINTF ( 4 , ( " \n " ) ) ; return entry -> ep ; } DPRINTF ( 4 , ( " \n " ) ) ; return NULL ; }
Find the given address with the all given flags set in the list
Find the given address with the all given flags set in the list