FreeBSD/contrib/ntp/ntpd/ntp_peer.c
/*
 * init_peer - initialize peer data structures and counters
 *
 * N.B. We use the random number routine in here. It had better be
 * initialized prior to getting here.
 */
initialize peer data structures and counters
N.B. We use the random number routine in here. It had better be
initialized prior to getting here.
initialize peer data structures and counters N . B . We use the random number routine in here . It had better be initialized prior to getting here .
void
init_peer(void)
{
	int i;
	for (i = COUNTOF(init_peer_alloc) - 1; i >= 0; i--)
		LINK_SLIST(peer_free, &init_peer_alloc[i], p_link);
	total_peer_structs = COUNTOF(init_peer_alloc);
	peer_free_count = COUNTOF(init_peer_alloc);
	do
		current_association_ID = ntp_random() & ASSOCID_MAX;
	while (!current_association_ID);
	initial_association_ID = current_association_ID;
}
void init_peer ( void ) { int i ; for ( i = COUNTOF ( init_peer_alloc ) - 1 ; i >= 0 ; i -- ) LINK_SLIST ( peer_free , & init_peer_alloc [ i ] , p_link ) ; total_peer_structs = COUNTOF ( init_peer_alloc ) ; peer_free_count = COUNTOF ( init_peer_alloc ) ; do current_association_ID = ntp_random ( ) & ASSOCID_MAX ; while ( ! current_association_ID ) ; initial_association_ID = current_association_ID ; }
init_peer - initialize peer data structures and counters
 N.B.
init_peer - initialize peer data structures and counters N . B .
/*
	 * Initialize peer free list from static allocation.
	 */ /*
	 * Initialize our first association ID
	 */