/** read expi ince keytag owner from cmdline */ static void parse_cmdline(char *argv[], struct keysets* s) { s->expi = convert_timeval(argv[1]); s->incep = convert_timeval(argv[2]); s->keytag = (uint16_t)atoi(argv[3]); s->owner = argv[4]; s->flags = DNSKEY_BIT_ZSK; /* to enforce signing */ }
int msntp_get_offset(char *hostname, int port, struct timeval *offset) { int ret; double offset_d; setup(hostname, port); operation = op_client; if (ret = run_client(&hostname, 1, &offset_d)) return ret; *offset = convert_timeval(offset_d); return 0; }
int msntp_get_time(char *hostname, int port, struct timeval *server_time) { int ret; double offset; setup(hostname, port); operation = op_client; if (ret = run_client(&hostname, 1, &offset)) return ret; *server_time = convert_timeval(current_time(offset)); return 0; }