FreeBSD/contrib/ntp/ntpq/ntpq-subs.c
/*
 * another_ifstats_field - helper for ifstats()
 *
 * If all fields for the row have been received, print it.
 */
helper for ifstats()
If all fields for the row have been received, print it.
helper for ifstats () If all fields for the row have been received print it .
static void
another_ifstats_field(
	int *		pfields,
	ifstats_row *	prow,
	FILE *		fp
	)
{
	u_int ifnum;
	(*pfields)++;
	if (IFSTATS_FIELDS > *pfields)	
		return;
	fprintf(fp,
		"%3u %-24.24s %c %4x %3d %2d %6d %6d %6d %5d %8d\n"
		"    %s\n",
		prow->ifnum, prow->name,
		(prow->enabled)
		    ? '.'
		    : 'D',
		prow->flags, prow->ttl, prow->mcast_count,
		prow->received, prow->sent, prow->send_errors,
		prow->peer_count, prow->uptime, sptoa(&prow->addr));
	if (!SOCK_UNSPEC(&prow->bcast))
		fprintf(fp, "    %s\n", sptoa(&prow->bcast));
	ifnum = prow->ifnum;
	ZERO(*prow);
	prow->ifnum = ifnum;
}
static void another_ifstats_field ( int * pfields , ifstats_row * prow , FILE * fp ) { u_int ifnum ; ( * pfields ) ++ ; if ( IFSTATS_FIELDS > * pfields ) return ; fprintf ( fp , " \n " " \n " , prow -> ifnum , prow -> name , ( prow -> enabled ) ? ' ' : ' ' , prow -> flags , prow -> ttl , prow -> mcast_count , prow -> received , prow -> sent , prow -> send_errors , prow -> peer_count , prow -> uptime , sptoa ( & prow -> addr ) ) ; if ( ! SOCK_UNSPEC ( & prow -> bcast ) ) fprintf ( fp , " \n " , sptoa ( & prow -> bcast ) ) ; ifnum = prow -> ifnum ; ZERO ( * prow ) ; prow -> ifnum = ifnum ; }
another_ifstats_field - helper for ifstats()
 If all fields for the row have been received, print it.
another_ifstats_field - helper for ifstats () If all fields for the row have been received print it .
/* we understand 12 tags */ /*
	"    interface name                                        send\n"
	" #  address/broadcast     drop flag ttl mc received sent failed peers   uptime\n"
	"==============================================================================\n");
	 */