FreeBSD/contrib/ntp/ntpq/ntpq.c
/*
 * keyid - get a keyid to use for authenticating requests
 */
get a keyid to use for authenticating requests
get a keyid to use for authenticating requests
static void
keyid(
	struct parse *pcmd,
	FILE *fp
	)
{
	if (pcmd->nargs == 0) {
		if (info_auth_keyid == 0)
		    (void) fprintf(fp, "no keyid defined\n");
		else
		    (void) fprintf(fp, "keyid is %lu\n", (u_long)info_auth_keyid);
	} else {
		if(pcmd->argval[0].uval > NTP_MAXKEY)
		    (void) fprintf(fp, "Invalid key identifier\n");
		info_auth_keyid = pcmd->argval[0].uval;
	}
}
static void keyid ( struct parse * pcmd , FILE * fp ) { if ( pcmd -> nargs == 0 ) { if ( info_auth_keyid == 0 ) ( void ) fprintf ( fp , " \n " ) ; else ( void ) fprintf ( fp , " \n " , ( u_long ) info_auth_keyid ) ; } else { if ( pcmd -> argval [ 0 ] . uval > NTP_MAXKEY ) ( void ) fprintf ( fp , " \n " ) ; info_auth_keyid = pcmd -> argval [ 0 ] . uval ; } }
keyid - get a keyid to use for authenticating requests
keyid - get a keyid to use for authenticating requests
/* allow zero so that keyid can be cleared. */