From: Harlan Stenn Date: Tue, 23 Apr 2002 01:15:21 +0000 (-0400) Subject: Simulator option fixes. X-Git-Tag: NTP_4_1_73~158^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5b53a41bbee6eda166fc54a98ee7087fc46b14df;p=thirdparty%2Fntp.git Simulator option fixes. libntpsim.a dependency cleanup. bk: 3cc4b5a9c4spNf8iiS27u_PhZzhPZg --- diff --git a/libntp/Makefile.am b/libntp/Makefile.am index 4742330686..b66679b708 100644 --- a/libntp/Makefile.am +++ b/libntp/Makefile.am @@ -1,6 +1,7 @@ #AUTOMAKE_OPTIONS = ../ansi2knr no-dependencies AUTOMAKE_OPTIONS = ../util/ansi2knr noinst_LIBRARIES = libntp.a @MAKE_LIBNTPSIM@ +EXTRA_LIBRARIES = libntpsim.a libntp_a_SRCS = a_md5encrypt.c adjtime.c atoint.c atolfp.c atouint.c \ audio.c authkeys.c authreadkeys.c authusekey.c binio.c buftvtots.c \ caljulian.c calleapwhen.c caltontp.c calyearstart.c clocktime.c \ diff --git a/ntpd/cmd_args.c b/ntpd/cmd_args.c index 9f61b4a8cb..0b81d24671 100644 --- a/ntpd/cmd_args.c +++ b/ntpd/cmd_args.c @@ -9,13 +9,18 @@ #include "ntp_stdlib.h" #include "ntp_cmdargs.h" +#ifdef SIM +#include "ntpsim.h" +#endif /* SIM */ + /* * Definitions of things either imported from or exported to outside */ extern char const *progname; int listen_to_virtual_ips = 0; -static const char *ntp_options = "aAbc:dD:f:gk:l:LmnN:p:P:qr:s:t:v:V:x"; + +static const char *ntp_options = "aAbc:dD:f:gJ:k:l:LmnN:O:p:P:qr:s:t:T:W:v:V:x"; #ifdef HAVE_NETINFO extern int check_netinfo; @@ -292,7 +297,23 @@ getCmdOpts( case 'x': allow_step = FALSE; break; - +#ifdef SIM + case 'T': + ntp_node.ferr = (double)atof(ntp_optarg); + break; + case 'O': + ntp_node.clk_time = + ntp_node.time+((double)atof(ntp_optarg)/1e6); + ntp_node.ntp_time = + ntp_node.time+((double)atof(ntp_optarg)/1e6); + break; + case 'W': + ntp_node.fnse = (double)atof(ntp_optarg); + break; + case 'J': + ntp_node.nnse = (double)atof(ntp_optarg); + break; +#endif /* SIM */ default: errflg++; break;