FreeBSD/contrib/ntp/ntpdc/ntpdc_ops.c
/*
 * do_changekey - do grunge work of changing keys
 */
do grunge work of changing keys
do grunge work of changing keys
static void
do_changekey(
	struct parse *pcmd,
	FILE *fp,
	int req
	)
{
	u_long key;
	size_t items;
	size_t itemsize;
	const char *dummy;
	int res;
	key = htonl((u_int32)pcmd->argval[0].uval);
again:
	res = doquery(impl_ver, req, 1, 1, sizeof(u_int32),
		      (char *)&key, &items, &itemsize, &dummy, 0, 
		      sizeof(dummy));
	if (res == INFO_ERR_IMPL && impl_ver == IMPL_XNTPD) {
		impl_ver = IMPL_XNTPD_OLD;
		goto again;
	}
	if (res == 0)
	    (void) fprintf(fp, "done!\n");
	return;
}
static void do_changekey ( struct parse * pcmd , FILE * fp , int req ) { u_long key ; size_t items ; size_t itemsize ; const char * dummy ; int res ; key = htonl ( ( u_int32 ) pcmd -> argval [ 0 ] . uval ) ; again : res = doquery ( impl_ver , req , 1 , 1 , sizeof ( u_int32 ) , ( char * ) & key , & items , & itemsize , & dummy , 0 , sizeof ( dummy ) ) ; if ( res == INFO_ERR_IMPL && impl_ver == IMPL_XNTPD ) { impl_ver = IMPL_XNTPD_OLD ; goto again ; } if ( res == 0 ) ( void ) fprintf ( fp , " \n " ) ; return ; }
do_changekey - do grunge work of changing keys
do_changekey - do grunge work of changing keys