FreeBSD/contrib/ntp/ntpq/ntpq-subs.c
/*
 * mreadlist - send a read variables request for multiple associations
 */
send a read variables request for multiple associations
send a read variables request for multiple associations
static void
mreadlist(
	struct parse *pcmd,
	FILE *fp
	)
{
	int i;
	int from;
	int to;
	if (!findassidrange(pcmd->argval[0].uval, pcmd->argval[1].uval,
			    &from, &to, fp))
		return;
	for (i = from; i <= to; i++) {
		if (i != from)
			fprintf(fp, "\n");
		if (!dolist(g_varlist, assoc_cache[i].assid,
			    CTL_OP_READVAR, TYPE_PEER, fp))
			return;
	}
	return;
}
static void mreadlist ( struct parse * pcmd , FILE * fp ) { int i ; int from ; int to ; if ( ! findassidrange ( pcmd -> argval [ 0 ] . uval , pcmd -> argval [ 1 ] . uval , & from , & to , fp ) ) return ; for ( i = from ; i <= to ; i ++ ) { if ( i != from ) fprintf ( fp , " \n " ) ; if ( ! dolist ( g_varlist , assoc_cache [ i ] . assid , CTL_OP_READVAR , TYPE_PEER , fp ) ) return ; } return ; }
mreadlist - send a read variables request for multiple associations
mreadlist - send a read variables request for multiple associations