FreeBSD/contrib/ntp/ntpdc/ntpdc.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 && !keyid_entered)
		    (void) fprintf(fp, "no keyid defined\n");
		else if (info_auth_keyid == 0 && keyid_entered)
		    (void) fprintf(fp, "no keyid will be sent\n");
		else
		    (void) fprintf(fp, "keyid is %lu\n", (u_long)info_auth_keyid);
	} else {
		info_auth_keyid = pcmd->argval[0].uval;
		keyid_entered = 1;
	}
}
static void keyid ( struct parse * pcmd , FILE * fp ) { if ( pcmd -> nargs == 0 ) { if ( info_auth_keyid == 0 && ! keyid_entered ) ( void ) fprintf ( fp , " \n " ) ; else if ( info_auth_keyid == 0 && keyid_entered ) ( void ) fprintf ( fp , " \n " ) ; else ( void ) fprintf ( fp , " \n " , ( u_long ) info_auth_keyid ) ; } else { info_auth_keyid = pcmd -> argval [ 0 ] . uval ; keyid_entered = 1 ; } }
keyid - get a keyid to use for authenticating requests
keyid - get a keyid to use for authenticating requests