FreeBSD/contrib/ntp/ntpd/ntp_peer.c
/*
 * findmanycastpeer - find and return a manycastclient or pool
 *		      association matching a received response.
 */
find and return a manycastclient or pool
association matching a received response.
find and return a manycastclient or pool association matching a received response .
struct peer *
findmanycastpeer(
	struct recvbuf *rbufp	
	)
{
	struct peer *peer;
	struct pkt *pkt;
	l_fp p_org;
	pkt = &rbufp->recv_pkt;
	for (peer = peer_list; peer != NULL; peer = peer->p_link)
		if (MDF_SOLICIT_MASK & peer->cast_flags) {
			NTOHL_FP(&pkt->org, &p_org);
			if (L_ISEQU(&p_org, &peer->aorg))
				break;
		}
	return peer;
}
struct peer * findmanycastpeer ( struct recvbuf * rbufp ) { struct peer * peer ; struct pkt * pkt ; l_fp p_org ; pkt = & rbufp -> recv_pkt ; for ( peer = peer_list ; peer != NULL ; peer = peer -> p_link ) if ( MDF_SOLICIT_MASK & peer -> cast_flags ) { NTOHL_FP ( & pkt -> org , & p_org ) ; if ( L_ISEQU ( & p_org , & peer -> aorg ) ) break ; } return peer ; }
findmanycastpeer - find and return a manycastclient or pool
                    association matching a received response.
findmanycastpeer - find and return a manycastclient or pool association matching a received response .
/* receive buffer pointer */ /*
 	 * This routine is called upon arrival of a server-mode response
	 * to a manycastclient multicast solicitation, or to a pool
	 * server unicast solicitation.  Search the peer list for a
	 * manycastclient association where the last transmit timestamp
	 * matches the response packet's originate timestamp.  There can
	 * be multiple manycastclient associations, or multiple pool
	 * solicitation assocations, so this assumes the transmit
	 * timestamps are unique for such.
	 */