003 File Manager
Current Path:
/usr/src/contrib/ntp/ntpd
usr
/
src
/
contrib
/
ntp
/
ntpd
/
📁
..
📄
Makefile.am
(13.57 KB)
📄
Makefile.in
(78.52 KB)
📄
check_y2k.c
(15.73 KB)
📄
cmd_args.c
(4.25 KB)
📄
complete.conf.in
(3.35 KB)
📄
declcond.h
(793 B)
📄
invoke-ntp.conf.menu
(56 B)
📄
invoke-ntp.conf.texi
(104.37 KB)
📄
invoke-ntp.keys.menu
(56 B)
📄
invoke-ntp.keys.texi
(3.21 KB)
📄
invoke-ntpd.menu
(49 B)
📄
invoke-ntpd.texi
(23.68 KB)
📄
jupiter.h
(9.1 KB)
📄
keyword-gen-utd
(57 B)
📄
keyword-gen.c
(21.99 KB)
📄
ntp.conf.5man
(115.01 KB)
📄
ntp.conf.5mdoc
(101.72 KB)
📄
ntp.conf.def
(100.75 KB)
📄
ntp.conf.html
(126.28 KB)
📄
ntp.conf.man.in
(115.01 KB)
📄
ntp.conf.mdoc.in
(101.71 KB)
📄
ntp.conf.texi
(1.19 KB)
📄
ntp.keys.5man
(3.99 KB)
📄
ntp.keys.5mdoc
(4.25 KB)
📄
ntp.keys.def
(3.65 KB)
📄
ntp.keys.html
(8.37 KB)
📄
ntp.keys.man.in
(3.99 KB)
📄
ntp.keys.mdoc.in
(4.24 KB)
📄
ntp.keys.texi
(1.2 KB)
📄
ntp_config.c
(117.55 KB)
📄
ntp_control.c
(123.14 KB)
📄
ntp_crypto.c
(117.09 KB)
📄
ntp_filegen.c
(13.42 KB)
📄
ntp_io.c
(112.21 KB)
📄
ntp_keyword.h
(73.49 KB)
📄
ntp_leapsec.c
(31.18 KB)
📄
ntp_leapsec.h
(10.95 KB)
📄
ntp_loopfilter.c
(40.05 KB)
📄
ntp_monitor.c
(13.43 KB)
📄
ntp_parser.c
(130.65 KB)
📄
ntp_parser.h
(11.36 KB)
📄
ntp_peer.c
(27.66 KB)
📄
ntp_prio_q.c
(4.54 KB)
📄
ntp_proto.c
(150.76 KB)
📄
ntp_refclock.c
(43.87 KB)
📄
ntp_request.c
(67.25 KB)
📄
ntp_restrict.c
(19.06 KB)
📄
ntp_scanner.c
(20.74 KB)
📄
ntp_scanner.h
(4.43 KB)
📄
ntp_signd.c
(5.24 KB)
📄
ntp_timer.c
(17.69 KB)
📄
ntp_util.c
(22.66 KB)
📄
ntpd-opts.c
(71.91 KB)
📄
ntpd-opts.def
(17.55 KB)
📄
ntpd-opts.h
(14.57 KB)
📄
ntpd.1ntpdman
(32.03 KB)
📄
ntpd.1ntpdmdoc
(29.07 KB)
📄
ntpd.c
(42.16 KB)
📄
ntpd.html
(49.68 KB)
📄
ntpd.man.in
(32.03 KB)
📄
ntpd.mdoc.in
(29.07 KB)
📄
ntpd.texi
(3.25 KB)
📄
ntpdbase-opts.def
(13.21 KB)
📄
ntpsim.c
(17.11 KB)
📄
ppsapi_timepps.h
(497 B)
📄
psl0.conf
(25 B)
📄
psl1.conf
(25 B)
📄
psl2.conf
(37 B)
📄
rc_cmdlength.c
(800 B)
📄
refclock_acts.c
(22.66 KB)
📄
refclock_arbiter.c
(12.15 KB)
📄
refclock_arc.c
(46.85 KB)
📄
refclock_as2201.c
(11.09 KB)
📄
refclock_atom.c
(6.63 KB)
📄
refclock_bancomm.c
(16.11 KB)
📄
refclock_chronolog.c
(7.61 KB)
📄
refclock_chu.c
(45.28 KB)
📄
refclock_conf.c
(7.25 KB)
📄
refclock_datum.c
(22.3 KB)
📄
refclock_dumbclock.c
(8.42 KB)
📄
refclock_fg.c
(6.89 KB)
📄
refclock_gpsdjson.c
(58 KB)
📄
refclock_gpsvme.c
(7.77 KB)
📄
refclock_heath.c
(12.97 KB)
📄
refclock_hopfpci.c
(5.69 KB)
📄
refclock_hopfser.c
(7.41 KB)
📄
refclock_hpgps.c
(16.38 KB)
📄
refclock_irig.c
(30.05 KB)
📄
refclock_jjy.c
(144.27 KB)
📄
refclock_jupiter.c
(25.66 KB)
📄
refclock_leitch.c
(13.27 KB)
📄
refclock_local.c
(5.72 KB)
📄
refclock_msfees.c
(44.66 KB)
📄
refclock_mx4200.c
(41.72 KB)
📄
refclock_neoclock4x.c
(29.08 KB)
📄
refclock_nmea.c
(50.6 KB)
📄
refclock_oncore.c
(121.54 KB)
📄
refclock_palisade.c
(35.15 KB)
📄
refclock_palisade.h
(6.52 KB)
📄
refclock_parse.c
(160.87 KB)
📄
refclock_pcf.c
(4.79 KB)
📄
refclock_pst.c
(8.09 KB)
📄
refclock_ripencc.c
(118.21 KB)
📄
refclock_shm.c
(16.96 KB)
📄
refclock_tpro.c
(4.69 KB)
📄
refclock_true.c
(25.3 KB)
📄
refclock_tsyncpci.c
(28.35 KB)
📄
refclock_tt560.c
(6.12 KB)
📄
refclock_ulink.c
(15.64 KB)
📄
refclock_wwv.c
(79.32 KB)
📄
refclock_wwvb.c
(15.71 KB)
📄
refclock_zyfer.c
(7.38 KB)
Editing: cmd_args.c
/* * cmd_args.c = command-line argument processing */ #ifdef HAVE_CONFIG_H # include <config.h> #endif #include "ntpd.h" #include "ntp_stdlib.h" #include "ntp_config.h" #include "ntp_cmdargs.h" #include "ntpd-opts.h" /* * Definitions of things either imported from or exported to outside */ extern char const *progname; #ifdef HAVE_NETINFO extern int check_netinfo; #endif /* * getCmdOpts - apply most command line options * * A few options are examined earlier in ntpd.c ntpdmain() and * ports/winnt/ntpd/ntservice.c main(). */ void getCmdOpts( int argc, char ** argv ) { extern const char *config_file; int errflg; /* * Initialize, initialize */ errflg = 0; if (ipv4_works && ipv6_works) { if (HAVE_OPT( IPV4 )) ipv6_works = 0; else if (HAVE_OPT( IPV6 )) ipv4_works = 0; } else if (!ipv4_works && !ipv6_works) { msyslog(LOG_ERR, "Neither IPv4 nor IPv6 networking detected, fatal."); exit(1); } else if (HAVE_OPT( IPV4 ) && !ipv4_works) msyslog(LOG_WARNING, "-4/--ipv4 ignored, IPv4 networking not found."); else if (HAVE_OPT( IPV6 ) && !ipv6_works) msyslog(LOG_WARNING, "-6/--ipv6 ignored, IPv6 networking not found."); if (HAVE_OPT( AUTHREQ )) proto_config(PROTO_AUTHENTICATE, 1, 0., NULL); else if (HAVE_OPT( AUTHNOREQ )) proto_config(PROTO_AUTHENTICATE, 0, 0., NULL); if (HAVE_OPT( BCASTSYNC )) proto_config(PROTO_BROADCLIENT, 1, 0., NULL); if (HAVE_OPT( CONFIGFILE )) { config_file = OPT_ARG( CONFIGFILE ); #ifdef HAVE_NETINFO check_netinfo = 0; #endif } if (HAVE_OPT( DRIFTFILE )) stats_config(STATS_FREQ_FILE, OPT_ARG( DRIFTFILE ), 0); if (HAVE_OPT( PANICGATE )) allow_panic = TRUE; if (HAVE_OPT( FORCE_STEP_ONCE )) force_step_once = TRUE; #ifdef HAVE_DROPROOT if (HAVE_OPT( JAILDIR )) { droproot = 1; chrootdir = OPT_ARG( JAILDIR ); } #endif if (HAVE_OPT( KEYFILE )) getauthkeys(OPT_ARG( KEYFILE )); if (HAVE_OPT( PIDFILE )) stats_config(STATS_PID_FILE, OPT_ARG( PIDFILE ), 0); if (HAVE_OPT( QUIT )) mode_ntpdate = TRUE; if (HAVE_OPT( PROPAGATIONDELAY )) do { double tmp; const char *my_ntp_optarg = OPT_ARG( PROPAGATIONDELAY ); if (sscanf(my_ntp_optarg, "%lf", &tmp) != 1) { msyslog(LOG_ERR, "command line broadcast delay value %s undecodable", my_ntp_optarg); } else { proto_config(PROTO_BROADDELAY, 0, tmp, NULL); } } while (0); if (HAVE_OPT( STATSDIR )) stats_config(STATS_STATSDIR, OPT_ARG( STATSDIR ), 0); if (HAVE_OPT( TRUSTEDKEY )) { int ct = STACKCT_OPT( TRUSTEDKEY ); const char** pp = STACKLST_OPT( TRUSTEDKEY ); do { u_long tkey; const char* p = *pp++; tkey = (int)atol(p); if (tkey == 0 || tkey > NTP_MAXKEY) { msyslog(LOG_ERR, "command line trusted key %s is invalid", p); } else { authtrust(tkey, 1); } } while (--ct > 0); } #ifdef HAVE_DROPROOT if (HAVE_OPT( USER )) { droproot = 1; user = estrdup(OPT_ARG( USER )); group = strrchr(user, ':'); if (group != NULL) { size_t len; *group++ = '\0'; /* get rid of the ':' */ len = group - user; group = estrdup(group); user = erealloc(user, len); } } #endif if (HAVE_OPT( VAR )) { int ct; const char ** pp; const char * v_assign; ct = STACKCT_OPT( VAR ); pp = STACKLST_OPT( VAR ); do { v_assign = *pp++; set_sys_var(v_assign, strlen(v_assign) + 1, RW); } while (--ct > 0); } if (HAVE_OPT( DVAR )) { int ct = STACKCT_OPT( DVAR ); const char** pp = STACKLST_OPT( DVAR ); do { const char* my_ntp_optarg = *pp++; set_sys_var(my_ntp_optarg, strlen(my_ntp_optarg)+1, (u_short) (RW | DEF)); } while (--ct > 0); } if (HAVE_OPT( SLEW )) loop_config(LOOP_MAX, 600); if (HAVE_OPT( UPDATEINTERVAL )) { long val = OPT_VALUE_UPDATEINTERVAL; if (val >= 0) interface_interval = val; else { fprintf(stderr, "command line interface update interval %ld must not be negative\n", val); msyslog(LOG_ERR, "command line interface update interval %ld must not be negative", val); errflg++; } } /* save list of servers from cmd line for config_peers() use */ if (argc > 0) { cmdline_server_count = argc; cmdline_servers = argv; } /* display usage & exit with any option processing errors */ if (errflg) optionUsage(&ntpdOptions, 2); /* does not return */ }
Upload File
Create Folder